4#ifndef MRMESH_NO_OPENVDB
24 const int t =
id % 10;
25 const int q =
id / 10;
26 static_assert( q >= 1 && q <= 4 && t >= 1 && t <= 8 );
50struct std::hash<
MR::DentalId>
52 inline size_t operator() (
const MR::DentalId&
id )
const noexcept
54 return hash<int>{}(
id.fdi() );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
This class represents tooth id.
Definition MRTeethMaskToDirectionVolume.h:18
static MRMESH_API std::optional< DentalId > fromFDI(int id)
Creates id from FDI number known only at runtime.
auto operator<=>(const DentalId &other) const =default
MRMESH_API int fdi() const
Returns FDI representation of the id.
static constexpr DentalId fromFDI()
Creates id from FDI number known at compile time.
Definition MRTeethMaskToDirectionVolume.h:22
Definition MRTeethMaskToDirectionVolume.h:65
std::array< SimpleVolume, 3 > DirectionVolume
See meshToDirectionVolume for details.
Definition MRTeethMaskToDirectionVolume.h:74
MRMESH_API Expected< ProcessResult > convertAll() const
Converts all the teeth into direction volume.
MRMESH_API Expected< ProcessResult > convertTooth(DentalId id) const
Converts single tooth into direction volume.
MRMESH_API const HashMap< DentalId, Box3i > & getToothBounds() const
Returns all the teeth present in volume and corresponding bounding boxes.
static MRMESH_API Expected< TeethMaskToDirectionVolumeConvertor > create(const VdbVolume &volume)
Initialize class.
Definition MRCameraOrientationPlugin.h:7
tl::expected< T, E > Expected
Definition MRExpected.h:49
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:450
Definition MRTeethMaskToDirectionVolume.h:76
DirectionVolume volume
Definition MRTeethMaskToDirectionVolume.h:77
AffineXf3f xf
Definition MRTeethMaskToDirectionVolume.h:78