go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageRandomSamplerSparseMask.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 __ImageRandomSamplerSparseMask_h
19 #define __ImageRandomSamplerSparseMask_h
20 
22 #include "itkMersenneTwisterRandomVariateGenerator.h"
23 #include "itkImageFullSampler.h"
24 
25 namespace itk
26 {
37 template< class TInputImage >
39  public ImageRandomSamplerBase< TInputImage >
40 {
41 public:
42 
47  typedef SmartPointer< const Self > ConstPointer;
48 
50  itkNewMacro( Self );
51 
54 
67  typedef typename Superclass::MaskType MaskType;
68 
70  itkStaticConstMacro( InputImageDimension, unsigned int,
71  Superclass::InputImageDimension );
72 
74  typedef typename InputImageType::IndexType InputImageIndexType;
75  typedef typename InputImageType::PointType InputImagePointType;
76 
78  typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
79  typedef typename RandomGeneratorType::Pointer RandomGeneratorPointer;
80 
81 protected:
82 
85 
90 
92  void PrintSelf( std::ostream & os, Indent indent ) const;
93 
95  virtual void GenerateData( void );
96 
98  virtual void BeforeThreadedGenerateData( void );
99 
100  virtual void ThreadedGenerateData(
101  const InputImageRegionType & inputRegionForThread,
102  ThreadIdType threadId );
103 
104  RandomGeneratorPointer m_RandomGenerator;
105  InternalFullSamplerPointer m_InternalFullSampler;
106 
107 private:
108 
110  ImageRandomSamplerSparseMask( const Self & ); // purposely not implemented
112  void operator=( const Self & ); // purposely not implemented
113 
114 };
115 
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkImageRandomSamplerSparseMask.hxx"
120 #endif
121 
122 #endif // end #ifndef __ImageRandomSamplerSparseMask_h
void PrintSelf(std::ostream &os, Indent indent) const
RandomGeneratorType::Pointer RandomGeneratorPointer
Superclass::ImageSampleContainerType ImageSampleContainerType
virtual void ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::OutputVectorContainerType OutputVectorContainerType
itk::ImageFullSampler< InputImageType > InternalFullSamplerType
A class that defines an image sample, which is the coordinates of a point and its value...
Superclass::InputImagePointer InputImagePointer
Samples all voxels in the InputImageRegion.
Superclass::InputImagePixelType InputImagePixelType
Samples randomly some voxels of an image.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Superclass::InputImageConstPointer InputImageConstPointer
Superclass::OutputVectorContainerPointer OutputVectorContainerPointer
InternalFullSamplerType::Pointer InternalFullSamplerPointer
virtual void BeforeThreadedGenerateData(void)
This class is a base class for any image sampler that randomly picks samples.
Superclass::InputImageRegionType InputImageRegionType
ImageRandomSamplerBase< TInputImage > Superclass
Superclass::DataObjectPointer DataObjectPointer


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo