MeshLib Documentation
Loading...
Searching...
No Matches
MR::VolumeSegmenter Class Reference

Class for voxels segmentation. More...

#include <MRVolumeSegment.h>

Public Types

enum  SeedType { Inside , Outside , Count }
 

Public Member Functions

MRVOXELS_API VolumeSegmenter (const VdbVolume &volume)
 
MRVOXELS_API void addPathSeeds (const VoxelMetricParameters &metricParameters, SeedType seedType, float exponentModifier=-1.0f)
 Builds path with given parameters, marks result as seedType seeds.
 
MRVOXELS_API void setSeeds (const std::vector< Vector3i > &seeds, SeedType seedType)
 Reset seeds with given ones.
 
MRVOXELS_API void addSeeds (const std::vector< Vector3i > &seeds, SeedType seedType)
 Adds new seeds to stored.
 
MRVOXELS_API const std::vector< Vector3i > & getSeeds (SeedType seedType) const
 Return currently stored seeds.
 
MRVOXELS_API Expected< VoxelBitSet > segmentVolume (float segmentationExponentModifier=3000.0f, int voxelsExpansion=25, ProgressCallback cb={})
 Segments volume, return inside part segmentation (VoxelBitSet in space of VolumePart)
 
MRVOXELS_API Expected< MR::MeshcreateMeshFromSegmentation (const VoxelBitSet &segmentation) const
 Returns mesh of given segment.
 
MRVOXELS_API const Vector3i & getVolumePartDimensions () const
 Dimensions of volume part, filled after segmentation.
 
MRVOXELS_API const Vector3i & getMinVoxel () const
 Min voxel of volume part box in whole volume space, filled after segmentation.
 

Detailed Description

Class for voxels segmentation.

Before (a)
Before (b)
After

Member Enumeration Documentation

◆ SeedType

Enumerator
Inside 
Outside 
Count 

Constructor & Destructor Documentation

◆ VolumeSegmenter()

MRVOXELS_API MR::VolumeSegmenter::VolumeSegmenter ( const VdbVolume & volume)

Member Function Documentation

◆ addPathSeeds()

MRVOXELS_API void MR::VolumeSegmenter::addPathSeeds ( const VoxelMetricParameters & metricParameters,
SeedType seedType,
float exponentModifier = -1.0f )

Builds path with given parameters, marks result as seedType seeds.

◆ addSeeds()

MRVOXELS_API void MR::VolumeSegmenter::addSeeds ( const std::vector< Vector3i > & seeds,
SeedType seedType )

Adds new seeds to stored.

◆ createMeshFromSegmentation()

MRVOXELS_API Expected< MR::Mesh > MR::VolumeSegmenter::createMeshFromSegmentation ( const VoxelBitSet & segmentation) const

Returns mesh of given segment.

◆ getMinVoxel()

MRVOXELS_API const Vector3i & MR::VolumeSegmenter::getMinVoxel ( ) const

Min voxel of volume part box in whole volume space, filled after segmentation.

◆ getSeeds()

MRVOXELS_API const std::vector< Vector3i > & MR::VolumeSegmenter::getSeeds ( SeedType seedType) const

Return currently stored seeds.

◆ getVolumePartDimensions()

MRVOXELS_API const Vector3i & MR::VolumeSegmenter::getVolumePartDimensions ( ) const

Dimensions of volume part, filled after segmentation.

◆ segmentVolume()

MRVOXELS_API Expected< VoxelBitSet > MR::VolumeSegmenter::segmentVolume ( float segmentationExponentModifier = 3000.0f,
int voxelsExpansion = 25,
ProgressCallback cb = {} )

Segments volume, return inside part segmentation (VoxelBitSet in space of VolumePart)

◆ setSeeds()

MRVOXELS_API void MR::VolumeSegmenter::setSeeds ( const std::vector< Vector3i > & seeds,
SeedType seedType )

Reset seeds with given ones.


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