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

kent williams nkwmailinglists at gmail.com
Fri Mar 23 14:54:20 EDT 2007


OK, I think I get what you're saying.  Here's my problem:  I'm displaying
images that are anisotropic in the X or Y direction.

This is a consequence of the way the data was acquired -- I'm displaying 3
brainscans, the first which is scanned Coronal ( i.e. back of the head to
the front) and the other two are scanned Sagittal  (i.e. left ear to  right
ear).

When I read the images using ITK I re-orient the Sagittal scans to Coronal.
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?


On 3/23/07, Dean Inglis <dean.inglis at camris.ca> wrote:
>
> 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.
> _______________________________________________
> 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/20070323/b8bfd371/attachment.htm>


More information about the vtkusers mailing list