|
|
size_t | get_nx () const |
| | Get the number of samples in the x direction.
|
| |
|
size_t | get_ny () const |
| | Get the number of samples in the y direction.
|
| |
|
size_t | get_nz () const |
| | Get the number of samples in the z direction.
|
| |
|
size_t | get_size () const |
| | Get the total number of samples.
|
| |
|
size_t | get_elem_size () const |
| | Get the size of the data elements.
|
| |
|
size_t | get_byte_size () const |
| | Get the size in bytes.
|
| |
|
index_type | to_index (index_type x, index_type y, index_type z) const |
| | Compute the real index based on the coordinates in index space.
|
| |
|
void | from_index (index_type index, index_type &x, index_type &y, index_type &z) const |
| | Compute the index components from the actual index.
|
| |
|
DataType | get_data_type () const |
| | The type of the data.
|
| |
|
void * | get_data () |
| | Pointer to the block of data.
|
| |
|
double | get_data_at (index_type x, index_type y, index_type z) const |
| | Get data at a certain location in the data block.
|
| |
|
double | get_data_at (index_type index) const |
| | Get data at a certain index location in the data block.
|
| |
|
void | set_data_at (index_type x, index_type y, index_type z, double value) |
| | Set data at a certain location in the data block.
|
| |
|
void | set_data_at (index_type index, double value) |
| | Set data at a certain index location in the data block.
|
| |
|
void | clear () |
| | Clear the data inside the data block.
|
| |
| double | get_max () const |
| |
| double | get_min () const |
| |
| double | get_range () const |
| |
|
const Histogram & | get_histogram () const |
| | Get the histogram of the underlying data.
|
| |
|
bool | update_histogram () |
| | Recompute the histogram. This needs to be triggered each time the data is updated.
|
| |
| void | update_data_type (DataType type) |
| |
|
generation_type | get_generation () const |
| | Get the current generation number of the data volume.
|
| |
| void | increase_generation () |
| |
|
void | set_histogram (const Histogram &histogram) |
| | Set the histogram of the dataset.
|
| |
|
void | swap_endian () |
| | Swap the endianess of the data.
|
| |
|
void | set_data (void *data) |
| | Set the data pointer of the data.
|
| |
|
bool | insert_slice (const DataSliceHandle slice) |
| | Insert slice into the datablock.
|
| |
|
bool | extract_slice (SliceType type, index_type index, DataSliceHandle &slice) |
| | Extract a slice from the datablock.
|
| |
|
mutex_type & | get_mutex () const |
| |
|
|
static bool | ConvertDataType (const DataBlockHandle &src_data_block, DataBlockHandle &dst_data_block, DataType new_data_type) |
| | Convert the data to a specific format.
|
| |
| static bool | PermuteData (const DataBlockHandle &src_data_block, DataBlockHandle &dst_data_block, std::vector< int > permutation) |
| |
| static bool | QuantizeData (const DataBlockHandle &src_data_block, DataBlockHandle &dst_data_block, DataType new_data_type) |
| |
|
static bool | Duplicate (const DataBlockHandle &src_data_block, DataBlockHandle &dst_data_block) |
| | Clone the data in a datablock by generating a new one and copying the data into it.
|
| |
|
static bool | Pad (DataBlockHandle src_data_block, DataBlockHandle &dst_data_block, int pad=1, double pad_value=0.0) |
| |
|
static bool | Clip (DataBlockHandle src_data_block, DataBlockHandle &dst_data_block, int width, int height, int depth, double fill_value=0.0) |
| |
|
static bool | IsBigEndian () |
| | Check whether current architecture is big endian.
|
| |
|
static bool | IsLittleEndian () |
| | Check whether current architecture is little endian.
|
| |
This class is an abstract representation of a block of volume data in memory. It stores the pointer to where the data is located as well as its dimensions, and the type of the data NOTE: This is a base class that does not do any memory allocation, use one of the derived classes to generate a datablock. The implementation in this class is just the common access to the data.
| bool Core::DataBlock::PermuteData |
( |
const DataBlockHandle & |
src_data_block, |
|
|
DataBlockHandle & |
dst_data_block, |
|
|
std::vector< int > |
permutation |
|
) |
| |
|
static |
Reorder the data by shuffling the axis, the permutation is a vector of three components that specify -1, 1 , and -2, 2, and -3, 3 for each of the axis, where the negative number indicates an inverted axis.