MeshLib Documentation
Loading...
Searching...
No Matches
MRDistanceMap.h File Reference
#include "MRRectIndexer.h"
#include "MRBitSet.h"
#include "MRAffineXf3.h"
#include "MRDistanceMapParams.h"
#include "MRPolyline.h"
#include "MRHeapBytes.h"
#include "MRImage.h"
#include "MRExpected.h"
#include <cfloat>
#include <filesystem>
#include <vector>

Go to the source code of this file.

Classes

class  MR::DistanceMap
 
struct  MR::ContoursDistanceMapOffset
 Structure with parameters for optional offset in distanceMapFromContours function. More...
 
struct  MR::ContoursDistanceMapOptions
 

Namespaces

namespace  MR
 

Functions

MRMESH_API DistanceMap MR::combineXYderivativeMaps (std::pair< DistanceMap, DistanceMap > XYderivativeMaps)
 fill another distance map pair with gradients across X and Y axes of the argument map
 
MRMESH_API DistanceMap MR::computeDistanceMap (const MeshPart &mp, const MeshToDistanceMapParams &params, ProgressCallback cb={}, std::vector< MeshTriPoint > *outSamples=nullptr)
 
MRMESH_API DistanceMap MR::computeDistanceMapD (const MeshPart &mp, const MeshToDistanceMapParams &params, ProgressCallback cb={}, std::vector< MeshTriPoint > *outSamples=nullptr)
 
MRMESH_API DistanceMap MR::distanceMapFromContours (const Polyline2 &contours, const ContourToDistanceMapParams &params, const ContoursDistanceMapOptions &options={})
 Computes distance of 2d contours according ContourToDistanceMapParams.
 
MRMESH_API void MR::distanceMapFromContours (DistanceMap &distMap, const Polyline2 &polyline, const ContourToDistanceMapParams &params, const ContoursDistanceMapOptions &options={})
 Computes distance of 2d contours according ContourToDistanceMapParams.
 
MRMESH_API std::vector< Vector3f > MR::edgePointsFromContours (const Polyline2 &polyline, float pixelSize, float threshold)
 
MRMESH_API Polyline2 MR::distanceMapTo2DIsoPolyline (const DistanceMap &distMap, float isoValue)
 
MRMESH_API Polyline2 MR::distanceMapTo2DIsoPolyline (const DistanceMap &distMap, const ContourToDistanceMapParams &params, float isoValue)
 iso-lines are created in real space ( plane OXY with parameters according ContourToDistanceMapParams )
 
MRMESH_API std::pair< Polyline2, AffineXf3f > MR::distanceMapTo2DIsoPolyline (const DistanceMap &distMap, const AffineXf3f &xf, float isoValue, bool useDepth=false)
 
MRMESH_API Polyline2 MR::distanceMapTo2DIsoPolyline (const DistanceMap &distMap, float pixelSize, float isoValue)
 
MRMESH_API Polyline2 MR::polylineOffset (const Polyline2 &polyline, float pixelSize, float offset)
 constructs an offset contour for given polyline
 
MRMESH_API Polyline2 MR::contourUnion (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0)
 computes the union of the shapes bounded by input 2d contours
 
MRMESH_API Polyline2 MR::contourIntersection (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0.f)
 computes the intersection of the shapes bounded by input 2d contours
 
MRMESH_API Polyline2 MR::contourSubtract (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0.f)
 computes the difference between the shapes bounded by contoursA and the shapes bounded by contoursB
 
MRMESH_API Expected< MeshMR::distanceMapToMesh (const DistanceMap &distMap, const AffineXf3f &toWorld, ProgressCallback cb={})
 converts distance map into mesh and applies a transformation to all points
 
MRMESH_API Image MR::convertDistanceMapToImage (const DistanceMap &distMap, float threshold=1.f/255)
 
MRMESH_API Expected< DistanceMapMR::convertImageToDistanceMap (const Image &image, float threshold=1.f/255)