You can use vtkImageChangeInformation to change the spacing so your pixels will be displayed the way you want but without changing the data itself<br><br><div><span class="gmail_quote">On 3/24/07, <b class="gmail_sendername">
Dean Inglis</b> <<a href="mailto:dean.inglis@sympatico.ca">dean.inglis@sympatico.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Nothing is displayed incorrectly. You have anisotropic spacing, so<br>the vtkImageActor is displaying anisotropic pixels in plane whatever<br>plane you ask it to display. For example, if you have a coronal<br>scan of the brain taken with in plane resolution =
0.2 mm x 0.2 mm, such<br>that x-y plane is coronal with x running from left to right ear, and<br>y running from jaw to top of head and out of plane resolution = 1 mm<br>such that z is running from back of head to nose, when you use
<br>vtkImageViewer2 and SetOrientationToXY you will see a coronal<br>image with isotropic pixels 0.2 mm (x) x 0.2 mm (y). If you ask for an<br>axial reconstruction in the x-z plane (SetOrientationToXZ) such that<br>z runs from back of head to nose and x runs from left to right ear, you
<br>will see an axial image with anisotropic in plane resolution of 0.2 mm (x) x<br>1 mm (z).<br>If you ask for a saggital reconstruction in the y-z plane such that z runs<br>from back of head to nose and y runs from jaw to top of head, you will
<br>see a sagittal image with anisotropic in plane resolution of 0.2 mm (y) x 1<br>mm (z).<br>The vtkImageActor in vtkImageViewer2 is displaying the true nature of<br>the data: it is anisotropic. vtkImageActor does not try to "account" for
<br>this by<br>resampling to make it isotropic and so it is in fact correct. Ask yourself<br>if when you observe the out of plane images, do the reconstructions look<br>anatomically correct in terms of scale? If you want to view a 3D dataset,
<br>have a look at VTK/Examples/GUI/Tcl for a simultaneous 3D multi-slice view<br>using<br>vtkImagePlaneWidget, or use vtkImageOrthoPlanes.<br><br>hth,<br>Dean<br><br>So the first image is spaced 0.9375, 0.935, 1.5, and the second and third
<br>are spaced 1, 3, 1.<br><br>What I have been doing is chainging the input to the ImageViewer in order to<br>flip between the 3 images. If I get what you're saying, the images spaced<br>1,3,1 are displayed incorrectly because the size of a pixel in the XY plane
<br>isn't square.<br><br>This doesn't make sense to me -- if it accounts for anisotropic spacing,<br>shouldn't it do so in all directions?<br><br>_______________________________________________<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>