MeVisLab Toolbox Reference
ml::ImagePropertyExtensionContainer Class Reference

This class is a container for extended image properties derived from ImagePropertyExtension. More...

#include <mlImagePropertyExtensionContainer.h>

Public Member Functions

void getValueAsString (std::string &valueAsString) const
 Conversion to string providing the same result as returned by operator<<. More...
 
Construction / Copy / Destruction / Equality operations.
 ImagePropertyExtensionContainer ()
 Constructor which builds an empty container. More...
 
virtual ~ImagePropertyExtensionContainer ()
 Destructor. More...
 
 ImagePropertyExtensionContainer (const ImagePropertyExtensionContainer &imagePropertyExtensionContainer)
 Copy constructor from an existing ImagePropertyExtensionContainer object. More...
 
ImagePropertyExtensionContaineroperator= (const ImagePropertyExtensionContainer &imagePropertyExtensionContainer)
 Assignment operator from an existing ImagePropertyExtension object, produces a copy. More...
 
bool operator== (const ImagePropertyExtensionContainer &imagePropertyExtensionContainer) const
 Returns true if *this and imagePropertyExtensionContainer are identical, otherwise false. More...
 
bool operator!= (const ImagePropertyExtensionContainer &imagePropertyExtensionContainer) const
 Returns true if *this and \ imagePropertyExtensionContainer are not identical, otherwise false. More...
 
Access property entries by index
size_t getNumEntries () const
 Returns the number of property extensions in the container. More...
 
ImagePropertyExtensiongetEntry (size_t position)
 Returns the entry in container at index position (non-const version). More...
 
const ImagePropertyExtensiongetEntry (size_t position) const
 Returns the entry in container at index position (const version). More...
 
Search property entries.
int findEntry (const ImagePropertyExtension *entry) const
 Searches for an entry referring to the specified entry and returns its index. More...
 
int findFirstEntryOfType (const RuntimeType *runtimeType) const
 Searches for the first entry with RuntimeType runtimeType and returns its index. More...
 
ImagePropertyExtensiongetFirstEntryOfType (const RuntimeType *runtimeType)
 Returns the first entry in the container with runtime type runtimeType (non-const version). More...
 
const ImagePropertyExtensiongetFirstEntryOfType (const RuntimeType *runtimeType) const
 Returns the first entry in container with runtime type runtimeType (const version). More...
 
ImagePropertyExtensionVector getEntriesOfType (const RuntimeType *runtimeType)
 Returns a vector of all property extensions of type runtimeType in the container. More...
 
ImagePropertyExtensionVector cloneEntriesOfType (const RuntimeType *runtimeType) const
 Returns a vector of clones of all property extensions of type runtimeType in container. More...
 
size_t getNumEntriesOfType (const RuntimeType *runtimeType) const
 Returns the number of property extensions of type runtimeType in the container. More...
 
Remove property entries.
void clear ()
 Removes all entries from the container. More...
 
bool removeEntry (size_t position)
 Erases the entry at the given position from the container and deletes the corresponding PropertyExtension object. More...
 
bool removeEntry (const ImagePropertyExtension *propertyExtension)
 Erases the entry referring to specified propertyExtension from the container and deletes the corresponding PropertyExtension object. More...
 
void removeEntriesOfType (const RuntimeType *runtimeType)
 Removes all entries from the container which are of type runtimeType. More...
 
Append property entries.
void append (ImagePropertyExtension *propertyExtension)
 Appends the PropertyExtension object \ propertyExtension at the end of the container. More...
 
ImagePropertyExtensionappendClone (const ImagePropertyExtension &propertyExtension)
 Appends a clone of the PropertyExtension object propertyExtension at the end of the container and returns a pointer to the appended object. More...
 

Protected Member Functions

void appendClones (const ImagePropertyExtensionContainer &container)
 Appends clones of entries of container to the container. More...
 

Detailed Description

This class is a container for extended image properties derived from ImagePropertyExtension.

It is normally used as a member of MedicalImageProperties to allow adding own image property objects. See abstract base class ImagePropertyExtension for deriving such a property extension.

Definition at line 36 of file mlImagePropertyExtensionContainer.h.

Constructor & Destructor Documentation

◆ ImagePropertyExtensionContainer() [1/2]

ml::ImagePropertyExtensionContainer::ImagePropertyExtensionContainer ( )

Constructor which builds an empty container.

◆ ~ImagePropertyExtensionContainer()

virtual ml::ImagePropertyExtensionContainer::~ImagePropertyExtensionContainer ( )
virtual

Destructor.

◆ ImagePropertyExtensionContainer() [2/2]

ml::ImagePropertyExtensionContainer::ImagePropertyExtensionContainer ( const ImagePropertyExtensionContainer imagePropertyExtensionContainer)

Copy constructor from an existing ImagePropertyExtensionContainer object.

Member Function Documentation

◆ append()

void ml::ImagePropertyExtensionContainer::append ( ImagePropertyExtension propertyExtension)

Appends the PropertyExtension object \ propertyExtension at the end of the container.

The object is not cloned. After appending, the object is managed by the container.

◆ appendClone()

ImagePropertyExtension* ml::ImagePropertyExtensionContainer::appendClone ( const ImagePropertyExtension propertyExtension)

