MeshLib C++ Docs
Loading...
Searching...
No Matches
MRVoxels/MRVoxelsFwd.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4
5#ifdef _WIN32
6# ifdef MRVoxels_EXPORTS
7# define MRVOXELS_API __declspec(dllexport)
8# else
9# define MRVOXELS_API __declspec(dllimport)
10# endif
11# define MRVOXELS_CLASS
12#else
13# define MRVOXELS_API __attribute__((visibility("default")))
14# define MRVOXELS_CLASS __attribute__((visibility("default")))
15#endif
16
17#include <MRMesh/MRMeshFwd.h>
18
19namespace MR
20{
21
22class ObjectVoxels;
23
25using FloatGrid = std::shared_ptr<OpenVdbFloatGrid>;
26
28 ( SimpleVolumeMinMax, VoxelsVolumeMinMax<std::vector<float>> )
29 ( SimpleVolumeMinMaxU16, VoxelsVolumeMinMax<std::vector<uint16_t>> )
31)
32
33using VdbVolumes = std::vector<VdbVolume>;
34
35template <typename T>
36using VoxelValueGetter = std::function<T ( const Vector3i& )>;
37
38MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRVOXELS_CLASS VoxelsVolume,
39 ( FunctionVolume, VoxelsVolume<VoxelValueGetter<float>> )
40 ( FunctionVolumeU8, VoxelsVolume<VoxelValueGetter<uint8_t>> )
41 ( SimpleVolume, VoxelsVolume<std::vector<float>> )
42 ( SimpleVolumeU16, VoxelsVolume<std::vector<uint16_t>> )
43)
44
45namespace VoxelsLoad
46{
47MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRVOXELS_CLASS DicomVolumeT,
48 ( DicomVolume, DicomVolumeT<SimpleVolumeMinMax> )
49 ( DicomVolumeAsVdb, DicomVolumeT<VdbVolume> )
50)
51} // namespace VoxelsLoad
52
53} // namespace MR
#define MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
Definition MRCanonicalTypedefs.h:23
#define MRVOXELS_CLASS
Definition MRVoxels/MRVoxelsFwd.h:14
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxels/MRVoxelsFwd.h:25
std::function< T(const Vector3i &)> VoxelValueGetter
Definition MRVoxels/MRVoxelsFwd.h:36
this class just hides very complex type of typedef openvdb::FloatGrid
Definition MRVDBFloatGrid.h:21
Definition MRVoxelsVolume.h:53
represents a box in 3D space subdivided on voxels stored in T
Definition MRVoxelsVolume.h:39