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 using namespace itk;
33 
39 
50 extern int xoutSetup( const char * logfilename );
51 
93 class ElastixMain : public Object
94 {
95 public:
96 
98  typedef ElastixMain Self;
99  typedef Object Superclass;
100  typedef SmartPointer<Self> Pointer;
101  typedef SmartPointer<const Self> ConstPointer;
102 
104  itkNewMacro( Self );
105 
107  itkTypeMacro( ElastixMain, Object );
108 
112  typedef Object ObjectType;
113  typedef ObjectType::Pointer ObjectPointer;
114  typedef DataObject DataObjectType;
115  typedef DataObjectType::Pointer DataObjectPointer;
116 
127 
133  typedef ComponentDatabaseType::PtrToCreator PtrToCreator;
138 
142 
144  itkSetMacro( FixedImagePixelType, PixelTypeDescriptionType );
145  itkSetMacro( MovingImagePixelType, PixelTypeDescriptionType );
146  itkSetMacro( FixedImageDimension, ImageDimensionType );
147  itkSetMacro( MovingImageDimension, ImageDimensionType );
148  itkGetMacro( FixedImagePixelType, PixelTypeDescriptionType );
149  itkGetMacro( MovingImagePixelType, PixelTypeDescriptionType );
150  itkGetMacro( FixedImageDimension, ImageDimensionType );
151  itkGetMacro( MovingImageDimension, ImageDimensionType );
152 
157  itkSetObjectMacro( FixedImageContainer, DataObjectContainerType );
158  itkSetObjectMacro( MovingImageContainer, DataObjectContainerType );
159  itkGetObjectMacro( FixedImageContainer, DataObjectContainerType );
160  itkGetObjectMacro( MovingImageContainer, DataObjectContainerType );
161 
166  itkSetObjectMacro( FixedMaskContainer, DataObjectContainerType );
167  itkSetObjectMacro( MovingMaskContainer, DataObjectContainerType );
168  itkGetObjectMacro( FixedMaskContainer, DataObjectContainerType );
169  itkGetObjectMacro( MovingMaskContainer, DataObjectContainerType );
170 
172  itkSetObjectMacro( Configuration, ConfigurationType );
173  itkGetObjectMacro( Configuration, ConfigurationType );
174 
179  itkGetObjectMacro( Elastix, ObjectType );
180 
184  virtual ElastixBaseType * GetElastixBase(void) const;
185 
191  itkGetObjectMacro( FinalTransform, ObjectType );
192 
197  itkSetObjectMacro( InitialTransform, ObjectType );
198  itkGetObjectMacro( InitialTransform, ObjectType );
199 
202  virtual void SetOriginalFixedImageDirectionFlat(
203  const FlatDirectionCosinesType & arg );
204  virtual const FlatDirectionCosinesType &
205  GetOriginalFixedImageDirectionFlat( void ) const;
206 
208  void SetElastixLevel( unsigned int level );
209  unsigned int GetElastixLevel( void );
210 
212  void SetTotalNumberOfElastixLevels( unsigned int levels );
213  unsigned int GetTotalNumberOfElastixLevels( void );
214 
216  itkGetConstMacro( DBIndex, DBIndexType );
217 
222  virtual void EnterCommandLineArguments( ArgumentMapType & argmap );
223 
229  virtual int Run( void );
230 
235  virtual int Run( ArgumentMapType & argmap );
236 
241  virtual void SetProcessPriority( void ) const;
242 
247  virtual void SetMaximumNumberOfThreads( void ) const;
248 
250  static ComponentDatabase * GetComponentDatabase( void )
251  {
252  return s_CDB.GetPointer();
253  }
254 
255  static void SetComponentDatabase( ComponentDatabase * arg )
256  {
257  if ( s_CDB != arg )
258  {
259  s_CDB = arg;
260  }
261  }
262 
263  static void UnloadComponents( void );
264 
265 protected:
266 
267  ElastixMain();
268  virtual ~ElastixMain();
269 
274 
277 
283 
285 
291 
294 
297 
299 
302  virtual int LoadComponents( void );
303 
308  virtual int InitDBIndex( void );
309 
313  virtual ObjectPointer CreateComponent( const ComponentDescriptionType & name );
314 
330  virtual ObjectContainerPointer CreateComponents(
331  const ComponentDescriptionType & key,
332  const ComponentDescriptionType & defaultComponentName,
333  int & errorcode,
334  bool mandatoryComponent = true );
335 
336 private:
337 
338  ElastixMain( const Self& ); // purposely not implemented
339  void operator=( const Self& ); // purposely not implemented
340 
341 }; // end class ElastixMain
342 
343 
344 } // end namespace elastix
345 
346 
347 #endif // end #ifndef __elxElastixMain_h
348 


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo