HDK
|
Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed) More...
#include <CreateNanoGrid.h>
Classes | |
struct | BlindMetaData |
Public Types | |
using | SrcNodeAccT = NodeAccessor< SrcGridT > |
using | SrcBuildT = typename SrcNodeAccT::BuildType |
using | SrcValueT = typename SrcNodeAccT::ValueType |
using | SrcTreeT = typename SrcNodeAccT::TreeType |
using | SrcRootT = typename SrcNodeAccT::RootType |
template<int LEVEL> | |
using | SrcNodeT = typename NodeTrait< SrcRootT, LEVEL >::type |
Public Member Functions | |
CreateNanoGrid (const SrcGridT &srcGrid) | |
Constructor from a source grid. More... | |
CreateNanoGrid (const SrcNodeAccT &srcNodeAcc) | |
Constructor from a source node accessor (defined above) More... | |
void | setVerbose (int mode=1) |
Set the level of verbosity. More... | |
void | enableDithering (bool on=true) |
Enable or disable dithering, i.e. randomization of the quantization error. More... | |
void | setStats (StatsMode mode=StatsMode::Default) |
Set the mode used for computing statistics of the destination grid. More... | |
void | setChecksum (ChecksumMode mode=ChecksumMode::Default) |
Set the mode used for computing checksums of the destination grid. More... | |
template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename BufferT = HostBuffer> | |
disable_if< is_same< DstBuildT, FpN >::value||BuildTraits < DstBuildT >::is_index, GridHandle< BufferT > >::type | getHandle (const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with the specified destination build type. More... | |
template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename OracleT = AbsDiff, typename BufferT = HostBuffer> | |
enable_if< is_same< DstBuildT, FpN >::value, GridHandle < BufferT > >::type | getHandle (const OracleT &oracle=OracleT(), const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with variable bit quantization. More... | |
template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename BufferT = HostBuffer> | |
enable_if< BuildTraits < DstBuildT >::is_index, GridHandle< BufferT > >::type | getHandle (uint32_t channels=0u, bool includeStats=true, bool includeTiles=true, const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with indices to external arrays of values. More... | |
uint64_t | addBlindData (const std::string &name, GridBlindDataSemantic dataSemantic, GridBlindDataClass dataClass, GridType dataType, size_t count, size_t size) |
Add blind data to the destination grid. More... | |
uint64_t | valueCount () const |
This method only has affect when getHandle was called with DstBuildT = ValueIndex or ValueOnIndex. More... | |
template<typename DstBuildT > | |
enable_if< BuildTraits < DstBuildT >::is_index > ::type | copyValues (SrcValueT *buffer) |
Copy values from the source grid into a provided buffer. More... | |
Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed)
Definition at line 105 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcBuildT = typename SrcNodeAccT::BuildType |
Definition at line 528 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcNodeAccT = NodeAccessor<SrcGridT> |
Definition at line 527 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcNodeT = typename NodeTrait<SrcRootT, LEVEL>::type |
Definition at line 533 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcRootT = typename SrcNodeAccT::RootType |
Definition at line 531 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcTreeT = typename SrcNodeAccT::TreeType |
Definition at line 530 of file CreateNanoGrid.h.
using nanovdb::CreateNanoGrid< typename >::SrcValueT = typename SrcNodeAccT::ValueType |
Definition at line 529 of file CreateNanoGrid.h.
nanovdb::CreateNanoGrid< SrcGridT >::CreateNanoGrid | ( | const SrcGridT & | srcGrid | ) |
Constructor from a source grid.
srcGrid | Source grid of type SrcGridT |
Definition at line 783 of file CreateNanoGrid.h.
nanovdb::CreateNanoGrid< SrcGridT >::CreateNanoGrid | ( | const SrcNodeAccT & | srcNodeAcc | ) |
Constructor from a source node accessor (defined above)
srcNodeAcc | Source node accessor of type SrcNodeAccT |
Definition at line 798 of file CreateNanoGrid.h.
|
inline |
Add blind data to the destination grid.
name | String name of the blind data |
dataSemantic | Semantics of the blind data |
dataClass | Class of the blind data |
dataType | Type of the blind data |
count | Element count of the blind data |
size | Size of each element of the blind data |
Definition at line 607 of file CreateNanoGrid.h.
enable_if< BuildTraits< DstBuildT >::is_index >::type nanovdb::CreateNanoGrid< SrcGridT >::copyValues | ( | SrcValueT * | buffer | ) |
Copy values from the source grid into a provided buffer.
DstBuildT | Must be ValueIndex or ValueOnIndex, i.e. a index grid |
buffer | point in which to write values |
Definition at line 1840 of file CreateNanoGrid.h.
|
inline |
disable_if< is_same< DstBuildT, FpN >::value||BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type nanovdb::CreateNanoGrid< SrcGridT >::getHandle | ( | const BufferT & | buffer = BufferT() | ) |
Converts the source grid into a nanovdb grid with the specified destination build type.
DstBuildT | build type of the destination, output, grid |
BufferT | Type of the buffer used for allocating the destination grid |
buffer | instance of the buffer use for allocation |
Definition at line 896 of file CreateNanoGrid.h.
enable_if< is_same< DstBuildT, FpN >::value, GridHandle< BufferT > >::type nanovdb::CreateNanoGrid< SrcGridT >::getHandle | ( | const OracleT & | oracle = OracleT() , |
const BufferT & | buffer = BufferT() |
||
) |
Converts the source grid into a nanovdb grid with variable bit quantization.
DstBuildT | FpN, i.e. the destination grid uses variable bit quantization |
OracleT | Type of oracle used to determine the N in FpN |
BufferT | Type of the buffer used for allocating the destination grid |
oracle | Instance of the oracle used to determine the N in FpN |
buffer | instance of the buffer use for allocation |
Definition at line 909 of file CreateNanoGrid.h.
enable_if< BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type nanovdb::CreateNanoGrid< SrcGridT >::getHandle | ( | uint32_t | channels = 0u , |
bool | includeStats = true , |
||
bool | includeTiles = true , |
||
const BufferT & | buffer = BufferT() |
||
) |
Converts the source grid into a nanovdb grid with indices to external arrays of values.
DstBuildT | ValueIndex or ValueOnIndex, i.e. index all or just active values |
BufferT | Type of the buffer used for allocating the destination grid |
channels | Number of copies of values encoded as blind data in the destination grid |
includeStats | Specify if statics should be indexed |
includeTiles | Specify if tile values, i.e. non-leaf-node-values, should be indexed |
buffer | instance of the buffer use for allocation |
Definition at line 922 of file CreateNanoGrid.h.
|
inline |
Set the mode used for computing checksums of the destination grid.
mode | specify the mode of checksum |
Definition at line 558 of file CreateNanoGrid.h.
|
inline |
Set the mode used for computing statistics of the destination grid.
mode | specify the mode of statistics |
Definition at line 554 of file CreateNanoGrid.h.
|
inline |
Set the level of verbosity.
mode | level of verbosity, mode=0 means quiet |
Definition at line 545 of file CreateNanoGrid.h.
|
inline |
This method only has affect when getHandle was called with DstBuildT = ValueIndex or ValueOnIndex.
Definition at line 621 of file CreateNanoGrid.h.