Volume Cartographer 2.27.0
Public Types | Public Member Functions | Private Attributes | List of all members
volcart::VolumeMask Class Reference

Per-voxel Segmentation State Mask for Volumes. More...

#include <vc/core/types/VolumeMask.hpp>

Public Types

enum class  State { Unsegmented = 0 , Segmented }
 Segmentation States. More...
 
using Subvolume = NDArray< State >
 

Public Member Functions

 VolumeMask (std::size_t width, std::size_t height, std::size_t numSlices)
 Construct from Volume dimensions.
 
void setVoxelState (const cv::Vec3i &xyz, State state)
 Set the segmentation state for a voxel.
 
State getVoxelState (const cv::Vec3i &xyz)
 Get the segmentation state for a voxel.
 
void setSubvolumeState (const cv::Vec3i &origin, const cv::Vec3i &dims, State state)
 Set the segmentation state for every voxel in a subvolume. More...
 
Subvolume getSubvolumeState (const cv::Vec3i &origin, const cv::Vec3i &dims)
 Get the segmentation state for every voxel in a subvolume. More...
 

Private Attributes

Eigen::SparseMatrix< int, Eigen::RowMajor > states_
 
std::size_t sliceWidth_
 
std::size_t sliceHeight_
 

Detailed Description

Per-voxel Segmentation State Mask for Volumes.

Stores the segmentation state (segmented/unsegmented) for each voxel of a Volume.

Warning
The underlying data structure for this class is memory efficient but extremely slow. This class should be not used in production code.

Definition at line 26 of file VolumeMask.hpp.

Member Typedef Documentation

◆ Subvolume

Subvolume containing voxel states

Definition at line 33 of file VolumeMask.hpp.

Member Enumeration Documentation

◆ State

enum class volcart::VolumeMask::State
strong

Segmentation States.

Definition at line 30 of file VolumeMask.hpp.

Member Function Documentation

◆ getSubvolumeState()

Subvolume volcart::VolumeMask::getSubvolumeState ( const cv::Vec3i &  origin,
const cv::Vec3i &  dims 
)

Get the segmentation state for every voxel in a subvolume.

Parameters
originTop-left corner of subvolume
dimsLength of the subvolume's basis axes in voxels

◆ setSubvolumeState()

void volcart::VolumeMask::setSubvolumeState ( const cv::Vec3i &  origin,
const cv::Vec3i &  dims,
State  state 
)

Set the segmentation state for every voxel in a subvolume.

Parameters
originTop-left corner of subvolume
dimsLength of the subvolume's basis axes in voxels

Member Data Documentation

◆ sliceHeight_

std::size_t volcart::VolumeMask::sliceHeight_
private

Slice height

Definition at line 74 of file VolumeMask.hpp.

◆ sliceWidth_

std::size_t volcart::VolumeMask::sliceWidth_
private

Slice width

Definition at line 71 of file VolumeMask.hpp.

◆ states_

Eigen::SparseMatrix<int, Eigen::RowMajor> volcart::VolumeMask::states_
private

Voxel state storage matrix

The Eigen matrix is a 2D storage array. To accommodate a 3D volume, z-indices are stored sequentially

Definition at line 68 of file VolumeMask.hpp.


The documentation for this class was generated from the following file: