15 #ifndef __elxElastixMain_h 16 #define __elxElastixMain_h 18 #include "elxComponentDatabase.h" 19 #include "elxComponentLoader.h" 21 #include "elxBaseComponent.h" 22 #include "elxElastixBase.h" 23 #include "itkObject.h" 28 #include "itkParameterMapInterface.h" 49 extern int xoutSetup(
const char * logfilename,
bool setupLogging,
bool setupCout );
98 typedef itk::Object Superclass;
99 typedef itk::SmartPointer< Self > Pointer;
100 typedef itk::SmartPointer< const Self > ConstPointer;
112 typedef ObjectType::Pointer ObjectPointer;
113 typedef itk::DataObject DataObjectType;
114 typedef DataObjectType::Pointer DataObjectPointer;
118 typedef ElastixBase::ConfigurationType ConfigurationType;
119 typedef ConfigurationType::CommandLineArgumentMapType ArgumentMapType;
120 typedef ConfigurationType::Pointer ConfigurationPointer;
121 typedef ElastixBase::ObjectContainerType ObjectContainerType;
122 typedef ElastixBase::DataObjectContainerType DataObjectContainerType;
123 typedef ElastixBase::ObjectContainerPointer ObjectContainerPointer;
124 typedef ElastixBase::DataObjectContainerPointer DataObjectContainerPointer;
125 typedef ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType;
131 typedef ComponentDatabaseType::Pointer ComponentDatabasePointer;
132 typedef ComponentDatabaseType::PtrToCreator PtrToCreator;
133 typedef ComponentDatabaseType::ComponentDescriptionType ComponentDescriptionType;
134 typedef ComponentDatabaseType::PixelTypeDescriptionType PixelTypeDescriptionType;
135 typedef ComponentDatabaseType::ImageDimensionType ImageDimensionType;
136 typedef ComponentDatabaseType::IndexType DBIndexType;
140 typedef ComponentLoaderType::Pointer ComponentLoaderPointer;
146 itkSetMacro( FixedImagePixelType, PixelTypeDescriptionType );
147 itkSetMacro( MovingImagePixelType, PixelTypeDescriptionType );
148 itkSetMacro( FixedImageDimension, ImageDimensionType );
149 itkSetMacro( MovingImageDimension, ImageDimensionType );
150 itkGetMacro( FixedImagePixelType, PixelTypeDescriptionType );
151 itkGetMacro( MovingImagePixelType, PixelTypeDescriptionType );
152 itkGetMacro( FixedImageDimension, ImageDimensionType );
153 itkGetMacro( MovingImageDimension, ImageDimensionType );
161 itkGetObjectMacro( FixedImageContainer, DataObjectContainerType );
162 itkGetObjectMacro( MovingImageContainer, DataObjectContainerType );
170 itkGetObjectMacro( FixedMaskContainer, DataObjectContainerType );
171 itkGetObjectMacro( MovingMaskContainer, DataObjectContainerType );
178 itkGetObjectMacro( ResultImageContainer, DataObjectContainerType );
182 itkGetObjectMacro( Configuration, ConfigurationType );
188 itkGetObjectMacro( Elastix, ObjectType );
200 itkGetObjectMacro( FinalTransform, ObjectType );
207 itkGetObjectMacro( InitialTransform, ObjectType );
212 const FlatDirectionCosinesType & arg );
236 ParameterMapType & inputMap );
240 std::vector< ParameterMapType > & inputMaps );
247 virtual int Run(
void );
253 virtual int Run( ArgumentMapType & argmap );
255 virtual int Run( ArgumentMapType & argmap, ParameterMapType & inputMap );
272 return s_CDB.GetPointer();
276 static void SetComponentDatabase( ComponentDatabase * arg )
308 ImageDimensionType m_FixedImageDimension;
309 PixelTypeDescriptionType m_MovingImagePixelType;
310 ImageDimensionType m_MovingImageDimension;
312 DBIndexType m_DBIndex;
316 DataObjectContainerPointer m_MovingImageContainer;
317 DataObjectContainerPointer m_FixedMaskContainer;
318 DataObjectContainerPointer m_MovingMaskContainer;
319 DataObjectContainerPointer m_ResultImageContainer;
331 FlatDirectionCosinesType m_OriginalFixedImageDirection;
333 static ComponentDatabasePointer
s_CDB;
334 static ComponentLoaderPointer s_ComponentLoader;
346 virtual ObjectPointer
CreateComponent(
const ComponentDescriptionType & name );
364 const ComponentDescriptionType & key,
365 const ComponentDescriptionType & defaultComponentName,
367 bool mandatoryComponent =
true );
371 ImageDimensionType & imageDimension )
const;
376 void operator=(
const Self & );
382 #endif // end #ifndef __elxElastixMain_h virtual void EnterCommandLineArguments(ArgumentMapType &argmap)
itkSetMacro(FixedImagePixelType, PixelTypeDescriptionType)
static ComponentDatabase * GetComponentDatabase(void)
virtual int LoadComponents(void)
void GetImageInformationFromFile(const std::string &filename, ImageDimensionType &imageDimension) const
std::vector< ConfigurationPointer > m_Configurations
int xoutSetup(const char *logfilename, bool setupLogging, bool setupCout)
PixelTypeDescriptionType m_FixedImagePixelType
virtual int InitDBIndex(void)
ComponentDatabase ComponentDatabaseType
ObjectPointer m_InitialTransform
ElastixBase ElastixBaseType
ObjectPointer m_FinalTransform
virtual ParameterMapType GetTransformParametersMap(void) const
void SetTotalNumberOfElastixLevels(unsigned int levels)
virtual const FlatDirectionCosinesType & GetOriginalFixedImageDirectionFlat(void) const
virtual ObjectPointer CreateComponent(const ComponentDescriptionType &name)
Determines which components (metrics, transforms, etc.) are available.
ParameterMapType m_TransformParametersMap
virtual void SetProcessPriority(void) const
virtual void SetOriginalFixedImageDirectionFlat(const FlatDirectionCosinesType &arg)
ConfigurationPointer m_Configuration
itkGetConstMacro(DBIndex, DBIndexType)
DataObjectContainerPointer m_FixedImageContainer
static void UnloadComponents(void)
A class with all functionality to configure elastix.
virtual ObjectContainerPointer CreateComponents(const ComponentDescriptionType &key, const ComponentDescriptionType &defaultComponentName, int &errorcode, bool mandatoryComponent=true)
static ComponentDatabasePointer s_CDB
void SetElastixLevel(unsigned int level)
itk::ParameterMapInterface::ParameterMapType ParameterMapType
unsigned int GetTotalNumberOfElastixLevels(void)
unsigned int GetElastixLevel(void)
itkSetObjectMacro(FixedImageContainer, DataObjectContainerType)
virtual ElastixBaseType * GetElastixBase(void) const
virtual void SetMaximumNumberOfThreads(void) const
ComponentLoader ComponentLoaderType
itkTypeMacro(ElastixMain, Object)