[vtkusers] Rotating image data

David Gobbi david.gobbi at gmail.com
Mon Jul 12 09:10:28 EDT 2010


On Mon, Jul 12, 2010 at 6:48 AM, Lic. José M. Rodriguez Bacallao
<jmrbcu at gmail.com> wrote:
> in your hybrid approach you said that yiou use vtkImageReslice for operations
> that require a regridding of the image (e.g. extracting oblique
> slices) and use either vtkImageReslice or the camera for doing
> operations like pan and zoom.
>
> a couple of questions:
> 1- when you said regridding (extracting oblique slices), do you
> include special cases of obliqueness: saggital, coronal and axial?

Not sure what you mean.  If the view is sagittal, coronal, or axial
then I do not consider it to be oblique.  In those cases, I do not
regrid the image unless I have additional reasons for doing so, e.g.
if I want to magnify them with cubic interpolation.

> 2- "and use either vtkImageReslice or the camera": what are the
> situation for using vtkImageReslice or the camera.

They are complex.  But in general, vtkImageReslice is used for oblique
views.  But my pipeline always uses both vtkImageReslice and the
camera at the same time, and trades off operations between the two.
It isn't simply an either/or.  For example, vtkImageReslice might
extract an oblique slice, and then the vtkCamera will do the
magnification.  Or, if I want do use cubic interpolation for the
magnification, then vtkImageReslice will do both the oblique
extraction and the magnification.

> 3- what do you think of these pipelines:
>
>    For simply viewing axial slices, change between them, etc:
>        vtkGDCMImageReader -> vtkImageMapToWindowLevelColors2 ->
> vtkImageActor -> vtkRenderer -> vtkRenderWindow
>
>    For extracting oblique slices (sagittal, coronal, axial, obliques)
> and change between them, something like an MPR view:
>        vtkGDCMImageReader ->vtkImageReslice ->
> vtkImageMapToWindowLevelColors2 -> vtkImageActor -> vtkRenderer ->
> vtkRenderWindow

Both pipelines will work.  I always just use vtkImageMapToColors
myself, I never saw any advantage in using
vtkImageMapToWindowLevelColors.

One thing to note is that indexed images (i.e. label images) must be
dealt with as a special case, because indexes cannot be interpolated
the way that continuous images can be.  For indexed images, the color
mapping has to come before vtkImageReslice, instead of after.  In fact
color mapping before reslicing is always preferable for the best
display quality (it reduces banding artifacts), but it is seldom done
because it is less efficient.

  David



More information about the vtkusers mailing list