C3DTransformation Class Referenceabstract

This is the generic base class for 3D transformations. More...

#include <mia/3d/transform.hh>

Inheritance diagram for C3DTransformation:
[legend]
Collaboration diagram for C3DTransformation:
[legend]

Data Structures

class  const_iterator
 
class  iterator_impl
 

Public Member Functions

virtual C3DFVector apply (const C3DFVector &x) const __attribute__((deprecated))
 
virtual const_iterator begin () const =0
 
virtual const_iterator begin_range (const C3DBounds &begin, const C3DBounds &end) const =0
 
 C3DTransformation (const C3DInterpolatorFactory &ipf)
 
virtual C3DTransformationclone () const
 
virtual size_t degrees_of_freedom () const =0
 
virtual C3DFMatrix derivative_at (int x, int y, int z) const =0
 
virtual C3DFMatrix derivative_at (const C3DFVector &x) const =0
 
virtual const_iterator end () const =0
 
virtual const_iterator end_range (const C3DBounds &begin, const C3DBounds &end) const =0
 
const std::string & get_creator_string () const
 
virtual C3DFVector get_displacement_at (const C3DFVector &x) const =0
 
virtual float get_jacobian (const C3DFVectorfield &v, float delta) const =0
 
virtual float get_max_transform () const =0
 
virtual C3DBounds get_minimal_supported_image_size () const
 
virtual CDoubleVector get_parameters () const =0
 
virtual const C3DBoundsget_size () const =0
 
virtual C3DTransformationinvert () const =0
 
virtual C3DFVector operator() (const C3DFVector &x) const =0
 
virtual float pertuberate (C3DFVectorfield &v) const =0
 
virtual bool refine ()
 
virtual void reinit () const
 
void set_creator_string (const std::string &s)
 
void set_debug ()
 
virtual void set_identity ()=0
 
virtual void set_parameters (const CDoubleVector &params)=0
 
virtual void translate (const C3DFVectorfield &gradient, CDoubleVector &params) const =0
 
virtual void update (float step, const C3DFVectorfield &a)=0
 
P3DTransformation upscale (const C3DBounds &size) const
 
- Public Member Functions inherited from Transformation< C3DImage, C3DInterpolatorFactory >
double get_energy_penalty () const
 
double get_energy_penalty_and_gradient (CDoubleVector &gradient) const
 
bool has_energy_penalty () const
 
std::shared_ptr< C3DImageoperator() (const C3DImage &input) const
 
std::shared_ptr< C3DImageoperator() (const C3DImage &input, const C3DInterpolatorFactory &ipf_override) const
 
void set_interpolator_factory (const C3DInterpolatorFactory &ipf)
 
 Transformation (const C3DInterpolatorFactory &ipf)
 
virtual ~Transformation ()
 
- Public Member Functions inherited from CIOData
const std::string & get_source_format () const
 
void set_source_format (const std::string &format)
 
- Public Member Functions inherited from CAttributedData
CAttributeMap::const_iterator begin_attributes () const
 
void delete_attribute (const std::string &key)
 
CAttributeMap::const_iterator end_attributes () const
 
const PAttribute get_attribute (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key, T default_value) const
 
const std::string get_attribute_as_string (const std::string &key) const
 returns the requested attribute as string, returns an empty string if attribute doesn't exist More...
 
bool has_attribute (const std::string &key) const
 
CAttributedDataoperator= (const CAttributedData &org)
 Assignemt operator. More...
 
void print (std::ostream &os) const
 
void set_attribute (const std::string &key, PAttribute attr)
 
void set_attribute (const std::string &key, const std::string &value)
 
template<typename T >
void set_attribute (const std::string &key, const T &value)
 
void set_attribute (const std::string &key, const char *value)
 
void set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
 
 CAttributedData ()
 
 CAttributedData (const CAttributedData &org)
 
 CAttributedData (PAttributeMap attr)
 

Static Public Attributes

static constexpr const char * input_spacing_attr = "in-voxel-spacing"
 
static constexpr const char * output_spacing_attr = "out-voxel-spacing"
 
