18 #ifndef itkImageToListSampleAdaptor_h
19 #define itkImageToListSampleAdaptor_h
52 template<
typename TImage >
54 public ListSample< typename MeasurementVectorPixelTraits< typename TImage::PixelType >::MeasurementVectorType >
103 void SetImage(
const TImage *image);
106 const TImage * GetImage()
const;
119 if( m_Image.IsNull() )
121 return Superclass::GetMeasurementVectorSize();
125 return m_Image->GetNumberOfComponentsPerPixel();
130 AbsoluteFrequencyType GetFrequency(InstanceIdentifier
id)
const ITK_OVERRIDE;
133 TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE;
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)
203 ConstIterator() ITK_DELETED_FUNCTION;
221 ConstIterator(adaptor)
230 this->ConstIterator::operator=(iter);
236 ConstIterator(iter, iid)
245 Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION;
246 ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION;
253 ImageIteratorType imageIterator( nonConstImage, nonConstImage->GetLargestPossibleRegion() );
264 const typename ImageType::RegionType & largestRegion = nonConstImage->GetLargestPossibleRegion();
267 Iterator iter( imageIterator, largestRegion.GetNumberOfPixels() );
278 ConstIterator iter(imageConstIterator, 0);
287 const typename ImageType::RegionType & largestRegion = m_Image->GetLargestPossibleRegion();
290 ConstIterator iter( imageConstIterator, largestRegion.GetNumberOfPixels() );
299 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
311 #ifndef ITK_MANUAL_INSTANTIATION
312 #include "itkImageToListSampleAdaptor.hxx"
MeasurementVectorTraitsType::ValueType MeasurementType
SmartPointer< Self > Pointer
ConstIterator End() const
InstanceIdentifier m_InstanceIdentifier
MeasurementVectorType ValueType
ImageConstPointer m_Image
InstanceIdentifier GetInstanceIdentifier() const
Represent the size (bounds) of a n-dimensional image.
AbsoluteFrequencyType GetFrequency() const
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)
ImageType::ConstPointer ImageConstPointer
Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
ImageType::PixelType PixelType
MeasurementPixelTraitsType::MeasurementVectorType MeasurementVectorType
Iterator(const ImageIteratorType &iter, InstanceIdentifier iid)
Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Iterator & operator=(const Iterator &iter)
ConstIterator & operator=(const ConstIterator &iter)
ConstIterator(const ConstIterator &iter)
ConstIterator Begin() const
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
bool operator==(const ConstIterator &it)
ListSample< typename MeasurementVectorPixelTraits< typename TImage::PixelType >::MeasurementVectorType > Superclass
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)
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
virtual ~ImageToListSampleAdaptor() override
ImageBaseType::IndexType IndexType
ImageType::PixelContainerConstPointer PixelContainerConstPointer