18 #ifndef itkImageToNeighborhoodSampleAdaptor_h 19 #define itkImageToNeighborhoodSampleAdaptor_h 34 namespace Statistics {
51 template <
typename TImage,
typename TBoundaryCondition >
53 public ListSample< std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > >
95 typedef typename std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > >
97 typedef typename MeasurementVectorType::value_type
ValueType;
112 void SetRadius(
const NeighborhoodRadiusType& radius);
115 NeighborhoodRadiusType
GetRadius()
const;
118 void SetRegion(
const RegionType& region);
126 itkGetConstMacro( UseImageRegion,
bool );
129 itkBooleanMacro( UseImageRegion );
133 InstanceIdentifier
Size() const ITK_OVERRIDE;
139 AbsoluteFrequencyType
GetFrequency(InstanceIdentifier
id) const ITK_OVERRIDE;
155 *
this = adaptor->
Begin();
178 return this->m_MeasurementVectorCache;
183 return m_InstanceIdentifier;
188 ++(m_MeasurementVectorCache[0]);
189 ++m_InstanceIdentifier;
206 NeighborhoodIteratorType iter,
207 InstanceIdentifier iid)
209 this->m_MeasurementVectorCache.clear();
210 this->m_MeasurementVectorCache.push_back(iter);
211 m_InstanceIdentifier = iid;
214 ConstIterator() ITK_DELETE_FUNCTION;
246 #if !(defined(_MSC_VER) && (_MSC_VER <= 1200)) 252 Iterator(
const Self * adaptor) ITK_DELETE_FUNCTION;
312 void operator=(
const Self&) ITK_DELETE_FUNCTION;
327 template <
typename TImage,
typename TBoundaryCondition>
333 #ifndef ITK_MANUAL_INSTANTIATION 334 #include "itkImageToNeighborhoodSampleAdaptor.hxx" ConstIterator(NeighborhoodIteratorType iter, InstanceIdentifier iid)
ImageType::PixelType PixelType
NeighborhoodRadiusType m_Radius
NeighborhoodIteratorType::NeighborhoodType NeighborhoodType
ConstNeighborhoodIterator< TImage, TBoundaryCondition > NeighborhoodIteratorType
Iterator(const Iterator &iter)
InstanceIdentifier m_InstanceIdentifier
ConstIterator(const ImageToNeighborhoodSampleAdaptor *adaptor)
ConstIterator & operator++()
bool operator==(const ConstIterator &it)
signed long OffsetValueType
SmartPointer< Self > Pointer
void SetUseImageRegion(const bool &flag)
ImageType::PixelContainerConstPointer PixelContainerConstPointer
A light-weight container object for storing an N-dimensional neighborhood of values.
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
virtual ~ImageToNeighborhoodSampleAdaptor()
AbsoluteFrequencyType GetFrequency() const
virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > MeasurementVectorType
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
ImageType::OffsetValueType OffsetValueType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
NeighborhoodIteratorType::IndexType NeighborhoodIndexType
SmartPointer< const Self > ConstPointer
Superclass::RadiusType RadiusType
ConstIterator & operator=(const ConstIterator &iter)
Iterator & operator=(const Iterator &iter)
ImageConstPointer m_Image
ImageRegionIteratorWithIndex< TImage > ImageIteratorType
void SetRadius(const NeighborhoodRadiusType &radius)
NeighborhoodIteratorType::SizeType NeighborhoodSizeType
Iterator() ITK_DELETE_FUNCTION
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
MeasurementVectorType m_MeasurementVectorCache
const TImage * GetImage() const
ImageType::OffsetType OffsetType
Superclass::SizeType SizeType
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
InstanceIdentifier GetInstanceIdentifier() const
NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType
ConstIterator Begin() const
Superclass::InstanceIdentifier InstanceIdentifier
void SetRegion(const RegionType ®ion)
TotalAbsoluteFrequencyType GetTotalFrequency() const override
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
bool operator!=(const ConstIterator &it)
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
NeighborhoodRadiusType GetRadius() const
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
RegionType::OffsetTableType OffsetTableType
ImageType::SizeType SizeType
const MeasurementVectorType & GetMeasurementVector() const
ListSample< std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > > Superclass
InstanceIdentifier Size() const override
ConstIterator(const ConstIterator &iter)
ImageType::IndexType IndexType
ImageType::Pointer ImagePointer
Superclass::InstanceIdentifier InstanceIdentifier
This class is the native implementation of the a Sample with an STL container.
void SetImage(const TImage *image)
Control indentation during Print() invocation.
MeasurementVectorType m_MeasurementVectorInternal
void PrintSelf(std::ostream &os, Indent indent) const override
OffsetTableType m_OffsetTable
Iterator(NeighborhoodIteratorType iter, InstanceIdentifier iid)
RegionType GetRegion() const
ConstIterator End() const
ImageToNeighborhoodSampleAdaptor Self
MeasurementVectorType::value_type ValueType
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
ValueType MeasurementType
ImageType::RegionType RegionType
IndexType m_NeighborIndexInternal
ImageType::ConstPointer ImageConstPointer
This class provides ListSample interface to ITK Image.
NeighborhoodIterator< TImage, TBoundaryCondition > NonConstNeighborhoodIteratorType
InstanceIdentifier m_InstanceIdentifierInternal
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
friend class ImageToNeighborhoodSampleAdaptor
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType