1
2
3
4
5
6import SimpleITK as sitk
7import sys
8
9if len(sys.argv) < 6:
10 print(
11 f"Usage: {sys.argv[0]} <fixedImage> <movingImage> <parameterFile> <outputImage> <outputParameterFile>"
12 )
13 sys.exit(1)
14
15
17
18
21
22
23elastix_image_filter.SetFixedImage(fixed_image)
24elastix_image_filter.SetMovingImage(moving_image)
25
26
28elastix_image_filter.SetParameterMap(parameter_map)
29
30
31elastix_image_filter.LogToConsoleOn()
32
33
34elastix_image_filter.Execute()
35
36
38
39
40
The class that wraps the elastix registration library.
SITKIO_EXPORT Image ReadImage(const PathType &filename, PixelIDValueEnum outputPixelType=sitkUnknown, const std::string &imageIO="")
ReadImage is a procedural interface to the ImageFileReader class which is convenient for most image r...
SITKIO_EXPORT void WriteImage(const Image &image, const PathType &fileName, bool useCompression=false, int compressionLevel=-1)
WriteImage is a procedural interface to the ImageFileWriter. class which is convenient for many image...
SITKElastix_EXPORT std::map< std::string, std::vector< std::string > > ReadParameterFile(const std::string filename)
SITKElastix_EXPORT void WriteParameterFile(const std::map< std::string, std::vector< std::string > > parameterMap, const std::string filename)