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 );
31 return DentalId(
id );
43 constexpr explicit DentalId(
int fdi ):
53struct std::hash<
MR::DentalId>
55 inline size_t operator() (
const MR::DentalId&
id )
const noexcept
57 return hash<int>{}(
id.fdi() );
70class TeethMaskToDirectionVolumeConvertor
#define MRVOXELS_API
see explanation in MRMesh/MRMeshFwd.h
Definition MRVoxelsFwd.h:14
double volume(const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region=nullptr)
auto operator<=>(const DentalId &other) const =default
std::array< SimpleVolumeMinMax, 3 > DirectionVolume
See meshToDirectionVolume for details.
Definition MRTeethMaskToDirectionVolume.h:82
Expected< ProcessResult > convertObject(int id) const
Converts single object into direction volume.
tl::expected< T, E > Expected
Definition MRExpected.h:31
static std::optional< DentalId > fromFDI(int id)
Creates id from FDI number known only at runtime.
Expected< ProcessResult > convertAll() const
Converts all the objects into direction volume.
static Expected< TeethMaskToDirectionVolumeConvertor > create(const VdbVolume &volume, const std::vector< int > &additionalIds={})
Expected< std::array< SimpleVolumeMinMax, 3 > > teethMaskToDirectionVolume(const VdbVolume &volume, const std::vector< int > &additionalIds={})
A shortcut for TeethMaskToDirectionVolumeConvertor::create and TeethMaskToDirectionVolumeConvertor::c...
DirectionVolume volume
Definition MRTeethMaskToDirectionVolume.h:85
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
int fdi() const
Returns FDI representation of the id.
AffineXf3f xf
Definition MRTeethMaskToDirectionVolume.h:86
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMeshFwd.h:606
@ other
Angle, normally float. Measure in radians.
Definition MRFeatureObject.h:27
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRTeethMaskToDirectionVolume.h:84