Class WarpImageFilter


public class WarpImageFilter extends ImageFilter
Warps an image using an input displacement field. WarpImageFilter warps an existing image with respect to a given displacement field. A displacement field is represented as a image whose pixel type is some vector type with at least N elements, where N is the dimension of the input image. The vector type must support element access via operator []. The output image is produced by inverse mapping: the output pixels are mapped back onto the input image. This scheme avoids the creation of any holes and overlaps in the output image. Each vector in the displacement field represent the distance between a geometric point in the input space and a point in the output space such that: \\[ p_{in} = p_{out} + d \\] Typically the mapped position does not correspond to an integer pixel position in the input image. Interpolation via an image function is used to compute values at non-integer positions. The default interpolation typed used is the LinearInterpolateImageFunction . The user can specify a particular interpolation function via SetInterpolator() . Note that the input interpolator must derive from base class InterpolateImageFunction . Position mapped to outside of the input image buffer are assigned a edge padding value. The LargestPossibleRegion for the output is inherited from the input displacement field. The output image spacing, origin and orientation may be set via SetOutputSpacing, SetOutputOrigin and SetOutputDirection. The default are respectively a vector of 1's, a vector of 0's and an identity matrix. This class is templated over the type of the input image, the type of the output image and the type of the displacement field. The input image is set via SetInput. The input displacement field is set via SetDisplacementField. This filter is implemented as a multithreaded filter. WARNING: This filter assumes that the input type, output type and displacement field type all have the same number of dimensions. See: itk::simple::Warp for the procedural interface itk::WarpImageFilter for the Doxygen on the original ITK class. C++ includes: sitkWarpImageFilter.h
  • Constructor Details

    • WarpImageFilter

      protected WarpImageFilter(long cPtr, boolean cMemoryOwn)
    • WarpImageFilter

      public WarpImageFilter()
      itk::simple::WarpImageFilter::WarpImageFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(WarpImageFilter obj)
    • swigRelease

      protected static long swigRelease(WarpImageFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::WarpImageFilter::~WarpImageFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setInterpolator

      public void setInterpolator(InterpolatorEnum Interpolator)
      Self& itk::simple::WarpImageFilter::SetInterpolator(InterpolatorEnum Interpolator) Get/Set the interpolator function.
    • getInterpolator

      public InterpolatorEnum getInterpolator()
      InterpolatorEnum itk::simple::WarpImageFilter::GetInterpolator() const Get/Set the interpolator function.
    • setOutputSize

      public void setOutputSize(VectorUInt32 OutputSize)
      Self& itk::simple::WarpImageFilter::SetOutputSize(std::vector< uint32_t > OutputSize) Set the size of the output image.
    • getOutputSize

      public VectorUInt32 getOutputSize()
      std::vector<uint32_t> itk::simple::WarpImageFilter::GetOutputSize() const Get the size of the output image.
    • setOutputOrigin

      public void setOutputOrigin(VectorDouble OutputOrigin)
      Self& itk::simple::WarpImageFilter::SetOutputOrigin(std::vector< double > OutputOrigin) Set the output image origin.
    • getOutputOrigin

      public VectorDouble getOutputOrigin()
      std::vector<double> itk::simple::WarpImageFilter::GetOutputOrigin() const Get the output image origin.
    • setOutputSpacing

      public void setOutputSpacing(VectorDouble OutputSpacing)
      Self& itk::simple::WarpImageFilter::SetOutputSpacing(std::vector< double > OutputSpacing) Set the output image spacing.
    • getOutputSpacing

      public VectorDouble getOutputSpacing()
      std::vector<double> itk::simple::WarpImageFilter::GetOutputSpacing() const Get the output image spacing.
    • setOutputDirection

      public void setOutputDirection(VectorDouble OutputDirection)
      Self& itk::simple::WarpImageFilter::SetOutputDirection(std::vector< double > OutputDirection) Set/Get the direction (orientation) of the output image
    • getOutputDirection

      public VectorDouble getOutputDirection()
      std::vector<double> itk::simple::WarpImageFilter::GetOutputDirection() const Set/Get the direction (orientation) of the output image
    • setEdgePaddingValue

      public void setEdgePaddingValue(double EdgePaddingValue)
      Self& itk::simple::WarpImageFilter::SetEdgePaddingValue(double EdgePaddingValue) Set the edge padding value
    • getEdgePaddingValue

      public double getEdgePaddingValue()
      double itk::simple::WarpImageFilter::GetEdgePaddingValue() const Get the edge padding value
    • getName

      public String getName()
      std::string itk::simple::WarpImageFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::WarpImageFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image, Image displacementField)
      Image itk::simple::WarpImageFilter::Execute(const Image &image, const Image &displacementField) Execute the filter on the input image
    • setOutputParameteresFromImage

      public void setOutputParameteresFromImage(Image refImage)
      void itk::simple::WarpImageFilter::SetOutputParameteresFromImage(const Image &refImage) This methods sets the output size, origin, spacing and direction to that of the provided image