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. more...

Functions

auto Data() const -> dip::Measurement::ValueType*
A raw pointer to the data of the object. All values are contiguous.
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 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 NumberOfFeatures() const -> dip::uint
Number of 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 ObjectID() const -> dip::uint
ID of the object
auto ObjectIndex() const -> dip::uint
Index of the object (row number)
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)

Operators

auto operator bool() const -> bool explicit
True if the iterator is valid and can be used
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[](dip::String const& name) const -> dip::Measurement::IteratorObject::Iterator
Iterator to the given feature for this object

Function documentation

dip::Measurement::IteratorObject::Iterator FirstFeature( ) const

Iterator to the first feature for this object

bool IsAtEnd( ) const

True if done iterating (do not call other methods if this is true!)

dip::uint ObjectID( ) const

ID of the object

bool FeatureExists( dip::String const& name) const

True if the feature is available in this.

std::vector<FeatureInformation> const& Features( ) const

Returns an array of feature names

dip::uint NumberOfFeatures( ) const

Number of features

dip::uint ValueIndex( dip::String const& name) const

Returns the index to the first columns for the feature

dip::Feature::ValueInformationArray Values( dip::String const& name) const

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).

dip::Feature::ValueInformationArray const& Values( ) const

Returns an array with names and units for each of the values (for all features)

dip::uint NumberOfValues( ) const

Returns the total number of feature values

dip::uint NumberOfValues( dip::String const& name) const

Returns the number of values for the given feature

dip::uint ObjectIndex( ) const

Index of the object (row number)

dip::Measurement::ValueType* Data( ) const

A raw pointer to the data of the object. All values are contiguous.

dip::Measurement::IteratorObject::Iterator operator[]( dip::String const& name) const

Iterator to the given feature for this object

dip::Measurement::IteratorObject& operator++( )

Pre-increment, to access the next object

dip::Measurement::IteratorObject operator++( int )

Post-increment, to access the next object

bool operator bool( ) const explicit

True if the iterator is valid and can be used