SimpleITK
|
Generate a displacement field from a coordinate transform. More...
#include <sitkTransformToDisplacementFieldFilter.h>
Public Types | |
using | PixelIDTypeList = RealVectorPixelIDTypeList |
using | Self = TransformToDisplacementFieldFilter |
![]() | |
using | Self = ImageFilter |
![]() | |
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 |
Self & | SetOutputDirection (std::vector< double > OutputDirection) |
Self & | SetOutputOrigin (std::vector< double > OutputOrigin) |
Self & | SetOutputPixelType (PixelIDValueEnum OutputPixelType) |
Set the output pixel type, only sitkVectorFloat32 and sitkVectorFloat64 are supported. More... | |
Self & | SetOutputSpacing (std::vector< double > OutputSpacing) |
void | SetReferenceImage (const Image &refImage) |
Self & | SetSize (std::vector< unsigned int > Size) |
std::string | ToString () const |
TransformToDisplacementFieldFilter () | |
virtual | ~TransformToDisplacementFieldFilter () |
![]() | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
![]() | |
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 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... | |
![]() | |
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) |
![]() | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
![]() | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
![]() | |
template<class TImageType > | |
static void | FixNonZeroIndex (TImageType *img) |
![]() | |
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<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
static const itk::EventObject & | GetITKEventObject (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) |
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.
This class was taken from the Insight Journal paper: https://www.insight-journal.org/browse/publication/240
Definition at line 50 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Setup for member function dispatching
Definition at line 138 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.
|
virtual |
Destructor
itk::simple::TransformToDisplacementFieldFilter::TransformToDisplacementFieldFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
Execute the filter on the input image
|
private |
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 119 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Set the output direction cosine matrix.
Definition at line 116 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Get the output image origin.
Definition at line 96 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Get the ouput pixel type.
Definition at line 76 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Get the output image spacing.
Definition at line 106 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Set/Get the size of the output image.
Definition at line 86 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Set the output direction cosine matrix.
Definition at line 111 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Set the output image origin.
Definition at line 91 of file sitkTransformToDisplacementFieldFilter.h.
|
inline |
Set the output pixel type, only sitkVectorFloat32 and sitkVectorFloat64 are supported.
Definition at line 71 of file sitkTransformToDisplacementFieldFilter.h.
|
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
|
inline |
Set/Get the size of the output image.
Definition at line 81 of file sitkTransformToDisplacementFieldFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 142 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 144 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 156 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 151 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 147 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 153 of file sitkTransformToDisplacementFieldFilter.h.
|
private |
Definition at line 149 of file sitkTransformToDisplacementFieldFilter.h.