MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDistanceMapSave.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRIOFilters.h"
5#include "MRExpected.h"
6#include <filesystem>
7
8namespace MR
9{
10
11namespace DistanceMapSave
12{
13
17
24MRMESH_API Expected<void> toRAW( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
25[[deprecated( "Use toRAW( dmap, path, settings )")]]
26inline Expected<void> toRAW( const std::filesystem::path& path, const DistanceMap& dmap )
27{
28 return toRAW( dmap, path );
29}
30
31MRMESH_API Expected<void> toMrDistanceMap( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
32[[deprecated( "Use toMrDistanceMap( dmap, path, settings )")]]
33inline Expected<void> toMrDistanceMap( const std::filesystem::path& path, const DistanceMap& dmapObject, const DistanceMapToWorld& params )
34{
35 const auto xf = params.xf();
36 return toMrDistanceMap( dmapObject, path, {
37 .xf = &xf,
38 } );
39}
40
41MRMESH_API Expected<void> toAnySupportedFormat( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
42[[deprecated( "Use toAnySupportedFormat( dmap, path, settings )")]]
43inline Expected<void> toAnySupportedFormat( const std::filesystem::path& path, const DistanceMap& dmapObject, const AffineXf3f * xf = nullptr )
44{
45 return toAnySupportedFormat( dmapObject, path, {
46 .xf = xf,
47 } );
48}
49
51
52} // namespace DistanceMapSave
53
54} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
Definition MRDistanceMap.h:24
MRMESH_API Expected< void > toAnySupportedFormat(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
MRMESH_API Expected< void > toMrDistanceMap(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
MRMESH_API Expected< void > toRAW(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
Save DistanceMap to binary file Format: 2 integer - DistanceMap.resX & DistanceMap....
tl::expected< T, E > Expected
Definition MRExpected.h:59
determines how to save distance maps
Definition MRDistanceMapParams.h:198
This structure store data to transform distance map to world coordinates.
Definition MRDistanceMapParams.h:136
AffineXf3f xf() const
Definition MRDistanceMapParams.h:170