go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiInputImageRandomCoordinateSampler.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#ifndef __MultiInputImageRandomCoordinateSampler_h
19#define __MultiInputImageRandomCoordinateSampler_h
20
22#include "itkInterpolateImageFunction.h"
23#include "itkBSplineInterpolateImageFunction.h"
24#include "itkMersenneTwisterRandomVariateGenerator.h"
25
26namespace itk
27{
28
39template< class TInputImage >
41 public ImageRandomSamplerBase< TInputImage >
42{
43public:
44
49 typedef SmartPointer< const Self > ConstPointer;
50
52 itkNewMacro( Self );
53
56
70 typedef typename InputImageType::SpacingType InputImageSpacingType;
75
77 itkStaticConstMacro( InputImageDimension, unsigned int,
78 Superclass::InputImageDimension );
79
83 typedef double CoordRepType;
84 typedef InterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType;
85 typedef typename InterpolatorType::Pointer InterpolatorPointer;
86 typedef BSplineInterpolateImageFunction< InputImageType, CoordRepType, double > DefaultInterpolatorType;
87
89 typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
90 typedef typename RandomGeneratorType::Pointer RandomGeneratorPointer;
91
93 itkSetObjectMacro( Interpolator, InterpolatorType );
95
99 itkSetMacro( SampleRegionSize, InputImageSpacingType );
100 itkGetConstReferenceMacro( SampleRegionSize, InputImageSpacingType );
101
104 itkGetConstMacro( UseRandomSampleRegion, bool );
105 itkSetMacro( UseRandomSampleRegion, bool );
106
107protected:
108
109 typedef typename InterpolatorType::ContinuousIndexType InputImageContinuousIndexType;
110
113
116
118 void PrintSelf( std::ostream & os, Indent indent ) const override;
119
121 void GenerateData( void ) override;
122
126 const InputImageContinuousIndexType & smallestContIndex,
127 const InputImageContinuousIndexType & largestContIndex,
128 InputImageContinuousIndexType & randomContIndex );
129
133
136 InputImageContinuousIndexType & smallestContIndex,
137 InputImageContinuousIndexType & largestContIndex );
138
139private:
140
142 MultiInputImageRandomCoordinateSampler( const Self & ); // purposely not implemented
144 void operator=( const Self & ); // purposely not implemented
145
147
148};
149
150} // end namespace itk
151
152#ifndef ITK_MANUAL_INSTANTIATION
153#include "itkMultiInputImageRandomCoordinateSampler.hxx"
154#endif
155
156#endif // end #ifndef __MultiInputImageRandomCoordinateSampler_h
This class is a base class for any image sampler that randomly picks samples.
Superclass::InputImageType InputImageType
A class that defines an image sample, which is the coordinates of a point and its value.
InputImageType::IndexType InputImageIndexType
InputImagePointType::ValueType InputImagePointValueType
Superclass::InputImagePixelType InputImagePixelType
InputImageType::SizeType InputImageSizeType
SpatialObject< Self::InputImageDimension > MaskType
ImageSampleType::RealType ImageSampleValueType
Superclass::DataObjectPointer DataObjectPointer
InputImageType::PointType InputImagePointType
Superclass::InputImageRegionType InputImageRegionType
Superclass::InputImagePointer InputImagePointer
Superclass::InputImageConstPointer InputImageConstPointer
Samples an image by randomly composing a set of physical coordinates.
virtual void GenerateRandomCoordinate(const InputImageContinuousIndexType &smallestContIndex, const InputImageContinuousIndexType &largestContIndex, InputImageContinuousIndexType &randomContIndex)
Superclass::OutputVectorContainerPointer OutputVectorContainerPointer
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
virtual void GenerateSampleRegion(InputImageContinuousIndexType &smallestContIndex, InputImageContinuousIndexType &largestContIndex)
BSplineInterpolateImageFunction< InputImageType, CoordRepType, double > DefaultInterpolatorType
itkGetModifiableObjectMacro(Interpolator, InterpolatorType)
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
void PrintSelf(std::ostream &os, Indent indent) const override
InterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo