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
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_FloatGrid MR_FloatGrid; // Defined in `#include <MRCVoxels/MRFloatGrid.h>`.
14typedef struct MR_Object MR_Object; // Defined in `#include <MRCMesh/MRObject.h>`.
15typedef struct MR_SimpleVolume MR_SimpleVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
16typedef struct MR_SimpleVolumeMinMax MR_SimpleVolumeMinMax; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
17typedef struct MR_VdbVolume MR_VdbVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
18typedef struct MR_Vector3i MR_Vector3i; // Defined in `#include <MRCMesh/MRVector3.h>`.
19typedef struct MR_expected_void_std_string MR_expected_void_std_string; // Defined in `#include <MRCMisc/expected_void_std_string.h>`.
20typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
21typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
22typedef struct MR_std_ostream MR_std_ostream; // Defined in `#include <MRCMisc/iostream.h>`.
23typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
24
25
26// stores together all data for save voxel object as a group of images
29
36MRC_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);
37
43MRC_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);
44
51MRC_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);
52
61
68
75
83
90
97
104
111
118
125MRC_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);
126
133
139MRC_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);
140
148MRC_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);
149
155MRC_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);
156
164MRC_API MR_expected_void_std_string *MR_VoxelsSave_saveSliceToImage(const char *path, const char *path_end, const MR_VdbVolume *vdbVolume, const MR_SlicePlane *slicePlain, int sliceNumber, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
165
166// path to directory where you want to save images
171
172// path to directory where you want to save images
176MRC_API void MR_VoxelsSave_SavingSettings_Set_path(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end);
177
178// path to directory where you want to save images
183
184// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
189
190// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
195MRC_API void MR_VoxelsSave_SavingSettings_Set_format(MR_VoxelsSave_SavingSettings *_this, const char *value, const char *value_end);
196
197// format for file names, you should specify a placeholder for number and extension, eg "slice_{0:0{1}}.tif"
202
203// Plane which the object is sliced by. XY, XZ, or YZ
208
209// Plane which the object is sliced by. XY, XZ, or YZ
213
214// Plane which the object is sliced by. XY, XZ, or YZ
219
220// Callback reporting progress
225
226// Callback reporting progress
230
231// Callback reporting progress
236
240
245
251MRC_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);
252
255
258
262
265
268
273
280
287MRC_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);
288
289#ifdef __cplusplus
290} // extern "C"
291#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:18
struct MR_SimpleVolumeMinMax MR_SimpleVolumeMinMax
Definition MRBox.h:16
struct MR_expected_void_std_string MR_expected_void_std_string
Definition MRCtm.h:19
struct MR_std_ostream MR_std_ostream
Definition MRCtm.h:21
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_expected_void_std_string * MR_VoxelsSave_saveSliceToImage(const char *path, const char *path_end, const MR_VdbVolume *vdbVolume, const MR_SlicePlane *slicePlain, int sliceNumber, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
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_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:28
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:32