open_iA 2023.02
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
iAPlotData Class Referenceabstract

Abstract base class providing data used for drawing a plot in a chart. More...

#include <iAPlotData.h>

Inheritance diagram for iAPlotData:
[legend]

Public Types

using DataType = double
 Data type used for x and y values.
 

Public Member Functions

 iAPlotData (QString const &name, iAValueType type)
 Construct a plot data object.
 
virtual ~iAPlotData ()
 
QString const & name () const
 The name of the data series that this object holds.
 
virtual size_t nearestIdx (DataType dataX) const =0
 Retrieve the index closest to the given x data value.
 
virtual QString toolTipText (DataType dataX) const =0
 The tooltip text for this data when the user is currently hovering over the given x position.
 
virtual size_t valueCount () const =0
 The number of available data elements (i.e. in xValue/yValue, idx can go from 0 to valueCount()-1).
 
virtual iAValueType valueType () const
 The type of the values held by this data object.
 
virtual DataType const * xBounds () const =0
 The range of values for x; i.e. xBounds()[0] is the minimum of all xValue(...), xBounds()[1] is the maximum.
 
virtual DataType xValue (size_t idx) const =0
 Value on the x axis for a datum with given index.
 
virtual DataType const * yBounds () const =0
 The range of values for y; i.e. yBounds()[0] is the minimum of all yValue(...), yBounds()[1] is the maximum.
 
virtual DataType yValue (size_t idx) const =0
 Value on the y axis for a datum with given index.
 

Detailed Description

Abstract base class providing data used for drawing a plot in a chart.

Member Typedef Documentation

◆ DataType

using iAPlotData::DataType = double

Data type used for x and y values.

Constructor & Destructor Documentation

◆ iAPlotData()

iAPlotData::iAPlotData ( QString const &  name,
iAValueType  type 
)

Construct a plot data object.

Parameters
namethe name of the data series that this object holds.
typetype of the values held by this data object, see iAValueType

◆ ~iAPlotData()

iAPlotData::~iAPlotData ( )
virtual

Member Function Documentation

◆ name()

QString const & iAPlotData::name ( ) const

The name of the data series that this object holds.

◆ nearestIdx()

virtual size_t iAPlotData::nearestIdx ( DataType  dataX) const
pure virtual

Retrieve the index closest to the given x data value.

Parameters
dataXthe value (on the x axis) for which to search the closest datapoint in this data object.
Returns
the index (such as can be passed to xValue/yValue) of the datapoint closest to dataX calling xValue on the returned index will always give a value lower than or equal to dataX.

Implemented in iAHistogramData, and iAXYPlotData.

◆ toolTipText()

virtual QString iAPlotData::toolTipText ( DataType  dataX) const
pure virtual

The tooltip text for this data when the user is currently hovering over the given x position.

Note that currently only the x axis position of the user is considered.

Parameters
dataXthe value (on the x axis) the user currently is hovering over.
Returns
a description of the datapoint that the user currrently is over/closest to.

Implemented in iAHistogramData, and iAXYPlotData.

◆ valueCount()

virtual size_t iAPlotData::valueCount ( ) const
pure virtual

The number of available data elements (i.e. in xValue/yValue, idx can go from 0 to valueCount()-1).

Implemented in iAHistogramData, and iAXYPlotData.

◆ valueType()

iAValueType iAPlotData::valueType ( ) const
virtual

The type of the values held by this data object.

◆ xBounds()

virtual DataType const * iAPlotData::xBounds ( ) const
pure virtual

The range of values for x; i.e. xBounds()[0] is the minimum of all xValue(...), xBounds()[1] is the maximum.

Implemented in iAHistogramData, and iAXYPlotData.

◆ xValue()

virtual DataType iAPlotData::xValue ( size_t  idx) const
pure virtual

Value on the x axis for a datum with given index.

Parameters
idxdata index

Implemented in iAHistogramData, and iAXYPlotData.

◆ yBounds()

virtual DataType const * iAPlotData::yBounds ( ) const
pure virtual

The range of values for y; i.e. yBounds()[0] is the minimum of all yValue(...), yBounds()[1] is the maximum.

Implemented in iAHistogramData, and iAXYPlotData.

◆ yValue()

virtual DataType iAPlotData::yValue ( size_t  idx) const
pure virtual

Value on the y axis for a datum with given index.

Parameters
idxdata index

Implemented in iAHistogramData, and iAXYPlotData.


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