8#include "MRMesh/MRphmap.h"
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 MRVOXELS_API
Definition MRVoxelsFwd.h:13
This class represents tooth id.
Definition MRTeethMaskToDirectionVolume.h:18
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
MRVOXELS_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< SimpleVolumeMinMax, 3 > DirectionVolume
See meshToDirectionVolume for details.
Definition MRTeethMaskToDirectionVolume.h:76
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.
static MRVOXELS_API Expected< TeethMaskToDirectionVolumeConvertor > create(const VdbVolume &volume, const std::vector< int > &additionalIds={})
MRVOXELS_API const HashMap< int, Box3i > & getObjectBounds() const
Returns all the objects present in volume and corresponding bounding boxes.
Definition MRCameraOrientationPlugin.h:8
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:58
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:460
Definition MRTeethMaskToDirectionVolume.h:78
DirectionVolume volume
Definition MRTeethMaskToDirectionVolume.h:79
AffineXf3f xf
Definition MRTeethMaskToDirectionVolume.h:80