SimpleITK  
sitkTransformixImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef sitkTransformixImageFilter_h
19#define sitkTransformixImageFilter_h
20
22#include "sitkCommon.h"
23#include "sitkImage.h"
24
25#include <map>
26#include <memory> // For unique_ptr.
27#include <string>
28#include <vector>
29
30namespace itk::simple
31{
32
34{
35public:
38
40
41 typedef std::string ParameterKeyType;
42 typedef std::string ParameterValueType;
43 typedef std::vector<ParameterValueType> ParameterValueVectorType;
44 typedef ParameterValueVectorType::iterator ParameterValueVectorIterator;
45 typedef std::map<ParameterKeyType, ParameterValueVectorType> ParameterMapType;
46 typedef std::vector<ParameterMapType> ParameterMapVectorType;
47 typedef ParameterMapType::iterator ParameterMapIterator;
48 typedef ParameterMapType::const_iterator ParameterMapConstIterator;
49
50 std::string
51 GetName() const;
52
53 void
54 SetMovingImage(const Image & movingImage);
55 Image &
57 void
59
60 void
61 SetFixedPointSetFileName(const std::string movingPointSetFileName);
62 std::string
64 void
66
67 void
69 bool
71 void
73 void
75
76 void
78 bool
80 void
82 void
84
85 void
87 bool
89 void
91 void
93
94 void
95 SetOutputDirectory(const std::string outputDirectory);
96 std::string
98 void
100
101 void
102 SetLogFileName(const std::string logFileName);
103 std::string
105 void
107
108 void
109 SetLogToFile(const bool logToFile);
110 bool
112 void
114 void
116
117 void
118 SetLogToConsole(const bool logToConsole);
119 bool
121 void
123 void
125
126 void
127 SetTransformParameterMaps(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
128 void
129 SetTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
130 void
131 AddTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
132 std::vector<std::map<std::string, std::vector<std::string>>>
134 unsigned int
136
137 void
138 SetTransformParameter(const std::string key, const std::string value);
139 void
140 SetTransformParameter(const std::string key, const std::vector<std::string> value);
141 void
142 SetTransformParameter(const unsigned int index, const std::string key, const std::string value);
143 void
144 SetTransformParameter(const unsigned int index, const std::string key, const std::vector<std::string> value);
145 void
146 AddTransformParameter(const std::string key, const std::string value);
147 void
148 AddTransformParameter(const unsigned int index, const std::string key, const std::string value);
149 std::vector<std::string>
150 GetTransformParameter(const std::string key);
151 std::vector<std::string>
152 GetTransformParameter(const unsigned int index, const std::string key);
153 void
154 RemoveTransformParameter(const std::string key);
155 void
156 RemoveTransformParameter(const unsigned int index, const std::string key);
157
158 std::map<std::string, std::vector<std::string>>
159 ReadParameterFile(const std::string parameterFileName);
160 void
161 WriteParameterFile(const std::map<std::string, std::vector<std::string>> parameterMap,
162 const std::string parameterFileName);
163
164 void
166 void
167 PrintParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
168 void
169 PrintParameterMap(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
170
171 Image
173
174 Image
176 Image
178
179private:
181 const std::unique_ptr<TransformixImageFilterImpl> m_Pimple;
182};
183
184// Procedural Interface
186Transformix(const Image & movingImage,
187 const std::map<std::string, std::vector<std::string>> parameterMap,
188 const bool logToConsole = false,
189 const std::string outputDirectory = ".");
191Transformix(const Image & movingImage,
192 const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector,
193 const bool logToConsole = false,
194 const std::string outputDirectory = ".");
195
196} // namespace itk::simple
197
198#endif // sitkTransformixImageFilter_h
The Image class for SimpleITK.
Definition sitkImage.h:77
std::map< std::string, std::vector< std::string > > ReadParameterFile(const std::string parameterFileName)
void SetTransformParameter(const unsigned int index, const std::string key, const std::vector< std::string > value)
void SetComputeDeterminantOfSpatialJacobian(const bool)
void SetFixedPointSetFileName(const std::string movingPointSetFileName)
void PrintParameterMap(const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector)
std::vector< ParameterMapType > ParameterMapVectorType
void SetMovingImage(const Image &movingImage)
std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMaps()
std::map< ParameterKeyType, ParameterValueVectorType > ParameterMapType
unsigned int GetNumberOfTransformParameterMaps()
void SetComputeSpatialJacobian(const bool)
void SetLogToConsole(const bool logToConsole)
void RemoveTransformParameter(const unsigned int index, const std::string key)
ParameterValueVectorType::iterator ParameterValueVectorIterator
void SetTransformParameterMaps(const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector)
void SetLogFileName(const std::string logFileName)
void RemoveTransformParameter(const std::string key)
void AddTransformParameter(const unsigned int index, const std::string key, const std::string value)
void SetLogToFile(const bool logToFile)
std::vector< ParameterValueType > ParameterValueVectorType
std::vector< std::string > GetTransformParameter(const unsigned int index, const std::string key)
ParameterMapType::const_iterator ParameterMapConstIterator
std::vector< std::string > GetTransformParameter(const std::string key)
void WriteParameterFile(const std::map< std::string, std::vector< std::string > > parameterMap, const std::string parameterFileName)
void AddTransformParameter(const std::string key, const std::string value)
const std::unique_ptr< TransformixImageFilterImpl > m_Pimple
void AddTransformParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
void SetOutputDirectory(const std::string outputDirectory)
void SetTransformParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
void SetTransformParameter(const unsigned int index, const std::string key, const std::string value)
void PrintParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
void SetTransformParameter(const std::string key, const std::vector< std::string > value)
void SetTransformParameter(const std::string key, const std::string value)
SITKElastix_EXPORT Image Transformix(const Image &movingImage, const std::map< std::string, std::vector< std::string > > parameterMap, const bool logToConsole=false, const std::string outputDirectory=".")
#define SITKElastix_EXPORT