3#include "MRVoxelsFwd.h"
8#include "MRMesh/MRphmap.h"
27 const int t =
id % 10;
28 const int q =
id / 10;
29 static_assert( q >= 1 && q <= 4 && t >= 1 && t <= 8 );
35 MRVOXELS_API
static std::optional<DentalId>
fromFDI(
int id );
38 MRVOXELS_API
int fdi()
const;
53struct std::hash<
MR::DentalId>
55 inline size_t operator() (
const MR::DentalId&
id )
const noexcept
57 return hash<int>{}(
id.fdi() );
98 HashMap<int, Box3i> presentObjects_;
This class represents tooth id.
Definition MRTeethMaskToDirectionVolume.h:21
Definition MRTeethMaskToDirectionVolume.h:71
static MRVOXELS_API std::optional< DentalId > fromFDI(int id)
Creates id from FDI number known only at runtime.
auto operator<=>(const DentalId &other) const =default
std::array< SimpleVolumeMinMax, 3 > DirectionVolume
See meshToDirectionVolume for details.
Definition MRTeethMaskToDirectionVolume.h:82
MRVOXELS_API Expected< std::array< SimpleVolumeMinMax, 3 > > teethMaskToDirectionVolume(const VdbVolume &volume, const std::vector< int > &additionalIds={})
A shortcut for TeethMaskToDirectionVolumeConvertor::create and TeethMaskToDirectionVolumeConvertor::c...
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRVOXELS_API Expected< ProcessResult > convertObject(int id) const
Converts single object into direction volume.
MRVOXELS_API Expected< ProcessResult > convertAll() const
Converts all the objects into direction volume.
MRMESH_API double volume(const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region=nullptr)
static MRVOXELS_API Expected< TeethMaskToDirectionVolumeConvertor > create(const VdbVolume &volume, const std::vector< int > &additionalIds={})
DirectionVolume volume
Definition MRTeethMaskToDirectionVolume.h:85
MRVOXELS_API int fdi() const
Returns FDI representation of the id.
MRVOXELS_API const HashMap< int, Box3i > & getObjectBounds() const
Returns all the objects present in volume and corresponding bounding boxes.
static constexpr DentalId fromFDI()
Creates id from FDI number known at compile time.
Definition MRTeethMaskToDirectionVolume.h:25
AffineXf3f xf
Definition MRTeethMaskToDirectionVolume.h:86
@ other
Angle, normally float. Measure in radians.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRTeethMaskToDirectionVolume.h:84