go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageRandomCoordinateSampler.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 __ImageRandomCoordinateSampler_h
19 #define __ImageRandomCoordinateSampler_h
20 
22 #include "itkInterpolateImageFunction.h"
23 #include "itkBSplineInterpolateImageFunction.h"
24 #include "itkMersenneTwisterRandomVariateGenerator.h"
25 
26 namespace itk
27 {
28 
39 template< class TInputImage >
41  public ImageRandomSamplerBase< TInputImage >
42 {
43 public:
44 
49  typedef SmartPointer< const Self > ConstPointer;
50 
52  itkNewMacro( Self );
53 
56 
69  typedef typename Superclass::MaskType MaskType;
71  typedef typename InputImageType::SpacingType InputImageSpacingType;
76 
78  itkStaticConstMacro( InputImageDimension, unsigned int,
79  Superclass::InputImageDimension );
80 
83  typedef double CoordRepType;
84  typedef InterpolateImageFunction<
86  typedef typename InterpolatorType::Pointer InterpolatorPointer;
87  typedef BSplineInterpolateImageFunction<
89 
91  typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
92  typedef typename RandomGeneratorType::Pointer RandomGeneratorPointer;
93 
95  itkSetObjectMacro( Interpolator, InterpolatorType );
96  itkGetObjectMacro( Interpolator, InterpolatorType );
97 
100  itkSetMacro( SampleRegionSize, InputImageSpacingType );
101  itkGetConstReferenceMacro( SampleRegionSize, InputImageSpacingType );
102 
105  itkGetConstMacro( UseRandomSampleRegion, bool );
106  itkSetMacro( UseRandomSampleRegion, bool );
107 
108 protected:
109 
110  typedef typename InterpolatorType::ContinuousIndexType InputImageContinuousIndexType;
111 
116 
118  void PrintSelf( std::ostream & os, Indent indent ) const;
119 
121  virtual void GenerateData( void );
122 
124  virtual void BeforeThreadedGenerateData( void );
125 
126  virtual void ThreadedGenerateData(
127  const InputImageRegionType & inputRegionForThread,
128  ThreadIdType threadId );
129 
132  const InputImageContinuousIndexType & smallestContIndex,
133  const InputImageContinuousIndexType & largestContIndex,
134  InputImageContinuousIndexType & randomContIndex );
135 
139 
145  virtual void GenerateSampleRegion(
146  const InputImageContinuousIndexType & smallestImageContIndex,
147  const InputImageContinuousIndexType & largestImageContIndex,
148  InputImageContinuousIndexType & smallestContIndex,
149  InputImageContinuousIndexType & largestContIndex );
150 
151 private:
152 
154  ImageRandomCoordinateSampler( const Self & ); // purposely not implemented
156  void operator=( const Self & ); // purposely not implemented
157 
159 
160 };
161 
162 } // end namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 #include "itkImageRandomCoordinateSampler.hxx"
166 #endif
167 
168 #endif // end #ifndef __ImageRandomCoordinateSampler_h
itk::ImageRandomCoordinateSampler::OutputVectorContainerPointer
Superclass::OutputVectorContainerPointer OutputVectorContainerPointer
Definition: itkImageRandomCoordinateSampler.h:60
itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImagePointType
InputImageType::PointType InputImagePointType
Definition: itkImageSamplerBase.h:82
itk::ImageRandomCoordinateSampler::InputImagePixelType
Superclass::InputImagePixelType InputImagePixelType
Definition: itkImageRandomCoordinateSampler.h:65
itk::ImageRandomCoordinateSampler::m_RandomGenerator
RandomGeneratorPointer m_RandomGenerator
Definition: itkImageRandomCoordinateSampler.h:137
itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::ImageSampleValueType
ImageSampleType::RealType ImageSampleValueType
Definition: itkImageSamplerBase.h:84
itk::ImageRandomCoordinateSampler::InputImageType
Superclass::InputImageType InputImageType
Definition: itkImageRandomCoordinateSampler.h:61
itk::ImageRandomCoordinateSampler::Pointer
SmartPointer< Self > Pointer
Definition: itkImageRandomCoordinateSampler.h:48
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::MaskType
Superclass::MaskType MaskType
Definition: itkImageRandomSamplerBase.h:65
itk::ImageRandomCoordinateSampler::Superclass
ImageRandomSamplerBase< TInputImage > Superclass
Definition: itkImageRandomCoordinateSampler.h:47
SmartPointer< Self >
itk::ImageRandomCoordinateSampler::m_Interpolator
InterpolatorPointer m_Interpolator
Definition: itkImageRandomCoordinateSampler.h:136
itk::ImageRandomCoordinateSampler::operator=
void operator=(const Self &)
itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: itkImageSamplerBase.h:80
itk::ImageRandomCoordinateSampler::InterpolatorPointer
InterpolatorType::Pointer InterpolatorPointer
Definition: itkImageRandomCoordinateSampler.h:86
itk::ImageRandomCoordinateSampler::InputImagePointType
Superclass::InputImagePointType InputImagePointType
Definition: itkImageRandomCoordinateSampler.h:73
itk::ImageRandomCoordinateSampler::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
itk::ImageRandomCoordinateSampler::InputImageRegionType
Superclass::InputImageRegionType InputImageRegionType
Definition: itkImageRandomCoordinateSampler.h:64
itk::ImageRandomCoordinateSampler::GenerateData
virtual void GenerateData(void)
itk::ImageRandomCoordinateSampler::MaskType
Superclass::MaskType MaskType
Definition: itkImageRandomCoordinateSampler.h:69
itk::ImageRandomCoordinateSampler::~ImageRandomCoordinateSampler
virtual ~ImageRandomCoordinateSampler()
Definition: itkImageRandomCoordinateSampler.h:115
itk::ImageRandomCoordinateSampler::InputImagePointValueType
Superclass::InputImagePointValueType InputImagePointValueType
Definition: itkImageRandomCoordinateSampler.h:74
itk::ImageRandomCoordinateSampler::InterpolatorType
InterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType
Definition: itkImageRandomCoordinateSampler.h:85
itk::ImageRandomCoordinateSampler::ImageSampleValueType
Superclass::ImageSampleValueType ImageSampleValueType
Definition: itkImageRandomCoordinateSampler.h:75
itk::ImageRandomCoordinateSampler::ImageSampleContainerType
Superclass::ImageSampleContainerType ImageSampleContainerType
Definition: itkImageRandomCoordinateSampler.h:67
itk::ImageRandomCoordinateSampler::DataObjectPointer
Superclass::DataObjectPointer DataObjectPointer
Definition: itkImageRandomCoordinateSampler.h:55
itk::ImageSample
A class that defines an image sample, which is the coordinates of a point and its value.
Definition: itkImageSample.h:35
double
itk::ImageRandomCoordinateSampler::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImagePixelType
Superclass::InputImagePixelType InputImagePixelType
Definition: itkImageRandomSamplerBase.h:61
itk::ImageRandomCoordinateSampler
Samples an image by randomly composing a set of physical coordinates.
Definition: itkImageRandomCoordinateSampler.h:42
ThreadIdType
itk::ImageRandomCoordinateSampler::GenerateSampleRegion
virtual void GenerateSampleRegion(const InputImageContinuousIndexType &smallestImageContIndex, const InputImageContinuousIndexType &largestImageContIndex, InputImageContinuousIndexType &smallestContIndex, InputImageContinuousIndexType &largestContIndex)
itk::ImageRandomCoordinateSampler::Self
ImageRandomCoordinateSampler Self
Definition: itkImageRandomCoordinateSampler.h:46
itk::ImageRandomCoordinateSampler::InputImageSpacingType
InputImageType::SpacingType InputImageSpacingType
Definition: itkImageRandomCoordinateSampler.h:71
itk::ImageRandomCoordinateSampler::ImageRandomCoordinateSampler
ImageRandomCoordinateSampler()
itk::ImageRandomCoordinateSampler::ImageSampleType
Superclass::ImageSampleType ImageSampleType
Definition: itkImageRandomCoordinateSampler.h:66
itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImagePointValueType
InputImagePointType::ValueType InputImagePointValueType
Definition: itkImageSamplerBase.h:83
itk::ImageRandomCoordinateSampler::ImageSampleContainerPointer
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Definition: itkImageRandomCoordinateSampler.h:68
itk::ImageRandomCoordinateSampler::InputImagePointer
Superclass::InputImagePointer InputImagePointer
Definition: itkImageRandomCoordinateSampler.h:62
itk::ImageRandomCoordinateSampler::RandomGeneratorPointer
RandomGeneratorType::Pointer RandomGeneratorPointer
Definition: itkImageRandomCoordinateSampler.h:92
itk::ImageRandomCoordinateSampler::RandomGeneratorType
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
Definition: itkImageRandomCoordinateSampler.h:91
itk::ImageRandomCoordinateSampler::InputImageIndexType
Superclass::InputImageIndexType InputImageIndexType
Definition: itkImageRandomCoordinateSampler.h:72
itk::ImageRandomCoordinateSampler::OutputVectorContainerType
Superclass::OutputVectorContainerType OutputVectorContainerType
Definition: itkImageRandomCoordinateSampler.h:59
itk::ImageRandomCoordinateSampler::BeforeThreadedGenerateData
virtual void BeforeThreadedGenerateData(void)
itk::ImageRandomCoordinateSampler::ImageRandomCoordinateSampler
ImageRandomCoordinateSampler(const Self &)
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImagePointer
Superclass::InputImagePointer InputImagePointer
Definition: itkImageRandomSamplerBase.h:58
itk::ImageRandomCoordinateSampler::InputImageSizeType
Superclass::InputImageSizeType InputImageSizeType
Definition: itkImageRandomCoordinateSampler.h:70
itkImageRandomSamplerBase.h
itk::ImageRandomCoordinateSampler::m_SampleRegionSize
InputImageSpacingType m_SampleRegionSize
Definition: itkImageRandomCoordinateSampler.h:138
itk::ImageRandomCoordinateSampler::InputImageContinuousIndexType
InterpolatorType::ContinuousIndexType InputImageContinuousIndexType
Definition: itkImageRandomCoordinateSampler.h:106
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::ImageRandomCoordinateSampler::m_UseRandomSampleRegion
bool m_UseRandomSampleRegion
Definition: itkImageRandomCoordinateSampler.h:158
itk::ImageRandomCoordinateSampler::CoordRepType
double CoordRepType
Definition: itkImageRandomCoordinateSampler.h:83
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImageRegionType
Superclass::InputImageRegionType InputImageRegionType
Definition: itkImageRandomSamplerBase.h:60
itk::ImageRandomCoordinateSampler::InputImageConstPointer
Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkImageRandomCoordinateSampler.h:63
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImageType
Superclass::InputImageType InputImageType
Definition: itkImageRandomSamplerBase.h:57
itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImageIndexType
InputImageType::IndexType InputImageIndexType
Definition: itkImageSamplerBase.h:81
itk::ImageRandomCoordinateSampler::DefaultInterpolatorType
BSplineInterpolateImageFunction< InputImageType, CoordRepType, double > DefaultInterpolatorType
Definition: itkImageRandomCoordinateSampler.h:88
itk::ImageRandomCoordinateSampler::ThreadedGenerateData
virtual void ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
itk::VectorDataContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorDataContainer.h:79
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::DataObjectPointer
Superclass::DataObjectPointer DataObjectPointer
Definition: itkImageRandomSamplerBase.h:51
itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType >::InputImageConstPointer
Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkImageRandomSamplerBase.h:59
itk::ImageRandomSamplerBase
This class is a base class for any image sampler that randomly picks samples.
Definition: itkImageRandomSamplerBase.h:38
itk::ImageRandomCoordinateSampler::GenerateRandomCoordinate
virtual void GenerateRandomCoordinate(const InputImageContinuousIndexType &smallestContIndex, const InputImageContinuousIndexType &largestContIndex, InputImageContinuousIndexType &randomContIndex)
itk::ImageRandomCoordinateSampler::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkImageRandomCoordinateSampler.h:49


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo