Volume Cartographer 2.27.0
VolumeLandmark.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <opencv2/core.hpp>
6
9
10namespace volcart::landmarks
11{
12
14enum class Type { Point, Plane, Polyline };
15
22{
23public:
25 VolumeLandmark() = delete;
26
28 using Identifier = std::string;
29
31 using Point = cv::Vec3d;
32
34 using Pointer = std::shared_ptr<VolumeLandmark>;
35
37 Identifier id() const;
38
40 std::string name() const;
41
43 Type type() const;
44
46 static void Write(
47 const volcart::filesystem::path& path, const Pointer& ldm);
48
50 static VolumeLandmark::Pointer Read(const volcart::filesystem::path& path);
51
52protected:
54 VolumeLandmark(const Identifier& uuid, const std::string& name, Type type);
55
58
61};
62} // namespace volcart::landmarks
Generic interface for storing metadata as key/value pairs.
Definition: Metadata.hpp:27
Base class for Volume Landmark types.
VolumeLandmark(const Identifier &uuid, const std::string &name, Type type)
std::string name() const
Get human-readable landmark name.
std::string Identifier
Identifier type.
std::shared_ptr< VolumeLandmark > Pointer
Pointer type.
Identifier id() const
Get the unique identifier.
static VolumeLandmark::Pointer Read(const volcart::filesystem::path &path)
Read a landmark metadata file from the path provided.
static void Write(const volcart::filesystem::path &path, const Pointer &ldm)
Write a landmark metadata file to the path provided.
Type type() const
Get the landmark type.
Volume landmark classes.
Type
Implemented Volume Landmark types.