MeshLib C++ Docs
Loading...
Searching...
No Matches
MRVoxelsFwd.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4
5// see explanation in MRMesh/MRMeshFwd.h
6#ifdef _WIN32
7# ifdef MRVoxels_EXPORTS
8# define MRVOXELS_API __declspec(dllexport)
9# else
10# define MRVOXELS_API __declspec(dllimport)
11# endif
12# define MRVOXELS_CLASS
13#else
14# define MRVOXELS_API __attribute__((visibility("default")))
15# ifdef __clang__
16# define MRVOXELS_CLASS __attribute__((type_visibility("default")))
17# else
18# define MRVOXELS_CLASS __attribute__((visibility("default")))
19# endif
20#endif
21
22#include <MRMesh/MRMeshFwd.h>
23
24namespace MR
25{
26
27class ObjectVoxels;
28
29class FloatGrid;
30
32 ( SimpleVolumeMinMax, VoxelsVolumeMinMax<Vector<float, VoxelId>> )
33 ( SimpleVolumeMinMaxU16, VoxelsVolumeMinMax<Vector<uint16_t, VoxelId>> )
35)
36
37using VdbVolumes = std::vector<VdbVolume>;
38
39template <typename T>
40using VoxelValueGetter = std::function<T ( const Vector3i& )>;
41
42MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRVOXELS_CLASS VoxelsVolume,
43 ( FunctionVolume, VoxelsVolume<VoxelValueGetter<float>> )
44 ( FunctionVolumeU8, VoxelsVolume<VoxelValueGetter<uint8_t>> )
45 ( SimpleVolume, VoxelsVolume<Vector<float, VoxelId>> )
46 ( SimpleVolumeU16, VoxelsVolume<Vector<uint16_t, VoxelId>> )
47 ( SimpleBinaryVolume, VoxelsVolume<VoxelBitSet> )
48)
49
50namespace VoxelsLoad
51{
52MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRVOXELS_CLASS DicomVolumeT,
53 ( DicomVolume, DicomVolumeT<SimpleVolumeMinMax> )
54 ( DicomVolumeAsVdb, DicomVolumeT<VdbVolume> )
55)
56} // namespace VoxelsLoad
57
58} // namespace MR
#define MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
Definition MRCanonicalTypedefs.h:23
#define MRVOXELS_CLASS
Definition MRVoxelsFwd.h:18
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:19
Definition MRCameraOrientationPlugin.h:8
std::function< T(const Vector3i &)> VoxelValueGetter
Definition MRVoxelsFwd.h:40
Definition MRVoxelsVolume.h:62
represents a box in 3D space subdivided on voxels stored in T
Definition MRVoxelsVolume.h:48