SimpleITK  1.3.0.dev466
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::TransformToDisplacementFieldFilter Class Reference

Generate a displacement field from a coordinate transform. More...

#include <sitkTransformToDisplacementFieldFilter.h>

+ Inheritance diagram for itk::simple::TransformToDisplacementFieldFilter:
+ Collaboration diagram for itk::simple::TransformToDisplacementFieldFilter:

Public Types

typedef RealVectorPixelIDTypeList PixelIDTypeList
 
typedef TransformToDisplacementFieldFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 0 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

Image Execute (const Transform &transform)
 
Image Execute (const Transform &transform, PixelIDValueEnum outputPixelType, const std::vector< unsigned int > &size, const std::vector< double > &outputOrigin, const std::vector< double > &outputSpacing, std::vector< double > outputDirection)
 
std::string GetName () const
 
std::vector< double > GetOutputDirection () const
 
std::vector< double > GetOutputOrigin () const
 
PixelIDValueEnum GetOutputPixelType () const
 Get the ouput pixel type. More...
 
std::vector< double > GetOutputSpacing () const
 
std::vector< unsigned int > GetSize () const
 
SelfSetOutputDirection (std::vector< double > OutputDirection)
 
SelfSetOutputOrigin (const std::vector< double > &OutputOrigin)
 
SelfSetOutputPixelType (PixelIDValueEnum OutputPixelType)
 Set the output pixel type, only sitkVectorFloat32 and sitkVectorFloat64 are supported. More...
 
SelfSetOutputSpacing (const std::vector< double > &OutputSpacing)
 
void SetReferenceImage (const Image &refImage)
 
SelfSetSize (const std::vector< unsigned int > &Size)
 
std::string ToString () const
 
 TransformToDisplacementFieldFilter ()
 
virtual ~TransformToDisplacementFieldFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 0 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Image(Self::* MemberFunctionType) (const Transform *transform)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Transform *transform)
 

Private Attributes

nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
std::vector< double > m_OutputDirection
 
std::vector< double > m_OutputOrigin
 
PixelIDValueEnum m_OutputPixelType
 
std::vector< double > m_OutputSpacing
 
std::vector< unsigned int > m_Size
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 0 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Generate a displacement field from a coordinate transform.

Output information (spacing, size and direction) for the output image should be set. This information has the normal defaults of unit spacing, zero origin and identity direction. Optionally, the output information can be obtained from a reference image. If the reference image is provided and UseReferenceImage is On, then the spacing, origin and direction of the reference image will be used.

Since this filter produces an image which is a different size than its input, it needs to override several of the methods defined in ProcessObject in order to properly manage the pipeline execution model. In particular, this filter overrides ProcessObject::GenerateOutputInformation() .

This filter is implemented as a multithreaded filter. It provides a ThreadedGenerateData() method for its implementation.

Author
Marius Staring, Leiden University Medical Center, The Netherlands.

This class was taken from the Insight Journal paper: https://hdl.handle.net/1926/1387

See also
itk::simple::TransformToDisplacementFieldFilter for the procedural interface
itk::TransformToDisplacementFieldFilter for the Doxygen on the original ITK class.
Examples:
DemonsRegistration2/DemonsRegistration2.cxx.

Definition at line 50 of file sitkTransformToDisplacementFieldFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::TransformToDisplacementFieldFilter::MemberFunctionType) (const Transform *transform)
private

Setup for member function dispatching

Definition at line 140 of file sitkTransformToDisplacementFieldFilter.h.

Define the pixels types supported by this filter

Definition at line 62 of file sitkTransformToDisplacementFieldFilter.h.

Definition at line 52 of file sitkTransformToDisplacementFieldFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::TransformToDisplacementFieldFilter::~TransformToDisplacementFieldFilter ( )
virtual

Destructor

itk::simple::TransformToDisplacementFieldFilter::TransformToDisplacementFieldFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

