STIR 6.4.0
stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT > Class Template Reference

Class to perform non-rigid object transformations in arbitrary dimensions. More...

#include "stir_experimental/motion/NonRigidObjectTransformationUsingBSplines.h"

Inheritance diagram for stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >:

Public Member Functions

 NonRigidObjectTransformationUsingBSplines (const std::string &filename_x, const std::string &filename_y, const std::string &filename_z, const int bspline_order)
 Give x, y and z components of the deformation field images separately. N.B., this will only work if the three components are in STIR orientation.
 
 NonRigidObjectTransformationUsingBSplines (const std::string &filename, const int bspline_order)
 Give x, y and z components of the deformation field images together (e.g., multicomponent nifti)
 
virtual BasicCoordinate< num_dimensions, elemT > transform_point (const BasicCoordinate< num_dimensions, elemT > &point) const
 Transform point.
 
float jacobian (const BasicCoordinate< num_dimensions, elemT > &point) const
 Returns the determinant of the Jacobian matrix.
 
virtual void set_defaults ()
 Set defaults before parsing.
 
virtual void initialise_keymap ()
 Initialise all keywords.
 
virtual bool post_processing ()
 This will be called at the end of the parsing.
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
 
- Public Member Functions inherited from stir::RegisteredParsingObject< NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >, ObjectTransformation< num_dimensions, elemT >, ObjectTransformation< num_dimensions, elemT > >
std::string get_registered_name () const override
 Returns Derived::registered_name.
 
std::string parameter_info () override
 Returns a string with all parameters and their values, in a form suitable for parsing again.
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
void ask_parameters ()
 

Static Public Attributes

static const char *const registered_name
 

Additional Inherited Members

- Public Types inherited from stir::ObjectTransformation< num_dimensions, elemT >
typedef ObjectTransformation hierarchy_base_type
 typedef used by read_from_file
 
- Static Public Member Functions inherited from stir::RegisteredParsingObject< NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >, ObjectTransformation< num_dimensions, elemT >, ObjectTransformation< num_dimensions, elemT > >
static ObjectTransformation< num_dimensions, elemT > * read_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
 
- Static Public Member Functions inherited from stir::RegisteredObject< ObjectTransformation< num_dimensions, elemT > >
static ObjectTransformation< num_dimensions, elemT > * read_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
 
static ObjectTransformation< num_dimensions, elemT > * ask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
 
- Protected Types inherited from stir::RegisteredObject< ObjectTransformation< num_dimensions, elemT > >
typedef ObjectTransformation< num_dimensions, elemT > *(* RootFactory) (std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
 
typedef FactoryRegistry< std::string, RootFactory, interfile_lessRegistryType
 The type of the registry.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< ObjectTransformation< num_dimensions, elemT > >
static RegistryTyperegistry ()
 Static function returning the registry.
 
KeyParser parser
 

Detailed Description

template<int num_dimensions, class elemT>
class stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >

Class to perform non-rigid object transformations in arbitrary dimensions.

Member Function Documentation

◆ transform_point()

template<int num_dimensions, class elemT>
BasicCoordinate< num_dimensions, elemT > stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::transform_point ( const BasicCoordinate< num_dimensions, elemT > & point) const
virtual

Transform point.

Implements stir::ObjectTransformation< num_dimensions, elemT >.

References transform_point().

Referenced by transform_point().

◆ jacobian()

template<int num_dimensions, class elemT>
float stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::jacobian ( const BasicCoordinate< num_dimensions, elemT > & point) const
virtual

Returns the determinant of the Jacobian matrix.

This is related to the volume-element change due to the transformation.

Implements stir::ObjectTransformation< num_dimensions, elemT >.

References stir::VectorWithOffset< T >::begin(), stir::determinant(), and jacobian().

Referenced by jacobian().

◆ set_defaults()

template<int num_dimensions, class elemT>
void stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::set_defaults ( )
virtual

◆ initialise_keymap()

template<int num_dimensions, class elemT>
void stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::initialise_keymap ( )
virtual

Initialise all keywords.

Reimplemented from stir::ParsingObject.

References initialise_keymap().

Referenced by initialise_keymap().

◆ post_processing()

template<int num_dimensions, class elemT>
bool stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::post_processing ( )
virtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::ParsingObject.

References stir::info(), post_processing(), and stir::warning().

Referenced by NonRigidObjectTransformationUsingBSplines(), NonRigidObjectTransformationUsingBSplines(), and post_processing().

◆ set_key_values()

template<int num_dimensions, class elemT>
void stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::set_key_values ( )
virtual

This will be called before parsing or parameter_info is called.

This virtual function should be overloaded when the values for the keywords depend on other variables in the derived class that can be set independently of the parsing.

Example:

A derived class has a public member angle_in_radians, while a keyword sets a private member angle_in_degrees.

Reimplemented from stir::ParsingObject.

References set_key_values().

Referenced by set_key_values().


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