- Static Public Attributes inherited from Transformation< C3DImage, C3DInterpolatorFactory >
static const char * type_descr
 interface type for plugin implementation and search More...
 

Protected Member Functions

bool get_debug () const
 
- Protected Member Functions inherited from Transformation< C3DImage, C3DInterpolatorFactory >
const C3DInterpolatorFactoryget_interpolator_factory () const
 

Additional Inherited Members

- Public Types inherited from Transformation< C3DImage, C3DInterpolatorFactory >
typedef C3DImage Data
 typedef for the data type to be transformed by this transformation More...
 
typedef C3DInterpolatorFactory InterpolatorFactory
 type of the interpolator used by this transformation More...
 

Detailed Description

This is the generic base class for 3D transformations.

This class defines the interface for 3D transformations. Most methods are pure abstract and need to be implemented by a "real" transformation.

Definition at line 53 of file 3d/transform.hh.

Constructor & Destructor Documentation

◆ C3DTransformation()

C3DTransformation::C3DTransformation ( const C3DInterpolatorFactory ipf)

Standard constructor place holder

Member Function Documentation

◆ apply()

virtual C3DFVector C3DTransformation::apply ( const C3DFVector x) const
virtual
Returns
the displacement at coordinate x
Remarks
rename the function to something that explains better whats going on

Reimplemented in C3DLinearTransform.

◆ begin()

virtual const_iterator C3DTransformation::begin ( ) const
pure virtual
Returns
the start iterator of the transformation that iterates over the grid of the area the ransformation is defined on

Implemented in C3DLinearTransform.

◆ begin_range()

virtual const_iterator C3DTransformation::begin_range ( const C3DBounds begin,
const C3DBounds end 
) const
pure virtual
Returns
the start iterator of the transformation that iterates over the grid of the area the ransformation is defined on

Implemented in C3DLinearTransform.

◆ clone()

virtual C3DTransformation* C3DTransformation::clone ( ) const
virtual
Returns
a newly allocated copy of the actual transformation

◆ degrees_of_freedom()

virtual size_t C3DTransformation::degrees_of_freedom ( ) const
pure virtual
Returns
the number of free parameters this transformation provides

Implemented in C3DLinearTransform.

◆ derivative_at() [1/2]

virtual C3DFMatrix C3DTransformation::derivative_at ( int  x,
int  y,
int  z 
) const
pure virtual

evaluate the derivative (Jacobian matrix) of the transformation at the given grid coordinates

Parameters
x
y
z
Returns
3x3 matrix of the derivative

Implemented in C3DLinearTransform.

◆ derivative_at() [2/2]

virtual C3DFMatrix C3DTransformation::derivative_at ( const C3DFVector x) const
pure virtual

evaluate the derivative (Jacobian matrix) of the transformation at the given coordinates

Parameters
x
Returns
3x3 matrix of the derivative

Implemented in C3DLinearTransform.

◆ end()

virtual const_iterator C3DTransformation::end ( ) const
pure virtual
Returns
the end iterator of the transformation that iterates over the grid of the area the ransformation is defined on

Implemented in C3DLinearTransform.

◆ end_range()

virtual const_iterator C3DTransformation::end_range ( const C3DBounds begin,
const C3DBounds end 
) const
pure virtual
Returns
the end iterator of the transformation that iterates over the grid of the area the ransformation is defined on

Implemented in C3DLinearTransform.

◆ get_creator_string()

const std::string& C3DTransformation::get_creator_string ( ) const
Returns
the description string used to create this transformations

◆ get_debug()

bool C3DTransformation::get_debug ( ) const
protected
Returns
information about the debug state

◆ get_displacement_at()

virtual C3DFVector C3DTransformation::get_displacement_at ( const C3DFVector x) const
pure virtual

Returns the displacement of the transformation at a given coordinate

Parameters
xcoordinate
Returns
actual displacement

◆ get_jacobian()

virtual float C3DTransformation::get_jacobian ( const C3DFVectorfield v,
float  delta 
) const
pure virtual

Evaluate the Jacobian of the transformation when updated with vector field v by factor delta

Returns
Jacobian
Remarks
this only is used for fluid dynamics registration and should probably be moved elsewhere

Implemented in C3DLinearTransform.

◆ get_max_transform()

virtual float C3DTransformation::get_max_transform ( ) const
pure virtual
Returns
the (approximate) maximum absolute translation of the transformation over the whole domain

Implemented in C3DLinearTransform.

◆ get_minimal_supported_image_size()

virtual C3DBounds C3DTransformation::get_minimal_supported_image_size ( ) const
virtual

◆ get_parameters()

virtual CDoubleVector C3DTransformation::get_parameters ( ) const
pure virtual
Returns
the transformation parameters as a flat value array

Implemented in C3DLinearTransform.

◆ get_size()

virtual const C3DBounds& C3DTransformation::get_size ( ) const
pure virtual

A transformation is defined on [0,X-1]x[0.Y-1]y[0,Z-1].

Returns
the upper boundaries (X,Y,Z) of this range

Implemented in C3DLinearTransform.

◆ invert()

virtual C3DTransformation* C3DTransformation::invert ( ) const
pure virtual
Returns
a the inverse transform

Implemented in C3DLinearTransform.

◆ operator()()

virtual C3DFVector C3DTransformation::operator() ( const C3DFVector x) const
pure virtual

apply the actual transformation to point x

Returns
transformed point

Implemented in C3DLinearTransform.

◆ pertuberate()

virtual float C3DTransformation::pertuberate ( C3DFVectorfield v) const
pure virtual

evaluate the pertuberation of a vectorfield combined with this transformation

Parameters
[in,out]vvectorfield to be pertuberated
Returns
maximum value of the pertuberation
Remarks
this makes only sense for fluid dynamics registration and should be handled elsewhere

Implemented in C3DLinearTransform.

◆ refine()

virtual bool C3DTransformation::refine ( )
virtual

Increase the number of coefficients along the axis according to the maximum given by the c-rate. This is the complemantary step to upscaling the transformation.

Returns
true if an actual refinment was done.

◆ reinit()

virtual void C3DTransformation::reinit ( ) const
virtual

Placeholder for transformations that might need special initializations like the B-spline based transformation

◆ set_creator_string()

void C3DTransformation::set_creator_string ( const std::string &  s)

Set the descrition string that was used to create this transformstion

Parameters
s

◆ set_debug()

void C3DTransformation::set_debug ( )

Enable some additional debugging.

◆ set_identity()

virtual void C3DTransformation::set_identity ( )
pure virtual

set the transformation to be the identity transform

Implemented in C3DLinearTransform.

◆ set_parameters()

virtual void C3DTransformation::set_parameters ( const CDoubleVector params)
pure virtual

sets the transformation parameters from a flat value array

Implemented in C3DLinearTransform.

◆ translate()

virtual void C3DTransformation::translate ( const C3DFVectorfield gradient,
CDoubleVector params 
) const
pure virtual

Translate the input gradient to a vector field in the space of the transformation field

Remarks
this is too specialized and needs to be replaced by something

Implemented in C3DLinearTransform.

◆ update()

virtual void C3DTransformation::update ( float  step,
const C3DFVectorfield a 
)
pure virtual

update a transformation by using a vector field

Remarks
this is too specialized and should go away

Implemented in C3DLinearTransform.

◆ upscale()

P3DTransformation C3DTransformation::upscale ( const C3DBounds size) const

Transforation upscaling to new image size

Parameters
sizenew size of the transformation
Returns
shared pointer to upscaled transformation

Field Documentation

◆ input_spacing_attr

constexpr const char* C3DTransformation::input_spacing_attr = "in-voxel-spacing"
static

This attribute defines the voxel spacing of the input data of this transform.

Definition at line 364 of file 3d/transform.hh.

◆ output_spacing_attr

constexpr const char* C3DTransformation::output_spacing_attr = "out-voxel-spacing"
static

This attribute defines the output voxel spacing of this transform.

Definition at line 369 of file 3d/transform.hh.


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