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;
106 void SetImage(
const TImage* image);
109 const TImage* GetImage()
const;
123 void SetUseImageRegion(
const bool& flag);
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;
215 ConstIterator() ITK_DELETED_FUNCTION;
241 this->ConstIterator::operator=( iter );
245 #if !(defined(_MSC_VER) && (_MSC_VER <= 1200))
258 Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION;
259 ConstIterator& operator=(const ConstIterator& it) ITK_DELETED_FUNCTION;
277 Iterator iter(nIterator, m_Region.GetNumberOfPixels());
288 ConstIterator iter(nIterator, 0);
298 ConstIterator iter(nIterator, m_Region.GetNumberOfPixels());
306 void PrintSelf(std::ostream& os,
Indent indent)
const ITK_OVERRIDE;
324 template <
typename TImage,
typename TBoundaryCondition>
330 #ifndef ITK_MANUAL_INSTANTIATION
331 #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++()
Represent the size (bounds) of a n-dimensional image.
bool operator==(const ConstIterator &it)
signed long OffsetValueType
SmartPointer< Self > Pointer
virtual ~ImageToNeighborhoodSampleAdaptor() override
ImageType::PixelContainerConstPointer PixelContainerConstPointer
A light-weight container object for storing an N-dimensional neighborhood of values.
AbsoluteFrequencyType GetFrequency() const
std::vector< ConstNeighborhoodIterator< TImage, TBoundaryCondition > > MeasurementVectorType
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
ImageType::OffsetValueType OffsetValueType
NeighborhoodIteratorType::IndexType NeighborhoodIndexType
SmartPointer< const Self > ConstPointer
Superclass::RadiusType RadiusType
ConstIterator & operator=(const ConstIterator &iter)
ImageConstPointer m_Image
ImageRegionIteratorWithIndex< TImage > ImageIteratorType
NeighborhoodIteratorType::SizeType NeighborhoodSizeType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
MeasurementVectorType m_MeasurementVectorCache
ImageType::OffsetType OffsetType
Superclass::SizeType SizeType
InstanceIdentifier GetInstanceIdentifier() const
NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType
ConstIterator Begin() const
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
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.
Control indentation during Print() invocation.
MeasurementVectorType m_MeasurementVectorInternal
OffsetTableType m_OffsetTable
Iterator(NeighborhoodIteratorType iter, InstanceIdentifier iid)
ConstIterator End() const
ImageBaseType::SizeType SizeType
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.
ImageBaseType::IndexType IndexType
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType