Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mirtk::MultiLevelStationaryVelocityTransformation Class Reference

#include <MultiLevelStationaryVelocityTransformation.h>

Inheritance diagram for mirtk::MultiLevelStationaryVelocityTransformation:
Inheritance graph
Collaboration diagram for mirtk::MultiLevelStationaryVelocityTransformation:
Collaboration graph

Public Member Functions

BSplineFreeFormTransformationSVActiveSVFFD ()
 Get active SV FFD whose parameters are being optimized.
 
const BSplineFreeFormTransformationSVActiveSVFFD () const
 Get active SV FFD whose parameters are being optimized.
 
virtual void Add (const DOFValue *)
 Add change to transformation parameters.
 
virtual void CombineLocalTransformation ()
 Combine local transformations on stack.
 
virtual void Displacement (int, int, GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual void Displacement (int, int, GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual double DOFGradientNorm (const double *) const
 Get norm of the gradient vector.
 
virtual double Get (int) const
 Get value of transformation parameter.
 
virtual void Get (DOFValue *) const
 Get values of transformation parameters.
 
virtual DOFStatus GetStatus (int) const
 Get status of transformation parameter.
 
virtual bool Inverse (int, int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the transformation.
 
virtual int InverseDisplacement (int, int, GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual int InverseDisplacement (int, int, GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual void Invert ()
 Invert transformation.
 
virtual void MergeGlobalIntoLocalDisplacement ()
 
 MultiLevelStationaryVelocityTransformation ()
 Default constructor.
 
 MultiLevelStationaryVelocityTransformation (const RigidTransformation &)
 Construct multi-level transformation given a rigid transformation.
 
 MultiLevelStationaryVelocityTransformation (const AffineTransformation &)
 Construct multi-level transformation given an affine transformation.
 
 MultiLevelStationaryVelocityTransformation (const MultiLevelStationaryVelocityTransformation &)
 Copy constructor.
 
virtual int NumberOfDOFs () const
 Get number of transformation parameters.
 
virtual void ParametricGradient (const GenericImage< double > *, double *, const WorldCoordsImage *, const WorldCoordsImage *, double=NaN, double=1) const
 
virtual void Print (ostream &, Indent=0) const
 Prints the parameters of the transformation.
 
virtual void Put (int, double)
 Put value of transformation parameter.
 
virtual void Put (const DOFValue *)
 Put values of transformation parameters.
 
virtual void PutStatus (int, DOFStatus)
 Put status of transformation parameter.
 
virtual bool RequiresCachingOfDisplacements () const
 
BSplineFreeFormTransformationSVSVFFD (int n)
 Get n-th local SV FFD.
 
const BSplineFreeFormTransformationSVSVFFD (int n) const
 Get n-th local SV FFD.
 
virtual void Transform (int, int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point.
 
virtual double Update (const DOFValue *)
 Update transformation parameters given parametric gradient.
 
virtual ~MultiLevelStationaryVelocityTransformation ()
 Destructor.
 
- Public Member Functions inherited from mirtk::MultiLevelTransformation
virtual double Approximate (const ImageAttributes &, double *, double *, double *, int=1, double=.0)
 
virtual double Approximate (const double *, const double *, const double *, double *, double *, double *, int, int=1, double=.0)
 
virtual double Approximate (const double *, const double *, const double *, const double *, double *, double *, double *, int, int=1, double=.0)
 
virtual double ApproximateAsNew (const ImageAttributes &, double *, double *, double *, int=1, double=.0)
 
virtual double ApproximateAsNew (const double *, const double *, const double *, double *, double *, double *, int, int=1, double=.0)
 
virtual double ApproximateAsNew (const double *, const double *, const double *, const double *, double *, double *, double *, int, int=1, double=.0)
 
virtual void ApproximateDOFs (const double *, const double *, const double *, const double *, const double *, const double *, const double *, int)
 
virtual void ApproximateDOFsGradient (const double *, const double *, const double *, const double *, const double *, const double *, const double *, int, double *, double=1.0) const
 
virtual double BendingEnergy (int, int, double, double, double, double=0, double=NaN, bool=true) const
 Calculates the bending energy of the transformation.
 
virtual double BendingEnergy (int, double, double, double, double=0, double=NaN, bool=true) const
 Calculates the bending energy of the transformation.
 
virtual double BendingEnergy (double, double, double, double=0, double=NaN, bool=true) const
 Calculates the bending energy of the transformation.
 
virtual void Clear ()
 Reset transformation and remove all local transformations.
 
virtual bool CopyFrom (const Transformation *)
 
virtual void DeriveJacobianWrtDOF (Matrix &, int, double, double, double, double=0, double=NaN) const
 Calculates the derivative of the Jacobian of the transformation (w.r.t. world coordinates) w.r.t. a transformation parameter.
 
virtual void Displacement (int, int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point.
 
virtual void Displacement (int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point.
 
virtual void Displacement (int, int, GenericImage< double > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void Displacement (int, int, GenericImage< float > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void Displacement (int, GenericImage< double > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void Displacement (int, GenericImage< float > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void Displacement (int, GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual void Displacement (int, GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual void Displacement (GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual void Displacement (GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual AffineTransformationGetGlobalTransformation ()
 Gets global transformation.
 
virtual const AffineTransformationGetGlobalTransformation () const
 Get global transformation.
 
virtual FreeFormTransformationGetLocalTransformation (int)
 Gets local transformation.
 
virtual const FreeFormTransformationGetLocalTransformation (int) const
 Gets local transformation.
 
virtual void GlobalHessian (Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the global transformation w.r.t world coordinates.
 
virtual void GlobalInverse (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the global transformation only.
 
virtual void GlobalJacobian (Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the global transformation w.r.t world coordinates.
 
virtual void GlobalTransform (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the global transformation component only.
 
virtual bool HasSameDOFsAs (const Transformation *) const
 Checks whether transformation depends on the same vector of parameters.
 
virtual void Hessian (int, int, Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the transformation w.r.t world coordinates.
 
virtual void Hessian (int, Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the transformation w.r.t world coordinates.
 
virtual void Hessian (Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the transformation w.r.t world coordinates.
 
virtual void InsertLocalTransformation (FreeFormTransformation *, int=0, bool=true)
 Insert local transformation.
 
virtual bool Inverse (int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the transformation.
 
virtual bool Inverse (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the transformation.
 
virtual bool InverseDisplacement (int, int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the transformation.
 
virtual bool InverseDisplacement (int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the transformation.
 
virtual int InverseDisplacement (int, GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual int InverseDisplacement (int, GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual int InverseDisplacement (GenericImage< double > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual int InverseDisplacement (GenericImage< float > &, double, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual bool IsIdentity () const
 Checks whether transformation is an identity mapping.
 
virtual void Jacobian (int, int, Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the transformation w.r.t world coordinates.
 
virtual void Jacobian (int, Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the transformation w.r.t world coordinates.
 
virtual void Jacobian (Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the transformation w.r.t world coordinates.
 
virtual double Jacobian (int, int, double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the transformation w.r.t world coordinates.
 
virtual double Jacobian (int, double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the transformation w.r.t world coordinates.
 
virtual void JacobianDOFs (double [3], int, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the transformation w.r.t the transformation parameters.
 
virtual void LocalDisplacement (int, int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the local transformation component only.
 
virtual void LocalDisplacement (int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the local transformation component only.
 
virtual void LocalHessian (int, Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the local transformation w.r.t world coordinates.
 
virtual void LocalHessian (Matrix [3], double, double, double, double=0, double=NaN) const
 Calculates the Hessian for each component of the local transformation w.r.t world coordinates.
 
virtual bool LocalInverse (int, int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the local transformation only.
 
virtual bool LocalInverse (int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the local transformation only.
 
virtual bool LocalInverse (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the inverse of the local transformation only.
 
virtual bool LocalInverseDisplacement (int, int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the local transformation only.
 
virtual bool LocalInverseDisplacement (int, double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the local transformation only.
 
virtual void LocalJacobian (int, Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the local transformation w.r.t world coordinates.
 
virtual void LocalJacobian (Matrix &, double, double, double, double=0, double=NaN) const
 Calculates the Jacobian of the local transformation w.r.t world coordinates.
 
virtual double LocalJacobian (int, double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the local transformation w.r.t world coordinates.
 
virtual void LocalTransform (int, int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the local transformation component only.
 
virtual void LocalTransform (int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the local transformation component only.
 
virtual void LocalTransform (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point using the local transformation component only.
 
virtual bool LocalTransformationIsActive (int) const
 Get whether local transformation is active.
 
virtual void LocalTransformationStatus (int, FFDStatus)
 Put status of local transformation.
 
virtual FFDStatus LocalTransformationStatus (int) const
 Get status of local transformation.
 
virtual int NumberOfActiveCPs () const
 Returns the total number of active control points on all active levels.
 
virtual int NumberOfActiveLevels () const
 Returns the number of active levels.
 
virtual int NumberOfCPs (bool=false) const
 Returns the total number of control points.
 
virtual int NumberOfLevels () const
 Returns the number of levels.
 
virtual int NumberOfPassiveLevels () const
 Returns the number of passive levels.
 
virtual ParameterList Parameter () const
 Get (non-DoF) parameters as key/value as string map.
 
virtual FreeFormTransformationPopLocalTransformation ()
 Pop local transformation from stack (remove last transformation)
 
virtual void PushLocalTransformation (FreeFormTransformation *, bool=true)
 Push local transformation on stack (append transformation)
 
virtual FreeFormTransformationPutLocalTransformation (FreeFormTransformation *, int, bool=true)
 Put local transformation and return pointer to previous one (needs to be deleted if not used)
 
virtual FreeFormTransformationRemoveLocalTransformation (int=0)
 Remove local transformation and return the pointer (need to be deleted if not used)
 
virtual void Reset ()
 Reset transformation (does not remove local transformations)
 
virtual bool Set (const char *, const char *)
 Set named (non-DoF) parameter from value as string.
 
virtual void Transform (int, double &, double &, double &, double=0, double=NaN) const
 Transforms a single point.
 
virtual void Transform (double &, double &, double &, double=0, double=NaN) const
 Transforms a single point.
 
virtual void Transform (int, int, Point &, double=0, double=NaN) const
 Transforms a single point.
 
virtual void Transform (int, Point &, double=0, double=NaN) const
 Transforms a single point.
 
virtual void Transform (int, int, PointSet &, double=0, double=NaN) const
 Transforms a set of points.
 
virtual void Transform (int, PointSet &, double=0, double=NaN) const
 Transforms a set of points.
 
virtual ~MultiLevelTransformation ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Transformation
virtual double Approximate (const ImageAttributes &, const Transformation *, int=1, double=.0)
 Approximate another transformation and return approximation error.
 
virtual double Approximate (GenericImage< double > &, int=1, double=.0)
 
virtual double ApproximateAsNew (const ImageAttributes &, const Transformation *, int=1, double=.0)
 Approximate another transformation and return approximation error.
 
virtual double ApproximateAsNew (GenericImage< double > &, int=1, double=.0)
 
virtual void ApproximateGradient (const ImageAttributes &, const double *, const double *, const double *, double *, double=1.0) const
 
virtual void ApproximateGradient (const double *, const double *, const double *, const double *, const double *, const double *, int, double *, double=1.0) const
 
virtual void ApproximateGradient (const double *, const double *, const double *, const double *, const double *, const double *, const double *, int, double *, double=1.0) const
 
virtual bool CanModifyDisplacement (int=-1) const
 
virtual bool CanRead (TransformationType) const
 Whether this transformation can read a file of specified type (i.e. format)
 
virtual void Displacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point.
 
virtual void Displacement (const ImageAttributes &, double *, double *, double *) const
 
virtual void Displacement (GenericImage< double > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void Displacement (GenericImage< float > &, double=NaN, const WorldCoordsImage *=NULL) const
 Calculates the displacement vectors for a whole image domain.
 
virtual void DisplacementAfterDOFChange (int dof, double dv, GenericImage< double > &dx, double t, double t0=NaN, const WorldCoordsImage *i2w=NULL) const
 
virtual bool DOFBoundingBox (const Image *, int, int &, int &, int &, int &, int &, int &, double=1) const
 
double EvaluateRMSError (const ImageAttributes &, const Transformation *) const
 Evaluates RMS error of transformation compared to another.
 
double EvaluateRMSError (const ImageAttributes &, double *, double *) const
 
double EvaluateRMSError (const ImageAttributes &, double *, double *, double *) const
 
double EvaluateRMSError (const double *, const double *, const double *, double, double *, double *, double *, int no) const
 Evaluates RMS error of transformation compared to displacement field.
 
double EvaluateRMSError (const double *, const double *, const double *, const double *, double *, double *, double *, int no) const
 Evaluates RMS error of transformation compared to given displacement field.
 
virtual void GlobalDisplacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the global transformation component only.
 
virtual void GlobalInverseDisplacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the global transformation only.
 
virtual double GlobalJacobian (double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the global transformation w.r.t world coordinates.
 
virtual bool Inverse (Point &, double=0, double=NaN) const
 Transforms a single point using the inverse of the transformation.
 
virtual int Inverse (PointSet &, double=0, double=NaN) const
 
virtual bool InverseDisplacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the transformation.
 
virtual int InverseDisplacement (const ImageAttributes &, double *, double *, double *) const
 
virtual int InverseDisplacement (GenericImage< double > &, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual int InverseDisplacement (GenericImage< float > &, double=NaN, const WorldCoordsImage *=NULL) const
 
virtual double Jacobian (double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the transformation w.r.t world coordinates.
 
virtual void LocalDisplacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the local transformation component only.
 
virtual bool LocalInverseDisplacement (double &, double &, double &, double=0, double=NaN) const
 Calculates the displacement of a single point using the inverse of the local transformation only.
 
virtual double LocalJacobian (double, double, double, double=0, double=NaN) const
 Calculates the determinant of the Jacobian of the local transformation w.r.t world coordinates.
 
int NumberOfActiveDOFs () const
 Get number of active transformation parameters.
 
int NumberOfPassiveDOFs () const
 Get number of passive transformation parameters.
 
void ParametricGradient (const GenericImage< double > *, double *, const WorldCoordsImage *, double=NaN, double=1) const
 
void ParametricGradient (const GenericImage< double > *, double *, double=NaN, double=1) const
 
virtual void ParametricGradient (const GenericImage< double > **, int, double *, const WorldCoordsImage *, const WorldCoordsImage *, const double *=NULL, double=1) const
 
void ParametricGradient (const GenericImage< double > **, int, double *, const WorldCoordsImage *, const double *=NULL, double=1) const
 
void ParametricGradient (const GenericImage< double > **, int, double *, const double *=NULL, double=1) const
 
virtual void ParametricGradient (const PointSet &, const Vector3D< double > *, double *, double=0, double=NaN, double=1) const
 
void Print (Indent=0) const
 Prints information about the transformation.
 
virtual void Read (const char *)
 Reads a transformation from a file.
 
virtual CifstreamRead (Cifstream &)
 Reads a transformation from a file stream.
 
virtual void Transform (Point &, double=0, double=NaN) const
 Transforms a single point.
 
virtual void Transform (PointSet &, double=0, double=NaN) const
 Transforms a set of points.
 
virtual void Transform (int, double *, double *, double *, double=0, double=NaN) const
 Transforms a set of points.
 
virtual void Transform (int, double *, double *, double *, const double *, double=NaN) const
 Transforms a set of points.
 
virtual void Transform (WorldCoordsImage &, double=NaN) const
 Transforms world coordinates of image voxels.
 
virtual TransformationType TypeOfClass () const
 Returns type ID of the instantiated transformation class.
 
virtual void Verify ()
 
virtual void Write (const char *) const
 Writes a transformation to a file.
 
virtual CofstreamWrite (Cofstream &) const
 Writes a transformation to a file stream.
 
virtual ~Transformation ()
 Default destructor.
 
- Public Member Functions inherited from mirtk::Observable
void AddObserver (Observer &)
 Add observer.
 
void Broadcast (Event, const void *=NULL)
 Broadcast event to observers.
 
void ClearObservers ()
 Delete all observers.
 
void DeleteObserver (Observer &)
 Delete observer.
 
void NotifyObservers (Event, const void *=NULL)
 Notify all observers about given event if this object has changed.
 
int NumberOfObservers () const
 Number of current observers.
 
virtual ~Observable ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

template<class VoxelType >
bool CanUseScalingAndSquaring (const GenericImage< VoxelType > &) const
 
bool FastScalingAndSquaring () const
 Whether to use fast scaling and squaring when possible.
 
double MaxScaledVelocity () const
 Maximum norm of scaled velocity for scaling and squaring.
 
 mirtkAttributeMacro (Matrix, LogA)
 Logarithm of global transformation matrix.
 
int NumberOfStepsForIntervalLength (double) const
 Get number of integration steps for a given temporal integration interval.
 
void NumberOfStepsForIntervalLength (double, int) const
 Set number of integration steps for a given temporal integration interval.
 
virtual void ParametricGradient (const GenericImage< double > *, double *, const WorldCoordsImage *, const WorldCoordsImage *, double, double, double) const
 
void RKE1 (int, int, double &x, double &y, double &z, double t) const
 Transform point using the forward Euler integration method.
 
template<class VoxelType >
void ScalingAndSquaring (int, int, GenericImage< VoxelType > &, double, const WorldCoordsImage *=NULL) const
 
void UpdateLogMatrix ()
 Update logarithm of global transformation matrix.
 
double UpperIntegrationLimit (double t, double t0) const
 
bool UseScalingAndSquaring () const
 Whether to use scaling and squaring when possible.
 
template<class VoxelType >
void Velocity (int, int, GenericImage< VoxelType > &, bool=false) const
 Get stationary velocity field.
 
template<class ScalarType >
void VelocityComponents (int, int, GenericImage< ScalarType > &, bool=false) const
 Get stationary velocity field as 3D+t vector field.
 
- Protected Member Functions inherited from mirtk::MultiLevelTransformation
virtual void CheckTransformation (FreeFormTransformation *) const
 Checks whether a given transformation is supported as local transformation.
 
void InterpolateGlobalDisplacement (FreeFormTransformation *)
 Helper function for MergeGlobalIntoLocalDisplacement.
 
 MultiLevelTransformation ()
 Default constructor.
 
 MultiLevelTransformation (const RigidTransformation &)
 Construct multi-level transformation given a rigid transformation.
 
 MultiLevelTransformation (const AffineTransformation &)
 Construct multi-level transformation given an affine transformation.
 
 MultiLevelTransformation (const MultiLevelTransformation &)
 Copy constructor.
 
virtual CifstreamReadDOFs (Cifstream &, TransformationType)
 Reads transformation parameters from a file stream.
 
virtual CofstreamWriteDOFs (Cofstream &) const
 Writes transformation parameters to a file stream.
 
- Protected Member Functions inherited from mirtk::Transformation
void InitializeDOFs (int)
 Initialize transformation parameters.
 
void InitializeDOFs (const Transformation &, int=-1)
 Copy transformation parameters (DoFs) and their status.
 
 Transformation (int=0)
 Default constructor.
 
 Transformation (const Transformation &)
 Copy constructor.
 
 Transformation (const Transformation &, int)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::Observable
 Observable ()
 Default constructor.
 
 Observable (const Observable &)
 Copy constructor.
 
Observableoperator= (const Observable &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Protected Attributes

EventDelegate _GlobalTransformationObserver
 Observes changes of global transformation matrix.
 
- Protected Attributes inherited from mirtk::MultiLevelTransformation
AffineTransformation _GlobalTransformation
 Global transformation.
 
FreeFormTransformation_LocalTransformation [MAX_TRANS]
 Local transformations.
 
bool _LocalTransformationOwner [MAX_TRANS]
 Whether this class is responsible for destructing the local transformation.
 
FFDStatus _LocalTransformationStatus [MAX_TRANS]
 Status of local transformations.
 
int _NumberOfLevels
 Number of local transformations.
 
- Protected Attributes inherited from mirtk::Transformation
int _NumberOfDOFs
 Number of transformation parameters.
 
DOFValue_Param
 Value of each transformation parameter.
 
DOFStatus_Status
 Status of each transformation parameter (Active or Passive)
 

Additional Inherited Members

- Public Types inherited from mirtk::MultiLevelTransformation
typedef Status FFDStatus
 Type of local transformation status.
 
- Public Types inherited from mirtk::Transformation
typedef Status DOFStatus
 Type of transforamtion parameter status.
 
typedef double DOFValue
 Type of transformation parameter value.
 
- Static Public Member Functions inherited from mirtk::Transformation
static bool CheckHeader (const char *)
 Whether magic number in header of given file.
 
static TransformationNew (TransformationType)
 
static TransformationNew (const Transformation *)
 
static TransformationNew (const char *)
 
static TransformationType TypeOfClass (const char *)
 Returns type ID corresponding to transformations of the named class.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Multi-level SV FFD where global and local transformations are summed up in the log space before exponentiation

T_msvffd(x) = exp(log(T_global(x)) + sum_i log(T_local^i(x)))

Definition at line 43 of file MultiLevelStationaryVelocityTransformation.h.

Member Function Documentation

§ CanUseScalingAndSquaring()

template<class VoxelType >
bool mirtk::MultiLevelStationaryVelocityTransformation::CanUseScalingAndSquaring ( const GenericImage< VoxelType > &  d) const
protected

Whether scaling and squaring can be used to obtain the displacement field for each voxel of the specified vector field

Definition at line 422 of file MultiLevelStationaryVelocityTransformation.h.

§ Displacement() [1/2]

void mirtk::MultiLevelStationaryVelocityTransformation::Displacement ( int  m,
int  n,
GenericImage< double > &  d,
double  t,
double  t0 = NaN,
const WorldCoordsImage wc = NULL 
) const
inlinevirtual

Calculates the displacement vectors for a whole image domain

Attention
The displacements are computed at the positions after applying the current displacements at each voxel. These displacements are then added to the current displacements. Therefore, set the input displacements to zero if only interested in the displacements of this transformation at the voxel positions.

Reimplemented from mirtk::MultiLevelTransformation.

Definition at line 589 of file MultiLevelStationaryVelocityTransformation.h.

§ Displacement() [2/2]

void mirtk::MultiLevelStationaryVelocityTransformation::Displacement ( int  m,
int  n,
GenericImage< float > &  d,
double  t,
double  t0 = NaN,
const WorldCoordsImage wc = NULL 
) const
inlinevirtual

Calculates the displacement vectors for a whole image domain

Attention
The displacements are computed at the positions after applying the current displacements at each voxel. These displacements are then added to the current displacements. Therefore, set the input displacements to zero if only interested in the displacements of this transformation at the voxel positions.

Reimplemented from mirtk::MultiLevelTransformation.

Definition at line 605 of file MultiLevelStationaryVelocityTransformation.h.

§ InverseDisplacement() [1/2]

int mirtk::MultiLevelStationaryVelocityTransformation::InverseDisplacement ( int  m,
int  n,
GenericImage< double > &  d,
double  t,
double  t0 = NaN,
const WorldCoordsImage wc = NULL 
) const
inlinevirtual

Calculates the inverse displacement vectors for a whole image domain

Attention
The displacements are computed at the positions after applying the current displacements at each voxel. These displacements are then added to the current displacements. Therefore, set the input displacements to zero if only interested in the displacements of this transformation at the voxel positions.
Returns
Always zero.

Reimplemented from mirtk::MultiLevelTransformation.

Definition at line 621 of file MultiLevelStationaryVelocityTransformation.h.

§ InverseDisplacement() [2/2]

int mirtk::MultiLevelStationaryVelocityTransformation::InverseDisplacement ( int  m,
int  n,
GenericImage< float > &  d,
double  t,
double  t0 = NaN,
const WorldCoordsImage wc = NULL 
) const
inlinevirtual

Calculates the inverse displacement vectors for a whole image domain

Attention
The displacements are computed at the positions after applying the current displacements at each voxel. These displacements are then added to the current displacements. Therefore, set the input displacements to zero if only interested in the displacements of this transformation at the voxel positions.
Returns
Always zero.

Reimplemented from mirtk::MultiLevelTransformation.

Definition at line 638 of file MultiLevelStationaryVelocityTransformation.h.

§ MergeGlobalIntoLocalDisplacement()

virtual void mirtk::MultiLevelStationaryVelocityTransformation::MergeGlobalIntoLocalDisplacement ( )
virtual

Convert the global transformation from a matrix representation to a FFD and incorporate it with any existing local transformation

Reimplemented from mirtk::MultiLevelTransformation.

§ ParametricGradient() [1/2]

virtual void mirtk::MultiLevelStationaryVelocityTransformation::ParametricGradient ( const GenericImage< double > *  ,
double *  ,
const WorldCoordsImage ,
const WorldCoordsImage ,
double  ,
double  ,
double   
) const
protectedvirtual

Applies the chain rule to convert spatial non-parametric gradient to a gradient w.r.t the parameters of this transformation.

§ ParametricGradient() [2/2]

virtual void mirtk::MultiLevelStationaryVelocityTransformation::ParametricGradient ( const GenericImage< double > *  ,
double *  ,
const WorldCoordsImage ,
const WorldCoordsImage ,
double  = NaN,
double  = 1 
) const
virtual

Applies the chain rule to convert spatial non-parametric gradient to a gradient w.r.t the parameters of this transformation.

Reimplemented from mirtk::Transformation.

§ RequiresCachingOfDisplacements()

bool mirtk::MultiLevelStationaryVelocityTransformation::RequiresCachingOfDisplacements ( ) const
inlinevirtual

Whether the caching of the transformation displacements is required (or preferred) by this transformation. For some transformations such as those parameterized by velocities, caching of the displacements for each target voxel results in better performance or is needed for example for the scaling and squaring method.

Reimplemented from mirtk::MultiLevelTransformation.

Definition at line 439 of file MultiLevelStationaryVelocityTransformation.h.

§ ScalingAndSquaring()

template<class VoxelType >
void mirtk::MultiLevelStationaryVelocityTransformation::ScalingAndSquaring ( int  m,
int  n,
GenericImage< VoxelType > &  d,
double  T,
const WorldCoordsImage = NULL 
) const
protected

Compute group exponential map using the scaling and squaring (SS) method

Attention
The scaling and squaring cannot be used to obtain the displacements generated by a 3D velocity field on a 2D slice only. It always must be applied to the entire domain of the velocity field.

Definition at line 495 of file MultiLevelStationaryVelocityTransformation.h.

§ UpperIntegrationLimit()

double mirtk::MultiLevelStationaryVelocityTransformation::UpperIntegrationLimit ( double  t,
double  t0 
) const
inlineprotected

Upper integration limit used given the temporal origin of both target and source images. If both images have the same temporal origin, the value of the member variable T is returned. Note that T may be set to zero in order to force no displacement between images located at the same point in time to be zero. This is especially useful when animating the deformation between two images with successively increasing upper integration limit. Otherwise, if the temporal origin of the two images differs, the signed difference between these is returned, i.e., t - t0, which corresponds to a forward integration of the target point (x, y, z) to the time point of the source image.

Definition at line 379 of file MultiLevelStationaryVelocityTransformation.h.


The documentation for this class was generated from the following file: