18 #ifndef itkImportImageContainer_h
19 #define itkImportImageContainer_h
44 template<
typename TElementIdentifier,
typename TElement >
75 void SetImportPointer(TElement *ptr, TElementIdentifier num,
76 bool LetContainerManageMemory =
false);
80 {
return m_ImportPointer[id]; }
84 {
return m_ImportPointer[id]; }
89 {
return m_ImportPointer; }
93 {
return m_Capacity; }
114 void Reserve(ElementIdentifier num,
const bool UseDefaultConstructor =
false);
136 itkSetMacro(ContainerManageMemory,
bool);
137 itkGetConstMacro(ContainerManageMemory,
bool);
138 itkBooleanMacro(ContainerManageMemory);
148 void PrintSelf(std::ostream & os,
Indent indent)
const override;
155 virtual TElement * AllocateElements(ElementIdentifier size,
bool UseDefaultConstructor =
false)
const;
157 virtual void DeallocateManagedMemory();
165 itkSetMacro(
Size, TElementIdentifier);
173 itkSetMacro(Capacity, TElementIdentifier);
189 #ifndef ITK_MANUAL_INSTANTIATION
190 #include "itkImportImageContainer.hxx"
TElement & operator[](const ElementIdentifier id)
TElement * m_ImportPointer
void SetImportPointer(TElement *ptr)
const TElement & operator[](const ElementIdentifier id) const
TElementIdentifier m_Capacity
TElement * GetImportPointer()
TElementIdentifier m_Size
Represent a n-dimensional size (bounds) of a n-dimensional image.
TElement * GetBufferPointer()
TElementIdentifier ElementIdentifier
Control indentation during Print() invocation.
bool m_ContainerManageMemory
ElementIdentifier Size() const
Base class for most ITK classes.
Defines an itk::Image front-end to a standard C-array.
ElementIdentifier Capacity() const