[vtkusers] vtkImageResample, vtkImageReslice and WholeExtent

ianl ilindsay at insigniamedical.co.uk
Thu Apr 12 04:55:35 EDT 2012


Hi all,

Can anyone shed any light on this one. I am using vtkImageResample to
resample and re-orientate a volume of image data. The resulting output
extents don't seem to get re-orientated - ie they are the same as the input
extents if the image resample scaling is 1. It is my understanding that if
AutoCropOutput (on vtkImageReslice, vtkImageResample's base class) is set on
and TransformInputSampling is set on, the original extents are permuted
through the reslice axes.

I have done a bit of investigation, and it seems that
vtkImageReslice::GetAutoCroppedOutputBounds() never gets called when using
the resample derived class as vtkImageResample overrides RequestInformation
which does not seem to take this into account.

I have read elsewhere that it is best to set output extent, origin and
spacing externally, rather than rely on the default calculation. However,
all I would do to calculate the extents is take the original eight corner
points, run them through the relevent transforms and work out their max and
min extents on each axis to get an enclosing volume. This seems to be more
or less what GetAutoCroppedOutputBounds is doing, so I might as well leave
it as the default setting.

If I do the re-orientate with vtkImageReslice then the resample as separate
steps, all is fine and the output extent seems correct.

Is this behaviour by design or is this a possible bug? I am using a VTK 5.10
build from a couple of months ago rather than the release candidate, so this
may have been addressed, although I have not spotted a specific fix for it
in the logs.

Thanks,
Ian Lindsay




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResample-vtkImageReslice-and-WholeExtent-tp5635028p5635028.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list