Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Core
Install
elxComponentDatabase.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 __elxComponentDatabase_h
16
#define __elxComponentDatabase_h
17
18
#include "itkObject.h"
19
#include "itkObjectFactory.h"
20
#include <iostream>
21
#include <string>
22
#include <utility>
23
#include <map>
24
25
26
namespace
elastix
27
{
28
49
class
ComponentDatabase
:
50
public
itk::Object
51
{
52
public
:
53
55
typedef
ComponentDatabase
Self
;
56
typedef
itk::Object
Superclass
;
57
typedef
itk::SmartPointer<Self>
Pointer
;
58
typedef
itk::SmartPointer<const Self>
ConstPointer
;
59
60
itkNewMacro(
Self
);
61
itkTypeMacro(
ComponentDatabase
, Object);
62
64
typedef
unsigned
int
IndexType
;
65
67
typedef
itk::Object
ObjectType
;
68
typedef
ObjectType::Pointer
ObjectPointer
;
69
73
typedef
ObjectPointer
(*
PtrToCreator
)(void);
74
typedef
std::string
ComponentDescriptionType
;
75
typedef
std::pair<
76
ComponentDescriptionType
,
77
IndexType
>
CreatorMapKeyType
;
78
typedef
PtrToCreator
CreatorMapValueType
;
79
typedef
std::map<
80
CreatorMapKeyType
,
81
CreatorMapValueType
>
CreatorMapType
;
82
typedef
CreatorMapType::value_type
CreatorMapEntryType
;
83
89
typedef
std::string
PixelTypeDescriptionType
;
90
typedef
unsigned
int
ImageDimensionType
;
91
typedef
std::pair<
92
PixelTypeDescriptionType
,
93
ImageDimensionType
>
ImageTypeDescriptionType
;
94
98
typedef
std::pair<
99
ImageTypeDescriptionType
,
100
ImageTypeDescriptionType
>
IndexMapKeyType
;
101
typedef
IndexType
IndexMapValueType
;
102
typedef
std::map<
103
IndexMapKeyType
,
104
IndexMapValueType
>
IndexMapType
;
105
typedef
IndexMapType::value_type
IndexMapEntryType
;
106
108
CreatorMapType
&
GetCreatorMap
(
void
);
109
IndexMapType
&
GetIndexMap
(
void
);
110
112
int
SetCreator
(
113
const
ComponentDescriptionType
& name,
114
IndexType
i,
115
PtrToCreator
creator );
116
117
int
SetIndex
(
118
const
PixelTypeDescriptionType
& fixedPixelType,
119
ImageDimensionType
fixedDimension,
120
const
PixelTypeDescriptionType
& movingPixelType,
121
ImageDimensionType
movingDimension,
122
IndexType
i );
123
125
PtrToCreator
GetCreator
(
126
const
ComponentDescriptionType
& name,
127
IndexType
i );
128
129
IndexType
GetIndex
(
130
const
PixelTypeDescriptionType
& fixedPixelType,
131
ImageDimensionType
fixedDimension,
132
const
PixelTypeDescriptionType
& movingPixelType,
133
ImageDimensionType
movingDimension );
134
135
protected
:
136
137
ComponentDatabase
(){}
138
virtual
~ComponentDatabase
(){}
139
140
CreatorMapType
CreatorMap
;
141
IndexMapType
IndexMap
;
142
143
private
:
144
ComponentDatabase
(
const
Self
& );
// purposely not implemented
145
void
operator=
(
const
Self
& );
// purposely not implemented
146
147
};
// end class ComponentDatabase
148
149
150
}
// end namespace elastix
151
152
153
154
#endif // end #ifndef __elxComponentDatabase_h
155
Generated on 21-03-2014 for elastix by
1.8.1.2