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

Dean Inglis dean.inglis at sympatico.ca
Sat Mar 24 03:33:54 EDT 2007


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?




More information about the vtkusers mailing list