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> &lt;<a href="mailto:dgobbi@atamai.com">dgobbi@atamai.com</a>&gt; 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-&gt;TransformInputSamplingOff();<br>reslice-&gt;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>&gt; Hi everyone,<br>&gt;<br>&gt; I do some oeprations on an image and then I need to save a resulting<br>&gt; image. Now to generate the resulting image, I use the output from
<br>&gt; vtkImageReslice which has changed the image dimensions according to<br>&gt; the output spacing and output extent parameters. However, I want to<br>&gt; save the resulting image with the same size as the input image.
<br>&gt;<br>&gt; Does anyone know what is the best way to resample the output image and<br>&gt; convert it to the same image dimensions as the input image? Some code<br>&gt; snippet would be really appreciated.<br>&gt;<br>
&gt; Best wishes,<br>&gt; P<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list.
<br>&gt; 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>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br><br></blockquote></div><br>