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 SITK_RETURN_SELF_TYPE_HEADER
54 SetMovingImage(const Image & movingImage);
55 Image &
57 SITK_RETURN_SELF_TYPE_HEADER
59
60 SITK_RETURN_SELF_TYPE_HEADER
61 SetFixedPointSetFileName(const std::string movingPointSetFileName);
62 std::string
64 SITK_RETURN_SELF_TYPE_HEADER
66
67 SITK_RETURN_SELF_TYPE_HEADER
69 bool
71 SITK_RETURN_SELF_TYPE_HEADER
73 SITK_RETURN_SELF_TYPE_HEADER
75
76 SITK_RETURN_SELF_TYPE_HEADER
78 bool
80 SITK_RETURN_SELF_TYPE_HEADER
82 SITK_RETURN_SELF_TYPE_HEADER
84
85 SITK_RETURN_SELF_TYPE_HEADER
87 bool
89 SITK_RETURN_SELF_TYPE_HEADER
91 SITK_RETURN_SELF_TYPE_HEADER
93
94 SITK_RETURN_SELF_TYPE_HEADER
95 SetOutputDirectory(const std::string outputDirectory);
96 std::string
98 SITK_RETURN_SELF_TYPE_HEADER
100
101 SITK_RETURN_SELF_TYPE_HEADER
102 SetLogFileName(const std::string logFileName);
103 std::string
105 SITK_RETURN_SELF_TYPE_HEADER
107
108 SITK_RETURN_SELF_TYPE_HEADER
109 SetLogToFile(const bool logToFile);
110 bool
112 SITK_RETURN_SELF_TYPE_HEADER
114 SITK_RETURN_SELF_TYPE_HEADER
116
117 SITK_RETURN_SELF_TYPE_HEADER
118 SetLogToConsole(const bool logToConsole);
119 bool
121 SITK_RETURN_SELF_TYPE_HEADER
123 SITK_RETURN_SELF_TYPE_HEADER
125
126 SITK_RETURN_SELF_TYPE_HEADER
127 SetTransformParameterMap(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
128 SITK_RETURN_SELF_TYPE_HEADER
129 SetTransformParameterMaps(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector)
130 {
131 return SetTransformParameterMap(parameterMapVector);
132 }
133 SITK_RETURN_SELF_TYPE_HEADER
134 SetTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
135 SITK_RETURN_SELF_TYPE_HEADER
136 AddTransformParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
137 std::vector<std::map<std::string, std::vector<std::string>>>
139 std::vector<std::map<std::string, std::vector<std::string>>>
144 unsigned int
146
147 SITK_RETURN_SELF_TYPE_HEADER
148 SetTransformParameter(const std::string key, const std::string value);
149 SITK_RETURN_SELF_TYPE_HEADER
150 SetTransformParameter(const std::string key, const std::vector<std::string> value);
151 SITK_RETURN_SELF_TYPE_HEADER
152 SetTransformParameter(const unsigned int index, const std::string key, const std::string value);
153 SITK_RETURN_SELF_TYPE_HEADER
154 SetTransformParameter(const unsigned int index, const std::string key, const std::vector<std::string> value);
155 SITK_RETURN_SELF_TYPE_HEADER
156 AddTransformParameter(const std::string key, const std::string value);
157 SITK_RETURN_SELF_TYPE_HEADER
158 AddTransformParameter(const unsigned int index, const std::string key, const std::string value);
159 std::vector<std::string>
160 GetTransformParameter(const std::string key);
161 std::vector<std::string>
162 GetTransformParameter(const unsigned int index, const std::string key);
163 SITK_RETURN_SELF_TYPE_HEADER
164 RemoveTransformParameter(const std::string key);
165 SITK_RETURN_SELF_TYPE_HEADER
166 RemoveTransformParameter(const unsigned int index, const std::string key);
167
168 std::map<std::string, std::vector<std::string>>
169 ReadParameterFile(const std::string parameterFileName);
170 SITK_RETURN_SELF_TYPE_HEADER
171 WriteParameterFile(const std::map<std::string, std::vector<std::string>> parameterMap,
172 const std::string parameterFileName);
173
174 SITK_RETURN_SELF_TYPE_HEADER
176 SITK_RETURN_SELF_TYPE_HEADER
177 PrintParameterMap(const std::map<std::string, std::vector<std::string>> parameterMap);
178 SITK_RETURN_SELF_TYPE_HEADER
179 PrintParameterMap(const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector);
180
181 Image
183
184 Image
186 Image
188
189private:
191 const std::unique_ptr<TransformixImageFilterImpl> m_Pimple;
192};
193
194// Procedural Interface
196Transformix(const Image & movingImage,
197 const std::map<std::string, std::vector<std::string>> parameterMap,
198 const bool logToConsole = false,
199 const std::string outputDirectory = ".");
201Transformix(const Image & movingImage,
202 const std::vector<std::map<std::string, std::vector<std::string>>> parameterMapVector,
203 const bool logToConsole = false,
204 const std::string outputDirectory = ".");
205
206} // namespace itk::simple
207
208#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)
Self & SetTransformParameter(const std::string key, const std::vector< std::string > value)
Self & SetComputeDeterminantOfSpatialJacobian(const bool)
Self & SetLogToFile(const bool logToFile)
Self & PrintParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
std::vector< ParameterMapType > ParameterMapVectorType
Self & WriteParameterFile(const std::map< std::string, std::vector< std::string > > parameterMap, const std::string parameterFileName)
std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMaps()
std::map< ParameterKeyType, ParameterValueVectorType > ParameterMapType
Self & SetFixedPointSetFileName(const std::string movingPointSetFileName)
unsigned int GetNumberOfTransformParameterMaps()
Self & SetTransformParameter(const unsigned int index, const std::string key, const std::vector< std::string > value)
Self & SetOutputDirectory(const std::string outputDirectory)
ParameterValueVectorType::iterator ParameterValueVectorIterator
Self & SetTransformParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMap()
Self & RemoveTransformParameter(const unsigned int index, const std::string key)
Self & SetLogFileName(const std::string logFileName)
Self & SetMovingImage(const Image &movingImage)
Self & RemoveTransformParameter(const std::string key)
std::vector< ParameterValueType > ParameterValueVectorType
Self & AddTransformParameterMap(const std::map< std::string, std::vector< std::string > > parameterMap)
std::vector< std::string > GetTransformParameter(const unsigned int index, const std::string key)
Self & AddTransformParameter(const unsigned int index, const std::string key, const std::string value)
Self & AddTransformParameter(const std::string key, const std::string value)
ParameterMapType::const_iterator ParameterMapConstIterator
std::vector< std::string > GetTransformParameter(const std::string key)
Self & SetLogToConsole(const bool logToConsole)
Self & PrintParameterMap(const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector)
const std::unique_ptr< TransformixImageFilterImpl > m_Pimple
Self & SetComputeSpatialJacobian(const bool)
Self & SetTransformParameter(const unsigned int index, const std::string key, const std::string value)
Self & SetTransformParameterMap(const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector)
Self & SetTransformParameterMaps(const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector)
Self & 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