ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkImportImageContainer.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef TElement | Element |
typedef TElementIdentifier | ElementIdentifier |
typedef SmartPointer< Self > | Pointer |
typedef ImportImageContainer | Self |
typedef Object | Superclass |
Public Member Functions | |
ElementIdentifier | Capacity (void) const |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
TElement * | GetBufferPointer () |
TElement * | GetImportPointer () |
virtual const char * | GetNameOfClass () const |
void | Initialize (void) |
TElement & | operator[] (const ElementIdentifier id) |
const TElement & | operator[] (const ElementIdentifier id) const |
void | Reserve (ElementIdentifier num) |
void | SetImportPointer (TElement *ptr, TElementIdentifier num, bool LetContainerManageMemory=false) |
ElementIdentifier | Size (void) const |
void | Squeeze (void) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
virtual TElement * | AllocateElements (ElementIdentifier size) const |
virtual void | DeallocateManagedMemory () |
void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | SetCapacity (TElementIdentifier _arg) |
void | SetImportPointer (TElement *ptr) |
virtual void | SetSize (TElementIdentifier _arg) |
Private Member Functions | |
ImportImageContainer (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
TElementIdentifier | m_Capacity |
bool | m_ContainerManageMemory |
TElement * | m_ImportPointer |
TElementIdentifier | m_Size |
virtual void | SetContainerManageMemory (bool _arg) |
virtual bool | GetContainerManageMemory () const |
virtual void | ContainerManageMemoryOn () |
virtual void | ContainerManageMemoryOff () |
ImportImageContainer () | |
virtual | ~ImportImageContainer () |
Defines an itk::Image front-end to a standard C-array.
Defines an itk::Image front-end to a standard C-array. This container conforms to the ImageContainerInterface. This is a full-fleged Object, so there is modification time, debug, and reference count information.
TElementIdentifier | An INTEGRAL type for use in indexing the imported buffer. |
TElement | The element type stored in the container. |
Definition at line 45 of file itkImportImageContainer.h.
typedef SmartPointer< const Self > itk::ImportImageContainer< TElementIdentifier, TElement >::ConstPointer |
Reimplemented from itk::Object.
Definition at line 52 of file itkImportImageContainer.h.
typedef TElement itk::ImportImageContainer< TElementIdentifier, TElement >::Element |
Definition at line 56 of file itkImportImageContainer.h.
typedef TElementIdentifier itk::ImportImageContainer< TElementIdentifier, TElement >::ElementIdentifier |
Save the template parameters.
Definition at line 55 of file itkImportImageContainer.h.
typedef SmartPointer< Self > itk::ImportImageContainer< TElementIdentifier, TElement >::Pointer |
Reimplemented from itk::Object.
Definition at line 51 of file itkImportImageContainer.h.
typedef ImportImageContainer itk::ImportImageContainer< TElementIdentifier, TElement >::Self |
Standard class typedefs.
Reimplemented from itk::Object.
Definition at line 49 of file itkImportImageContainer.h.
typedef Object itk::ImportImageContainer< TElementIdentifier, TElement >::Superclass |
Reimplemented from itk::Object.
Definition at line 50 of file itkImportImageContainer.h.
itk::ImportImageContainer< TElementIdentifier, TElement >::ImportImageContainer | ( | ) | [protected] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
virtual itk::ImportImageContainer< TElementIdentifier, TElement >::~ImportImageContainer | ( | ) | [protected, virtual] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
itk::ImportImageContainer< TElementIdentifier, TElement >::ImportImageContainer | ( | const Self & | ) | [private] |
virtual TElement* itk::ImportImageContainer< TElementIdentifier, TElement >::AllocateElements | ( | ElementIdentifier | size | ) | const [protected, virtual] |
ElementIdentifier itk::ImportImageContainer< TElementIdentifier, TElement >::Capacity | ( | void | ) | const [inline] |
Get the capacity of the container.
Definition at line 90 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_Capacity.
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::ContainerManageMemoryOff | ( | ) | [virtual] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::ContainerManageMemoryOn | ( | ) | [virtual] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
virtual::itk::LightObject::Pointer itk::ImportImageContainer< TElementIdentifier, TElement >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::DeallocateManagedMemory | ( | ) | [protected, virtual] |
TElement* itk::ImportImageContainer< TElementIdentifier, TElement >::GetBufferPointer | ( | ) | [inline] |
Return a pointer to the beginning of the buffer. This is used by the image iterator class.
Definition at line 86 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer.
virtual bool itk::ImportImageContainer< TElementIdentifier, TElement >::GetContainerManageMemory | ( | ) | const [virtual] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
TElement* itk::ImportImageContainer< TElementIdentifier, TElement >::GetImportPointer | ( | ) | [inline] |
Get the pointer from which the image data is imported.
Definition at line 65 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer.
virtual const char* itk::ImportImageContainer< TElementIdentifier, TElement >::GetNameOfClass | ( | ) | const [virtual] |
Standard part of every itk Object.
Reimplemented from itk::Object.
void itk::ImportImageContainer< TElementIdentifier, TElement >::Initialize | ( | void | ) |
Tell the container to release any of its allocated memory.
static Pointer itk::ImportImageContainer< TElementIdentifier, TElement >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::ImportImageContainer< TElementIdentifier, TElement >::operator= | ( | const Self & | ) | [private] |
TElement& itk::ImportImageContainer< TElementIdentifier, TElement >::operator[] | ( | const ElementIdentifier | id | ) | [inline] |
Index operator. This version can be an lvalue.
Definition at line 77 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer.
const TElement& itk::ImportImageContainer< TElementIdentifier, TElement >::operator[] | ( | const ElementIdentifier | id | ) | const [inline] |
Index operator. This version can only be an rvalue
Definition at line 81 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer.
void itk::ImportImageContainer< TElementIdentifier, TElement >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
PrintSelf routine. Normally this is a protected internal method. It is made public here so that Image can call this method. Users should not call this method but should call Print() instead.
Reimplemented from itk::Object.
void itk::ImportImageContainer< TElementIdentifier, TElement >::Reserve | ( | ElementIdentifier | num | ) |
Tell the container to allocate enough memory to allow at least as many elements as the size given to be stored. If new memory needs to be allocated, the contents of the old buffer are copied to the new area. The old buffer is deleted if the original pointer was passed in using "LetContainerManageMemory"=true. The new buffer's memory management will be handled by the container from that point on.
In general, Reserve should not change the usable elements of the container. However, in this particular case, Reserve as a Resize semantics that is kept for backward compatibility reasons.
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::SetCapacity | ( | TElementIdentifier | _arg | ) | [protected, virtual] |
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::SetContainerManageMemory | ( | bool | _arg | ) | [virtual] |
These methods allow to define whether upon destruction of this class the memory buffer should be released or not. Setting it to true (or ON) makes that this class will take care of memory release. Setting it to false (or OFF) will prevent the destructor from deleting the memory buffer. This is desirable only when the data is intended to be used by external applications. Note that the normal logic of this class set the value of the boolean flag. This may override your setting if you call this methods prematurely.
void itk::ImportImageContainer< TElementIdentifier, TElement >::SetImportPointer | ( | TElement * | ptr, |
TElementIdentifier | num, | ||
bool | LetContainerManageMemory = false |
||
) |
Set the pointer from which the image data is imported. "num" is the number of pixels in the block of memory. If "LetContainerManageMemory" is false, then the application retains the responsibility of freeing the memory for this image data. If "LetContainerManageMemory" is true, then this class will free the memory when this object is destroyed.
void itk::ImportImageContainer< TElementIdentifier, TElement >::SetImportPointer | ( | TElement * | ptr | ) | [inline, protected] |
Definition at line 168 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer.
virtual void itk::ImportImageContainer< TElementIdentifier, TElement >::SetSize | ( | TElementIdentifier | _arg | ) | [protected, virtual] |
ElementIdentifier itk::ImportImageContainer< TElementIdentifier, TElement >::Size | ( | void | ) | const [inline] |
Get the number of elements currently stored in the container.
Definition at line 94 of file itkImportImageContainer.h.
References itk::ImportImageContainer< TElementIdentifier, TElement >::m_Size.
void itk::ImportImageContainer< TElementIdentifier, TElement >::Squeeze | ( | void | ) |
Tell the container to try to minimize its memory usage for storage of the current number of elements. If new memory is allocated, the contents of old buffer are copied to the new area. The previous buffer is deleted if the original pointer was in using "LetContainerManageMemory"=true. The new buffer's memory management will be handled by the container from that point on.
TElementIdentifier itk::ImportImageContainer< TElementIdentifier, TElement >::m_Capacity [private] |
Definition at line 175 of file itkImportImageContainer.h.
Referenced by itk::ImportImageContainer< TElementIdentifier, TElement >::Capacity().
bool itk::ImportImageContainer< TElementIdentifier, TElement >::m_ContainerManageMemory [private] |
Definition at line 176 of file itkImportImageContainer.h.
TElement* itk::ImportImageContainer< TElementIdentifier, TElement >::m_ImportPointer [private] |
Definition at line 173 of file itkImportImageContainer.h.
Referenced by itk::ImportImageContainer< TElementIdentifier, TElement >::GetBufferPointer(), itk::ImportImageContainer< TElementIdentifier, TElement >::GetImportPointer(), itk::ImportImageContainer< TElementIdentifier, TElement >::operator[](), and itk::ImportImageContainer< TElementIdentifier, TElement >::SetImportPointer().
TElementIdentifier itk::ImportImageContainer< TElementIdentifier, TElement >::m_Size [private] |
Definition at line 174 of file itkImportImageContainer.h.
Referenced by itk::ImportImageContainer< TElementIdentifier, TElement >::Size().