public class SoVolumeHistogram extends Inventor
To implement the histogram computation, follow the steps below:
addValues()
multiple times.
getHistoSize()
, getHistogram()
, getNumValues()
, getValue()
, getMinValue, getMaxValue()
, getNumSignificantBits()
.
SoVolumeHistogram
has different behavior depending on the datatype:
setInputValueRange
.
See also:
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVolumeHistogram(SbDataType dataType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValues(SoBufferObject values,
int numValues)
Add to the histogram a 1D array of values.
|
void |
addValues(SoBufferObject values,
SbVec3i32 arrayDim)
Add to the histogram a 3D array of values.
|
void |
addValues(SoBufferObject values,
SbVec3i32 arrayDim,
SbBox3i32 range)
Add to the histogram the values in the specified range inside the given array.
|
static double[] |
computeMinMax(SoBufferObject valuesBuffer,
SbDataType dataType,
SbVec3i32 arrayDim,
SbBox3i32 range)
Compute min max.
|
static double[] |
computeMinMaxWithUndefined(SoBufferObject valuesBuffer,
double undefinedValue,
SbDataType dataType,
SbVec3i32 arrayDim,
SbBox3i32 range)
Compute min max.
|
java.nio.LongBuffer |
getDirectHistogram()
Returns a 64 bit integer pointer to the histogram data, the size of the histogram array is
getHistoSize() . |
long[] |
getHistogram()
Returns a 64 bit integer pointer to the histogram data, the size of the histogram array is
getHistoSize() . |
long |
getHistoSize()
Returns the size of the histogram .
|
double |
getMax()
Returns the max value of the dataset according to the specified data type .
|
long |
getMaxValue()
Returns the max value of the dataset for integer data types .
|
double |
getMaxValueD()
Returns the max value of the dataset for floating data types .
|
double |
getMin()
Returns the max value of the dataset according to the specified data type .
|
long |
getMinValue()
Returns the min value of the dataset for integer data types .
|
double |
getMinValueD()
Returns the min value of the dataset for floating data types .
|
int |
getNumSignificantBits()
Returns the number of significant bits for the dataset, only relevant for integer data types .
|
long |
getNumValues(long entry)
Returns the histogram value corresponding to the entry.
|
double |
getUndefinedValue()
return the current undefined value.
|
long |
getValue(long entry)
Returns the value corresponding to the entry for integer data types.
|
double |
getValueD(long entry)
Returns the value corresponding to the entry for floating data types.
|
void |
set(java.util.Collection<java.lang.Long> histo)
Set the histogram.
|
void |
set(java.util.Collection<java.lang.Long> histo,
java.util.Collection<java.lang.Double> values)
Set the histogram.
|
void |
setInputValueRange(double rangeMin,
double rangeMax)
For floating data type, specifies the range the histogram has to be computed in.
|
void |
setUndefinedValue(double undefinedValue)
Setup the undefined value to ignore when computing the histogram.
|
void |
setValue(SoVolumeHistogram copyFrom) |
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public SoVolumeHistogram(SbDataType dataType)
public static double[] computeMinMaxWithUndefined(SoBufferObject valuesBuffer, double undefinedValue, SbDataType dataType, SbVec3i32 arrayDim, SbBox3i32 range)
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.public long[] getHistogram()
getHistoSize()
.public void setInputValueRange(double rangeMin, double rangeMax)
addValues()
. Default values are -20000. 20000.public double getMin()
public void setValue(SoVolumeHistogram copyFrom)
public long getHistoSize()
public java.nio.LongBuffer getDirectHistogram()
getHistoSize()
.public void setUndefinedValue(double undefinedValue)
public double getUndefinedValue()
public double getMinValueD()
public void addValues(SoBufferObject values, SbVec3i32 arrayDim)
public long getMaxValue()
public void addValues(SoBufferObject values, int numValues)
public double getMax()
public int getNumSignificantBits()
public double getMaxValueD()
public void addValues(SoBufferObject values, SbVec3i32 arrayDim, SbBox3i32 range)
public long getValue(long entry)
public static double[] computeMinMax(SoBufferObject valuesBuffer, SbDataType dataType, SbVec3i32 arrayDim, SbBox3i32 range)
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.public long getNumValues(long entry)
getHistogram()
[entry]public void set(java.util.Collection<java.lang.Long> histo, java.util.Collection<java.lang.Double> values)
public long getMinValue()
public void set(java.util.Collection<java.lang.Long> histo)
public double getValueD(long entry)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com