Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Common
ImageSamplers
itkImageGridSampler.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 __ImageGridSampler_h
16
#define __ImageGridSampler_h
17
18
#include "
itkImageSamplerBase.h
"
19
20
namespace
itk
21
{
22
41
template
<
class
TInputImage >
42
class
ImageGridSampler
:
43
public
ImageSamplerBase
< TInputImage >
44
{
45
public
:
46
48
typedef
ImageGridSampler
Self
;
49
typedef
ImageSamplerBase< TInputImage >
Superclass
;
50
typedef
SmartPointer<Self>
Pointer
;
51
typedef
SmartPointer<const Self>
ConstPointer
;
52
54
itkNewMacro(
Self
);
55
57
itkTypeMacro(
ImageGridSampler
,
ImageSamplerBase
);
58
60
typedef
typename
Superclass::DataObjectPointer
DataObjectPointer
;
61
typedef
typename
Superclass::OutputVectorContainerType
OutputVectorContainerType
;
62
typedef
typename
Superclass::OutputVectorContainerPointer
OutputVectorContainerPointer
;
63
typedef
typename
Superclass::InputImageType
InputImageType
;
64
typedef
typename
Superclass::InputImagePointer
InputImagePointer
;
65
typedef
typename
Superclass::InputImageConstPointer
InputImageConstPointer
;
66
typedef
typename
Superclass::InputImageRegionType
InputImageRegionType
;
67
typedef
typename
Superclass::InputImagePixelType
InputImagePixelType
;
68
typedef
typename
Superclass::ImageSampleType
ImageSampleType
;
69
typedef
typename
Superclass::ImageSampleContainerType
ImageSampleContainerType
;
70
typedef
typename
Superclass::MaskType
MaskType
;
71
73
itkStaticConstMacro
( InputImageDimension,
unsigned
int
,
74
Superclass::InputImageDimension );
75
77
typedef
typename
InputImageType::IndexType
InputImageIndexType
;
78
typedef
typename
InputImageType::PointType
InputImagePointType
;
79
81
typedef
typename
InputImageType::OffsetType
SampleGridSpacingType
;
82
typedef
typename
SampleGridSpacingType::OffsetValueType
SampleGridSpacingValueType
;
83
typedef
typename
InputImageType::SizeType
SampleGridSizeType
;
84
typedef
InputImageIndexType
SampleGridIndexType
;
85
typedef
typename
InputImageType::SizeType
InputImageSizeType
;
86
91
void
SetSampleGridSpacing
(
SampleGridSpacingType
arg )
92
{
93
this->
SetNumberOfSamples
(0);
94
if
( this->
m_SampleGridSpacing
!= arg )
95
{
96
this->
m_SampleGridSpacing
= arg;
97
this->Modified();
98
}
99
}
100
itkGetConstMacro(SampleGridSpacing,
SampleGridSpacingType
);
101
119
virtual
void
SetNumberOfSamples
(
unsigned
long
nrofsamples );
120
123
virtual
bool
SelectNewSamplesOnUpdate
(
void
)
124
{
125
return
false
;
126
};
127
129
virtual
bool
SelectingNewSamplesOnUpdateSupported
(
void
)
const
130
{
131
return
false
;
132
}
133
134
protected
:
135
137
ImageGridSampler
()
138
{
139
this->
m_RequestedNumberOfSamples
= 0;
140
}
141
143
virtual
~ImageGridSampler
() {};
144
146
void
PrintSelf
( std::ostream& os, Indent indent )
const
;
147
149
virtual
void
GenerateData
(
void
);
150
152
SampleGridSpacingType
m_SampleGridSpacing
;
153
155
unsigned
long
m_RequestedNumberOfSamples
;
156
157
private
:
158
160
ImageGridSampler
(
const
Self
& );
// purposely not implemented
162
void
operator=
(
const
Self
& );
// purposely not implemented
163
164
};
// end class ImageGridSampler
165
166
167
}
// end namespace itk
168
169
#ifndef ITK_MANUAL_INSTANTIATION
170
#include "itkImageGridSampler.txx"
171
#endif
172
173
#endif // end #ifndef __ImageGridSampler_h
174
Generated on 21-03-2014 for elastix by
1.8.1.2