Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Common
itkNeighborhoodAccessorFunctor.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Insight Segmentation & Registration Toolkit
4
Module: $RCSfile: itkNeighborhoodAccessorFunctor.h,v $
5
Language: C++
6
Date: $Date: 2009-04-21 15:46:16 $
7
Version: $Revision: 1.3 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
#ifndef __itkNeighborhoodAccessorFunctor_h
18
#define __itkNeighborhoodAccessorFunctor_h
19
20
#include "
itkImageBoundaryCondition.h
"
21
#include "
itkNeighborhood.h
"
22
#include "
itkImageBase.h
"
23
24
namespace
itk
25
{
26
40
template
<
class
TImage >
41
class
NeighborhoodAccessorFunctor
42
{
43
public
:
44
typedef
TImage
ImageType
;
45
typedef
typename
ImageType::PixelType
PixelType
;
46
typedef
typename
ImageType::InternalPixelType
InternalPixelType
;
47
typedef
unsigned
int
VectorLengthType
;
48
typedef
typename
ImageType::OffsetType
OffsetType
;
49
50
typedef
Neighborhood
<
InternalPixelType
*,
51
::itk::GetImageDimension< TImage >::ImageDimension
>
NeighborhoodType
;
52
53
typedef
ImageBoundaryCondition< ImageType >
const
*
54
ImageBoundaryConditionConstPointerType
;
55
57
inline
void
SetBegin
(
const
InternalPixelType
*) {}
58
65
inline
PixelType
Get
(
const
InternalPixelType
*pixelPointer )
const
66
{
67
return
(*pixelPointer);
68
}
69
71
inline
void
Set
(
InternalPixelType
* &pixelPointer,
const
PixelType
&p )
const
72
{
73
*pixelPointer = p;
74
}
75
76
inline
PixelType
BoundaryCondition
(
77
const
OffsetType
& point_index,
78
const
OffsetType
&boundary_offset,
79
const
NeighborhoodType
*data,
80
const
ImageBoundaryConditionConstPointerType
boundaryCondition)
const
81
{
82
return
boundaryCondition->operator()(point_index, boundary_offset, data);
83
}
84
85
void
SetVectorLength
(
VectorLengthType
length ) {}
86
VectorLengthType
SetVectorLength
() {
return
0; }
87
89
NeighborhoodAccessorFunctor
() {}
90
92
virtual
~NeighborhoodAccessorFunctor
() {}
93
94
};
95
96
}
// end namespace itk
97
#endif
Generated at Sat May 25 2013 23:56:27 for
Orfeo Toolbox
with
doxygen 1.8.3.1