[vtkusers] How to display image data with anisotropic (non-square) voxels/pixels
Dean Inglis
dean.inglis at camris.ca
Fri Mar 23 13:22:45 EDT 2007
Hi Kent,
vktImageActor in vtkImageViewer2 is doing
what it should do when you have non-isotropic
voxels: the X-Z or Y-Z planes should show
elongated voxels in the z-dir if the x-y resolution
is isotropic and less the than out of plane (z) resolution.
To really see this, set the image actor's interpolation
on and off with SetInterpolate().
Unless your MRI data is acquired isotropically there
is not much else to do. You can use vtkImageResample to make
your data isotropic, but as you say, this is generally
not acceptable.
Dean
So when I run my program one orthogonal view -- i.e. looking at a slice in
the XY plane it is proportioned correctly. But if I look at a different
plane (XZ or YZ) the pixels appear squashed or stretched in either the X or
Y direction.
I attempted to fix this by using the vtkViewport::SetPixelAspect method on
the vtkRenderer. This appears to do nothing at all.
I spent quite some time with Google trying to figure out if anyone else had
solved this problem, with no luck. I read a lot of messages indicating that
SetPixelAspect was basically broken in 2003 or 2004, but never saw anywhere
that it was fixed.
Can anyone give me a clue as to how to fix this? This is radiological data
so it isn't acceptable to resample the image data into isotropic voxels.
More information about the vtkusers
mailing list