Image itk::simple::TransformToDisplacementFieldFilter::Execute ( const Transform transform)

Execute the filter on the input image

Examples:
DemonsRegistration2/DemonsRegistration2.cxx.
Image itk::simple::TransformToDisplacementFieldFilter::Execute ( const Transform transform,
PixelIDValueEnum  outputPixelType,
const std::vector< unsigned int > &  size,
const std::vector< double > &  outputOrigin,
const std::vector< double > &  outputSpacing,
std::vector< double >  outputDirection 
)

Execute the filter on the input image with the given parameters

template<class TImageType >
Image itk::simple::TransformToDisplacementFieldFilter::ExecuteInternal ( const Transform transform)
private
std::string itk::simple::TransformToDisplacementFieldFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 118 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::GetOutputDirection ( ) const
inline

Set the output direction cosine matrix.

Definition at line 116 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::GetOutputOrigin ( ) const
inline

Get the output image origin.

Definition at line 96 of file sitkTransformToDisplacementFieldFilter.h.

PixelIDValueEnum itk::simple::TransformToDisplacementFieldFilter::GetOutputPixelType ( ) const
inline

Get the ouput pixel type.

Definition at line 76 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::GetOutputSpacing ( ) const
inline

Get the output image spacing.

Definition at line 106 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<unsigned int> itk::simple::TransformToDisplacementFieldFilter::GetSize ( ) const
inline

Set/Get the size of the output image.

Definition at line 86 of file sitkTransformToDisplacementFieldFilter.h.

Self& itk::simple::TransformToDisplacementFieldFilter::SetOutputDirection ( std::vector< double >  OutputDirection)
inline

Set the output direction cosine matrix.

Definition at line 111 of file sitkTransformToDisplacementFieldFilter.h.

Self& itk::simple::TransformToDisplacementFieldFilter::SetOutputOrigin ( const std::vector< double > &  OutputOrigin)
inline

Set the output image origin.

Definition at line 91 of file sitkTransformToDisplacementFieldFilter.h.

Self& itk::simple::TransformToDisplacementFieldFilter::SetOutputPixelType ( PixelIDValueEnum  OutputPixelType)
inline

Set the output pixel type, only sitkVectorFloat32 and sitkVectorFloat64 are supported.

Definition at line 71 of file sitkTransformToDisplacementFieldFilter.h.

Self& itk::simple::TransformToDisplacementFieldFilter::SetOutputSpacing ( const std::vector< double > &  OutputSpacing)
inline

Set the output image spacing.

Definition at line 101 of file sitkTransformToDisplacementFieldFilter.h.

void itk::simple::TransformToDisplacementFieldFilter::SetReferenceImage ( const Image refImage)

This methods sets the size, origin, spacing and direction to that of the provided image

Examples:
DemonsRegistration2/DemonsRegistration2.cxx.
Self& itk::simple::TransformToDisplacementFieldFilter::SetSize ( const std::vector< unsigned int > &  Size)
inline

Set/Get the size of the output image.

Definition at line 81 of file sitkTransformToDisplacementFieldFilter.h.

std::string itk::simple::TransformToDisplacementFieldFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 144 of file sitkTransformToDisplacementFieldFilter.h.

Member Data Documentation

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::TransformToDisplacementFieldFilter::m_MemberFactory
private

Definition at line 146 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputDirection
private

Definition at line 154 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputOrigin
private

Definition at line 151 of file sitkTransformToDisplacementFieldFilter.h.

PixelIDValueEnum itk::simple::TransformToDisplacementFieldFilter::m_OutputPixelType
private

Definition at line 149 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputSpacing
private

Definition at line 152 of file sitkTransformToDisplacementFieldFilter.h.

std::vector<unsigned int> itk::simple::TransformToDisplacementFieldFilter::m_Size
private

Definition at line 150 of file sitkTransformToDisplacementFieldFilter.h.


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