18#ifndef itkImageRandomSamplerBase_h
19#define itkImageRandomSamplerBase_h
22#include <itkMersenneTwisterRandomVariateGenerator.h>
37template <
class TInputImage>
56 using typename Superclass::DataObjectPointer;
69 using SeedIntegerType = Statistics::MersenneTwisterRandomVariateGenerator::IntegerType;
76 if (arg != m_OptionalSeed)
87 SetOptionalSeed(std::make_optional(arg));
91 [[nodiscard]] std::optional<SeedIntegerType>
94 return m_OptionalSeed;
113 PrintSelf(std::ostream & os, Indent indent)
const override;
116 std::vector<double> m_RandomNumberList{};
119 std::optional<SeedIntegerType> m_OptionalSeed{};
124#ifndef ITK_MANUAL_INSTANTIATION
125# include "itkImageRandomSamplerBase.hxx"
This class is a base class for any image sampler that randomly picks samples.
void GenerateRandomNumberList()
void PrintSelf(std::ostream &os, Indent indent) const override
~ImageRandomSamplerBase() override=default
std::optional< SeedIntegerType > GetOptionalSeed() const
Statistics::MersenneTwisterRandomVariateGenerator::IntegerType SeedIntegerType
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
SmartPointer< const Self > ConstPointer
ITK_DISALLOW_COPY_AND_MOVE(ImageRandomSamplerBase)
void SetSeed(const SeedIntegerType arg)
void SetOptionalSeed(const std::optional< SeedIntegerType > arg)
A class that defines an image sample, which is the coordinates of a point and its value.
This class is a base class for any image sampler.
typename InputImageType::ConstPointer InputImageConstPointer
TInputImage InputImageType
typename InputImageType::RegionType InputImageRegionType
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
typename InputImageType::Pointer InputImagePointer
ImageMaskSpatialObject< Self::InputImageDimension > MaskType
typename InputImageType::PixelType InputImagePixelType
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.