Package org.itk.simple
Class TransformGeometryImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.TransformGeometryImageFilter
Modify an image's geometric meta-data, changing its "physical"
extent.
The TransformGeometryImageFilter "physically" changes the image in space using the given
transformation. The resulting image is an image with the same voxel
values as the input, but with different physical space representation
as affected by the transform.
The specific transformation type can be any type derived from the MatrixOffsetTransformBase and the TranslationTransform . The modification of the geometric meta-data is an alternative to
resampling the moving image onto the fixed image grid, after
registration. The advantages of using this approach over resampling
are two-fold, it does not introduce artifacts into the result because
the original intensity information is not modified, and it is
computationally more efficient.
When the filter is used with a rigid or translation transformation the
resulting image can be saved in any desired format. When the filter is
used with an affine transformation the resulting image should be saved
in a format that supports a non ortho-normal direction cosine matrix
(e.g. nrrd).
Let us call the transform operation from the fixed image to moving
image TfmF2M . Given a set of points from the fixed image in physical
space (i.e. physicalFixedImagePoints ), the aim is to convert those
points into the moving image physical space as
physicalMovingImagePoints = TfmF2M( physicalFixedImagePoints ) , and
then be able to get the image values as movingContinuousIndexPoints =
movingImage->TransformPhysicalPointToContinuousIndex(
physicalMovingImagePoints ) .
We desire to change the moving image direction cosine $\\mathbf{D}$ and origin $\\mathbf{o}$ such that we can compute the moving image points as
movingContinuousIndexPoints =
newMovingImage->TransformPhysicalPointToContinuousIndex(
physicalFixedImagePoints )
Let us introduce the notation that will be used to formalize the
transformation:
Image-related parameters:
$\\mathbf{D}$ : direction cosine matrix
$\\mathbf{o}$ : origin vector
$\\mathbf{S}$ : spacing
$\\mathbf{ci}$ : continuous index
$\\mathbf{D}^{'}$ : new direction cosine matrix
$\\mathbf{o}^{'}$ : new origin vector
Image content in corresponding space:
$\\mathbf{f}_{p}$ : fixed image points in physical space
$\\mathbf{m}_{p}$ : moving image points in physical space
Rigid transform-related parameters:
$\\mathbf{R}$ : rotation matrix
$\\mathbf{c}$ : center of rotation vector
$\\mathbf{t}$ : translation vector
The TransformPhysicalPointToContinuousIndex method performs then:
\\begin{eqnarray*} \\mathbf{ci} &=
\\mathbf{S}^{-1}\\mathbf{D}^{-1}( \\mathbf{m}_{p} -
\\mathbf{o} ) \\ \\mathbf{m}_{p} &=
\\mathbf{R}(\\mathbf{f}_{p} - \\mathbf{c}) + \\mathbf{c} +
\\mathbf{t} \\end{eqnarray*}
After substitution:
\\begin{eqnarray*} \\mathbf{m}_{c} &=
\\underbrace{\\mathbf{R}^{-1}\\mathbf{D}}_\\text{new
cosine}\\mathbf{S} * \\mathbf{i} +
\\underbrace{\\mathbf{R}^{-1} * \\mathbf{o} - \\mathbf{R}^{-1}
\\mathbf{c} - \\mathbf{R}^{-1}*t}_\\text{new origin} +
\\mathbf{c} \\ \\ \\mathbf{D}^{'} &=
\\mathbf{R}^{-1}\\mathbf{D} \\ \\mathbf{o}^{'} &=
\\mathbf{R}^{-1} * ( \\mathbf{o} - \\mathbf{c} - \\mathbf{t} )
+ \\mathbf{c} \\end{eqnarray*}
See:
itk::simple::TransformGeometry for the procedural interface
itk::TransformGeometryImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkTransformGeometryImageFilter.h
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::TransformGeometryImageFilter::TransformGeometryImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
TransformGeometryImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::TransformGeometryImageFilter::~TransformGeometryImageFilter() DestructorImage itk::simple::TransformGeometryImageFilter::Execute(Image &&image, const Transform &transform) Execute the filter on the input imageprotected void
finalize()
protected static long
getName()
std::string itk::simple::TransformGeometryImageFilter::GetName() const Name of this classprotected static long
toString()
std::string itk::simple::TransformGeometryImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods 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
-
TransformGeometryImageFilter
protected TransformGeometryImageFilter(long cPtr, boolean cMemoryOwn) -
TransformGeometryImageFilter
public TransformGeometryImageFilter()itk::simple::TransformGeometryImageFilter::TransformGeometryImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::TransformGeometryImageFilter::~TransformGeometryImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
getName
std::string itk::simple::TransformGeometryImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::TransformGeometryImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::TransformGeometryImageFilter::Execute(Image &&image, const Transform &transform) Execute the filter on the input image
-