Loading...
Searching...
No Matches
elxComponentDatabase.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 elxComponentDatabase_h
#define elxComponentDatabase_h
#include "itkObject.h"
#include "itkObjectFactory.h"
#include <iostream>
#include <string>
#include <utility>
#include <map>
namespace elastix
{
class ComponentDatabase : public itk::Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ComponentDatabase);
using Self = ComponentDatabase;
using Superclass = itk::Object;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(ComponentDatabase, Object);
using IndexType = unsigned int;
using ObjectPointer = itk::Object::Pointer;
using PtrToCreator = ObjectPointer (*)();
using ComponentDescriptionType = std::string;
using CreatorMapKeyType = std::pair<ComponentDescriptionType, IndexType>;
using CreatorMapValueType = PtrToCreator;
using CreatorMapType = std::map<CreatorMapKeyType, CreatorMapValueType>;
using CreatorMapEntryType = CreatorMapType::value_type;
using PixelTypeDescriptionType = std::string;
using ImageDimensionType = unsigned int;
using ImageTypeDescriptionType = std::pair<PixelTypeDescriptionType, ImageDimensionType>;
using IndexMapKeyType = std::pair<ImageTypeDescriptionType, ImageTypeDescriptionType>;
using IndexMapValueType = IndexType;
using IndexMapType = std::map<IndexMapKeyType, IndexMapValueType>;
using IndexMapEntryType = IndexMapType::value_type;
int
SetCreator(const ComponentDescriptionType & name, IndexType i, PtrToCreator creator);
int
SetIndex(const PixelTypeDescriptionType & fixedPixelType,
ImageDimensionType fixedDimension,
const PixelTypeDescriptionType & movingPixelType,
ImageDimensionType movingDimension,
IndexType i);
PtrToCreator
GetCreator(const ComponentDescriptionType & name, IndexType i) const;
IndexType
GetIndex(const PixelTypeDescriptionType & fixedPixelType,
ImageDimensionType fixedDimension,
const PixelTypeDescriptionType & movingPixelType,
ImageDimensionType movingDimension) const;
protected:
ComponentDatabase() = default;
~ComponentDatabase() override = default;
private:
CreatorMapType CreatorMap;
IndexMapType IndexMap;
};
} // end namespace elastix
#endif // end #ifndef elxComponentDatabase_h
elastix::ComponentDatabase::IndexMapEntryType
IndexMapType::value_type IndexMapEntryType
Definition elxComponentDatabase.h:97
elastix::ComponentDatabase::ImageDimensionType
unsigned int ImageDimensionType
Definition elxComponentDatabase.h:88
elastix::ComponentDatabase::SetIndex
int SetIndex(const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension, IndexType i)
elastix::ComponentDatabase::PixelTypeDescriptionType
std::string PixelTypeDescriptionType
Definition elxComponentDatabase.h:87
elastix::ComponentDatabase::IndexMapKeyType
std::pair< ImageTypeDescriptionType, ImageTypeDescriptionType > IndexMapKeyType
Definition elxComponentDatabase.h:94
elastix::ComponentDatabase::CreatorMapValueType
PtrToCreator CreatorMapValueType
Definition elxComponentDatabase.h:78
elastix::ComponentDatabase::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition elxComponentDatabase.h:61
elastix::ComponentDatabase::ImageTypeDescriptionType
std::pair< PixelTypeDescriptionType, ImageDimensionType > ImageTypeDescriptionType
Definition elxComponentDatabase.h:89
elastix::ComponentDatabase::GetCreator
PtrToCreator GetCreator(const ComponentDescriptionType &name, IndexType i) const
elastix::ComponentDatabase::~ComponentDatabase
~ComponentDatabase() override=default
elastix::ComponentDatabase::IndexMapType
std::map< IndexMapKeyType, IndexMapValueType > IndexMapType
Definition elxComponentDatabase.h:96
elastix::ComponentDatabase::ComponentDatabase
ComponentDatabase()=default
elastix::ComponentDatabase::Pointer
itk::SmartPointer< Self > Pointer
Definition elxComponentDatabase.h:60
elastix::ComponentDatabase::IndexMap
IndexMapType IndexMap
Definition elxComponentDatabase.h:126
elastix::ComponentDatabase::IndexMapValueType
IndexType IndexMapValueType
Definition elxComponentDatabase.h:95
elastix::ComponentDatabase::GetIndex
IndexType GetIndex(const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension) const
elastix::ComponentDatabase::ObjectPointer
itk::Object::Pointer ObjectPointer
Definition elxComponentDatabase.h:70
elastix::ComponentDatabase::IndexType
unsigned int IndexType
Definition elxComponentDatabase.h:67
elastix::ComponentDatabase::CreatorMap
CreatorMapType CreatorMap
Definition elxComponentDatabase.h:125
elastix::ComponentDatabase::Self
ComponentDatabase Self
Definition elxComponentDatabase.h:58
elastix::ComponentDatabase::CreatorMapKeyType
std::pair< ComponentDescriptionType, IndexType > CreatorMapKeyType
Definition elxComponentDatabase.h:77
elastix::ComponentDatabase::CreatorMapEntryType
CreatorMapType::value_type CreatorMapEntryType
Definition elxComponentDatabase.h:80
elastix::ComponentDatabase::PtrToCreator
ObjectPointer(*)() PtrToCreator
Definition elxComponentDatabase.h:75
elastix::ComponentDatabase::ComponentDescriptionType
std::string ComponentDescriptionType
Definition elxComponentDatabase.h:76
elastix::ComponentDatabase::CreatorMapType
std::map< CreatorMapKeyType, CreatorMapValueType > CreatorMapType
Definition elxComponentDatabase.h:79
elastix::ComponentDatabase::SetCreator
int SetCreator(const ComponentDescriptionType &name, IndexType i, PtrToCreator creator)
elastix::ComponentDatabase::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ComponentDatabase)
elastix::ComponentDatabase::Superclass
itk::Object Superclass
Definition elxComponentDatabase.h:59
int
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |