BUG: Fixes py_NeurosurgicalPlanningTutorial test

Beside of memory leak and error related to the glyphing pipeline (captured
by issue #3349).
The script can be successfully replayed within Slicer or if executed
using CTest with a Slicer build without leak detection.

// ---------------------------
Errors:

565: ERROR: In /home/jchris/Projects/Slicer-AHM-Superbuild-Release/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727
565: vtkStreamingDemandDrivenPipeline (0x957b600): Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x957b370) has 0 connections but is not optional.
565:
565:
565: ERROR: In /home/jchris/Projects/Slicer-AHM/Libs/vtkTeem/vtkDiffusionTensorGlyph.cxx, line 222
565: vtkDiffusionTensorGlyph (0xcd1db10): No data to glyph!
// ---------------------------

// ---------------------------
Leaks:

565: vtkDebugLeaks has detected LEAKS!
565: Class "vtkSynchronizedTemplatesCutter3D" has 21 instances still around.
565: Class "vtkTransformPolyDataFilter" has 21 instances still around.
565: Class "vtkInformationVector" has 441 instances still around.
565: Class "vtkMatrix4x4" has 42 instances still around.
565: Class "vtkCoordinate" has 42 instances still around.
565: Class "vtkPlane" has 21 instances still around.
565: Class "vtkInformation" has 525 instances still around.
565: Class "vtkSynchronizedTemplates3D" has 21 instances still around.
565: Class "vtkActor2D" has 21 instances still around.
565: Class "vtkRectilinearSynchronizedTemplates" has 21 instances still around.
565: Class "vtkDoubleArray" has 105 instances still around.
565: Class "vtkAlgorithmOutput" has 21 instances still around.
565: Class "vtkInformationIntegerValue" has 378 instances still around.
565: Class "vtkOpenGLPolyDataMapper2D" has 21 instances still around.
565: Class "vtkGridSynchronizedTemplates3D" has 21 instances still around.
565: Class "vtkCutter" has 21 instances still around.
565: Class "vtkInformationExecutivePortVectorValue" has 21 instances still around.
565: Class "vtkContourValues" has 105 instances still around.
565: Class "vtkTransform" has 21 instances still around.
565: Class "vtkStreamingDemandDrivenPipeline" has 42 instances still around.
565: Class "vtkTimerLog" has 21 instances still around.
565: Class "vtkInformationExecutivePortValue" has 21 instances still around.

// ---------------------------

Fixes #2808

Co-authored-by: Jean-Christophe Fillion-Robin <JChris.FillionR@kitware.com>

From: Chrystel Juan <chrystel.juan@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22397 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix issues causing inability to import multi-frame data from individual non-DICOM files, attempt to fix 3299


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22398 3bd1e089-480b-0410-8dfb-8563597acbee