MeshLib C++ Docs
Loading...
Searching...
No Matches
MRScanHelpers.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRVoxelsFwd.h"
4
5#include "MRMesh/MRVector3.h"
6
7#include <compare>
8#include <filesystem>
9
10namespace MR
11{
12
15struct SliceInfoBase
16{
18 int instanceNum = 0;
20 double z = 0;
22 int fileNum = 0;
23
24 auto operator <=>( const SliceInfoBase & ) const = default;
25};
26
30struct SliceInfo : SliceInfoBase
31{
33 Vector3d imagePos;
34};
35
37MRVOXELS_API void sortScansByOrder( std::vector<std::filesystem::path>& scans, std::vector<SliceInfo>& zOrder );
38
40MRVOXELS_API void putScanFileNameInZ( const std::vector<std::filesystem::path>& scans, std::vector<SliceInfo>& zOrder );
41
43MRVOXELS_API void sortScanFilesByName( std::vector<std::filesystem::path>& scans );
44
45} // namespace MR
#define MRVOXELS_API
Definition MRVoxelsFwd.h:14
new unsafe ref double z
new unsafe ref int instanceNum
unsafe SliceInfoBase()
new unsafe ref int fileNum
new unsafe ref MR.Vector3d imagePos
Definition MRCameraOrientationPlugin.h:8
MRVOXELS_API void sortScansByOrder(std::vector< std::filesystem::path > &scans, std::vector< SliceInfo > &zOrder)
Sort scan files in given vector by given slice information.
MRVOXELS_API void sortScanFilesByName(std::vector< std::filesystem::path > &scans)
Sort scan files in given vector by names (respect numbers in it)
MRVOXELS_API void putScanFileNameInZ(const std::vector< std::filesystem::path > &scans, std::vector< SliceInfo > &zOrder)
Read layer heights from given scan file names.