Loading...
Searching...
No Matches
elxMainBase.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef elxMainBase_h
#define elxMainBase_h
#include "elxComponentDatabase.h"
#include "elxElastixBase.h"
#include "itkParameterMapInterface.h"
#include <itkObject.h>
// Standard C++ header files:
#include <fstream>
#include <iostream>
#include <string>
namespace elastix
{
class MainBase : public itk::Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(MainBase);
using Self = MainBase;
using Superclass = itk::Object;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
itkTypeMacro(MainBase, Object);
using ObjectPointer = itk::Object::Pointer;
using DataObjectPointer = itk::DataObject::Pointer;
using ArgumentMapType = Configuration::CommandLineArgumentMapType;
using ObjectContainerType = ElastixBase::ObjectContainerType;
using DataObjectContainerType = ElastixBase::DataObjectContainerType;
using ObjectContainerPointer = ElastixBase::ObjectContainerPointer;
using DataObjectContainerPointer = ElastixBase::DataObjectContainerPointer;
using FlatDirectionCosinesType = ElastixBase::FlatDirectionCosinesType;
using ComponentDatabasePointer = ComponentDatabase::Pointer;
using PtrToCreator = ComponentDatabase::PtrToCreator;
using ComponentDescriptionType = ComponentDatabase::ComponentDescriptionType;
using PixelTypeDescriptionType = ComponentDatabase::PixelTypeDescriptionType;
using ImageDimensionType = ComponentDatabase::ImageDimensionType;
using DBIndexType = ComponentDatabase::IndexType;
using ParameterMapType = itk::ParameterMapInterface::ParameterMapType;
itkSetMacro(FixedImagePixelType, PixelTypeDescriptionType);
itkSetMacro(MovingImagePixelType, PixelTypeDescriptionType);
itkSetMacro(FixedImageDimension, ImageDimensionType);
itkSetMacro(MovingImageDimension, ImageDimensionType);
itkGetConstMacro(FixedImagePixelType, PixelTypeDescriptionType);
itkGetConstMacro(MovingImagePixelType, PixelTypeDescriptionType);
itkGetConstMacro(FixedImageDimension, ImageDimensionType);
itkGetConstMacro(MovingImageDimension, ImageDimensionType);
itkSetObjectMacro(MovingImageContainer, DataObjectContainerType);
itkGetModifiableObjectMacro(MovingImageContainer, DataObjectContainerType);
itkSetObjectMacro(ResultImageContainer, DataObjectContainerType);
itkGetModifiableObjectMacro(ResultImageContainer, DataObjectContainerType);
itkSetObjectMacro(ResultDeformationFieldContainer, DataObjectContainerType);
itkGetModifiableObjectMacro(ResultDeformationFieldContainer, DataObjectContainerType);
itkSetObjectMacro(Configuration, Configuration);
itkGetModifiableObjectMacro(Configuration, Configuration);
itkGetModifiableObjectMacro(Elastix, itk::Object);
ElastixBase &
GetElastixBase() const;
itkGetConstMacro(DBIndex, DBIndexType);
virtual int
Run() = 0;
virtual int
Run(const ArgumentMapType & argmap);
virtual int
Run(const ArgumentMapType & argmap, const ParameterMapType & inputMap);
virtual void
SetProcessPriority() const;
virtual void
SetMaximumNumberOfThreads() const;
static const ComponentDatabase &
GetComponentDatabase();
protected:
MainBase();
~MainBase() override = 0;
ObjectPointer m_Elastix{ nullptr };
std::vector<Configuration::ConstPointer> m_TransformConfigurations{};
PixelTypeDescriptionType m_FixedImagePixelType{};
ImageDimensionType m_FixedImageDimension{ 0 };
PixelTypeDescriptionType m_MovingImagePixelType{};
ImageDimensionType m_MovingImageDimension{ 0 };
DBIndexType m_DBIndex{ 0 };
DataObjectContainerPointer m_MovingImageContainer{ nullptr };
DataObjectContainerPointer m_ResultImageContainer{ nullptr };
DataObjectContainerPointer m_ResultDeformationFieldContainer{ nullptr };
virtual int
InitDBIndex() = 0;
virtual ObjectPointer
CreateComponent(const ComponentDescriptionType & name);
virtual ObjectContainerPointer
CreateComponents(const ComponentDescriptionType & key,
const ComponentDescriptionType & defaultComponentName,
int & errorcode,
bool mandatoryComponent = true);
private:
Configuration::Pointer m_Configuration{ Configuration::New() };
};
} // end namespace elastix
#endif // end #ifndef elxMainBase_h
MovingImagePixelType
elastix::ComponentDatabase
The ComponentDatabase class is a class that stores the New() functions of all components.
Definition elxComponentDatabase.h:53
elastix::ComponentDatabase::ImageDimensionType
unsigned int ImageDimensionType
Definition elxComponentDatabase.h:88
elastix::ComponentDatabase::PixelTypeDescriptionType
std::string PixelTypeDescriptionType
Definition elxComponentDatabase.h:87
elastix::ComponentDatabase::Pointer
itk::SmartPointer< Self > Pointer
Definition elxComponentDatabase.h:60
elastix::ComponentDatabase::IndexType
unsigned int IndexType
Definition elxComponentDatabase.h:67
elastix::ComponentDatabase::PtrToCreator
ObjectPointer(*)() PtrToCreator
Definition elxComponentDatabase.h:75
elastix::ComponentDatabase::ComponentDescriptionType
std::string ComponentDescriptionType
Definition elxComponentDatabase.h:76
elastix::Configuration
A class that deals with user given parameters and command line arguments.
Definition elxConfiguration.h:53
elastix::Configuration::New
static Pointer New()
elastix::Configuration::CommandLineArgumentMapType
std::map< std::string, std::string > CommandLineArgumentMapType
Definition elxConfiguration.h:71
elastix::Configuration::Pointer
itk::SmartPointer< Self > Pointer
Definition elxConfiguration.h:61
elastix::ElastixBase
This class creates an interface for elastix.
Definition elxElastixBase.h:143
elastix::ElastixBase::DataObjectContainerType
itk::VectorContainer< unsigned int, DataObjectPointer > DataObjectContainerType
Definition elxElastixBase.h:156
elastix::ElastixBase::FlatDirectionCosinesType
std::vector< double > FlatDirectionCosinesType
Definition elxElastixBase.h:170
elastix::ElastixBase::ObjectContainerType
itk::VectorContainer< unsigned int, ObjectPointer > ObjectContainerType
Definition elxElastixBase.h:154
elastix::ElastixBase::DataObjectContainerPointer
DataObjectContainerType::Pointer DataObjectContainerPointer
Definition elxElastixBase.h:157
elastix::ElastixBase::ObjectContainerPointer
ObjectContainerType::Pointer ObjectContainerPointer
Definition elxElastixBase.h:155
elastix::MainBase::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition elxMainBase.h:53
elastix::MainBase::Run
virtual int Run(const ArgumentMapType &argmap)
elastix::MainBase::ComponentDescriptionType
ComponentDatabase::ComponentDescriptionType ComponentDescriptionType
Definition elxMainBase.h:77
elastix::MainBase::ObjectContainerType
ElastixBase::ObjectContainerType ObjectContainerType
Definition elxMainBase.h:66
elastix::MainBase::ObjectContainerPointer
ElastixBase::ObjectContainerPointer ObjectContainerPointer
Definition elxMainBase.h:68
elastix::MainBase::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Configuration, Configuration)
elastix::MainBase::Run
virtual int Run()=0
elastix::MainBase::CreateComponents
virtual ObjectContainerPointer CreateComponents(const ComponentDescriptionType &key, const ComponentDescriptionType &defaultComponentName, int &errorcode, bool mandatoryComponent=true)
elastix::MainBase::CreateComponent
virtual ObjectPointer CreateComponent(const ComponentDescriptionType &name)
elastix::MainBase::~MainBase
~MainBase() override=0
elastix::MainBase::m_FixedImagePixelType
PixelTypeDescriptionType m_FixedImagePixelType
Definition elxMainBase.h:180
elastix::MainBase::FlatDirectionCosinesType
ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType
Definition elxMainBase.h:70
elastix::MainBase::m_MovingImageDimension
ImageDimensionType m_MovingImageDimension
Definition elxMainBase.h:183
elastix::MainBase::ParameterMapType
itk::ParameterMapInterface::ParameterMapType ParameterMapType
Definition elxMainBase.h:83
elastix::MainBase::GetElastixBase
ElastixBase & GetElastixBase() const
elastix::MainBase::m_FixedImageDimension
ImageDimensionType m_FixedImageDimension
Definition elxMainBase.h:181
elastix::MainBase::Pointer
itk::SmartPointer< Self > Pointer
Definition elxMainBase.h:52
elastix::MainBase::GetComponentDatabase
static const ComponentDatabase & GetComponentDatabase()
elastix::MainBase::PtrToCreator
ComponentDatabase::PtrToCreator PtrToCreator
Definition elxMainBase.h:76
elastix::MainBase::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Elastix, itk::Object)
elastix::MainBase::m_TransformConfigurations
std::vector< Configuration::ConstPointer > m_TransformConfigurations
Definition elxMainBase.h:177
elastix::MainBase::InitDBIndex
virtual int InitDBIndex()=0
elastix::MainBase::MainBase
MainBase()
elastix::MainBase::Run
virtual int Run(const ArgumentMapType &argmap, const ParameterMapType &inputMap)
elastix::MainBase::m_DBIndex
DBIndexType m_DBIndex
Definition elxMainBase.h:185
elastix::MainBase::ImageDimensionType
ComponentDatabase::ImageDimensionType ImageDimensionType
Definition elxMainBase.h:79
elastix::MainBase::SetProcessPriority
virtual void SetProcessPriority() const
elastix::MainBase::DataObjectContainerType
ElastixBase::DataObjectContainerType DataObjectContainerType
Definition elxMainBase.h:67
elastix::MainBase::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(MainBase)
elastix::MainBase::Self
MainBase Self
Definition elxMainBase.h:50
elastix::MainBase::ComponentDatabasePointer
ComponentDatabase::Pointer ComponentDatabasePointer
Definition elxMainBase.h:75
elastix::MainBase::SetMaximumNumberOfThreads
virtual void SetMaximumNumberOfThreads() const
elastix::MainBase::m_MovingImagePixelType
PixelTypeDescriptionType m_MovingImagePixelType
Definition elxMainBase.h:182
elastix::MainBase::DataObjectContainerPointer
ElastixBase::DataObjectContainerPointer DataObjectContainerPointer
Definition elxMainBase.h:69
elastix::MainBase::m_Elastix
ObjectPointer m_Elastix
Definition elxMainBase.h:174
elastix::MainBase::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(MovingImageContainer, DataObjectContainerType)
elastix::MainBase::Superclass
itk::Object Superclass
Definition elxMainBase.h:51
elastix::MainBase::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(ResultImageContainer, DataObjectContainerType)
elastix::MainBase::m_ResultDeformationFieldContainer
DataObjectContainerPointer m_ResultDeformationFieldContainer
Definition elxMainBase.h:190
elastix::MainBase::DBIndexType
ComponentDatabase::IndexType DBIndexType
Definition elxMainBase.h:80
elastix::MainBase::m_MovingImageContainer
DataObjectContainerPointer m_MovingImageContainer
Definition elxMainBase.h:188
elastix::MainBase::ObjectPointer
itk::Object::Pointer ObjectPointer
Definition elxMainBase.h:61
elastix::MainBase::m_Configuration
Configuration::Pointer m_Configuration
Definition elxMainBase.h:228
elastix::MainBase::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(ResultDeformationFieldContainer, DataObjectContainerType)
elastix::MainBase::DataObjectPointer
itk::DataObject::Pointer DataObjectPointer
Definition elxMainBase.h:62
elastix::MainBase::m_ResultImageContainer
DataObjectContainerPointer m_ResultImageContainer
Definition elxMainBase.h:189
elastix::MainBase::PixelTypeDescriptionType
ComponentDatabase::PixelTypeDescriptionType PixelTypeDescriptionType
Definition elxMainBase.h:78
elastix::MainBase::ArgumentMapType
Configuration::CommandLineArgumentMapType ArgumentMapType
Definition elxMainBase.h:65
itk::ParameterMapInterface::ParameterMapType
ParameterFileParser::ParameterMapType ParameterMapType
Definition itkParameterMapInterface.h:97
elxComponentDatabase.h
elxElastixBase.h
itkParameterMapInterface.h
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |