18 #ifndef sitkElastixImageFilter_h
19 #define sitkElastixImageFilter_h
59 std::string GetName()
const;
62 SITK_RETURN_SELF_TYPE_HEADER SetFixedImage(
const Image& fixedImage );
65 SITK_RETURN_SELF_TYPE_HEADER SetFixedImage(
const VectorOfImage& fixedImages );
68 SITK_RETURN_SELF_TYPE_HEADER AddFixedImage(
const Image& fixedImage );
71 Image& GetFixedImage(
const unsigned long index );
77 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedImage(
const unsigned long index );
80 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedImage();
83 unsigned int GetNumberOfFixedImages();
86 SITK_RETURN_SELF_TYPE_HEADER SetMovingImage(
const Image& movingImages );
89 SITK_RETURN_SELF_TYPE_HEADER SetMovingImage(
const VectorOfImage& movingImage );
92 SITK_RETURN_SELF_TYPE_HEADER AddMovingImage(
const Image& movingImage );
95 Image& GetMovingImage(
const unsigned long index );
101 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingImage(
const unsigned long index );
104 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingImage();
107 unsigned int GetNumberOfMovingImages();
110 SITK_RETURN_SELF_TYPE_HEADER SetFixedMask(
const Image& fixedMask );
113 SITK_RETURN_SELF_TYPE_HEADER SetFixedMask(
const VectorOfImage& fixedMasks );
116 SITK_RETURN_SELF_TYPE_HEADER AddFixedMask(
const Image& fixedMask );
119 Image& GetFixedMask(
const unsigned long index );
125 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedMask(
const unsigned long index );
128 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedMask();
131 unsigned int GetNumberOfFixedMasks();
134 SITK_RETURN_SELF_TYPE_HEADER SetMovingMask(
const Image& movingMask );
137 SITK_RETURN_SELF_TYPE_HEADER SetMovingMask(
const VectorOfImage& movingMasks );
140 SITK_RETURN_SELF_TYPE_HEADER AddMovingMask(
const Image& movingMask );
143 Image& GetMovingMask(
const unsigned long index );
149 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingMask(
const unsigned long index );
152 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingMask();
155 unsigned int GetNumberOfMovingMasks();
158 SITK_RETURN_SELF_TYPE_HEADER SetFixedPointSetFileName(
const std::string fixedPointSetFileName );
161 std::string GetFixedPointSetFileName();
164 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedPointSetFileName();
167 SITK_RETURN_SELF_TYPE_HEADER SetMovingPointSetFileName(
const std::string movingPointSetFileName );
170 std::string GetMovingPointSetFileName();
173 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingPointSetFileName();
176 SITK_RETURN_SELF_TYPE_HEADER SetOutputDirectory(
const std::string outputDirectory );
179 std::string GetOutputDirectory();
182 SITK_RETURN_SELF_TYPE_HEADER RemoveOutputDirectory();
185 SITK_RETURN_SELF_TYPE_HEADER SetLogFileName(
const std::string logFileName );
188 std::string GetLogFileName();
191 SITK_RETURN_SELF_TYPE_HEADER RemoveLogFileName();
194 SITK_RETURN_SELF_TYPE_HEADER SetLogToFile(
const bool logToFile );
200 SITK_RETURN_SELF_TYPE_HEADER LogToFileOn();
203 SITK_RETURN_SELF_TYPE_HEADER LogToFileOff();
206 SITK_RETURN_SELF_TYPE_HEADER SetLogToConsole(
bool );
209 bool GetLogToConsole();
212 SITK_RETURN_SELF_TYPE_HEADER LogToConsoleOn();
215 SITK_RETURN_SELF_TYPE_HEADER LogToConsoleOff();
219 SITK_RETURN_SELF_TYPE_HEADER SetNumberOfThreads(
int n );
222 int GetNumberOfThreads();
225 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::string transformName,
const unsigned int numberOfResolutions = 4u,
const double finalGridSpacingInPhysicalUnits = 10.0 );
228 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector );
231 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::map< std::string, std::vector< std::string > > parameterMap );
234 SITK_RETURN_SELF_TYPE_HEADER AddParameterMap(
const std::map< std::string, std::vector< std::string > > parameterMap );
237 std::vector< std::map< std::string, std::vector< std::string > > > GetParameterMap();
240 std::map< std::string, std::vector< std::string > >
GetDefaultParameterMap(
const std::string transformName,
const unsigned int numberOfResolutions = 4,
const double finalGridSpacingInPhysicalUnits = 10.0 );
243 unsigned int GetNumberOfParameterMaps();
246 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const std::string key,
const std::string value );
249 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const std::string key,
const std::vector< std::string > value );
252 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const unsigned int index,
const std::string key,
const std::string value );
255 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const unsigned int index,
const std::string key,
const std::vector< std::string > value );
258 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const std::string key,
const std::string value );
261 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const unsigned int index,
const std::string key,
const std::string value );
264 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const std::string key,
const std::vector< std::string > value );
267 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const unsigned int index,
const std::string key,
const std::vector< std::string > value );
270 std::vector< std::string > GetParameter(
const std::string key );
273 std::vector< std::string > GetParameter(
const unsigned int index,
const std::string key );
276 SITK_RETURN_SELF_TYPE_HEADER RemoveParameter(
const std::string key );
279 SITK_RETURN_SELF_TYPE_HEADER RemoveParameter(
const unsigned int index,
const std::string key );
282 SITK_RETURN_SELF_TYPE_HEADER SetInitialTransformParameterFileName(
const std::string initialTransformParmaterFileName );
285 std::string GetInitialTransformParameterFileName();
288 SITK_RETURN_SELF_TYPE_HEADER RemoveInitialTransformParameterFileName();
291 std::map< std::string, std::vector< std::string > >
ReadParameterFile(
const std::string filename );
294 SITK_RETURN_SELF_TYPE_HEADER
WriteParameterFile(
const std::map< std::string, std::vector< std::string > > parameterMap,
const std::string filename );
304 std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMap();
307 std::map< std::string, std::vector< std::string > > GetTransformParameterMap(
const unsigned int index );
310 Image GetResultImage();
323 class ElastixImageFilterImpl;
324 const std::unique_ptr<ElastixImageFilterImpl>
m_Pimple;
329 SITKElastix_EXPORT std::map< std::string, std::vector< std::string > >
GetDefaultParameterMap(
const std::string transform,
const unsigned int numberOfResolutions = 4,
const double finalGridSpacingInPhysicalUnits = 8.0 );
336 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage,
const std::string defaultParameterMapName,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
337 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage,
const std::map< std::string, std::vector< std::string > > parameterMap,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
338 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage,
const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
339 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage,
const std::string defaultParameterMapName,
const Image& fixedMask,
const Image& movingMask,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
340 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage,
const std::map< std::string, std::vector< std::string > >,
const Image& fixedMask,
const Image& movingMask,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
341 SITKElastix_EXPORT Image Elastix(
const Image& fixedImage,
const Image& movingImage, std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector,
const Image& fixedMask,
const Image& movingMask,
const bool logToConsole =
false,
const bool logToFile =
false,
const std::string outputDirectory =
"." );
346 #endif // sitkElastixImageFilter_h