18#ifndef itkImportImageContainer_h
19#define itkImportImageContainer_h
44template <
typename TElementIdentifier,
typename TElement>
70 return m_ImportPointer;
80 SetImportPointer(TElement * ptr, TElementIdentifier num,
bool LetContainerManageMemory =
false);
86 return m_ImportPointer[id];
93 return m_ImportPointer[id];
101 return m_ImportPointer;
158 itkSetMacro(ContainerManageMemory,
bool);
159 itkGetConstMacro(ContainerManageMemory,
bool);
160 itkBooleanMacro(ContainerManageMemory);
189 itkSetMacro(
Size, TElementIdentifier);
197 itkSetMacro(Capacity, TElementIdentifier);
206 m_ImportPointer = ptr;
210 TElement * m_ImportPointer{};
211 TElementIdentifier m_Size{};
212 TElementIdentifier m_Capacity{};
213 bool m_ContainerManageMemory{
true };
217#ifndef ITK_MANUAL_INSTANTIATION
218# include "itkImportImageContainer.hxx"
Defines an itk::Image front-end to a standard C-array.
TElement & operator[](const ElementIdentifier id)
void Reserve(ElementIdentifier size, const bool UseValueInitialization=false)
ElementIdentifier Size() const
TElement * GetImportPointer()
const TElement & operator[](const ElementIdentifier id) const
void SetImportPointer(TElement *ptr, TElementIdentifier num, bool LetContainerManageMemory=false)
virtual TElement * AllocateElements(ElementIdentifier size, bool UseValueInitialization=false) const
ImportImageContainer()=default
virtual void DeallocateManagedMemory()
~ImportImageContainer() override
ElementIdentifier Capacity() const
TElementIdentifier ElementIdentifier
void SetImportPointer(TElement *ptr)
void PrintSelf(std::ostream &os, Indent indent) const override
TElement * GetBufferPointer()
Control indentation during Print() invocation.
Base class for most ITK classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional size (bounds) of a n-dimensional image.