[vtkusers] Layers of vtkImageStack not visible
ochampao
ochampao at hotmail.com
Tue May 22 05:41:49 EDT 2018
Hi vtkUsers,
I am developing an application that uses 3 vtkImageStack instances for
overlaying multiple layers of vtkImageSlice's. Each vtkImageStack
corresponds to one of the anatomical views (axial, coronal, sagittal).
I am observing a peculiar behaviour which I cannot explain/fix. In
particular, although the 3 views use identical pipelines (except from camera
orientation/position), the vtkImageStack of axial view does not always
render all layers, whereas the coronal and sagittal views seem to be able to
render any number of layers.
In the attached screenshot below, you can see that the Second layer in the
Axial view is not visible, even when slicing though the volume:
<http://vtk.1045678.n5.nabble.com/file/t341857/vtkImageStackIssue.png>
In the example above the first volume is from a Dicom series whereas the
second from a Nifti file, but the same behaviour is observed when both
volumes are from Dicom. Also, applying the user matrix
(vtkImageSlice::SetUserMatrix()) does not seem to make any difference in the
observed behaviour.
I have attached the relevant sections of my source code here: QuadView.cxx
<http://vtk.1045678.n5.nabble.com/file/t341857/QuadView.cxx>
Brief explanation of the methods:
* initStaticPipeline(): initializes the 3 empty views and configures each
vtkImageStack
* addImage(): is called whenever a new volume is loaded
* renderViews2D(): forces the 3 views to render
* resetCameras2D(): resets the 3 cameras and configures camera orientation
and position.
Does anyone have any ideas why this behaviour is observed and how to fix it?
Thanks for your help.
Panos.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list