go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxComponentDatabase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef elxComponentDatabase_h
20#define elxComponentDatabase_h
21
22#include "itkObject.h"
23#include "itkObjectFactory.h"
24#include <iostream>
25#include <string>
26#include <utility>
27#include <map>
28
29namespace elastix
30{
31
52class ComponentDatabase : public itk::Object
53{
54public:
56
59 using Superclass = itk::Object;
60 using Pointer = itk::SmartPointer<Self>;
61 using ConstPointer = itk::SmartPointer<const Self>;
62
63 itkNewMacro(Self);
64 itkTypeMacro(ComponentDatabase, Object);
65
67 using IndexType = unsigned int;
68
70 using ObjectPointer = itk::Object::Pointer;
71
76 using ComponentDescriptionType = std::string;
77 using CreatorMapKeyType = std::pair<ComponentDescriptionType, IndexType>;
79 using CreatorMapType = std::map<CreatorMapKeyType, CreatorMapValueType>;
80 using CreatorMapEntryType = CreatorMapType::value_type;
81
87 using PixelTypeDescriptionType = std::string;
88 using ImageDimensionType = unsigned int;
89 using ImageTypeDescriptionType = std::pair<PixelTypeDescriptionType, ImageDimensionType>;
90
94 using IndexMapKeyType = std::pair<ImageTypeDescriptionType, ImageTypeDescriptionType>;
96 using IndexMapType = std::map<IndexMapKeyType, IndexMapValueType>;
97 using IndexMapEntryType = IndexMapType::value_type;
98
100 int
102
103 int
104 SetIndex(const PixelTypeDescriptionType & fixedPixelType,
105 ImageDimensionType fixedDimension,
106 const PixelTypeDescriptionType & movingPixelType,
107 ImageDimensionType movingDimension,
108 IndexType i);
109
113
115 GetIndex(const PixelTypeDescriptionType & fixedPixelType,
116 ImageDimensionType fixedDimension,
117 const PixelTypeDescriptionType & movingPixelType,
118 ImageDimensionType movingDimension) const;
119
120protected:
121 ComponentDatabase() = default;
122 ~ComponentDatabase() override = default;
123
124private:
127};
128
129} // end namespace elastix
130
131#endif // end #ifndef elxComponentDatabase_h
The ComponentDatabase class is a class that stores the New() functions of all components.
IndexMapType::value_type IndexMapEntryType
int SetIndex(const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension, IndexType i)
std::pair< ImageTypeDescriptionType, ImageTypeDescriptionType > IndexMapKeyType
itk::SmartPointer< const Self > ConstPointer
std::pair< PixelTypeDescriptionType, ImageDimensionType > ImageTypeDescriptionType
PtrToCreator GetCreator(const ComponentDescriptionType &name, IndexType i) const
~ComponentDatabase() override=default
std::map< IndexMapKeyType, IndexMapValueType > IndexMapType
itk::SmartPointer< Self > Pointer
IndexType GetIndex(const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension) const
itk::Object::Pointer ObjectPointer
std::pair< ComponentDescriptionType, IndexType > CreatorMapKeyType
CreatorMapType::value_type CreatorMapEntryType
std::map< CreatorMapKeyType, CreatorMapValueType > CreatorMapType
int SetCreator(const ComponentDescriptionType &name, IndexType i, PtrToCreator creator)
ITK_DISALLOW_COPY_AND_MOVE(ComponentDatabase)


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo