18#ifndef itkImageToNeighborhoodSampleAdaptor_h
19#define itkImageToNeighborhoodSampleAdaptor_h
54template <
typename TImage,
typename TBoundaryCondition>
56 :
public ListSample<std::vector<ConstNeighborhoodIterator<TImage, TBoundaryCondition>>>
100 using ValueType =
typename MeasurementVectorType::value_type;
103 using typename Superclass::AbsoluteFrequencyType;
104 using typename Superclass::TotalAbsoluteFrequencyType;
105 using typename Superclass::MeasurementVectorSizeType;
106 using typename Superclass::InstanceIdentifier;
136 itkGetConstMacro(UseImageRegion,
bool);
139 itkBooleanMacro(UseImageRegion);
195 return this->m_MeasurementVectorCache;
201 return m_InstanceIdentifier;
207 ++(m_MeasurementVectorCache[0]);
208 ++m_InstanceIdentifier;
224 this->m_MeasurementVectorCache.clear();
225 this->m_MeasurementVectorCache.push_back(iter);
226 m_InstanceIdentifier = iid;
262 this->ConstIterator::operator=(iter);
290 Iterator iter(nIterator, m_Region.GetNumberOfPixels());
331 bool m_UseImageRegion{
true };
338template <
typename TImage,
typename TBoundaryCondition>
344#ifndef ITK_MANUAL_INSTANTIATION
345# include "itkImageToNeighborhoodSampleAdaptor.hxx"
Base class for all data objects in ITK.
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Control indentation during Print() invocation.
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
A light-weight container object for storing an N-dimensional neighborhood of values.
Base class for most ITK classes.
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
ConstIterator(const ConstIterator &iter)
const MeasurementVectorType & GetMeasurementVector() const
InstanceIdentifier m_InstanceIdentifier
ConstIterator & operator=(const ConstIterator &iter)
bool operator==(const ConstIterator &it) const
AbsoluteFrequencyType GetFrequency() const
ConstIterator(NeighborhoodIteratorType iter, InstanceIdentifier iid)
ConstIterator & operator++()
ConstIterator(const ImageToNeighborhoodSampleAdaptor *adaptor)
InstanceIdentifier GetInstanceIdentifier() const
MeasurementVectorType m_MeasurementVectorCache
Iterator & operator=(const Iterator &iter)
ConstIterator & operator=(const ConstIterator &it)=delete
Iterator(const Self *adaptor)=delete
Iterator(NeighborhoodIteratorType iter, InstanceIdentifier iid)
Iterator(const Iterator &iter)
Iterator(const ConstIterator &it)=delete
This class provides ListSample interface to ITK Image.
InstanceIdentifier Size() const override
void SetImage(const TImage *image)
typename ImageType::PixelType PixelType
void SetUseImageRegion(const bool flag)
typename NeighborhoodIteratorType::SizeType NeighborhoodSizeType
RegionType GetRegion() const
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
typename ImageType::PixelContainerConstPointer PixelContainerConstPointer
typename ImageType::Pointer ImagePointer
typename ImageType::RegionType RegionType
void PrintSelf(std::ostream &os, Indent indent) const override
typename RegionType::OffsetTableType OffsetTableType
ImageToNeighborhoodSampleAdaptor()
ValueType MeasurementType
typename NeighborhoodIteratorType::NeighborhoodType NeighborhoodType
ConstIterator End() const
NeighborhoodRadiusType GetRadius() const
typename std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > MeasurementVectorType
void SetRadius(const NeighborhoodRadiusType &radius)
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
typename ImageType::ConstPointer ImageConstPointer
typename ImageType::OffsetValueType OffsetValueType
typename ImageType::IndexType IndexType
~ImageToNeighborhoodSampleAdaptor() override=default
typename NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType
typename ImageType::OffsetType OffsetType
ConstIterator Begin() const
typename ImageType::SizeType SizeType
const TImage * GetImage() const
TotalAbsoluteFrequencyType GetTotalFrequency() const override
void SetRegion(const RegionType ®ion)
typename MeasurementVectorType::value_type ValueType
typename NeighborhoodIteratorType::IndexType NeighborhoodIndexType
This class is the native implementation of the a Sample with an STL container.
typename MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
NumericTraits< AbsoluteFrequencyType >::AccumulateType TotalAbsoluteFrequencyType
MeasurementVectorTraits::AbsoluteFrequencyType AbsoluteFrequencyType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)