Class WarpImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.WarpImageFilter
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
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::WarpImageFilter::WarpImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedWarpImageFilter(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::WarpImageFilter::~WarpImageFilter() DestructorImage itk::simple::WarpImageFilter::Execute(const Image &image, const Image &displacementField) Execute the filter on the input imageprotected voidfinalize()protected static longgetCPtr(WarpImageFilter obj) doubledouble itk::simple::WarpImageFilter::GetEdgePaddingValue() const Get the edge padding valueInterpolatorEnum itk::simple::WarpImageFilter::GetInterpolator() const Get/Set the interpolator function.getName()std::string itk::simple::WarpImageFilter::GetName() const Name of this classstd::vector<double> itk::simple::WarpImageFilter::GetOutputDirection() const Set/Get the direction (orientation) of the output imagestd::vector<double> itk::simple::WarpImageFilter::GetOutputOrigin() const Get the output image origin.std::vector<uint32_t> itk::simple::WarpImageFilter::GetOutputSize() const Get the size of the output image.std::vector<double> itk::simple::WarpImageFilter::GetOutputSpacing() const Get the output image spacing.voidsetEdgePaddingValue(double EdgePaddingValue) Self& itk::simple::WarpImageFilter::SetEdgePaddingValue(double EdgePaddingValue) Set the edge padding valuevoidsetInterpolator(InterpolatorEnum Interpolator) Self& itk::simple::WarpImageFilter::SetInterpolator(InterpolatorEnum Interpolator) Get/Set the interpolator function.voidsetOutputDirection(VectorDouble OutputDirection) Self& itk::simple::WarpImageFilter::SetOutputDirection(std::vector< double > OutputDirection) Set/Get the direction (orientation) of the output imagevoidsetOutputOrigin(VectorDouble OutputOrigin) Self& itk::simple::WarpImageFilter::SetOutputOrigin(std::vector< double > OutputOrigin) Set the output image origin.voidsetOutputParameteresFromImage(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 imagevoidsetOutputSize(VectorUInt32 OutputSize) Self& itk::simple::WarpImageFilter::SetOutputSize(std::vector< uint32_t > OutputSize) Set the size of the output image.voidsetOutputSpacing(VectorDouble OutputSpacing) Self& itk::simple::WarpImageFilter::SetOutputSpacing(std::vector< double > OutputSpacing) Set the output image spacing.protected static longtoString()std::string itk::simple::WarpImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
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
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalizein classImageFilter
-
delete
public void delete()virtual itk::simple::WarpImageFilter::~WarpImageFilter() Destructor- Overrides:
deletein classImageFilter
-
setInterpolator
Self& itk::simple::WarpImageFilter::SetInterpolator(InterpolatorEnum Interpolator) Get/Set the interpolator function. -
getInterpolator
InterpolatorEnum itk::simple::WarpImageFilter::GetInterpolator() const Get/Set the interpolator function. -
setOutputSize
Self& itk::simple::WarpImageFilter::SetOutputSize(std::vector< uint32_t > OutputSize) Set the size of the output image. -
getOutputSize
std::vector<uint32_t> itk::simple::WarpImageFilter::GetOutputSize() const Get the size of the output image. -
setOutputOrigin
Self& itk::simple::WarpImageFilter::SetOutputOrigin(std::vector< double > OutputOrigin) Set the output image origin. -
getOutputOrigin
std::vector<double> itk::simple::WarpImageFilter::GetOutputOrigin() const Get the output image origin. -
setOutputSpacing
Self& itk::simple::WarpImageFilter::SetOutputSpacing(std::vector< double > OutputSpacing) Set the output image spacing. -
getOutputSpacing
std::vector<double> itk::simple::WarpImageFilter::GetOutputSpacing() const Get the output image spacing. -
setOutputDirection
Self& itk::simple::WarpImageFilter::SetOutputDirection(std::vector< double > OutputDirection) Set/Get the direction (orientation) of the output image -
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
std::string itk::simple::WarpImageFilter::GetName() const Name of this class- Overrides:
getNamein classProcessObject
-
toString
std::string itk::simple::WarpImageFilter::ToString() const Print ourselves out- Overrides:
toStringin classProcessObject
-
execute
-
setOutputParameteresFromImage
void itk::simple::WarpImageFilter::SetOutputParameteresFromImage(const Image &refImage) This methods sets the output size, origin, spacing and direction to that of the provided image
-