MeshLib C Docs
Loading...
Searching...
No Matches
MRVoxelsSave.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
6
7#include <stddef.h>
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_FloatGrid MR_FloatGrid; // Defined in `#include <MRCVoxels/MRFloatGrid.h>`.
15typedef struct MR_Object MR_Object; // Defined in `#include <MRCMesh/MRObject.h>`.
16typedef struct MR_SimpleVolume MR_SimpleVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
17typedef struct MR_SimpleVolumeMinMax MR_SimpleVolumeMinMax; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
18typedef struct MR_VdbVolume MR_VdbVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
19typedef struct MR_Vector3i MR_Vector3i; // Defined in `#include <MRCMesh/MRVector3.h>`.
20typedef struct MR_expected_void_std_string MR_expected_void_std_string; // Defined in `#include <MRCMisc/expected_void_std_string.h>`.
21typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
22typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
23typedef struct MR_std_ostream MR_std_ostream; // Defined in `#include <MRCMisc/iostream.h>`.
24typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
25
26
27// stores together all data for save voxel object as a group of images
30
37MRC_API MR_expected_void_std_string *MR_VoxelsSave_toRawAutoname_MR_VdbVolume(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
38
44MRC_API MR_expected_void_std_string *MR_VoxelsSave_toRawAutoname_MR_SimpleVolume(const MR_SimpleVolume *simpleVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
45
52MRC_API MR_expected_void_std_string *MR_VoxelsSave_gridToRawAutoname(const MR_FloatGrid *grid, const MR_Vector3i *dims, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
53
62
69
76
84
91
98
105
112
119
126MRC_API MR_expected_void_std_string *MR_VoxelsSave_gridToVdb_std_filesystem_path(const MR_FloatGrid *grid, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
127
134
140MRC_API MR_expected_void_std_string *MR_VoxelsSave_toVdb(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
141
149MRC_API MR_expected_void_std_string *MR_VoxelsSave_gridToAnySupportedFormat(const MR_FloatGrid *grid, const MR_Vector3i *dims, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
150
156MRC_API MR_expected_void_std_string *MR_VoxelsSave_toAnySupportedFormat(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
157
165MRC_API MR_expected_void_std_string *MR_VoxelsSave_saveSliceToImage(const char *path, const char *path_end, const MR_VdbVolume *vdbVolume, const MR_SlicePlane *slicePlain, int32_t sliceNumber, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
166
167// path to directory where you want to save images
172
173// path to directory where you want to save images
177MRC_API void MR_VoxelsSave_SavingSettings_Set_path(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end);
178
179// path to directory where you want to save images
184
185// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
190
191// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
196MRC_API void MR_VoxelsSave_SavingSettings_Set_format(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end);
197
198// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
203
204// Plane which the object is sliced by. XY, XZ, or YZ
209
210// Plane which the object is sliced by. XY, XZ, or YZ
214
215// Plane which the object is sliced by. XY, XZ, or YZ
220
221// Callback reporting progress
226
227// Callback reporting progress
231
232// Callback reporting progress
237
241
246
252MRC_API MR_VoxelsSave_SavingSettings *MR_VoxelsSave_SavingSettings_ConstructFrom(const char *path, const char *path_end, const char *format, const char *format_end, MR_SlicePlane slicePlane, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb);
253
256
259
263
266
269
274
281
288MRC_API MR_expected_void_std_string *MR_saveObjectVoxelsToFile(const MR_Object *object, const char *path, const char *path_end, const MR_std_function_bool_from_float *callback);
289
290#ifdef __cplusplus
291} // extern "C"
292#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_VdbVolume MR_VdbVolume
Definition MRBox.h:19
struct MR_SimpleVolumeMinMax MR_SimpleVolumeMinMax
Definition MRBox.h:17
struct MR_expected_void_std_string MR_expected_void_std_string
Definition MRCtm.h:20
struct MR_std_ostream MR_std_ostream
Definition MRCtm.h:22
struct MR_std_string MR_std_string
Definition MRE57.h:22
struct MR_Object MR_Object
Definition MRGltf.h:10
struct MR_std_filesystem_path MR_std_filesystem_path
Definition MRSceneRoot.h:15
MR_SlicePlane
Plane of slice in which to find path.
Definition MRVoxelPath.h:31
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_ConstructFromAnother(MR_PassBy _other_pass_by, MR_VoxelsSave_SavingSettings *_other)
MRC_API void MR_VoxelsSave_SavingSettings_Set_path(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_gridToRawAutoname(const MR_FloatGrid *grid, const MR_Vector3i *dims, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_gridToVdb_std_ostream(const MR_FloatGrid *grid, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_string * MR_VoxelsSave_SavingSettings_GetMutable_format(MR_VoxelsSave_SavingSettings *_this)
MRC_API void MR_VoxelsSave_SavingSettings_DestroyArray(const MR_VoxelsSave_SavingSettings *_this)
Destroys a heap-allocated array of MR_VoxelsSave_SavingSettings. Does nothing if the pointer is null.
MRC_API MR_SlicePlane * MR_VoxelsSave_SavingSettings_GetMutable_slicePlane(MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toAnySupportedFormat(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_saveSliceToImage(const char *path, const char *path_end, const MR_VdbVolume *vdbVolume, const MR_SlicePlane *slicePlain, int32_t sliceNumber, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toRawFloat_MR_VdbVolume(const MR_VdbVolume *vdbVolume, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
struct MR_VoxelsSave_SavingSettings MR_VoxelsSave_SavingSettings
Generated from class MR::VoxelsSave::SavingSettings.
Definition MRVoxelsSave.h:29
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_OffsetMutablePtr(MR_VoxelsSave_SavingSettings *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_std_filesystem_path * MR_VoxelsSave_SavingSettings_GetMutable_path(MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_gridToVdb_std_filesystem_path(const MR_FloatGrid *grid, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API const MR_std_string * MR_VoxelsSave_SavingSettings_Get_format(const MR_VoxelsSave_SavingSettings *_this)
MRC_API const MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_OffsetPtr(const MR_VoxelsSave_SavingSettings *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 void MR_VoxelsSave_SavingSettings_Set_format(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toRawAutoname_MR_SimpleVolume(const MR_SimpleVolume *simpleVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API void MR_VoxelsSave_SavingSettings_Set_slicePlane(MR_VoxelsSave_SavingSettings *_this, MR_SlicePlane value)
MRC_API void MR_VoxelsSave_SavingSettings_Destroy(const MR_VoxelsSave_SavingSettings *_this)
Destroys a heap-allocated instance of MR_VoxelsSave_SavingSettings. Does nothing if the pointer is nu...
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toRawAutoname_MR_VdbVolume(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_saveAllSlicesToImage(const MR_VdbVolume *vdbVolume, const MR_VoxelsSave_SavingSettings *settings)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_SimpleVolumeMinMax_ref_std_filesystem_path(const MR_SimpleVolumeMinMax *simpleVolumeMinMax, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_ConstructFrom(const char *path, const char *path_end, const char *format, const char *format_end, MR_SlicePlane slicePlane, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_AssignFromAnother(MR_VoxelsSave_SavingSettings *_this, MR_PassBy _other_pass_by, MR_VoxelsSave_SavingSettings *_other)
MRC_API const MR_std_filesystem_path * MR_VoxelsSave_SavingSettings_Get_path(const MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_SimpleVolumeMinMax_ref_std_ostream(const MR_SimpleVolumeMinMax *simpleVolumeMinMax, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toVdb(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_SimpleVolume_ref_std_filesystem_path(const MR_SimpleVolume *simpleVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_saveObjectVoxelsToFile(const MR_Object *object, const char *path, const char *path_end, const MR_std_function_bool_from_float *callback)
MRC_API MR_VoxelsSave_SavingSettings * MR_VoxelsSave_SavingSettings_DefaultConstruct(void)
MRC_API MR_std_function_bool_from_float * MR_VoxelsSave_SavingSettings_GetMutable_cb(MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_SimpleVolume_ref_std_ostream(const MR_SimpleVolume *simpleVolume, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API const MR_std_function_bool_from_float * MR_VoxelsSave_SavingSettings_Get_cb(const MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_VdbVolume_ref_std_filesystem_path(const MR_VdbVolume *vdbVolume, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_gridToAnySupportedFormat(const MR_FloatGrid *grid, const MR_Vector3i *dims, const char *file, const char *file_end, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toGav_const_MR_VdbVolume_ref_std_ostream(const MR_VdbVolume *vdbVolume, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_gridToRawFloat(const MR_FloatGrid *grid, const MR_Vector3i *dims, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API const MR_SlicePlane * MR_VoxelsSave_SavingSettings_Get_slicePlane(const MR_VoxelsSave_SavingSettings *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toRawFloat_MR_SimpleVolume(const MR_SimpleVolume *simpleVolume, MR_std_ostream *out, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API void MR_VoxelsSave_SavingSettings_Set_cb(MR_VoxelsSave_SavingSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
MR_PassBy
Definition common.h:19
struct MR_FloatGrid MR_FloatGrid
Definition expected_MR_FloatGrid_std_string.h:12
struct MR_SimpleVolume MR_SimpleVolume
Definition expected_MR_SimpleVolume_std_string.h:12
#define MRC_API
Definition exports.h:11
const Vector3i & dims() const
Definition MRVector3.h:33