18 #ifndef sitkElastixImageFilter_h
19 #define sitkElastixImageFilter_h
58 std::string GetName()
const;
61 SITK_RETURN_SELF_TYPE_HEADER SetFixedImage(
const Image& fixedImage );
64 SITK_RETURN_SELF_TYPE_HEADER SetFixedImage(
const VectorOfImage& fixedImages );
67 SITK_RETURN_SELF_TYPE_HEADER AddFixedImage(
const Image& fixedImage );
70 Image& GetFixedImage(
const unsigned long index );
76 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedImage(
const unsigned long index );
79 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedImage();
82 unsigned int GetNumberOfFixedImages();
85 SITK_RETURN_SELF_TYPE_HEADER SetMovingImage(
const Image& movingImages );
88 SITK_RETURN_SELF_TYPE_HEADER SetMovingImage(
const VectorOfImage& movingImage );
91 SITK_RETURN_SELF_TYPE_HEADER AddMovingImage(
const Image& movingImage );
94 Image& GetMovingImage(
const unsigned long index );
100 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingImage(
const unsigned long index );
103 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingImage();
106 unsigned int GetNumberOfMovingImages();
109 SITK_RETURN_SELF_TYPE_HEADER SetFixedMask(
const Image& fixedMask );
112 SITK_RETURN_SELF_TYPE_HEADER SetFixedMask(
const VectorOfImage& fixedMasks );
115 SITK_RETURN_SELF_TYPE_HEADER AddFixedMask(
const Image& fixedMask );
118 Image& GetFixedMask(
const unsigned long index );
124 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedMask(
const unsigned long index );
127 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedMask();
130 unsigned int GetNumberOfFixedMasks();
133 SITK_RETURN_SELF_TYPE_HEADER SetMovingMask(
const Image& movingMask );
136 SITK_RETURN_SELF_TYPE_HEADER SetMovingMask(
const VectorOfImage& movingMasks );
139 SITK_RETURN_SELF_TYPE_HEADER AddMovingMask(
const Image& movingMask );
142 Image& GetMovingMask(
const unsigned long index );
148 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingMask(
const unsigned long index );
151 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingMask();
154 unsigned int GetNumberOfMovingMasks();
157 SITK_RETURN_SELF_TYPE_HEADER SetFixedPointSetFileName(
const std::string fixedPointSetFileName );
160 std::string GetFixedPointSetFileName();
163 SITK_RETURN_SELF_TYPE_HEADER RemoveFixedPointSetFileName();
166 SITK_RETURN_SELF_TYPE_HEADER SetMovingPointSetFileName(
const std::string movingPointSetFileName );
169 std::string GetMovingPointSetFileName();
172 SITK_RETURN_SELF_TYPE_HEADER RemoveMovingPointSetFileName();
175 SITK_RETURN_SELF_TYPE_HEADER SetOutputDirectory(
const std::string outputDirectory );
178 std::string GetOutputDirectory();
181 SITK_RETURN_SELF_TYPE_HEADER RemoveOutputDirectory();
184 SITK_RETURN_SELF_TYPE_HEADER SetLogFileName(
const std::string logFileName );
187 std::string GetLogFileName();
190 SITK_RETURN_SELF_TYPE_HEADER RemoveLogFileName();
193 SITK_RETURN_SELF_TYPE_HEADER SetLogToFile(
const bool logToFile );
199 SITK_RETURN_SELF_TYPE_HEADER LogToFileOn();
202 SITK_RETURN_SELF_TYPE_HEADER LogToFileOff();
205 SITK_RETURN_SELF_TYPE_HEADER SetLogToConsole(
bool );
208 bool GetLogToConsole();
211 SITK_RETURN_SELF_TYPE_HEADER LogToConsoleOn();
214 SITK_RETURN_SELF_TYPE_HEADER LogToConsoleOff();
218 SITK_RETURN_SELF_TYPE_HEADER SetNumberOfThreads(
int n );
221 int GetNumberOfThreads();
224 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::string transformName,
const unsigned int numberOfResolutions = 4u,
const double finalGridSpacingInPhysicalUnits = 10.0 );
227 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::vector< std::map< std::string, std::vector< std::string > > > parameterMapVector );
230 SITK_RETURN_SELF_TYPE_HEADER SetParameterMap(
const std::map< std::string, std::vector< std::string > > parameterMap );
233 SITK_RETURN_SELF_TYPE_HEADER AddParameterMap(
const std::map< std::string, std::vector< std::string > > parameterMap );
236 std::vector< std::map< std::string, std::vector< std::string > > > GetParameterMap();
239 std::map< std::string, std::vector< std::string > >
GetDefaultParameterMap(
const std::string transformName,
const unsigned int numberOfResolutions = 4,
const double finalGridSpacingInPhysicalUnits = 10.0 );
242 unsigned int GetNumberOfParameterMaps();
245 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const std::string key,
const std::string value );
248 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const std::string key,
const std::vector< std::string > value );
251 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const unsigned int index,
const std::string key,
const std::string value );
254 SITK_RETURN_SELF_TYPE_HEADER SetParameter(
const unsigned int index,
const std::string key,
const std::vector< std::string > value );
257 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const std::string key,
const std::string value );
260 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const unsigned int index,
const std::string key,
const std::string value );
263 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const std::string key,
const std::vector< std::string > value );
266 SITK_RETURN_SELF_TYPE_HEADER AddParameter(
const unsigned int index,
const std::string key,
const std::vector< std::string > value );
269 std::vector< std::string > GetParameter(
const std::string key );
272 std::vector< std::string > GetParameter(
const unsigned int index,
const std::string key );
275 SITK_RETURN_SELF_TYPE_HEADER RemoveParameter(
const std::string key );
278 SITK_RETURN_SELF_TYPE_HEADER RemoveParameter(
const unsigned int index,
const std::string key );
281 SITK_RETURN_SELF_TYPE_HEADER SetInitialTransformParameterFileName(
const std::string initialTransformParmaterFileName );
284 std::string GetInitialTransformParameterFileName();
287 SITK_RETURN_SELF_TYPE_HEADER RemoveInitialTransformParameterFileName();
290 std::map< std::string, std::vector< std::string > >
ReadParameterFile(
const std::string filename );
293 SITK_RETURN_SELF_TYPE_HEADER
WriteParameterFile(
const std::map< std::string, std::vector< std::string > > parameterMap,
const std::string filename );
303 std::vector< std::map< std::string, std::vector< std::string > > > GetTransformParameterMap();
306 std::map< std::string, std::vector< std::string > > GetTransformParameterMap(
const unsigned int index );
309 Image GetResultImage();
322 class ElastixImageFilterImpl;
323 const std::unique_ptr<ElastixImageFilterImpl>
m_Pimple;
328 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 );
335 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 =
"." );
336 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 =
"." );
337 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 =
"." );
338 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 =
"." );
339 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 =
"." );
340 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 =
"." );
344 #endif // sitkElastixImageFilter_h