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);
93 return m_ImportPointer;
150 itkSetMacro(ContainerManageMemory,
bool);
151 itkGetConstMacro(ContainerManageMemory,
bool);
152 itkBooleanMacro(ContainerManageMemory);
181 itkSetMacro(
Size, TElementIdentifier);
189 itkSetMacro(Capacity, TElementIdentifier);
198 m_ImportPointer = ptr;
202 TElement * m_ImportPointer{};
203 TElementIdentifier m_Size{};
204 TElementIdentifier m_Capacity{};
205 bool m_ContainerManageMemory{
true };
209#ifndef ITK_MANUAL_INSTANTIATION
210# 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.