3#include "SurfaceMap.hpp"
5#include <wmtk/history/History.hpp>
14namespace wmtk::components::tracking {
82 std::vector<CurvePoint> points,
86 std::vector<CurvePoint> points,
92 const std::vector<size_t>&
warned_edits()
const {
return m_warned_edits; }
95 const std::vector<Eigen::Vector3d>&
input_vertices()
const {
return m_in_vertices; }
96 const std::vector<std::array<uint64_t, 2>>& input_segments()
const {
return m_in_segments; }
97 const std::vector<uint8_t>& input_segment_alive()
const {
return m_in_alive; }
98 const std::vector<Eigen::Vector3d>& output_vertices()
const {
return m_out_vertices; }
99 const std::vector<std::array<uint64_t, 2>>& output_segments()
const {
return m_out_segments; }
100 const std::vector<uint8_t>& output_segment_alive()
const {
return m_out_alive; }
105 const std::vector<std::array<uint64_t, 2>>&
feature_points()
const {
return m_features; }
110 const std::array<size_t, 16>&
steps_by_kind()
const {
return m_steps_by_kind; }
116 std::vector<uint64_t> segments;
117 std::vector<uint8_t> forward;
137 using Place = std::pair<uint32_t, uint32_t>;
144 std::vector<std::pair<Chain, Chain>>
chains;
145 std::vector<std::pair<uint64_t, Place>> before_at, after_at;
148 std::vector<std::pair<uint64_t, Image>>
forward, backward;
154 std::vector<std::array<Eigen::Vector3d, 2>>
before, after;
155 std::vector<std::vector<uint64_t>> to_after, to_before;
171 along(
const Chain& from,
size_t i,
const Eigen::Vector2d& bary,
const Chain& to);
173 std::vector<Step> m_steps;
175 std::vector<size_t> m_warned_edits;
176 std::vector<Eigen::Vector3d> m_in_vertices, m_out_vertices;
177 std::vector<std::array<uint64_t, 2>> m_in_segments, m_out_segments;
178 std::vector<uint8_t> m_in_alive, m_out_alive;
179 std::vector<std::array<uint64_t, 2>> m_features;
180 std::vector<uint64_t> m_out_features;
181 std::array<size_t, 16> m_steps_by_kind = {};
The map between the first and the last state of a CurveHistory.
Definition CurveMap.hpp:75
const std::array< size_t, 16 > & steps_by_kind() const
How many operations needed a local map, by kind (index: history::EditKind).
Definition CurveMap.hpp:110
std::vector< CurvePoint > to_input(std::vector< CurvePoint > points, CurveMapWarnings *warnings=nullptr) const
Definition CurveMap.cpp:813
const std::vector< std::array< uint64_t, 2 > > & feature_points() const
Definition CurveMap.hpp:105
const CurveMapWarnings & build_warnings() const
What building the map found.
Definition CurveMap.hpp:90
const std::vector< uint64_t > & output_feature_points() const
The feature points of the last state.
Definition CurveMap.hpp:107
const std::vector< size_t > & warned_edits() const
The edits (indices into the history) whose local map raised a build warning.
Definition CurveMap.hpp:92
std::vector< CurvePoint > to_output(std::vector< CurvePoint > points, CurveMapWarnings *warnings=nullptr) const
Points on the first state, mapped onto the last; see to_input.
Definition CurveMap.cpp:803
static void measure(Chain &c)
Definition CurveMap.cpp:614
static bool forward(const Step &s, CurvePoint &p)
One point through one step, or back; false if it has no image.
Definition CurveMap.cpp:658
std::pair< uint32_t, uint32_t > Place
Where a segment is on a step's chains: the pair, and its place on the chain.
Definition CurveMap.hpp:137
static CurvePoint along(const Chain &from, size_t i, const Eigen::Vector2d &bary, const Chain &to)
The point at the same fraction of arc length along to as bary on segment i of from.
Definition CurveMap.cpp:645
const std::vector< Eigen::Vector3d > & input_vertices() const
The curves at the start and at the end, every slot, as the history holds them.
Definition CurveMap.hpp:95
void map(std::vector< CurvePoint > &points, bool to_output, CurveMapWarnings &warnings) const
Definition CurveMap.cpp:749
A complex driven by the edits of a History: a surface (N = 3) or a curve network (N = 2).
Definition Replay.hpp:23
EditKind
The kinds of edit a complex goes through.
Definition History.hpp:27
A polyline: segments end to end, each run from its first corner to its second or back.
Definition CurveMap.hpp:115
std::vector< double > start
Definition CurveMap.hpp:120
Definition CurveMap.hpp:132
Definition CurveMap.hpp:139
std::vector< std::pair< Chain, Chain > > chains
Definition CurveMap.hpp:144
std::vector< std::array< Eigen::Vector3d, 2 > > before
Definition CurveMap.hpp:154
std::vector< Image > old_to_new
consolidate, relabel: every segment's new id, and back; any other has none.
Definition CurveMap.hpp:150
std::vector< std::pair< uint64_t, Image > > forward
Definition CurveMap.hpp:148
How a CurveMap is built.
Definition CurveMap.hpp:49
Smoothing smoothing
Definition CurveMap.hpp:54
Where a curve map stops being a bijection. Counted, never fatal: the map still answers.
Definition CurveMap.hpp:26
size_t unlocated
Definition CurveMap.hpp:39
size_t overlapping
Definition CurveMap.hpp:36
size_t merged_segments
Definition CurveMap.hpp:33
size_t replaced
Definition CurveMap.hpp:42
size_t topology
Definition CurveMap.hpp:30
Definition CurveMap.hpp:19
One committed operation.
Definition History.hpp:79
A complex and the edits it went through, in commit order.
Definition History.hpp:101