3#ifndef MRMESH_NO_OPENVDB
101 const VdbVolume& volume_;
103 SimpleVolume volumePart_;
109 std::array<VoxelBitSet, size_t(
SeedType::Count )> seedsInVolumePartSpace_;
111 bool seedsChanged_{
true};
113 void setupVolumePart_(
int voxelsExpansion );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Class for voxels segmentation.
Definition MRVolumeSegment.h:66
MRMESH_API const Vector3i & getVolumePartDimensions() const
Dimensions of volume part, filled after segmentation.
MRMESH_API VolumeSegmenter(const VdbVolume &volume)
MRMESH_API void addSeeds(const std::vector< Vector3i > &seeds, SeedType seedType)
Adds new seeds to stored.
MRMESH_API void setSeeds(const std::vector< Vector3i > &seeds, SeedType seedType)
Reset seeds with given ones.
MRMESH_API const std::vector< Vector3i > & getSeeds(SeedType seedType) const
Return currently stored seeds.
SeedType
Definition MRVolumeSegment.h:71
@ Inside
Definition MRVolumeSegment.h:72
@ Count
Definition MRVolumeSegment.h:74
@ Outside
Definition MRVolumeSegment.h:73
MRMESH_API void addPathSeeds(const VoxelMetricParameters &metricParameters, SeedType seedType, float exponentModifier=-1.0f)
Builds path with given parameters, marks result as seedType seeds.
MRMESH_API Expected< MR::Mesh > createMeshFromSegmentation(const VoxelBitSet &segmentation) const
Returns mesh of given segment.
MRMESH_API const Vector3i & getMinVoxel() const
Min voxel of volume part box in whole volume space, filled after segmentation.
MRMESH_API Expected< VoxelBitSet > segmentVolume(float segmentationExponentModifier=3000.0f, int voxelsExpansion=25, ProgressCallback cb={})
Segments volume, return inside part segmentation (VoxelBitSet in space of VolumePart)
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:589
MRMESH_API Expected< MR::Mesh > meshFromVoxelsMask(const VdbVolume &volume, const VoxelBitSet &mask)
Creates mesh from voxels mask.
MRMESH_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:7
tl::expected< T, E > Expected
Definition MRExpected.h:49
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