Information collection for class labels. More...
#include <cvb/sample_database/sample_list.hpp>
Public Types | |
using | LabelType = typename TLabelInformation::LabelType |
Type of the labels. | |
Public Member Functions | |
int | Count () const |
Retrieves the number of elements in the collection. More... | |
std::unique_ptr< TLabelInformation > | ReadInfo (int index) const |
Retrieves the indexed item. More... | |
std::vector< std::shared_ptr< TLabelInformation > > | ReadInfos () const |
Retrieves all the items stored in the collection. More... | |
void | RemoveAt (int index) |
Remove a class by index. More... | |
void | Remove (const LabelType &label) |
Remove a class and all the data objects associated with it based on its name. More... | |
void | Clear () |
Remove all labels (and their associated data) from the sample list. More... | |
void | MergeClasses (int fromIndex, int toIndex) |
Merge two classes into one class. More... | |
void | MergeClasses (const LabelType &fromLabel, const LabelType &toLabel) |
Merge two classes into one class. More... | |
Information collection for class labels.
|
inline |
Remove all labels (and their associated data) from the sample list.
Any | exception derived from std::exception including CvbException. |
Note that this invalidates all info objects that have been taken from this collection!
|
inline |
Retrieves the number of elements in the collection.
Any | exception derived from std::exception including CvbException. |
Merge two classes into one class.
[in] | fromLabel | Class to merge to the other classes. |
[in] | toLabel | Class to merge the samples to. |
Any | exception derived from std::exception including CvbException. |
The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromLabel.
|
inline |
Merge two classes into one class.
[in] | fromIndex | Class to merge to the other classes. |
[in] | toIndex | Class to merge the samples to. |
Any | exception derived from std::exception including CvbException. |
The class label will be taken from the 2nd class index. Note that this operation will invalidate all indices higher than fromIndex.
|
inline |
Retrieves the indexed item.
[in] | index | Index of the collection to be accessed. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Retrieves all the items stored in the collection.
Any | exception derived from std::exception including CvbException. |
|
inline |
Remove a class and all the data objects associated with it based on its name.
[in] | label | Name of the new class to be removed. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Remove a class by index.
[in] | index | Index of the class to be removed. |
Any | exception derived from std::exception including CvbException. |