I'm using KWWidgets to develop a medical image viewer application. What I'm trying to display is brain scans from an MRI scanner.<br><br>For the KWWidgets heads, I'm using a vtkKWRenderWidget, which is a collection of VTK objects in order to render the brain volume as a series of 2D slices.
<br><br>For VTK people, this uses a combination of a vtkImageViewer2 and a vtkRenderWindow.<br><br>The problem comes from the fact that each image voxel is not square. In each slice, a pixel represents a 1mm by 1mm square, but the inter-slice distance is 3mm.
<br><br>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.
<br><br>I attempted to fix this by using the vtkViewport::SetPixelAspect method on the vtkRenderer. This appears to do nothing at all.<br><br>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.
<br><br>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.<br><br>