SimpleITK  
sitkTransformixImageFilterImpl.h
Go to the documentation of this file.
1 #ifndef sitktransformiximagefilterimpl_h
2 #define sitktransformiximagefilterimpl_h
3 
4 // SimpleITK
7 
8 // Transformix
9 #include "itkTransformixFilter.h"
10 #include "elxParameterObject.h"
11 
12 namespace itk::simple {
13 
14 class SITKElastix_HIDDEN TransformixImageFilter::TransformixImageFilterImpl
15 {
16 public:
17  TransformixImageFilterImpl();
18  ~TransformixImageFilterImpl();
19 
20  typedef TransformixImageFilterImpl Self;
21 
22  typedef elastix::ParameterObject ParameterObjectType;
23  typedef ParameterObjectType::Pointer ParameterObjectPointer;
24  typedef ParameterObjectType::ParameterMapType ParameterMapType;
25  typedef ParameterObjectType::ParameterMapVectorType ParameterMapVectorType;
26  typedef ParameterMapType::iterator ParameterMapIterator;
27  typedef ParameterMapType::const_iterator ParameterMapConstIterator;
28  typedef itk::ParameterFileParser ParameterFileParserType;
29  typedef ParameterFileParserType::Pointer ParameterFileParserPointer;
30  typedef ParameterObjectType::ParameterKeyType ParameterKeyType;
31  typedef ParameterObjectType::ParameterValueType ParameterValueType;
32  typedef ParameterObjectType::ParameterValueVectorType ParameterValueVectorType;
33 
34  std::string GetName() const;
35 
36  void SetMovingImage( const Image& movingImage );
37  Image& GetMovingImage();
38  void RemoveMovingImage();
39 
40  void SetFixedPointSetFileName( const std::string movingPointSetFileName );
41  std::string GetFixedPointSetFileName();
42  void RemoveFixedPointSetFileName();
43 
44  void SetComputeSpatialJacobian( const bool );
45  bool GetComputeSpatialJacobian();
46  void ComputeSpatialJacobianOn();
47  void ComputeSpatialJacobianOff();
48 
49  void SetComputeDeterminantOfSpatialJacobian( const bool );
50  bool GetComputeDeterminantOfSpatialJacobian();
51  void ComputeDeterminantOfSpatialJacobianOn();
52  void ComputeDeterminantOfSpatialJacobianOff();
53 
54  void SetComputeDeformationField( bool );
55  bool GetComputeDeformationField();
56  void ComputeDeformationFieldOn();
57  void ComputeDeformationFieldOff();
58 
59  void SetOutputDirectory( const std::string outputDirectory );
60  std::string GetOutputDirectory();
61  void RemoveOutputDirectory();
62 
63  void SetLogFileName( const std::string logFileName );
64  std::string GetLogFileName();
65  void RemoveLogFileName();
66 
67  void SetLogToFile( const bool logToFile );
68  bool GetLogToFile();
69  void LogToFileOn();
70  void LogToFileOff();
71 
72  void SetLogToConsole( const bool logToConsole );
73  bool GetLogToConsole();
74  void LogToConsoleOn();
75  void LogToConsoleOff();
76 
77  void SetTransformParameterMap( const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector );
78  void SetTransformParameterMap( const std::map< std::string, std::vector< std::string > > parameterMap );
79  void AddTransformParameterMap( const std::map< std::string, std::vector< std::string > > parameterMap );
80  std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMap();
81  unsigned int GetNumberOfTransformParameterMaps();
82 
83  void SetTransformParameter( const std::string key, const std::string value );
84  void SetTransformParameter( const std::string key, const std::vector< std::string > value );
85  void SetTransformParameter( const unsigned int index, const std::string key, const std::string value );
86  void SetTransformParameter( const unsigned int index, const std::string key, const std::vector< std::string > value );
87  void AddTransformParameter( const std::string key, const std::string value );
88  void AddTransformParameter( const unsigned int index, const std::string key, const std::string value );
89  std::vector< std::string > GetTransformParameter( const std::string key );
90  std::vector< std::string > GetTransformParameter( const unsigned int index, const std::string key );
91  void RemoveTransformParameter( const std::string key );
92  void RemoveTransformParameter( const unsigned int index, const std::string key );
93 
94  std::map< std::string, std::vector< std::string > > ReadParameterFile( const std::string filename );
95  void WriteParameterFile( const std::map< std::string, std::vector< std::string > > parameterMap, const std::string parameterFileName );
96 
97  void PrintParameterMap();
98  void PrintParameterMap( const std::map< std::string, std::vector< std::string > > parameterMap );
99  void PrintParameterMap( const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector );
100 
101  Image Execute();
102 
103  Image GetResultImage();
104  Image GetDeformationField();
105 
106  bool IsEmpty( const Image& image );
107 
108  // Definitions for SimpleITK member factory
109  typedef Image ( Self::*MemberFunctionType )();
110  template< class TMovingImage > Image ExecuteInternal();
111  friend struct detail::MemberFunctionAddressor< MemberFunctionType >;
112  std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory;
113 
117 
119 
124 
125  std::string m_OutputDirectory;
126  std::string m_LogFileName;
127 
130 };
131 
132 }
133 
134 #endif // sitktransformiximagefilterimpl_h
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
itk::simple::TransformixImageFilter::m_LogToConsole
bool m_LogToConsole
Definition: sitkTransformixImageFilterImpl.h:128
itk::simple::TransformixImageFilter::ParameterMapVectorType
ParameterObjectType::ParameterMapVectorType ParameterMapVectorType
Definition: sitkTransformixImageFilterImpl.h:25
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:28
itk::simple::TransformixImageFilter::ParameterMapIterator
ParameterMapType::iterator ParameterMapIterator
Definition: sitkTransformixImageFilterImpl.h:26
itk::simple::TransformixImageFilter::ParameterValueType
ParameterObjectType::ParameterValueType ParameterValueType
Definition: sitkTransformixImageFilterImpl.h:31
itk::simple::ReadParameterFile
SITKElastix_EXPORT std::map< std::string, std::vector< std::string > > ReadParameterFile(const std::string filename)
itk::simple::TransformixImageFilter
Definition: sitkTransformixImageFilter.h:32
itk::simple::TransformixImageFilter::ParameterMapConstIterator
ParameterMapType::const_iterator ParameterMapConstIterator
Definition: sitkTransformixImageFilterImpl.h:27
itk::simple::TransformixImageFilter::ParameterFileParserPointer
ParameterFileParserType::Pointer ParameterFileParserPointer
Definition: sitkTransformixImageFilterImpl.h:29
itk::simple::TransformixImageFilter::ParameterObjectType
elastix::ParameterObject ParameterObjectType
Definition: sitkTransformixImageFilterImpl.h:22
itk::simple::TransformixImageFilter::m_OutputDirectory
std::string m_OutputDirectory
Definition: sitkTransformixImageFilterImpl.h:125
sitkMemberFunctionFactory.h
itk::simple::TransformixImageFilter::m_MovingPointSetFileName
std::string m_MovingPointSetFileName
Definition: sitkTransformixImageFilterImpl.h:123
itk::simple::TransformixImageFilter::m_ComputeDeformationField
bool m_ComputeDeformationField
Definition: sitkTransformixImageFilterImpl.h:122
itk::simple::TransformixImageFilter::m_ComputeSpatialJacobian
bool m_ComputeSpatialJacobian
Definition: sitkTransformixImageFilterImpl.h:120
itk::simple::TransformixImageFilter::m_LogToFile
bool m_LogToFile
Definition: sitkTransformixImageFilterImpl.h:129
SITKElastix_HIDDEN
#define SITKElastix_HIDDEN
Definition: sitkElastixTransformixWrappers.h:35
itk::simple::TransformixImageFilter::m_TransformParameterMapVector
ParameterMapVectorType m_TransformParameterMapVector
Definition: sitkTransformixImageFilterImpl.h:118
itk::simple::TransformixImageFilter::m_ComputeDeterminantOfSpatialJacobian
bool m_ComputeDeterminantOfSpatialJacobian
Definition: sitkTransformixImageFilterImpl.h:121
itk::simple::TransformixImageFilter::ParameterValueVectorType
ParameterObjectType::ParameterValueVectorType ParameterValueVectorType
Definition: sitkTransformixImageFilterImpl.h:32
itk::simple::TransformixImageFilter::m_MovingImage
Image m_MovingImage
Definition: sitkTransformixImageFilterImpl.h:114
itk::simple::TransformixImageFilter::m_DeformationField
Image m_DeformationField
Definition: sitkTransformixImageFilterImpl.h:116
itk::simple::TransformixImageFilter::ParameterKeyType
ParameterObjectType::ParameterKeyType ParameterKeyType
Definition: sitkTransformixImageFilterImpl.h:30
itk::simple::WriteParameterFile
SITKElastix_EXPORT void WriteParameterFile(const std::map< std::string, std::vector< std::string > > parameterMap, const std::string filename)
itk::simple::TransformixImageFilter::Self
TransformixImageFilterImpl Self
Definition: sitkTransformixImageFilterImpl.h:20
itk::simple::TransformixImageFilter::ParameterObjectPointer
ParameterObjectType::Pointer ParameterObjectPointer
Definition: sitkTransformixImageFilterImpl.h:23
itk::simple::TransformixImageFilter::ParameterFileParserType
itk::ParameterFileParser ParameterFileParserType
Definition: sitkTransformixImageFilterImpl.h:28
itk::simple::TransformixImageFilter::m_LogFileName
std::string m_LogFileName
Definition: sitkTransformixImageFilterImpl.h:126
itk::simple::TransformixImageFilter::ParameterMapType
ParameterObjectType::ParameterMapType ParameterMapType
Definition: sitkTransformixImageFilterImpl.h:24
sitkTransformixImageFilter.h
itk::simple::TransformixImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkTransformixImageFilterImpl.h:112
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::PrintParameterMap
SITKElastix_EXPORT void PrintParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
itk::simple::TransformixImageFilter::m_ResultImage
Image m_ResultImage
Definition: sitkTransformixImageFilterImpl.h:115
itk::simple::TransformixImageFilter::ParameterMapVectorType
std::vector< ParameterMapType > ParameterMapVectorType
Definition: sitkTransformixImageFilter.h:46