|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkImageToListSampleAdaptor_h
19 #define itkImageToListSampleAdaptor_h
53 template <
typename TImage>
55 :
public ListSample<typename MeasurementVectorPixelTraits<typename TImage::PixelType>::MeasurementVectorType>
106 SetImage(
const TImage * image);
114 Size()
const override;
126 if (m_Image.IsNull())
128 return Superclass::GetMeasurementVectorSize();
132 return m_Image->GetNumberOfComponentsPerPixel();
137 AbsoluteFrequencyType
138 GetFrequency(InstanceIdentifier
id)
const override;
141 TotalAbsoluteFrequencyType
142 GetTotalFrequency()
const override;
158 : m_Iter(iter.m_Iter)
159 , m_InstanceIdentifier(iter.m_InstanceIdentifier)
180 return this->m_MeasurementVectorCache;
186 return m_InstanceIdentifier;
193 ++m_InstanceIdentifier;
200 return (m_Iter != it.
m_Iter);
206 return (m_Iter == it.
m_Iter);
212 : m_Iter(std::move(iter))
213 , m_InstanceIdentifier(iid)
249 this->ConstIterator::operator=(iter);
263 ImagePointer nonConstImage = const_cast<ImageType *>(m_Image.GetPointer());
264 ImageIteratorType imageIterator(nonConstImage, nonConstImage->GetLargestPossibleRegion());
275 ImagePointer nonConstImage = const_cast<ImageType *>(m_Image.GetPointer());
279 Iterator iter(imageIterator, largestRegion.GetNumberOfPixels());
304 ConstIterator iter(imageConstIterator, largestRegion.GetNumberOfPixels());
314 PrintSelf(std::ostream & os,
Indent indent)
const override;
324 #ifndef ITK_MANUAL_INSTANTIATION
325 # include "itkImageToListSampleAdaptor.hxx"
Iterator & operator=(const Iterator &iter)
const MeasurementVectorType & GetMeasurementVector() const
typename ImageType::IndexType IndexType
typename ImageType::Pointer ImagePointer
Represent a n-dimensional size (bounds) of a n-dimensional image.
ConstIterator Begin() const
typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
InstanceIdentifier GetInstanceIdentifier() const
This class provides ListSample interface to ITK Image.
typename Superclass::AbsoluteFrequencyType AbsoluteFrequencyType
This class is the native implementation of the a Sample with an STL container.
static void Assign(TArrayType &m, const TArrayType &v)
Control indentation during Print() invocation.
Iterator(const ImageIteratorType &iter, InstanceIdentifier iid)
MeasurementVectorSizeType GetMeasurementVectorSize() const override
Traits for a pixel that define the dimension and component type.
typename MeasurementPixelTraitsType::MeasurementVectorType MeasurementVectorType
TPixelType MeasurementVectorType
typename Superclass::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
A multi-dimensional iterator templated over image type that walks a region of pixels.
ImageBaseType::IndexType IndexType
MeasurementVectorType m_MeasurementVectorCache
AbsoluteFrequencyType GetFrequency() const
bool operator!=(const ConstIterator &it) const
typename ImageType::ConstPointer ImageConstPointer
ImageBaseType::RegionType RegionType
ConstIterator & operator++()
MeasurementVectorType ValueType
bool operator==(const ConstIterator &it) const
MeasurementVectorType m_MeasurementVectorInternal
ConstIterator & operator=(const ConstIterator &iter)
ConstIterator End() const
ImageConstIteratorType m_Iter
typename ImageType::PixelContainerConstPointer PixelContainerConstPointer
Iterator(const Iterator &iter)
ConstIterator(const ImageToListSampleAdaptor *adaptor)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename ImageType::PixelType PixelType
typename Superclass::InstanceIdentifier InstanceIdentifier
ConstIterator(const ConstIterator &iter)
ConstIterator(ImageConstIteratorType iter, InstanceIdentifier iid)
typename MeasurementVectorTraitsType::ValueType MeasurementType
typename TMeasurementVector::ValueType ValueType
InstanceIdentifier m_InstanceIdentifier
Base class for most ITK classes.
ImageConstPointer m_Image
Base class for all data objects in ITK.