[vtkusers] How to display image data with anisotropic (non-square) voxels/pixels

Jesús Spí­nola jspinola at gmail.com
Fri Mar 30 12:13:22 EDT 2007


You can use vtkImageChangeInformation to change the spacing so your pixels
will be displayed the way you want but without changing the data itself

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


More information about the vtkusers mailing list