Loading [MathJax]/extensions/tex2jax.js
SimpleITK
2.2.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Variables
Typedefs
Enumerations
Enumerator
s
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Variables
d
f
m
r
t
v
Typedefs
c
d
e
f
h
i
k
m
o
p
r
s
t
v
Enumerations
b
c
d
e
h
m
n
o
p
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
v
w
z
Related Functions
a
d
i
Files
File List
File Members
All
c
i
s
Macros
c
i
s
Examples
elx.cxx
// This one header will include all SimpleITK filters and external
// objects.
#include <
SimpleITK.h
>
#include <iostream>
#include <stdlib.h>
namespace
sitk
=
itk::simple
;
int
main (
int
argc,
char
* argv[] ) {
if
( argc < 4 ) {
std::cerr <<
"Usage: "
<< argv[0] <<
" <fixedImage> <movingImage> <parameterFile> <outputImage>\n"
;
return
1;
}
// Instantiate SimpleElastix
sitk::ElastixImageFilter
elastixImageFilter;
// Read input
sitk::ImageFileReader
reader;
reader.
SetFileName
( std::string( argv[1] ) );
elastixImageFilter.
SetFixedImage
( reader.
Execute
() );
reader.
SetFileName
( std::string( argv[2] ) );
elastixImageFilter.
SetMovingImage
( reader.
Execute
() );
elastixImageFilter.
SetParameterMap
(
sitk::ReadParameterFile
( std::string( argv[3] ) ) );
elastixImageFilter.
LogToConsoleOn
();
// Run registration
elastixImageFilter.
Execute
();
// Write result image
sitk::ImageFileWriter
writer;
writer.
SetFileName
( std::string( argv[4] ) );
writer.
Execute
( elastixImageFilter.
GetResultImage
() );
return
0;
}
itk::simple::ImageFileWriter::SetFileName
Self & SetFileName(const std::string &fileName)
itk::simple::ElastixImageFilter::GetResultImage
Image GetResultImage()
itk::simple::ReadParameterFile
SITKElastix_EXPORT std::map< std::string, std::vector< std::string > > ReadParameterFile(const std::string filename)
itk::simple::ImageFileWriter::Execute
Self & Execute(const Image &)
itk::simple::ImageFileReader
Read an image file and return a SimpleITK Image.
Definition:
sitkImageFileReader.h:60
SimpleITK.h
itk::simple::ElastixImageFilter
The class that wraps the elastix registration library.
Definition:
sitkElastixImageFilter.h:36
itk::simple::ImageFileReader::SetFileName
Self & SetFileName(const std::string &fn)
itk::simple::ElastixImageFilter::SetMovingImage
Self & SetMovingImage(const Image &movingImages)
itk::simple::ElastixImageFilter::Execute
Image Execute()
itk::simple::ImageFileReader::Execute
Image Execute() override
Set/Get The output PixelType of the image.
itk::simple::ElastixImageFilter::SetFixedImage
Self & SetFixedImage(const Image &fixedImage)
Sets a fixed image.
itk::simple::ElastixImageFilter::LogToConsoleOn
Self & LogToConsoleOn()
itk::simple::ElastixImageFilter::SetParameterMap
Self & SetParameterMap(const std::string transformName, const unsigned int numberOfResolutions=4u, const double finalGridSpacingInPhysicalUnits=10.0)
itk::simple
Definition:
sitkAdditionalProcedures.h:29
itk::simple::ImageFileWriter
Write out a SimpleITK image to the specified file location.
Definition:
sitkImageFileWriter.h:48
Generated on
Fri, 26 Aug 2022 19:45:58 +0000
for SimpleITK by
1.8.17 |
Privacy Policy