SoConverterParameters Class Reference
[Converters]
Container class for LDM converter parameters
More...
#include <LDM/converters/SoConverterParameters.h>
List of all members.
Detailed Description
Container class for LDM converter parameters
This class provides a convenient way to specify parameters for the LDM converter.
SEE ALSO
SoConverter
- See related examples:
-
LDMConverter, LDMConverterExample, LDMSegYConverter
Member Enumeration Documentation
- Enumerator:
PARAM_NO_ERROR |
No error.
|
PARAM_ERROR |
Input params problems.
|
- Enumerator:
DECIMATION |
Decimation : Only one voxel out of two.
|
AVERAGE |
Average : Voxel value in parent tile is an average of Neighbor voxel in child tile.
|
Constructor & Destructor Documentation
SoConverterParameters::SoConverterParameters |
( |
|
) |
|
virtual SoConverterParameters::~SoConverterParameters |
( |
|
) |
[virtual] |
Member Function Documentation
void SoConverterParameters::buildOutputFileName |
( |
|
) |
[protected] |
Static method to build a parameters container from command line arguments.
The method returns NULL if an error is detected in the parameters. Otherwise, it returns a pointer to an instance of the class, initialized with given parameters See SoConverter::converter for a list of command line arguments.
Note: SbStringList is a list of pointers, not a list of objects, so the destructor for this class does not free the memory associated with the SbString objects. The application is responsible for deleting each object in the list.
Static method to build a parameters container from command line arguments.
The method returns NULL if an error is detected in the arguments. Otherwise, it returns a pointer to an instance of the class, initialized with given parameters. See SoConverter::converter for a list of command line arguments.
void SoConverterParameters::doUpdate |
( |
bool |
value |
) |
[inline] |
Only applies to input files in LDM format.
If true the converter must just perform an update of the given file. This means that if no options are specified, the converter will retrieve information from the input file and apply its properties automatically to the generated file.
void SoConverterParameters::enableHistogram |
( |
const bool |
flag |
) |
[inline] |
Specify if the histogram must be computed or not.
Default is true.
Disabling Histogram generation will greatly speedup the conversion process, but some VolumeViz rendering features and optimizations won't be available.
It also implies that the following information won't be computed:
- dataset min and max values
- per Tile min max values
Note also that if RGBA mode is set then no histogram is computed.
double SoConverterParameters::getBitSetThreshold |
( |
|
) |
const [inline] |
Returns the bitset generation threshold value.
SoDEPRECATED int SoConverterParameters::getBorder |
( |
|
) |
const [inline] |
int SoConverterParameters::getCompressionLevel |
( |
|
) |
const [inline] |
SbString SoConverterParameters::getCompressionName |
( |
|
) |
const [inline] |
Returns compression type.
SbString SoConverterParameters::getDataFileName |
( |
|
) |
const [inline] |
Returns the complete data filename (i.e.
: the whole path to .dat file).
SbString SoConverterParameters::getDataSectionFileName |
( |
|
) |
const [inline] |
Returns the data filename.
SbString SoConverterParameters::getHeaderFileName |
( |
|
) |
const [inline] |
SbString SoConverterParameters::getInputFileName |
( |
|
) |
const [inline] |
void SoConverterParameters::getInputRangeMinMax |
( |
double & |
min, |
|
|
double & |
max | |
|
) |
| | const [inline] |
Returns input data range.
SoDataSet * SoConverterParameters::getInputVolume |
( |
|
) |
const [inline] |
Returns the the volume used as input.
Returns algorithm used to build low resolution tiles.
int SoConverterParameters::getMaxMemory |
( |
|
) |
const [inline] |
Returns max memory available for converter.
int SoConverterParameters::getNbArgs |
( |
|
) |
const [inline] |
Returns the number of arguments set during init.
Returns the output data format.
bool SoConverterParameters::getOutputHeaderOnly |
( |
|
) |
const [inline] |
Returns header only setting.
int SoConverterParameters::getPondCoef |
( |
|
) |
const [inline] |
Retrieve the ponderation coefficient for low resolution tiles.
Only relevant when low resolution algorithm is set to AVERAGE.
int SoConverterParameters::getTargetWordFormat |
( |
|
) |
const [inline] |
Returns word format property.
SbVec3i32 SoConverterParameters::getTileDim |
( |
|
) |
const [inline] |
double SoConverterParameters::getUndefinedValue |
( |
|
) |
const [inline] |
Returns the undefined value.
bool SoConverterParameters::isCrcCheckDone |
( |
|
) |
const [inline] |
bool SoConverterParameters::isForUpdate |
( |
|
) |
const [inline] |
Return TRUE if converter is configured to perform a simple update.
Return FALSE otherwise
bool SoConverterParameters::isHistogramEnabled |
( |
|
) |
const [inline] |
Returns true if histogram will be computed.
bool SoConverterParameters::isInputDataRangeSpecified |
( |
|
) |
const [inline] |
Return whether or not the input data range has been specified.
bool SoConverterParameters::isOutputDataTypeSpecified |
( |
|
) |
const [inline] |
Return whether or not the output data type has been specified.
bool SoConverterParameters::isRGBAMode |
( |
|
) |
const [inline] |
Returns true if RGBA mode.
bool SoConverterParameters::isSavedAsBitSet |
( |
|
) |
const [inline] |
Returns true if output will be saved as a bitset (ie: 8 values per byte).
bool SoConverterParameters::isVerbose |
( |
|
) |
const [inline] |
Returns verbose mode setting.
void SoConverterParameters::saveAsBitSet |
( |
bool |
flag, |
|
|
double |
bitsetThreshold = 0 | |
|
) |
| | [inline] |
Specify if dataset should be saved as a bitset (8 values per byte) or values.
- Parameters:
-
| flag | Dataset is a bitset (true) or values (false) |
| bitsetThreshold | For each value (V) of a dataset, if V > bitsetThreshold the bitset is set to 1 for this bit, or to 0 otherwise. Used only if flag parameter is set to true. Default is 0. |
void SoConverterParameters::setBitSetThreshold |
( |
double |
bitsetThreshold |
) |
[inline] |
Set the bitset threshold value.
Whichever was called last, saveAsBitSet or this method, determines the threshold value that will be used.
- Parameters:
-
| bitsetThreshold | For each value (V) of a dataset, if V > threshold the bitset is set to 1 for this bit, or to 0 otherwise. Default is 0. |
SoDEPRECATED bool SoConverterParameters::setBorder |
( |
const int |
border = 0 |
) |
|
void SoConverterParameters::setCompressionLevel |
( |
int |
compressionLevel |
) |
|
Set compression level.
Like the -l command line argument. See also setCompressionName(). The meaning of this parameter depends on the type of compression used:
- gzip
Level must be between 0 and 9: 0 gives no compression, 9 gives best compression but slower speed. Default is 3.
- jpeg:
Level must be between 0 and 100: 0 gives best compression but most loss of data, 100 gives minimum compression and minimum data alteration. Default is 85.
- jp3d:
A level of 0 specifies the lossless mode, and any other value sets the target PSNR (Peak Signal to Noise Ratio). Typical values for PSNR are: 70dB for near lossless mode, and 40dB for visually lossless mode.
bool SoConverterParameters::setCompressionName |
( |
const SbString & |
compressionName |
) |
|
Set compression name.
Like the -c command line argument. See also setCompressionLevel(). The following compression types are currently supported:.
- jpeg:
This is a lossy compression. See SoJpegDataCompressor.
Limitation: Can only be used on 8-bit scalar data sets.
- jp3d:
This is a wavelet compression that can be lossless or lossy. See SoJp3dDataCompressor.
Limitation: 32 bit data values (float or integer) are always converted to 16 bit values.
Returns true if parameter is valid, else returns false.
void SoConverterParameters::setCrcCheck |
( |
bool |
addCrcCheck |
) |
[inline] |
Set CRC32 check on compression.
Like -C command line argument. When compression is enabled using -c, adds a data integrity check value to all compressed tiles. If the environment variable LDM_COMPRESS_CHECK_CRC32 is set, data values will be checked each time they are read from disk. Default is false.
void SoConverterParameters::setDataFileName |
( |
const SbString & |
dataFileName |
) |
[inline] |
Set data filename (i.e.
the .dat filename).
Like the -O command line argument. Default is the same as the header file, with .dat extension.
void SoConverterParameters::setHeaderFileName |
( |
const SbString & |
headerFileName |
) |
[inline] |
Set header filename (i.e.
the .ldm filename).
Like the -o command line argument. Default is input filename with extension .ldm.
void SoConverterParameters::setInputFileName |
( |
const SbString & |
inputFileName |
) |
[inline] |
Set the input filename.
This is the file containing data to convert. Alternative to setInputVolume(). An input file must be specified. To get more information regarding possible limitation of any readers you may use, please see documentation of Readers.
bool SoConverterParameters::setInputRangeMinMax |
( |
double |
min, |
|
|
double |
max | |
|
) |
| | |
Set the input data range to map to the output data format.
Like the -r command line argument. If not specified, and input type is float and output type is integer, the values are simply cast into the output data type. Returns true if parameter is valid, else returns false.
void SoConverterParameters::setInputVolume |
( |
SoDataSet * |
inputVolume |
) |
[inline] |
Define the volume used as input.
Allows to convert in-memory data to a LDM file. Alternative to setInputFileName().
bool SoConverterParameters::setLowResAlgorithm |
( |
int |
lowResAlgorithm |
) |
|
Set the algorithm used to build low resolution tiles.
Available options are :
- 0: To use decimation algorithm
- n: To use average algorithm and give a ponderation coefficient of n to the selected voxel. The default is Decimation. Returns true if parameter is valid, else returns false.
bool SoConverterParameters::setMaxMemory |
( |
int |
maxMemory |
) |
|
Set maximum memory available for the converter, in MB.
Like the -m command line argument. Default value is 512 MB. Returns true if parameter is valid, else returns false.
Set the output data format with an SoDataSet::DataType.
Note that if the input reader does not support the requested conversion, the output data format will be the same as the input data format (no conversion) Returns true if parameter is valid, else returns false.
bool SoConverterParameters::setOutputDataFormat |
( |
const SbString & |
dataFormat |
) |
|
Set the output data format from a format string.
Like the -f command line argument. The format is specified as "u*" for unsigned integer, "s*" for signed integer or "f" for float, where * = 8, 16 or 32. Default is no conversion. Returns true if parameter is valid, else returns false.
Note that if the input reader does not support the requested conversion, the output data format will be the same as the input data format (no conversion).
void SoConverterParameters::setOutputHeaderOnly |
( |
bool |
headerOnly |
) |
[inline] |
Set the header only feature.
Like the -h command line argument. If set, the converter will only write the header file. No data will be generated. Default value is Off.
void SoConverterParameters::setRGBAMode |
( |
const bool |
flag |
) |
[inline] |
Set RGBA data mode (output will be unsigned int32 RGBA values).
bool SoConverterParameters::setTargetWordFormat |
( |
int |
wordFormat |
) |
|
Set the target machine word format.
Like the -w command line argument. Default is the current machine word format. wordFormat parameter is 0 for Big Endian, and 1 for Little Endian. Returns true if parameter is valid, else returns false.
void SoConverterParameters::setTileDim |
( |
const SbVec3i32 & |
tileDim |
) |
|
Set tile dimension.
The default value is 64,64,64 and all values must a power of 2. This method can be used to set a different value for each tile dimension, for example for a "thin volume" or height field.
void SoConverterParameters::setTileDim |
( |
const int |
tileDim |
) |
|
Set tile dimension.
Like the -t command line argument. The default is 64 and the value must be a power of 2. The same value is used for all dimensions of the tile.
void SoConverterParameters::setUndefinedValue |
( |
double |
undefinedValue |
) |
[inline] |
Set the undefined value.
Like the -u command line argument. The given value will be stored in the LDM file. Default is NaN (Not a Number). This is currently used by SoHeightFieldRender (vertices with undefined values are not rendered).
void SoConverterParameters::setVerbose |
( |
const bool |
isVerbose |
) |
[inline] |
Set verbose mode.
Default value is Off.
bool SoConverterParameters::useDefaultCompLvl |
( |
|
) |
const [inline] |
Member Data Documentation
The documentation for this class was generated from the following file: