[IGSTK-Developers] Hi, question about ImageSpatialObjectRepresentation code

David Gobbi dgobbi at atamai.com
Mon Nov 14 19:00:07 EST 2005


Hi James,

You're right, vtkImageReslice can be used for orthogonal and oblique
slices, but even if ImageSpatialObjectRepresentation uses
vtkImageReslice to extract the slice, it should still use vtkImageActor
to display it (but vtkImageActor would not be used to select the
orientation, and probably not the slice number either).

The trick is that whatever transform is used as the ResliceTransform for
vtkImageReslice, the exact same transform also has to be used as the
UserTransform for the vtkImageActor. That ensures that all of the pixels
in the resliced image are displayed at the correct position in 3D space.

It is also necessary to make sure that the OutputExtent of
vtkImageReslice and the DisplayExtent of vtkImageActor are matched to
one another.

And here is where I start rambling...

Choosing the pixel spacing for the oblique slice is difficult if the
original voxel spacing of the image is not isotropic. I have used two
different ways to choose the pixel spacing:

1) Use the direction cosines of the oblique slice to calculate an
"oblique" pixel spacing based on a weighted combination of the original
x, y, and z spacings

2) My favorite method: if the View is a parallel projection (like most
2D views) then it is possible to calculate exactly how many millimetres,
in patient coordinates, there are per screen pixel on the monitor. Then
the OutputExtent, OutputSpacing and OutputOrigin of vtkImageReslice can
be set so that each pixel in the resliced image maps to a screen pixel
in the View2D.

I prefer (2) because it uses vtkImageReslice to combine the reslicing
and the image zoom into one trilinear interpolation step. In method (1),
vtkImageReslice performs trilinear interpolation for the oblique
reslicing, and then vtkImageActor applies a bilinear interpolation step
to achieve the zoom. Because two interpolations steps are done, method
(1) provides an image that is less true to the original.

- David




Hui Zhang wrote:

>Hi,
>
>I check the current ImageSpatialObject / ImageSpatialObjectRepresentation code from IGSTK and find it is easy to use this class to display the 2D slice image from Axial / Sagittal / Coronal view. The code use the vtkImageActor to set the orientation and slice number, as below:
>
>switch( m_Orientation )
>    {
>    case Axial:
>      m_ImageActor->SetDisplayExtent( ext[0], ext[1], ext[2], ext[3], m_SliceNumber, m_SliceNumber );
>      break;
>    case Sagittal:
>      m_ImageActor->SetDisplayExtent( m_SliceNumber, m_SliceNumber, ext[2], ext[3], ext[4], ext[5] );
>      break;
>    case Coronal:
>      m_ImageActor->SetDisplayExtent( ext[0], ext[1], m_SliceNumber, m_SliceNumber, ext[4], ext[5] );
>      break;
>    }
>
>My question is, through this category, we can't display any oblique image slice and integrate them into the same class. If the surgeons need get oblique view along the planned path or tracked tool, or even slab-MIP view, the program can't make any use of the existed ImageSpatialObjectRepresentation class. That means, we'll have two different ImageRepresenation classes, one for the fixed-axis, and one for the oblique axis. What we did before in our current navigation system is, we use vtkImageReslice instead of vtkImageActor, and made the orthogonal image representations (Axial / Coronal / Sagittal) are three specific oblique views. So, in my question, can we implement with vtkImageReslice in ImageSpatialObjectRepresentation class, instead of vtkImageActor? And from this implementation, the orthogonal image representation can be easily a derived class or just three specific settings.
>
>Regards,
>
>---------------------------------------------------------------------------------------------
>Hui (James) Zhang, Ph.D.                 
>  
>Imaging Science and Information Systems (ISIS) Center
>Department of Radiology                    
>Georgetown University Medical Center       
>2115 Wisconsin Avenue, Suite 603           
>Washington, DC, 20007                      
>
>Work phone: 202-687-2902
>Work fax: 202-784-3479
>Cell phone: 240-476-9361
>MSN: zh_skyfox at hotmail.com
>----------------------------------------------------------------------------------------------
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>IGSTK-Developers mailing list
>IGSTK-Developers at public.kitware.com
>http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>  
>




More information about the IGSTK-Developers mailing list