MeshLib C Docs
Loading...
Searching...
No Matches
MRVoxelGraphCut.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>

Go to the source code of this file.

Typedefs

typedef struct MR_SimpleVolume MR_SimpleVolume
 
typedef struct MR_VoxelBitSet MR_VoxelBitSet
 
typedef struct MR_expected_MR_VoxelBitSet_std_string MR_expected_MR_VoxelBitSet_std_string
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 

Functions

MRC_API MR_expected_MR_VoxelBitSet_std_stringMR_segmentVolumeByGraphCut (const MR_SimpleVolume *densityVolume, float k, const MR_VoxelBitSet *sourceSeeds, const MR_VoxelBitSet *sinkSeeds, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 Segment voxels of given volume on two sets using graph-cut, returning source set.
 

Typedef Documentation

◆ MR_expected_MR_VoxelBitSet_std_string

◆ MR_SimpleVolume

◆ MR_std_function_bool_from_float

◆ MR_VoxelBitSet

Function Documentation

◆ MR_segmentVolumeByGraphCut()

MRC_API MR_expected_MR_VoxelBitSet_std_string * MR_segmentVolumeByGraphCut ( const MR_SimpleVolume * densityVolume,
float k,
const MR_VoxelBitSet * sourceSeeds,
const MR_VoxelBitSet * sinkSeeds,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

Segment voxels of given volume on two sets using graph-cut, returning source set.

Parameters
k- coefficient in the exponent of the metric affecting edge capacity:
increasing k you force to find a higher steps in the density on the boundary, decreasing k you ask for smoother boundary
sourceSeeds- these voxels will be included in the result
sinkSeeds- these voxels will be excluded from the result
See also
VolumeSegmenter Generated from function MR::segmentVolumeByGraphCut. Parameter densityVolume can not be null. It is a single object. Parameter sourceSeeds can not be null. It is a single object. Parameter sinkSeeds can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_VoxelBitSet_std_string_Destroy() to free it when you're done using it.