Appends a clone of the PropertyExtension object propertyExtension at the end of the container and returns a pointer to the appended object.

The object propExt remains under control of the caller.

◆ appendClones()

void ml::ImagePropertyExtensionContainer::appendClones ( const ImagePropertyExtensionContainer container)
protected

Appends clones of entries of container to the container.

◆ clear()

void ml::ImagePropertyExtensionContainer::clear ( )

Removes all entries from the container.

Referenced by ml::PagedImageProperties::PagedImageProperties().

◆ cloneEntriesOfType()

ImagePropertyExtensionVector ml::ImagePropertyExtensionContainer::cloneEntriesOfType ( const RuntimeType runtimeType) const

Returns a vector of clones of all property extensions of type runtimeType in container.

The caller is responsible of disposing the returned objects.

◆ findEntry()

int ml::ImagePropertyExtensionContainer::findEntry ( const ImagePropertyExtension entry) const

Searches for an entry referring to the specified entry and returns its index.

If no matching entry is found, -1 is returned.

◆ findFirstEntryOfType()

int ml::ImagePropertyExtensionContainer::findFirstEntryOfType ( const RuntimeType runtimeType) const

Searches for the first entry with RuntimeType runtimeType and returns its index.

If the entry is not found, -1 is returned.

◆ getEntriesOfType()

ImagePropertyExtensionVector ml::ImagePropertyExtensionContainer::getEntriesOfType ( const RuntimeType runtimeType)

Returns a vector of all property extensions of type runtimeType in the container.

The pointers in the returned vector directly refer to the objects managed by the container.

◆ getEntry() [1/2]

ImagePropertyExtension* ml::ImagePropertyExtensionContainer::getEntry ( size_t  position)

Returns the entry in container at index position (non-const version).

If entry does not exist, NULL is returned. The returned pointer directly refers to the object managed by the container.

◆ getEntry() [2/2]

const ImagePropertyExtension* ml::ImagePropertyExtensionContainer::getEntry ( size_t  position) const

Returns the entry in container at index position (const version).

If entry does not exist, NULL is returned. The returned pointer directly refers to the object managed by the container.

◆ getFirstEntryOfType() [1/2]

ImagePropertyExtension* ml::ImagePropertyExtensionContainer::getFirstEntryOfType ( const RuntimeType runtimeType)

Returns the first entry in the container with runtime type runtimeType (non-const version).

If no entry is found, NULL is returned. The returned pointer directly refers to the object managed by the container.

◆ getFirstEntryOfType() [2/2]

const ImagePropertyExtension* ml::ImagePropertyExtensionContainer::getFirstEntryOfType ( const RuntimeType runtimeType) const

Returns the first entry in container with runtime type runtimeType (const version).

If no entry is found, NULL is returned. The returned pointer directly refers to the object managed by the container.

◆ getNumEntries()

size_t ml::ImagePropertyExtensionContainer::getNumEntries ( ) const

Returns the number of property extensions in the container.

◆ getNumEntriesOfType()

size_t ml::ImagePropertyExtensionContainer::getNumEntriesOfType ( const RuntimeType runtimeType) const

Returns the number of property extensions of type runtimeType in the container.

◆ getValueAsString()

void ml::ImagePropertyExtensionContainer::getValueAsString ( std::string &  valueAsString) const

Conversion to string providing the same result as returned by operator<<.

May be much faster with less memory foodprint especially on very large objects. Note that newlines are platform dependent.

◆ operator!=()

bool ml::ImagePropertyExtensionContainer::operator!= ( const ImagePropertyExtensionContainer imagePropertyExtensionContainer) const

Returns true if *this and \ imagePropertyExtensionContainer are not identical, otherwise false.

Inequality includes differing sizes of containers, or inequality on ordered comparison on all properties in container in corresponding entries in extImageProps.

◆ operator=()

ImagePropertyExtensionContainer& ml::ImagePropertyExtensionContainer::operator= ( const ImagePropertyExtensionContainer imagePropertyExtensionContainer)

Assignment operator from an existing ImagePropertyExtension object, produces a copy.

◆ operator==()

bool ml::ImagePropertyExtensionContainer::operator== ( const ImagePropertyExtensionContainer imagePropertyExtensionContainer) const

Returns true if *this and imagePropertyExtensionContainer are identical, otherwise false.

Equality includes same sizes of containers, and equality on ordered comparison on all properties in container in corresponding entries in extImageProps.

◆ removeEntriesOfType()

void ml::ImagePropertyExtensionContainer::removeEntriesOfType ( const RuntimeType runtimeType)

Removes all entries from the container which are of type runtimeType.

◆ removeEntry() [1/2]

bool ml::ImagePropertyExtensionContainer::removeEntry ( const ImagePropertyExtension propertyExtension)

Erases the entry referring to specified propertyExtension from the container and deletes the corresponding PropertyExtension object.

If the entry is removed, true is returned, otherwise false.

◆ removeEntry() [2/2]

bool ml::ImagePropertyExtensionContainer::removeEntry ( size_t  position)

Erases the entry at the given position from the container and deletes the corresponding PropertyExtension object.

If position is out of range, the call is ignored. If the entry is removed, true is returned, otherwise false.


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