[vtkusers] Question about image resampling
Pankaj Daga
deluded.soul at gmail.com
Mon Oct 30 11:07:38 EST 2006
Hi David,
Thanks for the tip! However, I am not using AutoCropOutput() and all that as
it never worked how I intended.
I mean, I could set the output extent etc. by hand again, but the output of
the reslicer is attached to a viewer and that would cause the viewer to also
change its output.
So, I was thinking that I could just resample the image again and that
should take care of everything.
Best regards,
Pankaj
On 10/30/06, David Gobbi <dgobbi at atamai.com> wrote:
>
> 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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061030/a859c338/attachment.htm>
More information about the vtkusers
mailing list