go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxElastixMain.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __elxElastixMain_h
16 #define __elxElastixMain_h
17 
18 #include "elxComponentDatabase.h"
19 #include "elxComponentLoader.h"
20 
21 #include "elxBaseComponent.h"
22 #include "elxElastixBase.h"
23 #include "itkObject.h"
24 
25 #include <iostream>
26 #include <fstream>
27 
28 
29 
30 namespace elastix
31 {
32 
38 
49 extern int xoutSetup( const char * logfilename );
50 
92 class ElastixMain : public itk::Object
93 {
94 public:
95 
97  typedef ElastixMain Self;
98  typedef itk::Object Superclass;
99  typedef itk::SmartPointer<Self> Pointer;
100  typedef itk::SmartPointer<const Self> ConstPointer;
101 
103  itkNewMacro( Self );
104 
106  itkTypeMacro( ElastixMain, Object );
107 
111  typedef itk::Object ObjectType;
112  typedef ObjectType::Pointer ObjectPointer;
113  typedef itk::DataObject DataObjectType;
114  typedef DataObjectType::Pointer DataObjectPointer;
115 
126 
137 
141 
143  itkSetMacro( FixedImagePixelType, PixelTypeDescriptionType );
144  itkSetMacro( MovingImagePixelType, PixelTypeDescriptionType );
145  itkSetMacro( FixedImageDimension, ImageDimensionType );
146  itkSetMacro( MovingImageDimension, ImageDimensionType );
147  itkGetMacro( FixedImagePixelType, PixelTypeDescriptionType );
148  itkGetMacro( MovingImagePixelType, PixelTypeDescriptionType );
149  itkGetMacro( FixedImageDimension, ImageDimensionType );
150  itkGetMacro( MovingImageDimension, ImageDimensionType );
151 
156  itkSetObjectMacro( FixedImageContainer, DataObjectContainerType );
157  itkSetObjectMacro( MovingImageContainer, DataObjectContainerType );
158  itkGetObjectMacro( FixedImageContainer, DataObjectContainerType );
159  itkGetObjectMacro( MovingImageContainer, DataObjectContainerType );
160 
165  itkSetObjectMacro( FixedMaskContainer, DataObjectContainerType );
166  itkSetObjectMacro( MovingMaskContainer, DataObjectContainerType );
167  itkGetObjectMacro( FixedMaskContainer, DataObjectContainerType );
168  itkGetObjectMacro( MovingMaskContainer, DataObjectContainerType );
169 
171  itkSetObjectMacro( Configuration, ConfigurationType );
172  itkGetObjectMacro( Configuration, ConfigurationType );
173 
178  itkGetObjectMacro( Elastix, ObjectType );
179 
183  virtual ElastixBaseType * GetElastixBase( void ) const;
184 
190  itkGetObjectMacro( FinalTransform, ObjectType );
191 
196  itkSetObjectMacro( InitialTransform, ObjectType );
197  itkGetObjectMacro( InitialTransform, ObjectType );
198 
202  const FlatDirectionCosinesType & arg );
203  virtual const FlatDirectionCosinesType &
205 
207  void SetElastixLevel( unsigned int level );
208  unsigned int GetElastixLevel( void );
209 
211  void SetTotalNumberOfElastixLevels( unsigned int levels );
212  unsigned int GetTotalNumberOfElastixLevels( void );
213 
215  itkGetConstMacro( DBIndex, DBIndexType );
216 
221  virtual void EnterCommandLineArguments( ArgumentMapType & argmap );
222 
228  virtual int Run( void );
229 
234  virtual int Run( ArgumentMapType & argmap );
235 
240  virtual void SetProcessPriority( void ) const;
241 
246  virtual void SetMaximumNumberOfThreads( void ) const;
247 
250  {
251  return s_CDB.GetPointer();
252  }
253 
255  {
256  if ( s_CDB != arg )
257  {
258  s_CDB = arg;
259  }
260  }
261 
262  static void UnloadComponents( void );
263 
264 protected:
265 
266  ElastixMain();
267  virtual ~ElastixMain();
268 
273 
276 
282 
284 
290 
293 
296 
298 
301  virtual int LoadComponents( void );
302 
307  virtual int InitDBIndex( void );
308 
313 
330  const ComponentDescriptionType & key,
331  const ComponentDescriptionType & defaultComponentName,
332  int & errorcode,
333  bool mandatoryComponent = true );
334 
336  void GetImageInformationFromFile( const std::string & filename,
337  ImageDimensionType & imageDimension ) const;
338 
339 private:
340 
341  ElastixMain( const Self& ); // purposely not implemented
342  void operator=( const Self& ); // purposely not implemented
343 
344 }; // end class ElastixMain
345 
346 
347 } // end namespace elastix
348 
349 
350 #endif // end #ifndef __elxElastixMain_h
DataObjectType::Pointer DataObjectPointer
DataObjectContainerPointer m_FixedImageContainer
DataObjectContainerType::Pointer DataObjectContainerPointer
std::map< std::string, std::string > CommandLineArgumentMapType
static ComponentDatabase * GetComponentDatabase(void)
ObjectPointer(* PtrToCreator)(void)
static ComponentLoaderPointer s_ComponentLoader
itk::VectorContainer< unsigned int, DataObjectPointer > DataObjectContainerType
static void UnloadComponents(void)
itk::SmartPointer< Self > Pointer
virtual ElastixBaseType * GetElastixBase(void) const
virtual void SetOriginalFixedImageDirectionFlat(const FlatDirectionCosinesType &arg)
virtual void EnterCommandLineArguments(ArgumentMapType &argmap)
ElastixBase::ConfigurationType ConfigurationType
virtual ObjectContainerPointer CreateComponents(const ComponentDescriptionType &key, const ComponentDescriptionType &defaultComponentName, int &errorcode, bool mandatoryComponent=true)
ObjectPointer m_FinalTransform
static ComponentDatabasePointer s_CDB
ElastixBase::ObjectContainerPointer ObjectContainerPointer
ImageDimensionType m_FixedImageDimension
DataObjectContainerPointer m_MovingMaskContainer
int xoutSetup(const char *logfilename)
ElastixBase::DataObjectContainerType DataObjectContainerType
ComponentDatabase ComponentDatabaseType
ConfigurationType::Pointer ConfigurationPointer
ComponentDatabaseType::PtrToCreator PtrToCreator
ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType
virtual void SetMaximumNumberOfThreads(void) const
ConfigurationType::CommandLineArgumentMapType ArgumentMapType
PixelTypeDescriptionType m_FixedImagePixelType
DataObjectContainerPointer m_FixedMaskContainer
virtual int InitDBIndex(void)
void GetImageInformationFromFile(const std::string &filename, ImageDimensionType &imageDimension) const
ComponentDatabaseType::Pointer ComponentDatabasePointer
ComponentDatabaseType::PixelTypeDescriptionType PixelTypeDescriptionType
ComponentLoaderType::Pointer ComponentLoaderPointer
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
ObjectPointer m_Elastix
PixelTypeDescriptionType m_MovingImagePixelType
virtual void SetProcessPriority(void) const
ObjectType::Pointer ObjectPointer
A class with all functionality to configure elastix.
DataObjectContainerPointer m_MovingImageContainer
FlatDirectionCosinesType m_OriginalFixedImageDirection
Determines which components (metrics, transforms, etc.) are available.
virtual ObjectPointer CreateComponent(const ComponentDescriptionType &name)
itk::DataObject DataObjectType
ElastixBase::ObjectContainerType ObjectContainerType
void SetTotalNumberOfElastixLevels(unsigned int levels)
ImageDimensionType m_MovingImageDimension
void operator=(const Self &)
ElastixBase::DataObjectContainerPointer DataObjectContainerPointer
ObjectContainerType::Pointer ObjectContainerPointer
ElastixBase ElastixBaseType
ObjectPointer m_InitialTransform
ConfigurationPointer m_Configuration
ComponentLoader ComponentLoaderType
itk::SmartPointer< Self > Pointer
A class that deals with user given parameters and command line arguments.
ComponentDatabaseType::ImageDimensionType ImageDimensionType
itk::VectorContainer< unsigned int, ObjectPointer > ObjectContainerType
The ComponentDatabase class is a class that stores the New() functions of all components.
std::vector< double > FlatDirectionCosinesType
ComponentDatabaseType::IndexType DBIndexType
ComponentDatabaseType::ComponentDescriptionType ComponentDescriptionType
virtual int LoadComponents(void)
void SetElastixLevel(unsigned int level)
static void SetComponentDatabase(ComponentDatabase *arg)
virtual const FlatDirectionCosinesType & GetOriginalFixedImageDirectionFlat(void) const
itk::SmartPointer< Self > Pointer
itk::Object Superclass
unsigned int GetTotalNumberOfElastixLevels(void)
This class creates an interface for elastix.
unsigned int GetElastixLevel(void)
virtual int Run(void)


Generated on 05-01-2014 for elastix by doxygen 1.8.5 elastix logo