MeshLib C Docs
Loading...
Searching...
No Matches
MRDicom.h
Go to the documentation of this file.
1#pragma once
2
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_SimpleVolumeMinMax MR_SimpleVolumeMinMax; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
16typedef struct MR_SimpleVolumeU16 MR_SimpleVolumeU16; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
17typedef struct MR_VdbVolume MR_VdbVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
18typedef struct MR_expected_MR_LoadedObjects_std_string MR_expected_MR_LoadedObjects_std_string; // Defined in `#include <MRCMisc/expected_MR_LoadedObjects_std_string.h>`.
19typedef struct MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string; // Defined in `#include <MRCMisc/expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string.h>`.
20typedef struct MR_expected_MR_VoxelsLoad_DicomVolume_std_string MR_expected_MR_VoxelsLoad_DicomVolume_std_string; // Defined in `#include <MRCMisc/expected_MR_VoxelsLoad_DicomVolume_std_string.h>`.
21typedef struct MR_expected_std_shared_ptr_MR_ObjectVoxels_std_string MR_expected_std_shared_ptr_MR_ObjectVoxels_std_string; // Defined in `#include <MRCMisc/expected_std_shared_ptr_MR_ObjectVoxels_std_string.h>`.
22typedef struct MR_expected_void_std_string MR_expected_void_std_string; // Defined in `#include <MRCMisc/expected_void_std_string.h>`.
23typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
24typedef struct MR_std_optional_MR_Box1f MR_std_optional_MR_Box1f; // Defined in `#include <MRCMisc/std_optional_MR_Box1f.h>`.
25typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
26typedef struct MR_std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string MR_std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string; // Defined in `#include <MRCMisc/std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string.h>`.
27typedef struct MR_std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string MR_std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string; // Defined in `#include <MRCMisc/std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string.h>`.
28typedef struct MR_std_vector_std_filesystem_path MR_std_vector_std_filesystem_path; // Defined in `#include <MRCMisc/std_vector_std_filesystem_path.h>`.
29
30
33
36
38enum // MR_VoxelsLoad_DicomStatusEnum
39{
40 // valid DICOM and we can open it
42 // not a valid DICOM
44 // a valid DICOM, but we do not support it (e.g. some MediaStorages)
46};
47
50
55
59
64
69
74MRC_API void MR_VoxelsLoad_DicomVolume_Set_name(MR_VoxelsLoad_DicomVolume *_this, const char *value, const char *value_end);
75
80
85
89
94
98
103
109
112
115
119
122
125
130
135
139
144
149
154MRC_API void MR_VoxelsLoad_DicomVolumeAsVdb_Set_name(MR_VoxelsLoad_DicomVolumeAsVdb *_this, const char *value, const char *value_end);
155
160
165
169
174
178
183
189
192
195
199
202
205
210
215
219
224
225// if status is Unsupported, specify reason why
230
231// if status is Unsupported, specify reason why
236MRC_API void MR_VoxelsLoad_DicomStatus_Set_reason(MR_VoxelsLoad_DicomStatus *_this, const char *value, const char *value_end);
237
238// if status is Unsupported, specify reason why
243
247
250
253
254// implicit by design
261
264
267
271
276
280
287MRC_API MR_VoxelsLoad_DicomStatus *MR_VoxelsLoad_isDicomFile(const char *path, const char *path_end, MR_std_string *seriesUid);
288
292MRC_API bool MR_VoxelsLoad_isDicomFolder(const char *dirPath, const char *dirPath_end);
293
299
307
315
322MRC_API MR_expected_MR_VoxelsLoad_DicomVolume_std_string *MR_VoxelsLoad_loadDicomFolder(const char *path, const char *path_end, uint32_t maxNumThreads, const MR_std_function_bool_from_float *cb);
323
331
339
347
356
364
372
379MRC_API MR_expected_void_std_string *MR_VoxelsSave_toDicom(const MR_VdbVolume *vdbVolume, const char *path, const char *path_end, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb);
380
392
393#ifdef __cplusplus
394} // extern "C"
395#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
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_ConstructFromAnother(MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomVolume *_other)
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_DefaultConstruct(void)
MRC_API const MR_std_string * MR_VoxelsLoad_DicomVolume_Get_name(const MR_VoxelsLoad_DicomVolume *_this)
MRC_API MR_VdbVolume * MR_VoxelsLoad_DicomVolumeAsVdb_GetMutable_vol(MR_VoxelsLoad_DicomVolumeAsVdb *_this)
MRC_API const MR_VoxelsLoad_DicomStatusEnum * MR_VoxelsLoad_DicomStatus_Get_status(const MR_VoxelsLoad_DicomStatus *_this)
MRC_API void MR_VoxelsLoad_DicomVolumeAsVdb_Set_name(MR_VoxelsLoad_DicomVolumeAsVdb *_this, const char *value, const char *value_end)
MRC_API const MR_AffineXf3f * MR_VoxelsLoad_DicomVolumeAsVdb_Get_xf(const MR_VoxelsLoad_DicomVolumeAsVdb *_this)
MRC_API MR_std_string * MR_VoxelsLoad_DicomVolume_GetMutable_name(MR_VoxelsLoad_DicomVolume *_this)
MRC_API const MR_VdbVolume * MR_VoxelsLoad_DicomVolumeAsVdb_Get_vol(const MR_VoxelsLoad_DicomVolumeAsVdb *_this)
MRC_API MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string * MR_VoxelsLoad_loadDicomFileAsVdb(const char *file, const char *file_end, const MR_std_function_bool_from_float *cb)
MRC_API MR_expected_MR_VoxelsLoad_DicomVolume_std_string * MR_VoxelsLoad_loadDicomFolder(const char *path, const char *path_end, uint32_t maxNumThreads, const MR_std_function_bool_from_float *cb)
@ MR_VoxelsLoad_DicomStatusEnum_Unsupported
Definition MRDicom.h:45
@ MR_VoxelsLoad_DicomStatusEnum_Invalid
Definition MRDicom.h:43
@ MR_VoxelsLoad_DicomStatusEnum_Ok
Definition MRDicom.h:41
MRC_API MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_ConstructFrom(MR_PassBy vol_pass_by, MR_VdbVolume *vol, const char *name, const char *name_end, MR_AffineXf3f xf)
MRC_API const MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_DicomStatus_OffsetPtr(const MR_VoxelsLoad_DicomStatus *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_VoxelsLoad_DicomVolume_Set_name(MR_VoxelsLoad_DicomVolume *_this, const char *value, const char *value_end)
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_AssignFromAnother(MR_VoxelsLoad_DicomVolume *_this, MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomVolume *_other)
MRC_API MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_ConstructFromAnother(MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomVolumeAsVdb *_other)
MRC_API MR_std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string * MR_VoxelsLoad_loadDicomsFolder(const char *path, const char *path_end, uint32_t maxNumThreads, const MR_std_function_bool_from_float *cb)
MRC_API MR_std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string * MR_VoxelsLoad_loadDicomsFolderTreeAsVdb(const char *path, const char *path_end, const uint32_t *maxNumThreads, const MR_std_function_bool_from_float *cb)
MRC_API bool MR_equal_MR_VoxelsLoad_DicomStatus_MR_VoxelsLoad_DicomStatusEnum(const MR_VoxelsLoad_DicomStatus *_this, MR_VoxelsLoad_DicomStatusEnum s)
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_ConstructFrom(MR_PassBy vol_pass_by, MR_SimpleVolumeMinMax *vol, const char *name, const char *name_end, MR_AffineXf3f xf)
MRC_API void MR_VoxelsLoad_DicomStatus_Destroy(const MR_VoxelsLoad_DicomStatus *_this)
Destroys a heap-allocated instance of MR_VoxelsLoad_DicomStatus. Does nothing if the pointer is null.
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_OffsetMutablePtr(MR_VoxelsLoad_DicomVolume *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 MR_SimpleVolumeMinMax * MR_VoxelsLoad_DicomVolume_Get_vol(const MR_VoxelsLoad_DicomVolume *_this)
MRC_API MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_DefaultConstructArray(size_t num_elems)
MRC_API void MR_VoxelsLoad_DicomVolume_Set_xf(MR_VoxelsLoad_DicomVolume *_this, MR_AffineXf3f value)
MRC_API void MR_VoxelsLoad_DicomVolume_Set_vol(MR_VoxelsLoad_DicomVolume *_this, MR_PassBy value_pass_by, MR_SimpleVolumeMinMax *value)
MRC_API MR_std_string * MR_VoxelsLoad_DicomStatus_GetMutable_reason(MR_VoxelsLoad_DicomStatus *_this)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toDicom(const MR_VdbVolume *vdbVolume, const char *path, const char *path_end, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API MR_SimpleVolumeMinMax * MR_VoxelsLoad_DicomVolume_GetMutable_vol(MR_VoxelsLoad_DicomVolume *_this)
MRC_API void MR_VoxelsLoad_DicomStatus_DestroyArray(const MR_VoxelsLoad_DicomStatus *_this)
Destroys a heap-allocated array of MR_VoxelsLoad_DicomStatus. Does nothing if the pointer is null.
MRC_API MR_AffineXf3f * MR_VoxelsLoad_DicomVolume_GetMutable_xf(MR_VoxelsLoad_DicomVolume *_this)
MRC_API MR_std_vector_std_filesystem_path * MR_VoxelsLoad_findDicomFoldersRecursively(const char *path, const char *path_end)
MRC_API const MR_std_string * MR_VoxelsLoad_DicomStatus_Get_reason(const MR_VoxelsLoad_DicomStatus *_this)
MRC_API MR_expected_MR_LoadedObjects_std_string * MR_VoxelsLoad_makeObjectVoxelsFromDicomFolder(const char *folder, const char *folder_end, const MR_std_function_bool_from_float *callback)
MRC_API MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_OffsetMutablePtr(MR_VoxelsLoad_DicomVolumeAsVdb *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_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_AssignFromAnother(MR_VoxelsLoad_DicomVolumeAsVdb *_this, MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomVolumeAsVdb *_other)
MRC_API bool MR_VoxelsLoad_isDicomFolder(const char *dirPath, const char *dirPath_end)
MRC_API void MR_VoxelsLoad_DicomVolume_DestroyArray(const MR_VoxelsLoad_DicomVolume *_this)
Destroys a heap-allocated array of MR_VoxelsLoad_DicomVolume. Does nothing if the pointer is null.
MRC_API const MR_AffineXf3f * MR_VoxelsLoad_DicomVolume_Get_xf(const MR_VoxelsLoad_DicomVolume *_this)
MRC_API MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_DicomStatus_ConstructFromAnother(MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomStatus *_other)
MRC_API MR_expected_std_shared_ptr_MR_ObjectVoxels_std_string * MR_VoxelsLoad_createObjectVoxels(const MR_VoxelsLoad_DicomVolumeAsVdb *dcm, const MR_std_function_bool_from_float *cb)
MRC_API const MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_OffsetPtr(const MR_VoxelsLoad_DicomVolume *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_VoxelsLoad_DicomVolumeAsVdb_DestroyArray(const MR_VoxelsLoad_DicomVolumeAsVdb *_this)
Destroys a heap-allocated array of MR_VoxelsLoad_DicomVolumeAsVdb. Does nothing if the pointer is nul...
MRC_API MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_isDicomFile(const char *path, const char *path_end, MR_std_string *seriesUid)
MRC_API const MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_OffsetPtr(const MR_VoxelsLoad_DicomVolumeAsVdb *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_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string * MR_VoxelsLoad_loadDicomsFolderAsVdb(const char *path, const char *path_end, uint32_t maxNumThreads, const MR_std_function_bool_from_float *cb)
struct MR_VoxelsLoad_DicomStatus MR_VoxelsLoad_DicomStatus
Generated from class MR::VoxelsLoad::DicomStatus.
Definition MRDicom.h:49
MRC_API MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_DicomStatus_OffsetMutablePtr(MR_VoxelsLoad_DicomStatus *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_AffineXf3f * MR_VoxelsLoad_DicomVolumeAsVdb_GetMutable_xf(MR_VoxelsLoad_DicomVolumeAsVdb *_this)
struct MR_SimpleVolumeU16 MR_SimpleVolumeU16
Definition MRDicom.h:16
MRC_API MR_VoxelsLoad_DicomVolumeAsVdb * MR_VoxelsLoad_DicomVolumeAsVdb_DefaultConstruct(void)
MRC_API MR_expected_MR_VoxelsLoad_DicomVolume_std_string * MR_VoxelsLoad_loadDicomFile(const char *file, const char *file_end, const MR_std_function_bool_from_float *cb)
MRC_API MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_DicomStatus_AssignFromAnother(MR_VoxelsLoad_DicomStatus *_this, MR_PassBy _other_pass_by, MR_VoxelsLoad_DicomStatus *_other)
MRC_API void MR_VoxelsLoad_DicomVolumeAsVdb_Destroy(const MR_VoxelsLoad_DicomVolumeAsVdb *_this)
Destroys a heap-allocated instance of MR_VoxelsLoad_DicomVolumeAsVdb. Does nothing if the pointer is ...
MRC_API MR_std_string * MR_VoxelsLoad_DicomVolumeAsVdb_GetMutable_name(MR_VoxelsLoad_DicomVolumeAsVdb *_this)
int32_t MR_VoxelsLoad_DicomStatusEnum
Definition MRDicom.h:37
MRC_API MR_VoxelsLoad_DicomStatus * MR_VoxelsLoad_DicomStatus_Construct(MR_VoxelsLoad_DicomStatusEnum st, const char *rs, const char *rs_end)
MRC_API MR_expected_void_std_string * MR_VoxelsSave_toDicom_uint16_t(const MR_SimpleVolumeU16 *volume, const char *path, const char *path_end, const MR_std_optional_MR_Box1f *sourceScale, const MR_std_function_bool_from_float *cb)
MRC_API MR_VoxelsLoad_DicomVolume * MR_VoxelsLoad_DicomVolume_DefaultConstructArray(size_t num_elems)
MRC_API bool MR_VoxelsLoad_DicomStatus_ConvertTo_bool(const MR_VoxelsLoad_DicomStatus *_this)
MRC_API void MR_VoxelsLoad_DicomStatus_Set_reason(MR_VoxelsLoad_DicomStatus *_this, const char *value, const char *value_end)
MRC_API MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string * MR_VoxelsLoad_loadDicomFolderAsVdb(const char *path, const char *path_end, uint32_t maxNumThreads, const MR_std_function_bool_from_float *cb)
MRC_API void MR_VoxelsLoad_DicomStatus_Set_status(MR_VoxelsLoad_DicomStatus *_this, MR_VoxelsLoad_DicomStatusEnum value)
MRC_API const MR_std_string * MR_VoxelsLoad_DicomVolumeAsVdb_Get_name(const MR_VoxelsLoad_DicomVolumeAsVdb *_this)
MRC_API void MR_VoxelsLoad_DicomVolumeAsVdb_Set_xf(MR_VoxelsLoad_DicomVolumeAsVdb *_this, MR_AffineXf3f value)
MRC_API void MR_VoxelsLoad_DicomVolume_Destroy(const MR_VoxelsLoad_DicomVolume *_this)
Destroys a heap-allocated instance of MR_VoxelsLoad_DicomVolume. Does nothing if the pointer is null.
MRC_API MR_VoxelsLoad_DicomStatusEnum * MR_VoxelsLoad_DicomStatus_GetMutable_status(MR_VoxelsLoad_DicomStatus *_this)
MRC_API void MR_VoxelsLoad_DicomVolumeAsVdb_Set_vol(MR_VoxelsLoad_DicomVolumeAsVdb *_this, MR_PassBy value_pass_by, MR_VdbVolume *value)
struct MR_std_string MR_std_string
Definition MRE57.h:22
struct MR_expected_MR_LoadedObjects_std_string MR_expected_MR_LoadedObjects_std_string
Definition MRE57.h:17
struct MR_std_vector_std_filesystem_path MR_std_vector_std_filesystem_path
Definition MRSceneLoad.h:17
MR_PassBy
Definition common.h:19
struct MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string MR_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string
Definition expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string.h:18
struct MR_VoxelsLoad_DicomVolumeAsVdb MR_VoxelsLoad_DicomVolumeAsVdb
Definition expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string.h:12
struct MR_VoxelsLoad_DicomVolume MR_VoxelsLoad_DicomVolume
Definition expected_MR_VoxelsLoad_DicomVolume_std_string.h:12
struct MR_expected_MR_VoxelsLoad_DicomVolume_std_string MR_expected_MR_VoxelsLoad_DicomVolume_std_string
Definition expected_MR_VoxelsLoad_DicomVolume_std_string.h:18
struct MR_expected_std_shared_ptr_MR_ObjectVoxels_std_string MR_expected_std_shared_ptr_MR_ObjectVoxels_std_string
Definition expected_std_shared_ptr_MR_ObjectVoxels_std_string.h:18
#define MRC_API
Definition exports.h:11
virtual std::string name() const override
struct MR_std_optional_MR_Box1f MR_std_optional_MR_Box1f
Definition std_optional_MR_Box1f.h:15
struct MR_std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string MR_std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string
Definition std_vector_expected_MR_VoxelsLoad_DicomVolumeAsVdb_std_string.h:18
struct MR_std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string MR_std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string
Definition std_vector_expected_MR_VoxelsLoad_DicomVolume_std_string.h:18
Definition MRAffineXf.h:36