Hi David,<br><br>Thanks for the tip! However, I am not using AutoCropOutput() and all that as it never worked how I intended.<br><br>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.
<br><br>So, I was thinking that I could just resample the image again and that should take care of everything.<br><br>Best regards,<br><br>Pankaj<br><br><div><span class="gmail_quote">On 10/30/06, <b class="gmail_sendername">
David Gobbi</b> <<a href="mailto:dgobbi@atamai.com">dgobbi@atamai.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Pankaj,<br><br>I think that what you want is this:<br><br>reslice->TransformInputSamplingOff();<br>reslice->AutoCropOutputOff();<br><br>That should cause vtkImageReslice to automatically produce an output<br>with the same spacing, origin, and dimensions as the input, so that you
<br>will not have to re-resample the output.<br><br> - David<br><br><br><br>Pankaj Daga wrote:<br>> Hi everyone,<br>><br>> I do some oeprations on an image and then I need to save a resulting<br>> image. Now to generate the resulting image, I use the output from
<br>> vtkImageReslice which has changed the image dimensions according to<br>> the output spacing and output extent parameters. However, I want to<br>> save the resulting image with the same size as the input image.
<br>><br>> Does anyone know what is the best way to resample the output image and<br>> convert it to the same image dimensions as the input image? Some code<br>> snippet would be really appreciated.<br>><br>
> Best wishes,<br>> P<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> This is the private VTK discussion list.
<br>> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br><br></blockquote></div><br>