[vtkusers] The vtkImageConstantPad
Darshan Pai
darshanpai at gmail.com
Thu Jun 24 16:06:34 EDT 2010
Yes that worked perfect . Thanks
On Wed, Jun 23, 2010 at 8:10 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> In order to pad on the left, you must adjust the image Origin and
> Extent at the same time. This can be done with
> vtkImageChangeInformation, if you know the image spacing ahead of
> time:
>
> translator = vtkImageChangeInformartion();
> translator.ExtentTranslation(padx, pady, padz);
> translator.OriginTranslation(-padx*xspacing, -pady*yspacing,
> -padz*zspacing)
>
> pad = vtkImagePadFilter()
> pad.SetInputConnection(translator.GetOutputPort())
> etcetera.
>
> In all honesty, though, someone should add an option to
> vtkImagePadFilter so that it can shift the image and pad it at the
> same time.
>
> David
>
>
> On Tue, Jun 22, 2010 at 10:55 PM, Darshan Pai <darshanpai at gmail.com>
> wrote:
> > I want to use pad the MRI data with zero values . Now vtkImageConstantPad
> > does what I need but it adds the constant only at the Positive ends of
> the
> > dimension . Can I pad the data so that constant can be added to the zero
> > ends .
> >
> > Regards
> > Darshan
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK 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/20100624/d8e48277/attachment.htm>
More information about the vtkusers
mailing list