I&#39;m using KWWidgets to develop a medical image viewer application.&nbsp; What I&#39;m trying to display is brain scans from an MRI scanner.<br><br>For the KWWidgets heads, I&#39;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.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; 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?&nbsp; This is radiological data so it isn&#39;t acceptable to resample the image data into isotropic voxels.<br><br>