dip::Measurement::IteratorObject class

An iterator to visit all objects (rows) in the dip::Measurement table. Can also be seen as a view over a specific object.

Contents

The iterator can be indexed with an feature name to access the table cell group that contains the object’s values for that feature. It is also possible to iterate over all features. See dip::Measurement for examples of using this class.

Classes

class Iterator
An iterator to visit all features (columns) within an object (row) of the dip::Measurement table.

Functions

auto FirstFeature() const -> dip::Measurement::IteratorObject::Iterator
Iterator to the first feature for this object
auto IsAtEnd() const -> bool
True if done iterating (do not call other methods if this is true!)
auto ObjectID() const -> dip::uint
ID of the object
auto FeatureExists(dip::String const& name) const -> bool
True if the feature is available in this.
auto Features() const -> std::vector<FeatureInformation> const&
Returns an array of feature names
auto NumberOfFeatures() const -> dip::uint
Number of features
auto ValueIndex(dip::String const& name) const -> dip::uint
Returns the index to the first columns for the feature
auto Values(dip::String const& name) const -> dip::Feature::ValueInformationArray
Returns an array with names and units for each of the values for the feature. (Note: data are copied to output array, this is not a trivial function).
auto Values() const -> dip::Feature::ValueInformationArray const&
Returns an array with names and units for each of the values (for all features)
auto NumberOfValues() const -> dip::uint
Returns the total number of feature values
auto NumberOfValues(dip::String const& name) const -> dip::uint
Returns the number of values for the given feature
auto ObjectIndex() const -> dip::uint
Index of the object (row number)
auto Data() const -> dip::Measurement::ValueType*
A raw pointer to the data of the object. All values are contiguous.

Operators

auto operator[](dip::String const& name) const -> dip::Measurement::IteratorObject::Iterator
Iterator to the given feature for this object
auto operator++() -> dip::Measurement::IteratorObject&
Pre-increment, to access the next object
auto operator++(int ) -> dip::Measurement::IteratorObject
Post-increment, to access the next object
auto operator bool() const -> bool explicit
True if the iterator is valid and can be used