file
VoxelUtils.h
Namespaces
Functions
-
void generateInteriorExteriorVoxelGrid(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper) - Generates an integer grid registered under "InteriorExterior" which stores +inf for exterior cells, -inf for interior cells, and 0 for Boundary cells.
-
void generateManhattanDistanceSDF(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& gridName) - Generates a signed distance field using manhattan distance as a distance metric.
-
void generateEuclideanDistanceSDF(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& gridName) - Generates a signed distance field using euclidean distance as a distance metric. Also created a "ClosestBoundaryCell" vector3 grid which holds the index of the closest Boundary grid.
-
void generateScalarGradientField(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& scalarGridName, const std:: string& gradientGridName) - Generates a Vector3 field where each vector of a cell is the gradient of how the scalar field changes.
-
template<typename T>void generateScalarGradientField(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& scalarGridName, const std:: string& gradientGridName) - Generates a Vector3 field where each vector of a cell is the gradient of how the scalar field changes.
-
auto getVoxelSetFromBoolGrid(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& boolGridName) -> std:: vector<Mn:: Vector3i> - Returns a vector of all filled/true voxels.
-
auto getVoxelSetFromIntGrid(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& intGridName, int lb, int ub) -> std:: vector<Mn:: Vector3i> - Fills a vector with voxel indices that meet some criteria.
-
auto getVoxelSetFromFloatGrid(std::
shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper, const std:: string& floatGridName, float lb, float ub) -> std:: vector<Mn:: Vector3i> - Fills a vector with voxel indices that meet some criteria.
Function documentation
void generateInteriorExteriorVoxelGrid(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper)
Generates an integer grid registered under "InteriorExterior" which stores +inf for exterior cells, -inf for interior cells, and 0 for Boundary cells.
Parameters | |
---|---|
voxelWrapper | The voxelization for the SDF. |
void generateManhattanDistanceSDF(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& gridName)
Generates a signed distance field using manhattan distance as a distance metric.
Parameters | |
---|---|
voxelWrapper | The voxelization for the SDF. |
gridName | The name underwhich to register the newly created manhattan SDF. |
void generateEuclideanDistanceSDF(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& gridName)
Generates a signed distance field using euclidean distance as a distance metric. Also created a "ClosestBoundaryCell" vector3 grid which holds the index of the closest Boundary grid.
Parameters | |
---|---|
voxelWrapper | The voxelization for the SDF. |
gridName | The name underwhich to register the newly created euclidean SDF. |
void generateScalarGradientField(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& scalarGridName,
const std:: string& gradientGridName)
Generates a Vector3 field where each vector of a cell is the gradient of how the scalar field changes.
Parameters | |
---|---|
voxelWrapper | The voxelization for the gradient field. |
scalarGridName | The name of the scalar field for which the gradient will be generated. |
gradientGridName | The name underwhich to register the newly created scalar gradient field. |
template<typename T>
void generateScalarGradientField(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& scalarGridName,
const std:: string& gradientGridName)
Generates a Vector3 field where each vector of a cell is the gradient of how the scalar field changes.
Parameters | |
---|---|
voxelWrapper | The voxelization for the gradient field. |
scalarGridName | The name of the scalar field for which the gradient will be generated. |
gradientGridName | The name underwhich to register the newly created scalar gradient field. |
std:: vector<Mn:: Vector3i> getVoxelSetFromBoolGrid(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& boolGridName)
Returns a vector of all filled/true voxels.
Parameters | |
---|---|
voxelWrapper | The voxelization. |
boolGridName | The name of the boolean grid to be processed. |
Returns | A vector of Vector3i's |
std:: vector<Mn:: Vector3i> getVoxelSetFromIntGrid(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& intGridName,
int lb,
int ub)
Fills a vector with voxel indices that meet some criteria.
Parameters | |
---|---|
voxelWrapper | The voxelization. |
intGridName | The name of the int grid to be processed. |
lb | The lower bound of voxel values to include. |
ub | The uppper bound of voxel values to include |
Returns | A vector of Vector3i's |
std:: vector<Mn:: Vector3i> getVoxelSetFromFloatGrid(std:: shared_ptr<esp:: geo:: VoxelWrapper>& voxelWrapper,
const std:: string& floatGridName,
float lb,
float ub)
Fills a vector with voxel indices that meet some criteria.
Parameters | |
---|---|
voxelWrapper | The voxelization. |
floatGridName | The name of the float grid to be processed. |
lb | The lower bound of voxel values to include. |
ub | The uppper bound of voxel values to include |
Returns | A vector of Vector3i's |