ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkCellInterfaceVisitor.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
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
#ifndef __itkCellInterfaceVisitor_h
19
#define __itkCellInterfaceVisitor_h
20
21
#include "
itkLightObject.h
"
22
#include "
itkObjectFactory.h
"
23
24
namespace
itk
25
{
26
// forward reference CellInterface
27
template
<
28
typename
TPixelType,
29
typename
TCellTraits
30
>
31
class
CellInterface;
32
46
template
<
47
typename
TPixelType,
48
typename
TCellTraits
49
>
50
class
CellInterfaceVisitor
:
public
LightObject
51
{
52
public
:
54
typedef
CellInterfaceVisitor
Self
;
55
typedef
LightObject
Superclass
;
56
typedef
SmartPointer< Self >
Pointer
;
57
typedef
SmartPointer< const Self >
ConstPointer
;
58
typedef
typename
TCellTraits::CellIdentifier
CellIdentifier
;
59
61
itkTypeMacro(
CellInterfaceVisitor
,
LightObject
);
62
64
virtual
void
VisitFromCell
(
CellIdentifier
cellId,
CellInterface
< TPixelType,
65
TCellTraits > *) = 0;
66
68
virtual
int
GetCellTopologyId
() = 0;
69
70
protected
:
71
CellInterfaceVisitor
() {}
72
~CellInterfaceVisitor
() {}
73
private
:
74
CellInterfaceVisitor
(
const
Self
&);
//purposely not implemented
75
void
operator=
(
const
Self
&);
//purposely not implemented
76
};
77
104
template
<
105
typename
TPixelType,
106
typename
TCellTraits,
107
class
CellTopology,
108
class
UserVisitor
109
>
110
class
CellInterfaceVisitorImplementation
:
111
public
CellInterfaceVisitor
< TPixelType, TCellTraits >,
public
UserVisitor
112
{
113
public
:
115
typedef
CellInterfaceVisitorImplementation
Self
;
116
typedef
SmartPointer< Self >
Pointer
;
117
typedef
typename
TCellTraits::CellIdentifier
CellIdentifier
;
118
120
itkNewMacro(
Self
);
121
123
itkTypeMacro(
CellInterfaceVisitorImplementation
,
LightObject
);
124
127
virtual
int
GetCellTopologyId
() {
return
CellTopology::GetTopologyId(); }
128
131
void
VisitFromCell
(
CellIdentifier
cellId,
CellInterface
< TPixelType,
132
TCellTraits > *c)
133
{
134
this->UserVisitor::Visit(cellId, (CellTopology *)c);
135
}
136
137
protected
:
138
CellInterfaceVisitorImplementation
() {}
139
~CellInterfaceVisitorImplementation
() {}
140
private
:
141
CellInterfaceVisitorImplementation
(
const
Self
&);
//purposely not implemented
142
void
operator=
(
const
Self
&);
//purposely not implemented
143
};
144
}
// end namespace itk
145
146
#endif
147
Generated on Tue Jul 10 2012 23:21:06 for ITK by
1.8.1