<div dir="ltr">I don't know why it is happening, but there are checks that you can try:<div><br></div><div>1) In QuadView.cxx after you call Render() on all the views, loop through the</div><div>axial image stack to verify that all of the images are actually present. Also,</div><div>you can call GetBounds() on the actor and on the mapper to see if the</div><div>size is as expected. Also, the bounds for the different data sets should</div><div>overlap. Since your UserMatrix is identity, the mapper and actor should</div><div>return the same bounds.</div><div><br></div><div>2) In the Property, set the Opacity to 0.5. Perhaps the layers aren't in the</div><div>correct order (I'm not sure why this would happen, but maybe your UIDs</div><div>aren't monotonically increasing as you add more data sets?)</div><div><br></div><div> - David</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 22, 2018 at 3:41 AM, ochampao <span dir="ltr"><<a href="mailto:ochampao@hotmail.com" target="_blank">ochampao@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi vtkUsers,<br>
<br>
I am developing an application that uses 3 vtkImageStack instances for<br>
overlaying multiple layers of vtkImageSlice's. Each vtkImageStack<br>
corresponds to one of the anatomical views (axial, coronal, sagittal). <br>
<br>
I am observing a peculiar behaviour which I cannot explain/fix. In<br>
particular, although the 3 views use identical pipelines (except from camera<br>
orientation/position), the vtkImageStack of axial view does not always<br>
render all layers, whereas the coronal and sagittal views seem to be able to<br>
render any number of layers.<br>
<br>
In the attached screenshot below, you can see that the Second layer in the<br>
Axial view is not visible, even when slicing though the volume:<br>
<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t341857/vtkImageStackIssue.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/file/t341857/<wbr>vtkImageStackIssue.png</a>> <br>
<br>
In the example above the first volume is from a Dicom series whereas the<br>
second from a Nifti file, but the same behaviour is observed when both<br>
volumes are from Dicom. Also, applying the user matrix<br>
(vtkImageSlice::SetUserMatrix(<wbr>)) does not seem to make any difference in the<br>
observed behaviour.<br>
<br>
I have attached the relevant sections of my source code here: QuadView.cxx<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t341857/QuadView.cxx" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/file/t341857/QuadView.cxx</a>> <br>
<br>
Brief explanation of the methods:<br>
* initStaticPipeline(): initializes the 3 empty views and configures each<br>
vtkImageStack<br>
* addImage(): is called whenever a new volume is loaded<br>
* renderViews2D(): forces the 3 views to render<br>
* resetCameras2D(): resets the 3 cameras and configures camera orientation<br>
and position.<br>
<br>
Does anyone have any ideas why this behaviour is observed and how to fix it?<br>
<br>
Thanks for your help.<br>
Panos.<br></blockquote></div></div></div></div>