SoVolumeHistogram Class Reference

Volume Data Histogram. More...

#include <LDM/SoVolumeHistogram.h>

List of all members.

Public Member Functions

 SoVolumeHistogram (const SbDataType &dataType)
 ~SoVolumeHistogram ()
void setInputValueRange (double rangeMin, double rangeMax)
void setUndefinedValue (const double undefinedValue)
double getUndefinedValue () const
size_t getHistoSize () const
int64_t * getHistogram ()
int64_t getNumValues (size_t entry)
int64_t getValue (size_t entry)
double getValueD (size_t entry)
int64_t getMinValue () const
int64_t getMaxValue () const
double getMinValueD () const
double getMaxValueD () const
double getMax () const
double getMin () const
int getNumSignificantBits () const
void addValues (SoBufferObject *values, const int numValues)
void addValues (SoBufferObject *values, const SbVec3i32 &arrayDim)
void addValues (SoBufferObject *values, const SbVec3i32 &arrayDim, const SbBox3i32 &range)
void set (const std::vector< int64_t > &histo)
void set (const std::vector< int64_t > &histo, const std::vector< double > &values)
template<typename T >
size_t getEntry (T value) const

Static Public Member Functions

static void computeMinMax (SoBufferObject *valuesBuffer, const SbDataType &dataType, const SbVec3i32 &arrayDim, const SbBox3i32 &range, double &min, double &max)
static void computeMinMaxWithUndefined (SoBufferObject *valuesBuffer, const double undefinedValue, const SbDataType &dataType, const SbVec3i32 &arrayDim, const SbBox3i32 &range, double &min, double &max)
static void computeMinMax (void *valuesBuffer, const SbDataType &dataType, const SbVec3i32 &arrayDim, SbVec2d &minMax)
static void computeMinMaxWithUndefined (void *valuesBuffer, const double undefinedValue, const SbDataType &dataType, const SbVec3i32 &arrayDim, SbVec2d &minMax)

Detailed Description

Volume Data Histogram.

This class allows building a histogram from a dataset or a portion of a dataset.

To implement the histogram computation, follow the steps below:

SoVolumeHistogram has different behavior depending on the datatype:

SEE ALSO

SoDataSet

See related examples:

MedicalComputeHistogram, ComputeHistogram


Constructor & Destructor Documentation

SoVolumeHistogram::SoVolumeHistogram ( const SbDataType dataType  ) 

Constructor.

SoVolumeHistogram::~SoVolumeHistogram (  ) 

Destructor.


Member Function Documentation

void SoVolumeHistogram::addValues ( SoBufferObject values,
const SbVec3i32 arrayDim,
const SbBox3i32 range 
)

Add to the histogram the values in the specified range inside the given array.

void SoVolumeHistogram::addValues ( SoBufferObject values,
const SbVec3i32 arrayDim 
) [inline]

Add to the histogram a 3D array of values.

void SoVolumeHistogram::addValues ( SoBufferObject values,
const int  numValues 
) [inline]

Add to the histogram a 1D array of values.

NOTES: this API is limited to INT_MAX numValues to handle.

static void SoVolumeHistogram::computeMinMax ( void *  valuesBuffer,
const SbDataType dataType,
const SbVec3i32 arrayDim,
SbVec2d minMax 
) [static]

Compute min max.

Parameters:
valuesBuffer Input buffer of values.
dataType Type of datas stored in valuesBuffer.
arrayDim Dimensions of valuesBuffer.
minMax Vector of computed minimum and maximum values.
static void SoVolumeHistogram::computeMinMax ( SoBufferObject valuesBuffer,
const SbDataType dataType,
const SbVec3i32 arrayDim,
const SbBox3i32 range,
double &  min,
double &  max 
) [static]

Compute min max.

Parameters:
valuesBuffer Input buffer of values.
dataType Type of datas stored in valuesBuffer.
arrayDim Dimensions of valuesBuffer.
range Box in which min and max values are computed.
min Computed minimum value.
max Computed maximum value.
static void SoVolumeHistogram::computeMinMaxWithUndefined ( void *  valuesBuffer,
const double  undefinedValue,
const SbDataType dataType,
const SbVec3i32 arrayDim,
SbVec2d minMax 
) [static]

Compute min max.

Parameters:
valuesBuffer Input buffer of values.
undefinedValue Discarded value in the computation of min and max.
dataType Type of datas stored in valuesBuffer.
arrayDim Dimensions of valuesBuffer.
minMax Vector of computed minimum and maximum values.
static void SoVolumeHistogram::computeMinMaxWithUndefined ( SoBufferObject valuesBuffer,
const double  undefinedValue,
const SbDataType dataType,
const SbVec3i32 arrayDim,
const SbBox3i32 range,
double &  min,
double &  max 
) [static]

Compute min max.

Parameters:
valuesBuffer Input buffer of values.
undefinedValue Discarded value in the computation of min and max.
dataType Type of datas stored in valuesBuffer.
arrayDim Dimensions of valuesBuffer.
range Box in which min and max values are computed.
min Computed minimum value.
max Computed maximum value.
template<typename T >
size_t SoVolumeHistogram::getEntry ( value  )  const [inline]

Returns the histogram entry corresponding to the value.

int64_t* SoVolumeHistogram::getHistogram (  ) 

Returns a 64 bit integer pointer to the histogram data, the size of the histogram array is getHistoSize().

size_t SoVolumeHistogram::getHistoSize (  )  const

Returns the size of the histogram.

double SoVolumeHistogram::getMax (  )  const

Returns the max value of the dataset according to the specified data type.

int64_t SoVolumeHistogram::getMaxValue (  )  const

Returns the max value of the dataset for integer data types.

double SoVolumeHistogram::getMaxValueD (  )  const

Returns the max value of the dataset for floating data types.

double SoVolumeHistogram::getMin (  )  const

Returns the max value of the dataset according to the specified data type.

int64_t SoVolumeHistogram::getMinValue (  )  const

Returns the min value of the dataset for integer data types.

double SoVolumeHistogram::getMinValueD (  )  const

Returns the min value of the dataset for floating data types.

int SoVolumeHistogram::getNumSignificantBits (  )  const

Returns the number of significant bits for the dataset, only relevant for integer data types.

int64_t SoVolumeHistogram::getNumValues ( size_t  entry  ) 

Returns the histogram value corresponding to the entry.

Equivalent to getHistogram()[entry]

double SoVolumeHistogram::getUndefinedValue (  )  const [inline]

return the current undefined value.

int64_t SoVolumeHistogram::getValue ( size_t  entry  ) 

Returns the value corresponding to the entry for integer data types.

double SoVolumeHistogram::getValueD ( size_t  entry  ) 

Returns the value corresponding to the entry for floating data types.

void SoVolumeHistogram::set ( const std::vector< int64_t > &  histo,
const std::vector< double > &  values 
)

Set the histogram.

Useful to get back scalar parameters such as min/max values and number of significant bits

void SoVolumeHistogram::set ( const std::vector< int64_t > &  histo  ) 

Set the histogram.

Useful to get back scalar parameters such as min/max values and number of significant bits

void SoVolumeHistogram::setInputValueRange ( double  rangeMin,
double  rangeMax 
)

For floating data type, specifies the range the histogram has to be computed in.

Must be called before any call to addValues(). Default values are -20000. 20000.

void SoVolumeHistogram::setUndefinedValue ( const double  undefinedValue  )  [inline]

Setup the undefined value to ignore when computing the histogram.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/