Class OpenVDS::VolumeDataAxisDescriptor

class VolumeDataAxisDescriptor

Describes the number of samples, name, unit and coordinates (annotation) of an axis (dimension) of the volume.

Public Functions

inline VolumeDataAxisDescriptor()

Default constructor.

inline VolumeDataAxisDescriptor(int numSamples, const char *name, const char *unit, float coordinateMin, float coordinateMax)

Constructor.

Parameters:
  • numSamples – The number of samples along this axis

  • name – The name of this axis

  • unit – The unit of the coordinates of this axis

  • coordinateMin – The coordinate of the first sample of this axis

  • coordinateMax – The coordinate of the last sample of this axis

inline int GetNumSamples() const

Get the number of samples along this axis.

Returns:

The number of samples along this axis

inline const char *GetName() const

Get the name of this axis.

Returns:

The name of this axis

inline const char *GetUnit() const

Get the unit of the coordinates of this axis.

Returns:

The unit of the coordinates of this axis

inline float GetCoordinateMin() const

Get the coordinate of the first sample of this axis.

Returns:

The coordinate of the first sample of this axis

inline float GetCoordinateMax() const

Get the coordinate of the last sample of this axis.

Returns:

The coordinate of the last sample of this axis

inline float GetCoordinateStep() const

Get the coordiante step size per sample.

Returns:

The coordiante step size per sample

inline float SampleIndexToCoordinate(int sampleIndex) const

Convert a sample index on this axis to a coordinate.

Parameters:

sampleIndex – The sample index get the coordinate of

Returns:

The coordinate of the sample index

inline int CoordinateToSampleIndex(float coordinate) const

Convert a coordinate to a sample index (rounding to the closest index)

Parameters:

coordinate – The coordinate to get the sample index of

Returns:

The sample index of the coordinate

inline float CoordinateToSamplePosition(float coordinate) const

Convert a coordinate to a sample position (to use with RequestVolumeSamples or an InterpolatingVolumeDataAccessor)

Parameters:

coordinate – The coordinate to get the sample position of

Returns:

The sample position of the coordinate