SimpleITK  2.1.0.dev86
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

using PixelIDTypeList = RealVectorPixelIDTypeList
 
using Self = TransformToDisplacementFieldFilter
 
- Public Types inherited from itk::simple::ImageFilter
using Self = ImageFilter
 
- Public Types inherited from itk::simple::ProcessObject
using Self = ProcessObject
 

Public Member Functions

Image Execute (const Transform &transform)
 
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 (std::vector< double > OutputOrigin)
 
SelfSetOutputPixelType (PixelIDValueEnum OutputPixelType)
 Set the output pixel type, only sitkVectorFloat32 and sitkVectorFloat64 are supported. More...
 
SelfSetOutputSpacing (std::vector< double > OutputSpacing)
 
void SetReferenceImage (const Image &refImage)
 
SelfSetSize (std::vector< unsigned int > Size)
 
std::string ToString () const
 
 TransformToDisplacementFieldFilter ()
 
virtual ~TransformToDisplacementFieldFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, const std::function< void()> &func)
 Directly add a callback to observe an event. More...
 
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
 
virtual void SetNumberOfWorkUnits (unsigned int n)
 
virtual unsigned int GetNumberOfWorkUnits () const
 

Private Types

using MemberFunctionType = Image(Self::*)(const Transform *transform)
 

Private Member Functions

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

Private Attributes

std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
std::vector< double > m_OutputDirection {std::vector<double>()}
 
std::vector< double > m_OutputOrigin {std::vector<double>(3, 0.0)}
 
PixelIDValueEnum m_OutputPixelType {itk::simple::sitkVectorFloat64}
 
std::vector< double > m_OutputSpacing {std::vector<double>(3, 1.0)}
 
std::vector< unsigned int > m_Size {std::vector<unsigned int>(3, 64)}
 

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 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...
 
static bool SetGlobalDefaultThreader (const std::string &threader)
 Set/Get the default threader used for process objects. More...
 
static std::string GetGlobalDefaultThreader ()
 Set/Get the default threader used for process objects. More...
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 Set/Get the default threader used for process objects. More...
 
- Protected Member Functions inherited from itk::simple::ImageFilter
void CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name)
 
void CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name)
 
void CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name)
 
- 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) noexcept
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter
template<class TImageType >
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 TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *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 51 of file sitkTransformToDisplacementFieldFilter.h.

Member Typedef Documentation

◆ MemberFunctionType

Setup for member function dispatching

Definition at line 139 of file sitkTransformToDisplacementFieldFilter.h.

◆ PixelIDTypeList

Define the pixels types supported by this filter

Definition at line 63 of file sitkTransformToDisplacementFieldFilter.h.

◆ Self

Definition at line 53 of file sitkTransformToDisplacementFieldFilter.h.

Constructor & Destructor Documentation

◆ ~TransformToDisplacementFieldFilter()

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

Destructor

◆ TransformToDisplacementFieldFilter()

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

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

◆ Execute()

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

Execute the filter on the input image

Examples
DemonsRegistration2/DemonsRegistration2.cxx.

◆ ExecuteInternal()

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

◆ GetName()

std::string itk::simple::TransformToDisplacementFieldFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 120 of file sitkTransformToDisplacementFieldFilter.h.

◆ GetOutputDirection()

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

Set the output direction cosine matrix.

Definition at line 117 of file sitkTransformToDisplacementFieldFilter.h.

◆ GetOutputOrigin()

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

Get the output image origin.

Definition at line 97 of file sitkTransformToDisplacementFieldFilter.h.

◆ GetOutputPixelType()

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

Get the ouput pixel type.

Definition at line 77 of file sitkTransformToDisplacementFieldFilter.h.

◆ GetOutputSpacing()

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

Get the output image spacing.

Definition at line 107 of file sitkTransformToDisplacementFieldFilter.h.

◆ GetSize()

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

Set/Get the size of the output image.

Definition at line 87 of file sitkTransformToDisplacementFieldFilter.h.

◆ SetOutputDirection()

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

Set the output direction cosine matrix.

Definition at line 112 of file sitkTransformToDisplacementFieldFilter.h.

◆ SetOutputOrigin()

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

Set the output image origin.

Definition at line 92 of file sitkTransformToDisplacementFieldFilter.h.

◆ SetOutputPixelType()

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

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

Definition at line 72 of file sitkTransformToDisplacementFieldFilter.h.

◆ SetOutputSpacing()

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

Set the output image spacing.

Definition at line 102 of file sitkTransformToDisplacementFieldFilter.h.

◆ SetReferenceImage()

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.

◆ SetSize()

Self& itk::simple::TransformToDisplacementFieldFilter::SetSize ( std::vector< unsigned int >  Size)
inline

Set/Get the size of the output image.

Definition at line 82 of file sitkTransformToDisplacementFieldFilter.h.

◆ ToString()

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

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

◆ detail::MemberFunctionAddressor< MemberFunctionType >

Definition at line 143 of file sitkTransformToDisplacementFieldFilter.h.

Member Data Documentation

◆ m_MemberFactory

std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::TransformToDisplacementFieldFilter::m_MemberFactory
private

Definition at line 145 of file sitkTransformToDisplacementFieldFilter.h.

◆ m_OutputDirection

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputDirection {std::vector<double>()}
private

Definition at line 157 of file sitkTransformToDisplacementFieldFilter.h.

◆ m_OutputOrigin

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputOrigin {std::vector<double>(3, 0.0)}
private

Definition at line 152 of file sitkTransformToDisplacementFieldFilter.h.

◆ m_OutputPixelType

PixelIDValueEnum itk::simple::TransformToDisplacementFieldFilter::m_OutputPixelType {itk::simple::sitkVectorFloat64}
private

Definition at line 148 of file sitkTransformToDisplacementFieldFilter.h.

◆ m_OutputSpacing

std::vector<double> itk::simple::TransformToDisplacementFieldFilter::m_OutputSpacing {std::vector<double>(3, 1.0)}
private

Definition at line 154 of file sitkTransformToDisplacementFieldFilter.h.

◆ m_Size

std::vector<unsigned int> itk::simple::TransformToDisplacementFieldFilter::m_Size {std::vector<unsigned int>(3, 64)}
private

Definition at line 150 of file sitkTransformToDisplacementFieldFilter.h.


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