Seg3D
2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
|
#include <MaskDataBlock.h>
Public Types | |
typedef DataBlock::mutex_type | mutex_type |
typedef DataBlock::lock_type | lock_type |
typedef DataBlock::shared_lock_type | shared_lock_type |
typedef DataBlock::index_type | index_type |
Public Member Functions | |
MaskDataBlock (DataBlockHandle data_block, unsigned int mask_bit) | |
size_t | get_nx () const |
size_t | get_ny () const |
size_t | get_nz () const |
size_t | get_size () const |
size_t | get_byte_size () const |
size_t | to_index (size_t x, size_t y, size_t z) const |
unsigned char * | get_mask_data () |
Pointer to the block of data. | |
unsigned int | get_mask_bit () |
Get the bit that describes the mask. | |
unsigned char | get_mask_value () |
Get the value at which the mask is stored. | |
DataBlockHandle | get_data_block () |
DataBlock::generation_type | get_generation () const |
Get the current generation number of the data volume. | |
void | increase_generation () |
Increase the generation number to a new unique number. | |
bool | get_mask_at (size_t x, size_t y, size_t z) const |
Get the mask value at a certain coordinate. | |
bool | get_mask_at (size_t index) const |
Get the mask value at a certain index. | |
void | set_mask_at (size_t x, size_t y, size_t z) |
Set the mask value at a certain coordinate. | |
void | set_mask_at (size_t index) |
Set the mask value at a certain index. | |
void | clear_mask_at (size_t x, size_t y, size_t z) |
Clear the mask value at a certain index. | |
void | clear_mask_at (size_t index) |
mutex_type & | get_mutex () const |
Get the mutex that locks the datablock. | |
bool | insert_slice (const MaskDataSliceHandle slice) |
Insert slice into the datablock. | |
bool | extract_slice (SliceType type, index_type index, MaskDataSliceHandle &slice) |
Extract a slice from the datablock. | |
Public Attributes | |
boost::signals2::signal< void()> | mask_updated_signal_ |
Triggered when mask has been update. More... | |
This class represents a datablock for masks that are collapsed in several bitplanes in a common datablock. It runs through the SharedDataBlockManager to allocate a new datablock or share the datablock with another mask. When a new datablock is created, it is checked whether a similar mask with the same dimensions exists with an unassigned bit and used if possible, otherwise a new one is generated.
DataBlockHandle Core::MaskDataBlock::get_data_block | ( | ) |
Retrieve the pointer to the data block NOTE: This one is needed for loading the textures onto the graphics card. As masks are shared the Texture will be shared hence access to the datablock is needed to see whether this one has already been uploaded
boost::signals2::signal<void ()> Core::MaskDataBlock::mask_updated_signal_ |
Triggered when mask has been update.
NOTE: This signal is never triggered inside the class. Any object that makes change to the mask data is responsible for triggering this signal after modification is done.