[vtkusers] Question about image resampling

David Gobbi dgobbi at atamai.com
Mon Oct 30 10:13:43 EST 2006


Hi Pankaj,

I think that what you want is this:

reslice->TransformInputSamplingOff();
reslice->AutoCropOutputOff();

That should cause vtkImageReslice to automatically produce an output 
with the same spacing, origin, and dimensions as the input, so that you 
will not have to re-resample the output.

 - David



Pankaj Daga wrote:
> Hi everyone,
>
> I do some oeprations on an image and then I need to save a resulting 
> image. Now to generate the resulting image, I use the output from 
> vtkImageReslice which has changed the image dimensions according to 
> the output spacing and output extent parameters. However, I want to 
> save the resulting image with the same size as the input image.
>
> Does anyone know what is the best way to resample the output image and 
> convert it to the same image dimensions as the input image? Some code 
> snippet would be really appreciated.
>
> Best wishes,
> P
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   




More information about the vtkusers mailing list