18 #ifndef itkImageToListSampleAdaptor_h
19 #define itkImageToListSampleAdaptor_h
52 template<
typename TImage >
54 public ListSample< typename MeasurementVectorPixelTraits< typename TImage::PixelType >::MeasurementVectorType >
125 return m_Image->GetNumberOfComponentsPerPixel();
147 *
this = adaptor->
Begin();
152 m_InstanceIdentifier(iter.m_InstanceIdentifier)
170 return this->m_MeasurementVectorCache;
175 return m_InstanceIdentifier;
181 ++m_InstanceIdentifier;
187 return ( m_Iter != it.
m_Iter );
192 return ( m_Iter == it.
m_Iter );
199 m_InstanceIdentifier(iid)
202 ConstIterator() ITK_DELETE_FUNCTION;
222 ConstIterator(adaptor)
241 Iterator(const ConstIterator & it) ITK_DELETE_FUNCTION;
242 ConstIterator & operator=(const ConstIterator & it) ITK_DELETE_FUNCTION;
245 ConstIterator(iter, iid)
255 ImageIteratorType imageIterator( nonConstImage, nonConstImage->GetLargestPossibleRegion() );
266 const typename ImageType::RegionType & largestRegion = nonConstImage->GetLargestPossibleRegion();
269 Iterator iter( imageIterator, largestRegion.GetNumberOfPixels() );
280 ConstIterator iter(imageConstIterator, 0);
289 const typename ImageType::RegionType & largestRegion =
m_Image->GetLargestPossibleRegion();
292 ConstIterator iter( imageConstIterator, largestRegion.GetNumberOfPixels() );
305 void operator=(const
Self &) ITK_DELETE_FUNCTION;
314 #ifndef ITK_MANUAL_INSTANTIATION
315 #include "itkImageToListSampleAdaptor.hxx"
ImageToListSampleAdaptor()
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
MeasurementVectorTraitsType::ValueType MeasurementType
virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
SmartPointer< Self > Pointer
ConstIterator End() const
InstanceIdentifier m_InstanceIdentifier
MeasurementVectorType ValueType
ImageConstPointer m_Image
InstanceIdentifier GetInstanceIdentifier() const
virtual MeasurementVectorSizeType GetMeasurementVectorSize() const override
AbsoluteFrequencyType GetFrequency() const
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
ImageRegionConstIterator< ImageType > ImageConstIteratorType
ImageRegionIterator< ImageType > ImageIteratorType
static void Assign(TArrayType &m, const TArrayType &v)
SmartPointer< const Self > ConstPointer
MeasurementVectorType m_MeasurementVectorInternal
ImageType::Pointer ImagePointer
TMeasurementVector::ValueType ValueType
Traits for a pixel that define the dimension and component type.
MeasurementVectorTraitsTypes< MeasurementVectorType > MeasurementVectorTraitsType
bool operator!=(const ConstIterator &it)
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
ImageType::ConstPointer ImageConstPointer
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
ImageType::PixelType PixelType
Superclass::InstanceIdentifier InstanceIdentifier
MeasurementPixelTraitsType::MeasurementVectorType MeasurementVectorType
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Iterator & operator=(const Iterator &iter)
InstanceIdentifier Size() const override
ConstIterator & operator=(const ConstIterator &iter)
ConstIterator(const ConstIterator &iter)
ConstIterator Begin() const
TotalAbsoluteFrequencyType GetTotalFrequency() const override
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
virtual MeasurementVectorSizeType GetMeasurementVectorSize() const
virtual ~ImageToListSampleAdaptor()
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
void PrintSelf(std::ostream &os, Indent indent) const override
bool operator==(const ConstIterator &it)
ListSample< typename MeasurementVectorPixelTraits< typename TImage::PixelType >::MeasurementVectorType > Superclass
const TImage * GetImage() const
ImageType::IndexType IndexType
This class is the native implementation of the a Sample with an STL container.
ImageConstIteratorType m_Iter
Control indentation during Print() invocation.
Iterator(const Iterator &iter)
void SetImage(const TImage *image)
ConstIterator & operator++()
This class provides ListSample interface to ITK Image.
const MeasurementVectorType & GetMeasurementVector() const
TPixelType MeasurementVectorType
PixelTraits< typename TImage::PixelType > PixelTraitsType
ConstIterator(const ImageToListSampleAdaptor *adaptor)
Base class for all data objects in ITK.
MeasurementVectorPixelTraits< PixelType > MeasurementPixelTraitsType
Superclass::InstanceIdentifier InstanceIdentifier
A multi-dimensional iterator templated over image type that walks a region of pixels.
ConstIterator(const ImageConstIteratorType &iter, InstanceIdentifier iid)
ImageToListSampleAdaptor Self
ImageType::PixelContainerConstPointer PixelContainerConstPointer