18#ifndef itkImageSamplerBase_h
19#define itkImageSamplerBase_h
24#include "itkSpatialObject.h"
41template <
class TInputImage>
62 using typename Superclass::DataObjectPointer;
72 itkStaticConstMacro(InputImageDimension,
unsigned int, InputImageType::ImageDimension);
83 using MaskType = SpatialObject<Self::InputImageDimension>;
101 this->SetMask(_arg, 0);
106 virtual const MaskType *
113 return this->GetMask(0);
122 itkGetConstMacro(NumberOfMasks,
unsigned int);
134 this->SetInputImageRegion(_arg, 0);
139 virtual const InputImageRegionType &
146 return this->GetInputImageRegion(0);
155 itkGetConstMacro(NumberOfInputImageRegions,
unsigned int);
178 itkSetClampMacro(NumberOfSamples,
unsigned long, 1, NumericTraits<unsigned long>::max());
179 itkGetConstMacro(NumberOfSamples,
unsigned long);
182 itkSetMacro(UseMultiThread,
bool);
193 PrintSelf(std::ostream & os, Indent indent)
const override;
225 unsigned long m_NumberOfSamples{ 0 };
229 bool m_UseMultiThread{
false };
235 unsigned int m_NumberOfMasks{ 0 };
238 unsigned int m_NumberOfInputImageRegions{ 0 };
246#ifndef ITK_MANUAL_INSTANTIATION
247# include "itkImageSamplerBase.hxx"
A class that defines an image sample, which is the coordinates of a point and its value.
typename NumericTraits< PixelType >::RealType RealType
This class is a base class for any image sampler.
std::vector< InputImageRegionType > InputImageRegionVectorType
virtual const InputImageRegionType & GetInputImageRegion() const
void AfterThreadedGenerateData() override
virtual const MaskType * GetMask(unsigned int pos) const
virtual bool CheckInputImageRegions()
~ImageSamplerBase() override=default
void GenerateInputRequestedRegion() override
void CropInputImageRegion()
virtual void UpdateAllMasks()
InputImageRegionType m_CroppedInputImageRegion
virtual void SetMask(const MaskType *_arg, unsigned int pos)
virtual const InputImageRegionType & GetInputImageRegion(unsigned int pos) const
virtual bool IsInsideAllMasks(const InputImagePointType &point) const
MaskVectorType m_MaskVector
virtual const MaskType * GetMask() const
InputImageRegionType m_InputImageRegion
typename InputImageType::PointType InputImagePointType
std::vector< ImageSampleContainerPointer > m_ThreaderSampleContainer
virtual void SetMask(const MaskType *_arg)
virtual void SetInputImageRegion(const InputImageRegionType _arg)
ImageSamplerBase()=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::SizeType InputImageSizeType
InputImageRegionVectorType m_InputImageRegionVector
virtual void SetNumberOfMasks(const unsigned int _arg)
ITK_DISALLOW_COPY_AND_MOVE(ImageSamplerBase)
typename MaskType::ConstPointer MaskConstPointer
typename InputImagePointType::ValueType InputImagePointValueType
virtual void SetNumberOfInputImageRegions(const unsigned int _arg)
SpatialObject< Self::InputImageDimension > MaskType
std::vector< MaskConstPointer > MaskVectorType
typename ImageSampleType::RealType ImageSampleValueType
typename InputImageType::IndexType InputImageIndexType
InputImageRegionType m_DummyInputImageRegion
SmartPointer< const Self > ConstPointer
virtual bool SelectingNewSamplesOnUpdateSupported() const
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
virtual void SetInputImageRegion(const InputImageRegionType _arg, unsigned int pos)
typename MaskType::Pointer MaskPointer
void BeforeThreadedGenerateData() override
virtual bool SelectNewSamplesOnUpdate()
Base class that takes in an image and pops out a vector container.
TInputImage InputImageType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::Pointer InputImagePointer
TOutputVectorContainer OutputVectorContainerType
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.