Volume Cartographer 2.27.0
Annotation.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstdint>
6
7#include <opencv2/core.hpp>
8
11namespace volcart
12{
13
15using AnnotationFlag = std::uint8_t;
16static constexpr AnnotationFlag ANNO_NONE = 0x0000;
17static constexpr AnnotationFlag ANNO_ANCHOR = 0x0001;
18static constexpr AnnotationFlag ANNO_MANUAL = 0x0002;
19static constexpr AnnotationFlag ANNO_USED_IN_RUN = 0x0004;
20
26struct Annotation {
28 Annotation() = default;
30 Annotation(std::int32_t i, AnnotationFlag f, double x, double y);
31
33 std::int32_t index{};
37 cv::Vec2d pt;
38};
39
42
44void WriteAnnotationSet(const filesystem::path& path, const AnnotationSet& as);
45
47auto ReadAnnotationSet(const filesystem::path& path) -> AnnotationSet;
48
49} // namespace volcart
Holds a collection of ordered points.
Volume Cartographer library
void WriteAnnotationSet(const filesystem::path &path, const AnnotationSet &as)
Write an AnnotationSet to disk.
std::uint8_t AnnotationFlag
Definition: Annotation.hpp:15
auto ReadAnnotationSet(const filesystem::path &path) -> AnnotationSet
Load an AnnotationSet from disk.
OrderedPointSet< Annotation > AnnotationSet
Ordered annotation collection.
Definition: Annotation.hpp:41
Segmentation annotation.
Definition: Annotation.hpp:26
Annotation(std::int32_t i, AnnotationFlag f, double x, double y)
cv::Vec2d pt
The original point position before manual moves.
Definition: Annotation.hpp:37
AnnotationFlag flags
Definition: Annotation.hpp:35
std::int32_t index
Slice index.
Definition: Annotation.hpp:33