MeVisLab Toolbox Reference
mlImagePropertyExtensionContainer.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_IMAGE_PROPERTY_EXTENSION_CONTAINER_H
14#define ML_IMAGE_PROPERTY_EXTENSION_CONTAINER_H
15
20
22
24
26class RuntimeType;
28
29//-------------------------------------------------------------------------
35//-------------------------------------------------------------------------
37public:
38
39 //-------------------------------------------------------------------
42 //-------------------------------------------------------------------
45
48
51
54
59
65
67
68
69
70 //-------------------------------------------------------------------
73 //-------------------------------------------------------------------
74
76 size_t getNumEntries() const;
77
82
86 const ImagePropertyExtension* getEntry(size_t position) const;
87
89
90
91 //-------------------------------------------------------------------
94 //-------------------------------------------------------------------
98
102
107
112
117
121
124
126
127
128 //-------------------------------------------------------------------
131 //-------------------------------------------------------------------
132
134 void clear();
135
140 bool removeEntry(size_t position);
141
146
149
151
152
153 //-------------------------------------------------------------------
156 //-------------------------------------------------------------------
157
161
166
168
171 void getValueAsString(std::string &valueAsString) const;
172
173protected:
174
177
178
179private:
180
182 ImagePropertyExtensionVector _propExtensions;
183
184};
185
187
188
189//-----------------------------------------------------------------------------------
190// Stream output for std::ostream
191//-----------------------------------------------------------------------------------
192namespace std {
193
195 ML_UTILS_EXPORT ostream& operator<<(ostream& s, const ML_NAMESPACE::ImagePropertyExtensionContainer &ipContainer);
196
197}
198
199#endif //of __mlImagePropertyExtensionContainer_H
200
201
202
This class is a container for extended image properties derived from ImagePropertyExtension.
ImagePropertyExtensionContainer(const ImagePropertyExtensionContainer &imagePropertyExtensionContainer)
Copy constructor from an existing ImagePropertyExtensionContainer object.
const ImagePropertyExtension * getEntry(size_t position) const
Returns the entry in container at index position (const version).
void removeEntriesOfType(const RuntimeType *runtimeType)
Removes all entries from the container which are of type runtimeType.
int findFirstEntryOfType(const RuntimeType *runtimeType) const
Searches for the first entry with RuntimeType runtimeType and returns its index.
void clear()
Removes all entries from the container.
bool removeEntry(size_t position)
Erases the entry at the given position from the container and deletes the corresponding PropertyExten...
ImagePropertyExtensionContainer & operator=(const ImagePropertyExtensionContainer &imagePropertyExtensionContainer)
Assignment operator from an existing ImagePropertyExtension object, produces a copy.
bool operator!=(const ImagePropertyExtensionContainer &imagePropertyExtensionContainer) const
Returns true if *this and \ imagePropertyExtensionContainer are not identical, otherwise false.
size_t getNumEntriesOfType(const RuntimeType *runtimeType) const
Returns the number of property extensions of type runtimeType in the container.
ImagePropertyExtensionContainer()
Constructor which builds an empty container.
ImagePropertyExtension * getFirstEntryOfType(const RuntimeType *runtimeType)
Returns the first entry in the container with runtime type runtimeType (non-const version).
void append(ImagePropertyExtension *propertyExtension)
Appends the PropertyExtension object \ propertyExtension at the end of the container.
virtual ~ImagePropertyExtensionContainer()
Destructor.
int findEntry(const ImagePropertyExtension *entry) const
Searches for an entry referring to the specified entry and returns its index.
const ImagePropertyExtension * getFirstEntryOfType(const RuntimeType *runtimeType) const
Returns the first entry in container with runtime type runtimeType (const version).
size_t getNumEntries() const
Returns the number of property extensions in the container.
ImagePropertyExtensionVector cloneEntriesOfType(const RuntimeType *runtimeType) const
Returns a vector of clones of all property extensions of type runtimeType in container.
bool operator==(const ImagePropertyExtensionContainer &imagePropertyExtensionContainer) const
Returns true if *this and imagePropertyExtensionContainer are identical, otherwise false.
ImagePropertyExtension * getEntry(size_t position)
Returns the entry in container at index position (non-const version).
bool removeEntry(const ImagePropertyExtension *propertyExtension)
Erases the entry referring to specified propertyExtension from the container and deletes the correspo...
ImagePropertyExtension * appendClone(const ImagePropertyExtension &propertyExtension)
Appends a clone of the PropertyExtension object propertyExtension at the end of the container and ret...
ImagePropertyExtensionVector getEntriesOfType(const RuntimeType *runtimeType)
Returns a vector of all property extensions of type runtimeType in the container.
void getValueAsString(std::string &valueAsString) const
Conversion to string providing the same result as returned by operator<<.
void appendClones(const ImagePropertyExtensionContainer &container)
Appends clones of entries of container to the container.
Base class from which one can derive own image properties.
RuntimeType contains type and inheritance information of a class and a static dictionary with informa...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
Definition mlUtilities.h:20
std::vector< ImagePropertyExtension * > ImagePropertyExtensionVector
Define the STL container type of ImagePropertyExtension objects.
STL namespace.
MLEXPORT std::ostream & operator<<(std::ostream &s, const ml::Field &v)
Overloads the operator "<<" for stream output of Field objects.