ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | List of all members
itk::ImageContainerInterface< TElementIdentifier, TElement > Class Template Referenceabstract

#include <itkImageContainerInterface.h>

Detailed Description

template<typename TElementIdentifier, typename TElement>
class itk::ImageContainerInterface< TElementIdentifier, TElement >

Used for reference when writing containers conforming to this interface.

This should only be used for reference when writing containers conforming to this interface. ITK uses generic programming to allow container type substitution, so polymorphism is not needed to use containers through this interface. This means that a container conforming to this interface need not be derived from it, and that their methods should not be virtual. However, the container must derive from Object in order to support the reference counting, modification time, and debug information required by this interface.

Note that many comments refer to a "default element" or "default element value". This value is equal to the default constructor of the Element type. Also note that all non-const methods assume that the container was modified, and update the modification time.

Template Parameters
TElementIdentifierA type that shall be used to index the container. It must have a < operator defined for ordering.
TElementThe element type stored in the container.

Definition at line 53 of file itkImageContainerInterface.h.

+ Inheritance diagram for itk::ImageContainerInterface< TElementIdentifier, TElement >:
+ Collaboration diagram for itk::ImageContainerInterface< TElementIdentifier, TElement >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Element = TElement
 
using ElementIdentifier = TElementIdentifier
 
using Pointer = SmartPointer< Self >
 
using Self = ImageContainerInterface
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual TElement * GetBufferPointer ()=0
 
const char * GetNameOfClass () const override
 
virtual const TElement & operator[] (const ElementIdentifier) const =0
 
virtual TElement & operator[] (const ElementIdentifier)=0
 
virtual void Reserve (ElementIdentifier)=0
 
virtual ElementIdentifier Size () const =0
 
virtual void Squeeze ()=0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::ConstPointer = SmartPointer<const Self>

Definition at line 60 of file itkImageContainerInterface.h.

◆ Element

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::Element = TElement

Definition at line 67 of file itkImageContainerInterface.h.

◆ ElementIdentifier

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::ElementIdentifier = TElementIdentifier

Save the template parameters.

Definition at line 66 of file itkImageContainerInterface.h.

◆ Pointer

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::Pointer = SmartPointer<Self>

Definition at line 59 of file itkImageContainerInterface.h.

◆ Self

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::Self = ImageContainerInterface

Standard class type aliases.

Definition at line 57 of file itkImageContainerInterface.h.

◆ Superclass

template<typename TElementIdentifier , typename TElement >
using itk::ImageContainerInterface< TElementIdentifier, TElement >::Superclass = Object

Definition at line 58 of file itkImageContainerInterface.h.

Member Function Documentation

◆ GetBufferPointer()

template<typename TElementIdentifier , typename TElement >
virtual TElement* itk::ImageContainerInterface< TElementIdentifier, TElement >::GetBufferPointer ( )
pure virtual

Return a pointer to the beginning of the buffer. This is used by the image iterator class.

◆ GetNameOfClass()

template<typename TElementIdentifier , typename TElement >
const char* itk::ImageContainerInterface< TElementIdentifier, TElement >::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::LightObject.

◆ operator[]() [1/2]

template<typename TElementIdentifier , typename TElement >
virtual const TElement& itk::ImageContainerInterface< TElementIdentifier, TElement >::operator[] ( const  ElementIdentifier) const
pure virtual

Index operator. This version can only be an rvalue

◆ operator[]() [2/2]

template<typename TElementIdentifier , typename TElement >
virtual TElement& itk::ImageContainerInterface< TElementIdentifier, TElement >::operator[] ( const  ElementIdentifier)
pure virtual

Index operator. This version can be an lvalue.

◆ Reserve()

template<typename TElementIdentifier , typename TElement >
virtual void itk::ImageContainerInterface< TElementIdentifier, TElement >::Reserve ( ElementIdentifier  )
pure virtual

Tell the container to allocate enough memory to allow at least as many elements as the size given to be stored. This is NOT guaranteed to actually allocate any memory, but is useful if the implementation of the container allocates contiguous storage.

◆ Size()

template<typename TElementIdentifier , typename TElement >
virtual ElementIdentifier itk::ImageContainerInterface< TElementIdentifier, TElement >::Size ( ) const
pure virtual

Get the number of elements currently stored in the container.

◆ Squeeze()

template<typename TElementIdentifier , typename TElement >
virtual void itk::ImageContainerInterface< TElementIdentifier, TElement >::Squeeze ( )
pure virtual

Tell the container to try to minimize its memory usage for storage of the current number of elements. This is NOT guaranteed to decrease memory usage.


The documentation for this class was generated from the following file: