18 #ifndef __ImageRandomCoordinateSampler_h 19 #define __ImageRandomCoordinateSampler_h 22 #include "itkInterpolateImageFunction.h" 23 #include "itkBSplineInterpolateImageFunction.h" 24 #include "itkMersenneTwisterRandomVariateGenerator.h" 39 template<
class TInputImage >
79 Superclass::InputImageDimension );
84 typedef InterpolateImageFunction<
87 typedef BSplineInterpolateImageFunction<
95 itkSetObjectMacro( Interpolator, InterpolatorType );
96 itkGetObjectMacro( Interpolator, InterpolatorType );
100 itkSetMacro( SampleRegionSize, InputImageSpacingType );
101 itkGetConstReferenceMacro( SampleRegionSize, InputImageSpacingType );
105 itkGetConstMacro( UseRandomSampleRegion,
bool );
106 itkSetMacro( UseRandomSampleRegion,
bool );
118 void PrintSelf( std::ostream & os, Indent indent )
const;
127 const InputImageRegionType & inputRegionForThread,
132 const InputImageContinuousIndexType & smallestContIndex,
133 const InputImageContinuousIndexType & largestContIndex,
134 InputImageContinuousIndexType & randomContIndex );
146 const InputImageContinuousIndexType & smallestImageContIndex,
147 const InputImageContinuousIndexType & largestImageContIndex,
148 InputImageContinuousIndexType & smallestContIndex,
149 InputImageContinuousIndexType & largestContIndex );
164 #ifndef ITK_MANUAL_INSTANTIATION 165 #include "itkImageRandomCoordinateSampler.hxx" 168 #endif // end #ifndef __ImageRandomCoordinateSampler_h InterpolatorPointer m_Interpolator
Superclass::InputImagePixelType InputImagePixelType
ImageSampleType::RealType ImageSampleValueType
Superclass::DataObjectPointer DataObjectPointer
InputImageType::PointType InputImagePointType
Superclass::ImageSampleValueType ImageSampleValueType
Superclass::InputImagePointer InputImagePointer
Superclass::InputImageSizeType InputImageSizeType
A class that defines an image sample, which is the coordinates of a point and its value...
virtual void GenerateRandomCoordinate(const InputImageContinuousIndexType &smallestContIndex, const InputImageContinuousIndexType &largestContIndex, InputImageContinuousIndexType &randomContIndex)
Superclass::InputImageConstPointer InputImageConstPointer
InterpolatorType::ContinuousIndexType InputImageContinuousIndexType
Superclass::InputImageConstPointer InputImageConstPointer
BSplineInterpolateImageFunction< InputImageType, CoordRepType, double > DefaultInterpolatorType
Superclass::MaskType MaskType
Superclass::InputImageRegionType InputImageRegionType
Superclass::InputImagePointType InputImagePointType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
ImageRandomCoordinateSampler Self
InputImagePointType::ValueType InputImagePointValueType
ImageRandomSamplerBase< TInputImage > Superclass
Superclass::InputImageType InputImageType
Superclass::ImageSampleType ImageSampleType
Superclass::InputImagePointValueType InputImagePointValueType
Superclass::InputImageType InputImageType
Superclass::InputImageRegionType InputImageRegionType
virtual void GenerateSampleRegion(const InputImageContinuousIndexType &smallestImageContIndex, const InputImageContinuousIndexType &largestImageContIndex, InputImageContinuousIndexType &smallestContIndex, InputImageContinuousIndexType &largestContIndex)
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Samples an image by randomly composing a set of physical coordinates.
Superclass::MaskType MaskType
InputImageType::SizeType InputImageSizeType
virtual void ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
SmartPointer< Self > Pointer
virtual ~ImageRandomCoordinateSampler()
void PrintSelf(std::ostream &os, Indent indent) const
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
Superclass::InputImagePixelType InputImagePixelType
virtual void GenerateData(void)
Superclass::InputImagePointer InputImagePointer
InputImageType::SpacingType InputImageSpacingType
InterpolatorType::Pointer InterpolatorPointer
InterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType
InputImageSpacingType m_SampleRegionSize
Superclass::OutputVectorContainerType OutputVectorContainerType
Superclass::DataObjectPointer DataObjectPointer
RandomGeneratorPointer m_RandomGenerator
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
This class is a base class for any image sampler that randomly picks samples.
bool m_UseRandomSampleRegion
RandomGeneratorType::Pointer RandomGeneratorPointer
InputImageType::IndexType InputImageIndexType
Superclass::InputImageIndexType InputImageIndexType
ImageRandomCoordinateSampler()
virtual void BeforeThreadedGenerateData(void)
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
Superclass::ImageSampleContainerType ImageSampleContainerType
Superclass::OutputVectorContainerPointer OutputVectorContainerPointer