18#ifndef itkVectorContainer_h
19#define itkVectorContainer_h
50template <
typename TElementIdentifier,
typename TElement>
53 ,
private std::vector<TElement>
94 const STLContainerType &
100 using STLContainerType::begin;
101 using STLContainerType::end;
102 using STLContainerType::rbegin;
103 using STLContainerType::rend;
104 using STLContainerType::cbegin;
105 using STLContainerType::cend;
106 using STLContainerType::crbegin;
107 using STLContainerType::crend;
109 using STLContainerType::size;
110 using STLContainerType::max_size;
111 using STLContainerType::resize;
112 using STLContainerType::capacity;
113 using STLContainerType::empty;
114 using STLContainerType::reserve;
115 using STLContainerType::shrink_to_fit;
117 using STLContainerType::operator[];
118 using STLContainerType::at;
119 using STLContainerType::front;
120 using STLContainerType::back;
122 using STLContainerType::assign;
123 using STLContainerType::push_back;
124 using STLContainerType::pop_back;
125 using STLContainerType::insert;
126 using STLContainerType::erase;
128 using STLContainerType::clear;
130 using STLContainerType::get_allocator;
132 using typename STLContainerType::reference;
133 using typename STLContainerType::const_reference;
134 using typename STLContainerType::iterator;
135 using typename STLContainerType::const_iterator;
136 using typename STLContainerType::size_type;
137 using typename STLContainerType::difference_type;
138 using typename STLContainerType::value_type;
139 using typename STLContainerType::allocator_type;
140 using typename STLContainerType::pointer;
141 using typename STLContainerType::const_pointer;
142 using typename STLContainerType::reverse_iterator;
143 using typename STLContainerType::const_reverse_iterator;
160 using pointer =
typename VectorIterator::pointer;
210 return m_Iter == r.
m_Iter;
218 return m_Iter == r.
m_Iter;
226 return (this->
operator-(r)) < 0;
284 using pointer =
typename VectorConstIterator::pointer;
285 using reference =
typename VectorConstIterator::reference;
352 return m_Iter == r.
m_Iter;
360 return m_Iter == r.
m_Iter;
368 return (this->
operator-(r) < 0);
562 template <
typename TInputIterator>
582template <
typename T1,
typename T2 =
void>
584 std::conditional_t<std::is_void_v<T2>, T1, T2>>;
588template <
typename TElement>
593 vectorContainer->CastToSTLContainer() = std::move(stdVector);
594 return vectorContainer;
600#ifndef ITK_MANUAL_INSTANTIATION
601# include "itkVectorContainer.hxx"
Light weight base class for most itk classes.
Base class for most ITK classes.
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Iterator)
typename VectorConstIterator::pointer pointer
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
bool operator==(const ConstIterator &r) const
bool operator>=(const ConstIterator &r) const
ConstIterator & operator=(const Iterator &r)
bool operator>(const ConstIterator &r) const
VectorConstIterator m_Iter
difference_type operator-(const ConstIterator &r) const
ConstIterator * operator->()
ConstIterator(size_type d, const VectorConstIterator &i)
ElementIdentifier Index() const
ConstIterator operator++(int)
ConstIterator & operator++()
ConstIterator(const Iterator &r)
typename VectorConstIterator::reference reference
typename VectorConstIterator::difference_type difference_type
ConstIterator & operator*()
ConstIterator & operator+=(difference_type n)
ConstIterator operator--(int)
typename VectorConstIterator::value_type value_type
const_reference Value() const
typename VectorConstIterator::iterator_category iterator_category
bool operator==(const Iterator &r) const
ConstIterator & operator--()
difference_type operator-(const Iterator &r) const
typename VectorIterator::difference_type difference_type
typename VectorIterator::pointer pointer
bool operator>(const Iterator &r) const
ElementIdentifier Index() const
typename VectorIterator::iterator_category iterator_category
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Iterator)
Iterator & operator+=(difference_type n)
bool operator==(const Iterator &r) const
typename VectorIterator::value_type value_type
bool operator==(const ConstIterator &r) const
bool operator>=(const Iterator &r) const
typename VectorIterator::reference reference
Iterator(size_type d, const VectorIterator &i)
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
void InsertElement(ElementIdentifier, Element)
void CreateIndex(ElementIdentifier)
bool IndexExists(ElementIdentifier) const
VectorContainer()=default
Element GetElement(ElementIdentifier) const
VectorContainer(size_type n)
ConstIterator Begin() const
reference CreateElementAt(ElementIdentifier)
TElementIdentifier ElementIdentifier
STLContainerType & CastToSTLContainer() noexcept
void DeleteIndex(ElementIdentifier)
VectorContainer(const Self &r)
VectorContainer(size_type n, const Element &x)
ConstIterator End() const
typename VectorType::iterator VectorIterator
reference ElementAt(ElementIdentifier)
ElementIdentifier Size() const
std::vector< Element > VectorType
bool GetElementIfIndexExists(ElementIdentifier, Element *) const
typename VectorType::const_iterator VectorConstIterator
void Reserve(ElementIdentifier)
const_reference ElementAt(ElementIdentifier) const
VectorContainer(TInputIterator first, TInputIterator last)
const STLContainerType & CastToSTLConstContainer() const noexcept
VectorType STLContainerType
void SetElement(ElementIdentifier, Element)
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(Array< T > &a, Array< T > &b) noexcept
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
unsigned long SizeValueType
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
auto MakeVectorContainer(std::vector< TElement > stdVector)
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer