Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

cmtk::VoxelMatchingAffineFunctionalTemplate< VM > Class Template Reference
[cmtkRegistration Library]

Functional that evaluates a voxel-based similarity measure. More...

#include <cmtkVoxelMatchingAffineFunctionalTemplate.h>

Inheritance diagram for cmtk::VoxelMatchingAffineFunctionalTemplate< VM >:
Inheritance graph
[legend]
Collaboration diagram for cmtk::VoxelMatchingAffineFunctionalTemplate< VM >:
Collaboration graph
[legend]

List of all members.

Classes

struct  EvaluateTaskInfo
 Thread parameter block for incremental gradient computation. More...

Public Types

typedef
VoxelMatchingAffineFunctionalTemplate
< VM > 
Self
 This class type.
typedef SmartPointer< SelfSmartPtr
 Smart pointer to this class.
typedef
VoxelMatchingAffineFunctional 
Superclass
 Superclass.
typedef Functional::ReturnType ReturnType
 Return type.

Public Member Functions

 VoxelMatchingAffineFunctionalTemplate (UniformVolume::SmartPtr &reference, UniformVolume::SmartPtr &floating, AffineXform::SmartPtr &affineXform)
 Constructor.
virtual ~VoxelMatchingAffineFunctionalTemplate ()
 Destructor.
virtual Self::ReturnType EvaluateAt (CoordinateVector &v)
 Evaluate with new parameter vector.
virtual Self::ReturnType Evaluate ()
 Compute functional value with volume clipping.

Static Public Member Functions

static void EvaluateThread (void *const args, const size_t taskIdx, const size_t taskCnt, const size_t threadIdx, const size_t)
 Compute functional gradient as a thread.

Public Attributes

size_t m_NumberOfThreads
 Number of threads that this object was created for.
std::vector< VM > m_ThreadMetric
 Metric objects for the separate threads.
MutexLock m_MetricMutex
 Mutex lock for access to global Metric field.
std::vector< typename
Self::EvaluateTaskInfo > 
m_EvaluateTaskInfo
 Info blocks for parallel threads evaluating functional gradient.

Detailed Description

template<class VM>
class cmtk::VoxelMatchingAffineFunctionalTemplate< VM >

Functional that evaluates a voxel-based similarity measure.

This class defines the type of functional that is optimized during voxel-based registration. It holds references to reference and floating data and computes similarity as well as its gradient w.r.t. a given transformation.

The metric to be optimized is given by a template parameter, therefore allowing inlined code to be generated for efficient evaluation.

Definition at line 59 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.


Member Typedef Documentation

Return type.

Reimplemented from cmtk::Functional.

Definition at line 76 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

This class type.

Reimplemented from cmtk::VoxelMatchingAffineFunctional.

Definition at line 67 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

Smart pointer to this class.

Reimplemented from cmtk::VoxelMatchingAffineFunctional.

Definition at line 70 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

Superclass.

Reimplemented from cmtk::VoxelMatchingAffineFunctional.

Definition at line 73 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.


Constructor & Destructor Documentation

Constructor.

Init pointers to volume and transformation objects and initialize internal data structures.

Parameters:
referenceThe reference (i.e. static) volume.
floatingThe floating (i.e. transformed) volume.
affineXformA transformation template. This object determines the type of transformation to be optimized. Its initial value is not relevant.

Definition at line 85 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

template<class VM>
virtual cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::~VoxelMatchingAffineFunctionalTemplate (  ) [inline, virtual]

Destructor.

Definition at line 94 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.


Member Function Documentation

template<class VM>
virtual Self::ReturnType cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::Evaluate (  ) [inline, virtual]

Compute functional value with volume clipping.

This function iterates over all voxels of the reference image that - after applying the current coordinate transformation - are located inside the mode image. This set of voxels is determined on-the-fly by an extension of Liang and Barsky's "Parameterized Line-Clipping" technique.

From the resulting sequence of reference/floating voxel pairs, the selected voxel-based similarity measure (metric) is computed.

Returns:
The computed similarity measure as returned by the "Metric" subobject.
See also:
VolumeClipping

Reimplemented from cmtk::Functional.

Definition at line 115 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

template<class VM>
virtual Self::ReturnType cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::EvaluateAt ( CoordinateVector v ) [inline, virtual]

Evaluate with new parameter vector.

Definition at line 97 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

template<class VM>
static void cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::EvaluateThread ( void *const   args,
const size_t  taskIdx,
const size_t  taskCnt,
const size_t  threadIdx,
const   size_t 
) [inline, static]

Compute functional gradient as a thread.

This function (i.e., each thread) iterates over all parameters of the current warp transformation. Among all active (i.e., not disabled) parameters, it selects the ones that have an index with modulus equal to the threads index when divided by the total number of threads. For these parameters, the thread computes the partial derivative of the functional by finite-difference approximation.

Definition at line 195 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.


Member Data Documentation

template<class VM>
std::vector<typename Self::EvaluateTaskInfo> cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::m_EvaluateTaskInfo

Info blocks for parallel threads evaluating functional gradient.

Definition at line 185 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

Mutex lock for access to global Metric field.

Definition at line 165 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

Number of threads that this object was created for.

This is the actual maximum number of threads running at any time, but not necessarily the number of parallel tasks to be completed. All duplicated data structures are generated with the multiplicity given by this value. It is determined from Threads when the object is first instanced. It cannot be changed afterwards.

Definition at line 159 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.

template<class VM>
std::vector<VM> cmtk::VoxelMatchingAffineFunctionalTemplate< VM >::m_ThreadMetric

Metric objects for the separate threads.

Definition at line 162 of file cmtkVoxelMatchingAffineFunctionalTemplate.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines