MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDistanceMapLoad.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRDistanceMap.h"
5#include "MRExpected.h"
6#include "MRIOFilters.h"
8#include "MRPch/MRBindingMacros.h"
9
10#include <filesystem>
11
12namespace MR
13{
14
15namespace DistanceMapLoad
16{
20
27MRMESH_API Expected<DistanceMap> fromRaw( const std::filesystem::path& path, const DistanceMapLoadSettings& settings = {} );
28[[deprecated( "Use fromRaw( path, settings )")]]
29MR_BIND_IGNORE inline Expected<DistanceMap> fromRaw( const std::filesystem::path& path, ProgressCallback progressCb )
30{
31 return fromRaw( path, DistanceMapLoadSettings {
32 .progress = progressCb,
33 } );
34}
35
36MRMESH_API Expected<DistanceMap> fromMrDistanceMap( const std::filesystem::path& path, const DistanceMapLoadSettings& settings = {} );
37[[deprecated( "Use fromMrDistanceMap( path, settings )")]]
38MR_BIND_IGNORE inline Expected<DistanceMap> fromMrDistanceMap( const std::filesystem::path& path, DistanceMapToWorld& params, ProgressCallback progressCb = {} )
39{
40 return fromMrDistanceMap( path, {
41 .distanceMapToWorld = &params,
42 .progress = progressCb,
43 } );
44}
45
46MRMESH_API Expected<DistanceMap> fromAnySupportedFormat( const std::filesystem::path& path, const DistanceMapLoadSettings& settings = {} );
47[[deprecated( "Use fromAnySupportedFormat( path, settings )" )]]
48MR_BIND_IGNORE inline Expected<DistanceMap> fromAnySupportedFormat( const std::filesystem::path& path, DistanceMapToWorld* params, ProgressCallback progressCb = {} )
49{
50 return fromAnySupportedFormat( path, {
51 .distanceMapToWorld = params,
52 .progress = progressCb,
53 } );
54}
55
57
58}
59
60}
#define MRMESH_API
Definition MRMeshFwd.h:85
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:790
Expected< DistanceMap > fromAnySupportedFormat(const std::filesystem::path &path, const DistanceMapLoadSettings &settings={})
Expected< DistanceMap > fromMrDistanceMap(const std::filesystem::path &path, const DistanceMapLoadSettings &settings={})
Expected< DistanceMap > fromRaw(const std::filesystem::path &path, const DistanceMapLoadSettings &settings={})
Load DistanceMap from binary file Format: 2 integer - DistanceMap.resX & DistanceMap....
tl::expected< T, E > Expected
Definition MRExpected.h:31
Definition MRTiff.h:83
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
settings for loading distance maps from external formats
Definition MRDistanceMapParams.h:189
This structure store data to transform distance map to world coordinates.
Definition MRDistanceMapParams.h:136