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;
126 itkGetConstMacro( UseImageRegion,
bool );
129 itkBooleanMacro( UseImageRegion );
155 *
this = adaptor->
Begin();
178 return this->m_MeasurementVectorCache;
183 return m_InstanceIdentifier;
188 ++(m_MeasurementVectorCache[0]);
189 ++m_InstanceIdentifier;
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))
253 Iterator(const ConstIterator & it) ITK_DELETE_FUNCTION;
254 ConstIterator& operator=(const ConstIterator& it) ITK_DELETE_FUNCTION;
290 ConstIterator iter(nIterator, 0);
300 ConstIterator iter(nIterator,
m_Region.GetNumberOfPixels());
312 void operator=(const
Self&) ITK_DELETE_FUNCTION;
327 template <typename TImage, typename TBoundaryCondition>
328 std::ostream & operator<<(std::ostream &os,
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
void PrintSelf(std::ostream &os, Indent indent) const override
Iterator(const Iterator &iter)
InstanceIdentifier Size() const override
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
std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > MeasurementVectorType
virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
ImageType::OffsetValueType OffsetValueType
NeighborhoodIteratorType::IndexType NeighborhoodIndexType
SmartPointer< const Self > ConstPointer
Superclass::RadiusType RadiusType
ConstIterator & operator=(const ConstIterator &iter)
ImageConstPointer m_Image
ImageRegionIteratorWithIndex< TImage > ImageIteratorType
void SetRadius(const NeighborhoodRadiusType &radius)
void operator=(const Self &) ITK_DELETE_FUNCTION
NeighborhoodIteratorType::SizeType NeighborhoodSizeType
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
TotalAbsoluteFrequencyType GetTotalFrequency() const override
InstanceIdentifier GetInstanceIdentifier() const
NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType
ConstIterator Begin() const
Superclass::InstanceIdentifier InstanceIdentifier
void SetRegion(const RegionType ®ion)
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
bool operator!=(const ConstIterator &it)
ImageToNeighborhoodSampleAdaptor()
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
NeighborhoodRadiusType GetRadius() const
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
RegionType::OffsetTableType OffsetTableType
ImageType::SizeType SizeType
const MeasurementVectorType & GetMeasurementVector() const
ListSample< std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > > Superclass
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
OffsetTableType m_OffsetTable
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
Base class for all data objects in ITK.
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType