Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::Column Class Referenceabstract

Pure interface for representing a data column with a header, optional units, and data range. More...

#include <column.h>

+ Inheritance diagram for inviwo::Column:

Public Member Functions

virtual Columnclone () const =0
 
virtual Columnclone (const std::vector< std::uint32_t > &rowSelection) const =0
 
virtual ColumnType getColumnType () const =0
 
virtual const std::string & getHeader () const =0
 
virtual void setHeader (std::string_view header)=0
 
virtual Unit getUnit () const =0
 
virtual void setUnit (Unit unit)=0
 
virtual void setCustomRange (std::optional< dvec2 >)=0
 
virtual std::optional< dvec2 > getCustomRange () const =0
 
virtual dvec2 getDataRange () const =0
 
virtual dvec2 getRange () const =0
 
virtual void add (std::string_view value)=0
 
virtual void append (const Column &col)=0
 
virtual std::shared_ptr< BufferBasegetBuffer ()=0
 
virtual std::shared_ptr< const BufferBasegetBuffer () const =0
 
virtual size_t getSize () const =0
 
virtual double getAsDouble (size_t idx) const =0
 
virtual std::string getAsString (size_t idx) const =0
 
- Public Member Functions inherited from inviwo::MetaDataOwner
 MetaDataOwner (const MetaDataOwner &rhs)=default
 
 MetaDataOwner (MetaDataOwner &rhs)=default
 
MetaDataOwneroperator= (const MetaDataOwner &rhs)=default
 
MetaDataOwneroperator= (MetaDataOwner &)=default
 
void copyMetaDataFrom (const MetaDataOwner &src)
 
void copyMetaDataTo (MetaDataOwner &dst)
 
template<typename T >
requires std::derived_from<T, MetaData>
T * createMetaData (std::string_view key)
 
template<typename T , typename U >
requires std::derived_from<T, MetaData> && Settable<T, U>
void setMetaData (std::string_view key, U value)
 
template<typename T >
requires std::derived_from<T, MetaData>
bool unsetMetaData (std::string_view key)
 unset, i.e. remove the metadata entry matching the given key and type
 
template<typename T , typename U >
requires std::derived_from<T, MetaData> && Gettable<T, U>
getMetaData (std::string_view key, U val) const
 
template<typename T >
requires std::derived_from<T, MetaData>
T * getMetaData (std::string_view key)
 
template<typename T >
requires std::derived_from<T, MetaData>
const T * getMetaData (std::string_view key) const
 
MetaDataMapgetMetaDataMap ()
 
const MetaDataMapgetMetaDataMap () const
 
bool hasMetaData (std::string_view key) const
 
template<typename T >
requires std::derived_from<T, MetaData>
bool hasMetaData (std::string_view key) const
 
void serialize (Serializer &s) const
 
void deserialize (Deserializer &d)
 

Additional Inherited Members

- Protected Attributes inherited from inviwo::MetaDataOwner
MetaDataMap metaData_
 

Detailed Description

Pure interface for representing a data column with a header, optional units, and data range.

Member Function Documentation

◆ add()

virtual void inviwo::Column::add ( std::string_view value)
pure virtual

◆ append()

virtual void inviwo::Column::append ( const Column & col)
pure virtual

◆ getAsDouble()

virtual double inviwo::Column::getAsDouble ( size_t idx) const
pure virtual

Implemented in inviwo::CategoricalColumn.

◆ getAsString()

virtual std::string inviwo::Column::getAsString ( size_t idx) const
pure virtual

Implemented in inviwo::CategoricalColumn.

◆ getBuffer() [1/2]

virtual std::shared_ptr< const BufferBase > inviwo::Column::getBuffer ( ) const
pure virtual

Implemented in inviwo::CategoricalColumn.

◆ getBuffer() [2/2]

virtual std::shared_ptr< BufferBase > inviwo::Column::getBuffer ( )
pure virtual

Implemented in inviwo::CategoricalColumn.

◆ getCustomRange()

virtual std::optional< dvec2 > inviwo::Column::getCustomRange ( ) const
pure virtual

Returns the custom column range. If no range has been set previously, the return value will be std::nullopt.

Implemented in inviwo::CategoricalColumn, inviwo::TemplateColumn< T >, inviwo::TemplateColumn< std::uint32_t >, and inviwo::TemplateColumn< uint32_t >.

◆ getDataRange()

virtual dvec2 inviwo::Column::getDataRange ( ) const
pure virtual

Returns the range (i.e. the min/max) of the data, ignoring any custom range

Implemented in inviwo::CategoricalColumn, inviwo::TemplateColumn< T >, inviwo::TemplateColumn< std::uint32_t >, and inviwo::TemplateColumn< uint32_t >.

◆ getRange()

virtual dvec2 inviwo::Column::getRange ( ) const
pure virtual

Returns the custom range if set or else the range (i.e. the min/max) of the data

Implemented in inviwo::CategoricalColumn, inviwo::TemplateColumn< T >, inviwo::TemplateColumn< std::uint32_t >, and inviwo::TemplateColumn< uint32_t >.

◆ setCustomRange()

virtual void inviwo::Column::setCustomRange ( std::optional< dvec2 > )
pure virtual

Set a custom range for the column which can be used for normalization, plotting, color mapping, etc.

Implemented in inviwo::CategoricalColumn, inviwo::TemplateColumn< T >, inviwo::TemplateColumn< std::uint32_t >, and inviwo::TemplateColumn< uint32_t >.


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