A simplified wrapper around a variety of ITK transforms.
More...
#include <sitkTransform.h>
A simplified wrapper around a variety of ITK transforms.
The interface to ITK transform objects to be used with the ImageRegistrationMethod, ResampleImageFilter and other SimpleITK process objects. The transforms are designed to have a serialized array of parameters to facilitate optimization for registration.
Provides a base class interface to any type of ITK transform. Objects of this type may have their interface converted to a derived interface while keeping the same reference to the ITK object.
Additionally, this class provides a basic interface to a composite transforms.
- See also
- itk::CompositeTransform
- Examples
- DemonsRegistration2/DemonsRegistration2.cxx, ImageRegistrationMethod1/ImageRegistrationMethod1.cxx, ImageRegistrationMethod2/ImageRegistrationMethod2.cxx, ImageRegistrationMethodBSpline1/ImageRegistrationMethodBSpline1.cxx, ImageRegistrationMethodBSpline3/ImageRegistrationMethodBSpline3.cxx, and ImageRegistrationMethodDisplacement1/ImageRegistrationMethodDisplacement1.cxx.
Definition at line 80 of file sitkTransform.h.
◆ Self
◆ Transform() [1/7]
itk::simple::Transform::Transform |
( |
| ) |
|
By default a 3-d identity transform is constructed.
◆ Transform() [2/7]
template<unsigned int NDimension>
◆ Transform() [3/7]
◆ Transform() [4/7]
itk::simple::Transform::Transform |
( |
unsigned int |
dimensions, |
|
|
TransformEnum |
type |
|
) |
| |
Construct a specific transformation.
- Deprecated:
- This constructor will be removed in future releases.
◆ Transform() [5/7]
Use an image to construct a transform.
The input displacement image is transferred to the constructed transform object. The input image is modified to be a default constructed Image object.
Only the sitkDisplacementField transformation type can currently be constructed this way. Image must be of sitkVectorFloat64 pixel type with the number of components equal to the image dimension.
- Deprecated:
- This constructor will be removed in future releases.
◆ ~Transform()
virtual itk::simple::Transform::~Transform |
( |
| ) |
|
|
virtual |
◆ Transform() [6/7]
itk::simple::Transform::Transform |
( |
const Transform & |
| ) |
|
Copy constructor and assignment operator.
Performs a shallow copy of the internal ITK transform. A deep copy will be done if the transform in modified.
◆ Transform() [7/7]
itk::simple::Transform::Transform |
( |
PimpleTransformBase * |
pimpleTransform | ) |
|
|
explicitprotected |
◆ GetDimension()
unsigned int itk::simple::Transform::GetDimension |
( |
| ) |
const |
Return the dimension of the Transform ( 2D or 3D )
◆ GetFixedParameters()
std::vector<double> itk::simple::Transform::GetFixedParameters |
( |
| ) |
const |
◆ GetInverse()
Transform itk::simple::Transform::GetInverse |
( |
| ) |
const |
Return a new inverse transform of the same type as this.
Creates a new transform object and tries to set the value to the inverse. As not all transform types have inverse and some transforms are not invertible, an exception will be throw is there is no inverse.
◆ GetITKBase() [1/2]
Get access to internal ITK data object.
The return value should immediately be assigned to as itk::SmartPointer.
In many cases the value may need to be dynamically cast to the actual transform type.
◆ GetITKBase() [2/2]
Get access to internal ITK data object.
The return value should immediately be assigned to as itk::SmartPointer.
In many cases the value may need to be dynamically cast to the actual transform type.
◆ GetName()
virtual std::string itk::simple::Transform::GetName |
( |
| ) |
const |
|
virtual |
return user readable name for the SimpleITK transform
Reimplemented in itk::simple::CompositeTransform, itk::simple::ScaleSkewVersor3DTransform, itk::simple::DisplacementFieldTransform, itk::simple::ScaleVersor3DTransform, itk::simple::BSplineTransform, itk::simple::VersorRigid3DTransform, itk::simple::VersorTransform, itk::simple::Similarity3DTransform, itk::simple::Euler3DTransform, itk::simple::Similarity2DTransform, itk::simple::AffineTransform, itk::simple::Euler2DTransform, itk::simple::TranslationTransform, and itk::simple::ScaleTransform.
◆ GetNumberOfFixedParameters()
unsigned int itk::simple::Transform::GetNumberOfFixedParameters |
( |
| ) |
const |
Get the number of fixed parameters
◆ GetNumberOfParameters()
unsigned int itk::simple::Transform::GetNumberOfParameters |
( |
| ) |
const |
◆ GetParameters()
std::vector<double> itk::simple::Transform::GetParameters |
( |
| ) |
const |
◆ GetTransformEnum()
Get the TransformEnum of the underlying Transform.
A SimpleITK Transform object can internally hold any ITK transform. This method returns the TransformEnum representing the internal ITK transform. This value may be used to identify which SimpleITK class the transform can be converted to.
◆ InternalBSplineInitialization()
template<unsigned int >
void itk::simple::Transform::InternalBSplineInitialization |
( |
Image & |
img | ) |
|
|
private |
◆ InternalDisplacementInitialization()
template<typename TDisplacementType >
void itk::simple::Transform::InternalDisplacementInitialization |
( |
Image & |
img | ) |
|
|
private |
◆ InternalInitialization() [1/3]
◆ InternalInitialization() [2/3]
template<unsigned int VDimension>
◆ InternalInitialization() [3/3]
template<class TransformType >
void itk::simple::Transform::InternalInitialization |
( |
TransformType * |
t | ) |
|
|
private |
◆ IsLinear()
virtual bool itk::simple::Transform::IsLinear |
( |
| ) |
const |
|
virtual |
◆ MakeUnique()
void itk::simple::Transform::MakeUnique |
( |
| ) |
|
Performs actually coping if needed to make object unique.
The Transform class by default performs lazy coping and assignment. This method make sure that coping actually happens to the itk::Transform pointed to is only pointed to by this object.
◆ operator=()
Copy constructor and assignment operator.
Performs a shallow copy of the internal ITK transform. A deep copy will be done if the transform in modified.
◆ SetFixedParameters()
void itk::simple::Transform::SetFixedParameters |
( |
const std::vector< double > & |
parameters | ) |
|
◆ SetIdentity()
virtual void itk::simple::Transform::SetIdentity |
( |
| ) |
|
|
virtual |
◆ SetInverse()
virtual bool itk::simple::Transform::SetInverse |
( |
| ) |
|
|
virtual |
Try to change the current transform to it's inverse.
If the transform has an inverse, i.e. non-singular linear transforms, then a new ITK transform is created of the same type and this object is set to it.
However not all transform have a direct inverse, if the inverse does not exist or fails false will be returned and this transform will not be modified.
◆ SetParameters()
void itk::simple::Transform::SetParameters |
( |
const std::vector< double > & |
parameters | ) |
|
◆ SetPimpleTransform()
virtual void itk::simple::Transform::SetPimpleTransform |
( |
PimpleTransformBase * |
pimpleTransform | ) |
|
|
protectedvirtual |
Reimplemented in itk::simple::DisplacementFieldTransform, itk::simple::ScaleSkewVersor3DTransform, itk::simple::BSplineTransform, itk::simple::ScaleVersor3DTransform, itk::simple::Euler3DTransform, itk::simple::Similarity3DTransform, itk::simple::VersorRigid3DTransform, itk::simple::AffineTransform, itk::simple::Similarity2DTransform, itk::simple::VersorTransform, itk::simple::Euler2DTransform, itk::simple::ScaleTransform, itk::simple::TranslationTransform, and itk::simple::CompositeTransform.
◆ ToString()
std::string itk::simple::Transform::ToString |
( |
| ) |
const |
◆ TransformPoint()
std::vector< double > itk::simple::Transform::TransformPoint |
( |
const std::vector< double > & |
point | ) |
const |
Apply transform to a point.
The dimension of the point must match the transform.
◆ TransformVector()
std::vector< double > itk::simple::Transform::TransformVector |
( |
const std::vector< double > & |
vector, |
|
|
const std::vector< double > & |
point |
|
) |
| const |
Apply transform to a vector at a point.
The ITK concept of a vector is a direction at a specific point, for example the difference between two points is a vector.
For linear transforms the point does not matter, in general the vector is transformed by the Jacobian with respect to point position.
The dimension of the vector and point must match the transform.
◆ WriteTransform()
void itk::simple::Transform::WriteTransform |
( |
const std::string & |
filename | ) |
const |
◆ m_PimpleTransform
PimpleTransformBase* itk::simple::Transform::m_PimpleTransform |
|
private |
The documentation for this class was generated from the following file: