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 
15 class SITKElastix_HIDDEN TransformixImageFilter::TransformixImageFilterImpl
16 {
17 public:
18  TransformixImageFilterImpl();
19  ~TransformixImageFilterImpl();
20 
21  typedef TransformixImageFilterImpl Self;
22 
23  typedef elastix::ParameterObject ParameterObjectType;
24  typedef ParameterObjectType::Pointer ParameterObjectPointer;
25  typedef ParameterObjectType::ParameterMapType ParameterMapType;
26  typedef ParameterObjectType::ParameterMapVectorType ParameterMapVectorType;
27  typedef ParameterMapType::iterator ParameterMapIterator;
28  typedef ParameterMapType::const_iterator ParameterMapConstIterator;
29  typedef itk::ParameterFileParser ParameterFileParserType;
30  typedef ParameterFileParserType::Pointer ParameterFileParserPointer;
31  typedef ParameterObjectType::ParameterKeyType ParameterKeyType;
32  typedef ParameterObjectType::ParameterValueType ParameterValueType;
33  typedef ParameterObjectType::ParameterValueVectorType ParameterValueVectorType;
34 
35  std::string
36  GetName() const;
37 
38  void
39  SetMovingImage(const Image & movingImage);
40  Image &
41  GetMovingImage();
42  void
43  RemoveMovingImage();
44 
45  void
46  SetFixedPointSetFileName(const std::string movingPointSetFileName);
47  std::string
48  GetFixedPointSetFileName();
49  void
50  RemoveFixedPointSetFileName();
51 
52  void
53  SetComputeSpatialJacobian(const bool);
54  bool
55  GetComputeSpatialJacobian();
56  void
57  ComputeSpatialJacobianOn();
58  void
59  ComputeSpatialJacobianOff();
60 
61  void
62  SetComputeDeterminantOfSpatialJacobian(const bool);
63  bool
64  GetComputeDeterminantOfSpatialJacobian();
65  void
66  ComputeDeterminantOfSpatialJacobianOn();
67  void
68  ComputeDeterminantOfSpatialJacobianOff();
69 
70  void
71  SetComputeDeformationField(bool);
72  bool
73  GetComputeDeformationField();
74  void
75  ComputeDeformationFieldOn();
76  void
77  ComputeDeformationFieldOff();
78 
79  void
80  SetOutputDirectory(const std::string outputDirectory);
81  std::string
82  GetOutputDirectory();
83  void
84  RemoveOutputDirectory();
85 
86  void
87  SetLogFileName(const std::string logFileName);
88  std::string
89  GetLogFileName();
90  void
91  RemoveLogFileName();
92 
93  void
94  SetLogToFile(const bool logToFile);
95  bool
96  GetLogToFile();
97  void
98  LogToFileOn();
99  void
100  LogToFileOff();
101 
102  void
103  SetLogToConsole(const bool logToConsole);
104  bool
105  GetLogToConsole();
106  void
107  LogToConsoleOn();
108  void
109  LogToConsoleOff();
110 
111  void
112  SetTransformParameterMap(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
113  void
114  SetTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
115  void
116  AddTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
117  std::vector<std::map<std::string, std::vector<std::string>>>
118  GetTransformParameterMap();
119  unsigned int
120  GetNumberOfTransformParameterMaps();
121 
122  void
123  SetTransformParameter(const std::string key, const std::string value);
124  void
125  SetTransformParameter(const std::string key, const std::vector<std::string> value);
126  void
127  SetTransformParameter(const unsigned int index, const std::string key, const std::string value);
128  void
129  SetTransformParameter(const unsigned int index, const std::string key, const std::vector<std::string> value);
130  void
131  AddTransformParameter(const std::string key, const std::string value);
132  void
133  AddTransformParameter(const unsigned int index, const std::string key, const std::string value);
134  std::vector<std::string>
135  GetTransformParameter(const std::string key);
136  std::vector<std::string>
137  GetTransformParameter(const unsigned int index, const std::string key);
138  void
139  RemoveTransformParameter(const std::string key);
140  void
141  RemoveTransformParameter(const unsigned int index, const std::string key);
142 
143  std::map<std::string, std::vector<std::string>>
144  ReadParameterFile(const std::string filename);
145  void
146  WriteParameterFile(const std::map<std::string, std::vector<std::string>> parameterMap,
147  const std::string parameterFileName);
148 
149  void
151  void
152  PrintParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
153  void
154  PrintParameterMap(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
155 
156  Image
157  Execute();
158 
159  Image
160  GetResultImage();
161  Image
162  GetDeformationField();
163 
164  bool
165  IsEmpty(const Image & image);
166 
167  // Definitions for SimpleITK member factory
168  typedef Image (Self::*MemberFunctionType)();
169  template <class TMovingImage>
170  Image
171  ExecuteInternal();
172  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
173  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType>> m_MemberFactory;
174 
178 
180 
185 
186  std::string m_OutputDirectory;
187  std::string m_LogFileName;
188 
191 };
192 
193 } // namespace itk::simple
194 
195 #endif // sitktransformiximagefilterimpl_h
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
itk::simple::PrintParameterMap
SITKElastix_EXPORT void PrintParameterMap(const std::map< std::string, std::vector< std::string >> parameterMap)
itk::simple::TransformixImageFilter::m_LogToConsole
bool m_LogToConsole
Definition: sitkTransformixImageFilterImpl.h:189
itk::simple::TransformixImageFilter::ParameterMapVectorType
ParameterObjectType::ParameterMapVectorType ParameterMapVectorType
Definition: sitkTransformixImageFilterImpl.h:26
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::TransformixImageFilter::ParameterMapIterator
ParameterMapType::iterator ParameterMapIterator
Definition: sitkTransformixImageFilterImpl.h:27
itk::simple::TransformixImageFilter::ParameterValueType
ParameterObjectType::ParameterValueType ParameterValueType
Definition: sitkTransformixImageFilterImpl.h:32
itk::simple::WriteParameterFile
SITKElastix_EXPORT void WriteParameterFile(const std::map< std::string, std::vector< std::string >> parameterMap, const std::string filename)
itk::simple::TransformixImageFilter
Definition: sitkTransformixImageFilter.h:33
itk::simple::TransformixImageFilter::ParameterMapConstIterator
ParameterMapType::const_iterator ParameterMapConstIterator
Definition: sitkTransformixImageFilterImpl.h:28
itk::simple::TransformixImageFilter::ParameterFileParserPointer
ParameterFileParserType::Pointer ParameterFileParserPointer
Definition: sitkTransformixImageFilterImpl.h:30
itk::simple::TransformixImageFilter::ParameterObjectType
elastix::ParameterObject ParameterObjectType
Definition: sitkTransformixImageFilterImpl.h:23
itk::simple::TransformixImageFilter::m_OutputDirectory
std::string m_OutputDirectory
Definition: sitkTransformixImageFilterImpl.h:186
sitkMemberFunctionFactory.h
itk::simple::TransformixImageFilter::m_MovingPointSetFileName
std::string m_MovingPointSetFileName
Definition: sitkTransformixImageFilterImpl.h:184
itk::simple::TransformixImageFilter::ParameterMapVectorType
std::vector< ParameterMapType > ParameterMapVectorType
Definition: sitkTransformixImageFilter.h:46
itk::simple::TransformixImageFilter::m_ComputeDeformationField
bool m_ComputeDeformationField
Definition: sitkTransformixImageFilterImpl.h:183
itk::simple::TransformixImageFilter::m_ComputeSpatialJacobian
bool m_ComputeSpatialJacobian
Definition: sitkTransformixImageFilterImpl.h:181
itk::simple::TransformixImageFilter::m_LogToFile
bool m_LogToFile
Definition: sitkTransformixImageFilterImpl.h:190
SITKElastix_HIDDEN
#define SITKElastix_HIDDEN
Definition: sitkElastixTransformixWrappers.h:35
itk::simple::TransformixImageFilter::m_TransformParameterMapVector
ParameterMapVectorType m_TransformParameterMapVector
Definition: sitkTransformixImageFilterImpl.h:179
itk::simple::TransformixImageFilter::m_ComputeDeterminantOfSpatialJacobian
bool m_ComputeDeterminantOfSpatialJacobian
Definition: sitkTransformixImageFilterImpl.h:182
itk::simple::TransformixImageFilter::ParameterValueVectorType
ParameterObjectType::ParameterValueVectorType ParameterValueVectorType
Definition: sitkTransformixImageFilterImpl.h:33
itk::simple::TransformixImageFilter::m_MovingImage
Image m_MovingImage
Definition: sitkTransformixImageFilterImpl.h:175
itk::simple::TransformixImageFilter::m_DeformationField
Image m_DeformationField
Definition: sitkTransformixImageFilterImpl.h:177
itk::simple::TransformixImageFilter::ParameterKeyType
ParameterObjectType::ParameterKeyType ParameterKeyType
Definition: sitkTransformixImageFilterImpl.h:31
itk::simple::TransformixImageFilter::Self
TransformixImageFilterImpl Self
Definition: sitkTransformixImageFilterImpl.h:21
itk::simple::TransformixImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkTransformixImageFilterImpl.h:173
itk::simple::TransformixImageFilter::ParameterObjectPointer
ParameterObjectType::Pointer ParameterObjectPointer
Definition: sitkTransformixImageFilterImpl.h:24
itk::simple::TransformixImageFilter::ParameterFileParserType
itk::ParameterFileParser ParameterFileParserType
Definition: sitkTransformixImageFilterImpl.h:29
itk::simple::TransformixImageFilter::m_LogFileName
std::string m_LogFileName
Definition: sitkTransformixImageFilterImpl.h:187
itk::simple::TransformixImageFilter::ParameterMapType
ParameterObjectType::ParameterMapType ParameterMapType
Definition: sitkTransformixImageFilterImpl.h:25
sitkTransformixImageFilter.h
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::ReadParameterFile
SITKElastix_EXPORT std::map< std::string, std::vector< std::string > > ReadParameterFile(const std::string filename)
itk::simple::TransformixImageFilter::m_ResultImage
Image m_ResultImage
Definition: sitkTransformixImageFilterImpl.h:176