18#ifndef itkImageSamplerBase_h
19#define itkImageSamplerBase_h
24#include "itkImageMaskSpatialObject.h"
41template <
class TInputImage>
61 using typename Superclass::DataObjectPointer;
73 itkStaticConstMacro(InputImageDimension,
unsigned int, InputImageType::ImageDimension);
84 using MaskType = ImageMaskSpatialObject<Self::InputImageDimension>;
92 MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx)
override;
129 this->SetMask(_arg, 0);
134 virtual const MaskType *
141 return this->GetMask(0);
150 itkGetConstMacro(NumberOfMasks,
unsigned int);
162 this->SetInputImageRegion(_arg, 0);
167 virtual const InputImageRegionType &
174 return this->GetInputImageRegion(0);
183 itkGetConstMacro(NumberOfInputImageRegions,
unsigned int);
206 itkSetClampMacro(NumberOfSamples,
unsigned long, 1, NumericTraits<unsigned long>::max());
207 itkGetConstMacro(NumberOfSamples,
unsigned long);
210 itkSetMacro(UseMultiThread,
bool);
221 PrintSelf(std::ostream & os, Indent indent)
const override;
246 static std::vector<InputImageRegionType>
250 unsigned long m_NumberOfSamples{ 0 };
254 bool m_UseMultiThread{
true };
258 using ProcessObject::MakeOutput;
259 using ProcessObject::SetInput;
264 unsigned int m_NumberOfMasks{ 0 };
267 unsigned int m_NumberOfInputImageRegions{ 0 };
275#ifndef ITK_MANUAL_INSTANTIATION
276# include "itkImageSamplerBase.hxx"
TInputImage InputImageType
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.
void SetInput(unsigned int idx, const InputImageType *input)
std::vector< InputImageRegionType > InputImageRegionVectorType
virtual const InputImageRegionType & GetInputImageRegion() const
virtual const MaskType * GetMask(unsigned int pos) const
const InputImageType * GetInput(unsigned int idx)
virtual bool CheckInputImageRegions()
DataObject::Pointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override
~ImageSamplerBase() override=default
void GenerateInputRequestedRegion() override
void CropInputImageRegion()
typename InputImageType::ConstPointer InputImageConstPointer
const InputImageType * GetInput()
virtual void UpdateAllMasks()
virtual void SetMask(const MaskType *_arg, unsigned int pos)
virtual const InputImageRegionType & GetInputImageRegion(unsigned int pos) const
virtual bool IsInsideAllMasks(const InputImagePointType &point) const
virtual const MaskType * GetMask() const
OutputVectorContainerType * GetOutput()
static std::vector< InputImageRegionType > SplitRegion(const InputImageRegionType &inputRegion, const vcl_size_t requestedNumberOfSubregions)
void SetInput(const InputImageType *input)
typename InputImageType::PointType InputImagePointType
virtual void SetMask(const MaskType *_arg)
virtual void SetInputImageRegion(const InputImageRegionType _arg)
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::SizeType InputImageSizeType
virtual void SetNumberOfMasks(const unsigned int _arg)
ITK_DISALLOW_COPY_AND_MOVE(ImageSamplerBase)
typename MaskType::ConstPointer MaskConstPointer
typename InputImagePointType::ValueType InputImagePointValueType
TInputImage InputImageType
virtual void SetNumberOfInputImageRegions(const unsigned int _arg)
std::vector< MaskConstPointer > MaskVectorType
typename ImageSampleType::RealType ImageSampleValueType
typename InputImageType::IndexType InputImageIndexType
SmartPointer< const Self > ConstPointer
typename InputImageType::RegionType InputImageRegionType
virtual bool SelectingNewSamplesOnUpdateSupported() const
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
virtual void SetInputImageRegion(const InputImageRegionType _arg, unsigned int pos)
typename MaskType::Pointer MaskPointer
ImageMaskSpatialObject< Self::InputImageDimension > MaskType
typename InputImageType::PixelType InputImagePixelType
virtual bool SelectNewSamplesOnUpdate()
A base class for creating an ImageToVectorContainerFilter.
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.