Yes that worked perfect . Thanks<br><br><div class="gmail_quote">On Wed, Jun 23, 2010 at 8:10 AM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In order to pad on the left, you must adjust the image Origin and<br>
Extent at the same time.  This can be done with<br>
vtkImageChangeInformation, if you know the image spacing ahead of<br>
time:<br>
<br>
translator = vtkImageChangeInformartion();<br>
translator.ExtentTranslation(padx, pady, padz);<br>
translator.OriginTranslation(-padx*xspacing, -pady*yspacing, -padz*zspacing)<br>
<br>
pad = vtkImagePadFilter()<br>
pad.SetInputConnection(translator.GetOutputPort())<br>
etcetera.<br>
<br>
In all honesty, though, someone should add an option to<br>
vtkImagePadFilter so that it can shift the image and pad it at the<br>
same time.<br>
<font color="#888888"><br>
  David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Tue, Jun 22, 2010 at 10:55 PM, Darshan Pai &lt;<a href="mailto:darshanpai@gmail.com">darshanpai@gmail.com</a>&gt; wrote:<br>
&gt; I want to use pad the MRI data with zero values . Now vtkImageConstantPad<br>
&gt; does what I need but it adds the constant only at the Positive ends of the<br>
&gt; dimension . Can I pad the data so that constant can be added to the zero<br>
&gt; ends .<br>
&gt;<br>
&gt; Regards<br>
&gt; Darshan<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>