MeshLib C Docs
Loading...
Searching...
No Matches
MRVolumeSegment.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stddef.h>
7#include <stdint.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_VdbVolume MR_VdbVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
14typedef struct MR_Vector3i MR_Vector3i; // Defined in `#include <MRCMesh/MRVector3.h>`.
15typedef struct MR_VoxelBitSet MR_VoxelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_VoxelMetricParameters MR_VoxelMetricParameters; // Defined in `#include <MRCVoxels/MRVoxelPath.h>`.
17typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
18typedef struct MR_expected_MR_VoxelBitSet_std_string MR_expected_MR_VoxelBitSet_std_string; // Defined in `#include <MRCMisc/expected_MR_VoxelBitSet_std_string.h>`.
19typedef struct MR_expected_std_vector_MR_Mesh_std_string MR_expected_std_vector_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_std_vector_MR_Mesh_std_string.h>`.
20typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
21typedef struct MR_std_vector_MR_Vector3i MR_std_vector_MR_Vector3i; // Defined in `#include <MRCMisc/std_vector_MR_Vector3i.h>`.
22typedef struct MR_std_vector_std_pair_MR_Vector3f_MR_Vector3f MR_std_vector_std_pair_MR_Vector3f_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_std_pair_MR_Vector3f_MR_Vector3f.h>`.
23
24
32
44
51
62
68
73
79
85
90
96
102
107
113
117
122
125MRC_API MR_VolumeSegmentationParameters *MR_VolumeSegmentationParameters_ConstructFrom(float buildPathExponentModifier, float segmentationExponentModifier, int32_t voxelsExpansion);
126
129
132
137
140
143
149
165
169
172
175
180
183
186
192MRC_API void MR_VolumeSegmenter_addPathSeeds(MR_VolumeSegmenter *_this, const MR_VoxelMetricParameters *metricParameters, MR_VolumeSegmenter_SeedType seedType, const float *exponentModifier);
193
199
205
211
219MRC_API MR_expected_MR_VoxelBitSet_std_string *MR_VolumeSegmenter_segmentVolume(MR_VolumeSegmenter *_this, const float *segmentationExponentModifier, const int32_t *voxelsExpansion, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb);
220
227
233
239
248
249#ifdef __cplusplus
250} // extern "C"
251#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_VoxelBitSet MR_VoxelBitSet
Definition MRBitSet.h:103
struct MR_VdbVolume MR_VdbVolume
Definition MRBox.h:19
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:18
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_AssignFromAnother(MR_VolumeSegmentationParameters *_this, const MR_VolumeSegmentationParameters *_other)
MRC_API int32_t * MR_VolumeSegmentationParameters_GetMutable_voxelsExpansion(MR_VolumeSegmentationParameters *_this)
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_OffsetMutablePtr(MR_VolumeSegmentationParameters *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_VoxelMetricParameters MR_VoxelMetricParameters
Definition MRVolumeSegment.h:16
MRC_API MR_expected_MR_VoxelBitSet_std_string * MR_VolumeSegmenter_segmentVolume(MR_VolumeSegmenter *_this, const float *segmentationExponentModifier, const int32_t *voxelsExpansion, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API const MR_VolumeSegmenter * MR_VolumeSegmenter_OffsetPtr(const MR_VolumeSegmenter *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_ConstructFrom(float buildPathExponentModifier, float segmentationExponentModifier, int32_t voxelsExpansion)
MRC_API float * MR_VolumeSegmentationParameters_GetMutable_buildPathExponentModifier(MR_VolumeSegmentationParameters *_this)
MRC_API void MR_VolumeSegmenter_DestroyArray(const MR_VolumeSegmenter *_this)
Destroys a heap-allocated array of MR_VolumeSegmenter. Does nothing if the pointer is null.
MRC_API const float * MR_VolumeSegmentationParameters_Get_buildPathExponentModifier(const MR_VolumeSegmentationParameters *_this)
struct MR_VolumeSegmenter MR_VolumeSegmenter
Class for voxels segmentation.
Definition MRVolumeSegment.h:43
MRC_API void MR_VolumeSegmentationParameters_Set_buildPathExponentModifier(MR_VolumeSegmentationParameters *_this, float value)
MRC_API const MR_Vector3i * MR_VolumeSegmenter_getMinVoxel(const MR_VolumeSegmenter *_this)
MRC_API float * MR_VolumeSegmentationParameters_GetMutable_segmentationExponentModifier(MR_VolumeSegmentationParameters *_this)
struct MR_VolumeSegmentationParameters MR_VolumeSegmentationParameters
Parameters for volume segmentation.
Definition MRVolumeSegment.h:31
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_DefaultConstructArray(size_t num_elems)
MRC_API void MR_VolumeSegmenter_Destroy(const MR_VolumeSegmenter *_this)
Destroys a heap-allocated instance of MR_VolumeSegmenter. Does nothing if the pointer is null.
MRC_API void MR_VolumeSegmentationParameters_Set_voxelsExpansion(MR_VolumeSegmentationParameters *_this, int32_t value)
MRC_API const MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_OffsetPtr(const MR_VolumeSegmentationParameters *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_expected_MR_Mesh_std_string * MR_VolumeSegmenter_createMeshFromSegmentation(const MR_VolumeSegmenter *_this, const MR_VoxelBitSet *segmentation)
MRC_API void MR_VolumeSegmenter_addSeeds(MR_VolumeSegmenter *_this, const MR_std_vector_MR_Vector3i *seeds, MR_VolumeSegmenter_SeedType seedType)
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_ConstructFromAnother(const MR_VolumeSegmentationParameters *_other)
MRC_API void MR_VolumeSegmentationParameters_DestroyArray(const MR_VolumeSegmentationParameters *_this)
Destroys a heap-allocated array of MR_VolumeSegmentationParameters. Does nothing if the pointer is nu...
MRC_API void MR_VolumeSegmentationParameters_Set_segmentationExponentModifier(MR_VolumeSegmentationParameters *_this, float value)
MR_VolumeSegmenter_SeedType
Definition MRVolumeSegment.h:46
@ MR_VolumeSegmenter_SeedType_Inside
Definition MRVolumeSegment.h:47
@ MR_VolumeSegmenter_SeedType_Count
Definition MRVolumeSegment.h:49
@ MR_VolumeSegmenter_SeedType_Outside
Definition MRVolumeSegment.h:48
MRC_API MR_expected_MR_Mesh_std_string * MR_segmentVolume(const MR_VdbVolume *volume, const MR_std_vector_std_pair_MR_Vector3f_MR_Vector3f *pairs, const MR_VolumeSegmentationParameters *params)
Simple segment volume.
MRC_API void MR_VolumeSegmenter_addPathSeeds(MR_VolumeSegmenter *_this, const MR_VoxelMetricParameters *metricParameters, MR_VolumeSegmenter_SeedType seedType, const float *exponentModifier)
MRC_API MR_VolumeSegmentationParameters * MR_VolumeSegmentationParameters_DefaultConstruct(void)
MRC_API const int32_t * MR_VolumeSegmentationParameters_Get_voxelsExpansion(const MR_VolumeSegmentationParameters *_this)
MRC_API MR_expected_MR_Mesh_std_string * MR_meshFromVoxelsMask(const MR_VdbVolume *volume, const MR_VoxelBitSet *mask)
Creates mesh from voxels mask.
MRC_API MR_expected_std_vector_MR_Mesh_std_string * MR_segmentVoxelMaskToInstances(const MR_VdbVolume *mask, const MR_uint64_t *minSize, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API void MR_VolumeSegmentationParameters_Destroy(const MR_VolumeSegmentationParameters *_this)
Destroys a heap-allocated instance of MR_VolumeSegmentationParameters. Does nothing if the pointer is...
MRC_API MR_VolumeSegmenter * MR_VolumeSegmenter_OffsetMutablePtr(MR_VolumeSegmenter *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const float * MR_VolumeSegmentationParameters_Get_segmentationExponentModifier(const MR_VolumeSegmentationParameters *_this)
MRC_API const MR_Vector3i * MR_VolumeSegmenter_getVolumePartDimensions(const MR_VolumeSegmenter *_this)
MRC_API const MR_std_vector_MR_Vector3i * MR_VolumeSegmenter_getSeeds(const MR_VolumeSegmenter *_this, MR_VolumeSegmenter_SeedType seedType)
MRC_API void MR_VolumeSegmenter_setSeeds(MR_VolumeSegmenter *_this, const MR_std_vector_MR_Vector3i *seeds, MR_VolumeSegmenter_SeedType seedType)
MRC_API MR_VolumeSegmenter * MR_VolumeSegmenter_Construct(const MR_VdbVolume *volume)
MRC_API MR_VolumeSegmenter * MR_VolumeSegmenter_ConstructFromAnother(MR_PassBy _other_pass_by, MR_VolumeSegmenter *_other)
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
struct MR_expected_MR_VoxelBitSet_std_string MR_expected_MR_VoxelBitSet_std_string
Definition expected_MR_VoxelBitSet_std_string.h:18
struct MR_expected_std_vector_MR_Mesh_std_string MR_expected_std_vector_MR_Mesh_std_string
Definition expected_std_vector_MR_Mesh_std_string.h:18
#define MRC_API
Definition exports.h:11
struct MR_std_vector_MR_Vector3i MR_std_vector_MR_Vector3i
Definition std_vector_MR_Vector3i.h:17
struct MR_std_vector_std_pair_MR_Vector3f_MR_Vector3f MR_std_vector_std_pair_MR_Vector3f_MR_Vector3f
Definition std_vector_std_pair_MR_Vector3f_MR_Vector3f.h:18
Definition MRVector3.h:33