101 const VdbVolume& volume_;
103 SimpleVolumeMinMax volumePart_;
109 std::array<VoxelBitSet, size_t(
SeedType::Count )> seedsInVolumePartSpace_;
111 bool seedsChanged_{
true};
113 void setupVolumePart_(
int voxelsExpansion );
#define MRVOXELS_API
Definition MRVoxelsFwd.h:13
Class for voxels segmentation.
Definition MRVolumeSegment.h:66
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::Mesh > createMeshFromSegmentation(const VoxelBitSet &segmentation) const
Returns mesh of given segment.
MRVOXELS_API const Vector3i & getMinVoxel() const
Min voxel of volume part box in whole volume space, filled after segmentation.
MRVOXELS_API const Vector3i & getVolumePartDimensions() const
Dimensions of volume part, filled after segmentation.
MRVOXELS_API void addSeeds(const std::vector< Vector3i > &seeds, SeedType seedType)
Adds new seeds to stored.
SeedType
Definition MRVolumeSegment.h:71
@ Inside
Definition MRVolumeSegment.h:72
@ Count
Definition MRVolumeSegment.h:74
@ Outside
Definition MRVolumeSegment.h:73
MRVOXELS_API void setSeeds(const std::vector< Vector3i > &seeds, SeedType seedType)
Reset seeds with given ones.
MRVOXELS_API VolumeSegmenter(const VdbVolume &volume)
MRVOXELS_API const std::vector< Vector3i > & getSeeds(SeedType seedType) const
Return currently stored seeds.
MRVOXELS_API void addPathSeeds(const VoxelMetricParameters &metricParameters, SeedType seedType, float exponentModifier=-1.0f)
Builds path with given parameters, marks result as seedType seeds.
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
MRVOXELS_API Expected< MR::Mesh > meshFromVoxelsMask(const VdbVolume &volume, const VoxelBitSet &mask)
Creates mesh from voxels mask.
MRVOXELS_API Expected< MR::Mesh > segmentVolume(const VdbVolume &volume, const std::vector< std::pair< Vector3f, Vector3f > > &pairs, const VolumeSegmentationParameters ¶ms=VolumeSegmentationParameters())
Simple segment volume.
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Parameters for volume segmentation.
Definition MRVolumeSegment.h:34
int voxelsExpansion
Segment box expansion (only part of volume are segmented, this parameter shows how much to expand thi...
Definition MRVolumeSegment.h:40
float segmentationExponentModifier
Exponent modifier of graph cutting metric (volume presents graph with seeds, this graph are min cut)
Definition MRVolumeSegment.h:38
float buildPathExponentModifier
Exponent modifier of path building metric (paths are built between voxel pairs and then marked as too...
Definition MRVolumeSegment.h:36
Parameters for building metric function.
Definition MRVoxelPath.h:38