render_params.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------------------
2  * A repertory of multi primitive-to-primitive (MP2P) ICP algorithms in C++
3  * Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
4  * See LICENSE for license information.
5  * ------------------------------------------------------------------------- */
6 
13 #pragma once
14 
15 #include <mp2p_icp/layer_name_t.h>
16 #include <mrpt/img/TColor.h>
17 #include <mrpt/img/color_maps.h>
18 #include <mrpt/opengl/opengl_frwds.h>
19 #include <mrpt/typemeta/TEnumType.h>
20 
21 #include <map>
22 #include <optional>
23 #include <vector>
24 
25 namespace mp2p_icp
26 {
33 {
34  render_params_planes_t() = default;
35 
36  bool visible = true;
37  double halfWidth = 1.0;
38  double gridSpacing = 0.25;
39  mrpt::img::TColor color{0xff, 0xff, 0xff, 0xff};
40 
41  bool operator==(const render_params_planes_t& o) const
42  {
43  return visible == o.visible && halfWidth == o.halfWidth && gridSpacing == o.gridSpacing &&
44  color == o.color;
45  }
46  bool operator!=(const render_params_planes_t& o) const { return !(*this == o); }
47 };
48 
51 {
52  render_params_lines_t() = default;
53 
54  bool visible = true;
55  mrpt::img::TColor color{0xff, 0x00, 0x00, 0xff};
56  double length = 20.0;
57  std::optional<std::vector<double>> lengths;
58 
59  bool operator==(const render_params_lines_t& o) const
60  {
61  return visible == o.visible && length == o.length && lengths == o.lengths &&
62  color == o.color;
63  }
64  bool operator!=(const render_params_lines_t& o) const { return !(*this == o); }
65 };
66 
67 enum class Coordinate : uint8_t
68 {
69  X = 0,
70  Y,
71  Z
72 };
73 
75 {
78 
80  mrpt::img::TColormap colorMap = mrpt::img::cmHOT;
81 
83  std::optional<Coordinate> recolorizeByCoordinate;
84 
92  std::optional<float> colorMapMinCoord, colorMapMaxCoord;
93 
101  std::optional<float> autoBoundingBoxOutliersPercentile = {0.025};
102 
103  bool operator==(const color_mode_t& o) const
104  {
109  }
110  bool operator!=(const color_mode_t& o) const { return !(*this == o); }
111 };
112 
116 {
117  render_params_point_layer_t() = default;
118 
121  float pointSize = 1.0f;
122 
124  mrpt::img::TColor color{0x00, 0x00, 0xff, 0xff};
125 
128  std::optional<color_mode_t> colorMode;
129 
132 
134  {
135  return pointSize == o.pointSize && color == o.color && colorMode == o.colorMode &&
138  }
139  bool operator!=(const render_params_point_layer_t& o) const { return !(*this == o); }
140 };
141 
144 {
145  render_params_points_t() = default;
146 
149  bool visible = true;
150 
154 
157  std::map<layer_name_t, render_params_point_layer_t> perLayer;
158 
159  bool operator==(const render_params_points_t& o) const
160  {
161  return visible == o.visible && allLayers == o.allLayers && perLayer == o.perLayer;
162  }
163  bool operator!=(const render_params_points_t& o) const { return !(*this == o); }
164 };
165 
168 {
169  render_params_t() = default;
170 
174 
175  bool operator==(const render_params_t& o) const
176  {
177  return planes == o.planes && lines == o.lines && points == o.points;
178  }
179  bool operator!=(const render_params_t& o) const { return !(*this == o); }
180 };
181 
183 {
184  render_params_pairings_pt2pt_t() = default;
185 
186  bool visible = true;
187 
188  mrpt::img::TColor color{0xe0, 0xe0, 0xe0, 0xc0};
189 };
190 
192 {
193  render_params_pairings_pt2pl_t() = default;
194 
195  bool visible = true;
196 
197  mrpt::img::TColor segmentColor{0x00, 0xff, 0x00, 0xa0};
198  mrpt::img::TColor planePatchColor{0x00, 0xff, 0x00, 0x80};
199  double planePatchSize = 0.2;
200 };
201 
203 {
204  render_params_pairings_pt2ln_t() = default;
205 
206  bool visible = true;
207 
208  mrpt::img::TColor segmentColor{0x00, 0xff, 0x00, 0xa0};
209  mrpt::img::TColor lineColor{0x00, 0xff, 0x00, 0x80};
210  double lineLength = 0.2;
211 };
212 
215 {
216  pairings_render_params_t() = default;
217 
221 };
222 
225 } // namespace mp2p_icp
226 
227 MRPT_ENUM_TYPE_BEGIN(mp2p_icp::Coordinate)
231 MRPT_ENUM_TYPE_END()
mp2p_icp::color_mode_t::operator==
bool operator==(const color_mode_t &o) const
Definition: render_params.h:103
mp2p_icp::render_params_lines_t::visible
bool visible
Definition: render_params.h:54
mp2p_icp::render_params_point_layer_t::operator!=
bool operator!=(const render_params_point_layer_t &o) const
Definition: render_params.h:139
mp2p_icp::color_mode_t::operator!=
bool operator!=(const color_mode_t &o) const
Definition: render_params.h:110
mp2p_icp::pairings_render_params_t::pt2pl
render_params_pairings_pt2pl_t pt2pl
Definition: render_params.h:219
mp2p_icp::render_params_pairings_pt2pl_t::planePatchColor
mrpt::img::TColor planePatchColor
Definition: render_params.h:198
mp2p_icp
Definition: covariance.h:17
mp2p_icp::render_params_pairings_pt2pt_t::render_params_pairings_pt2pt_t
render_params_pairings_pt2pt_t()=default
mp2p_icp::render_params_pairings_pt2pt_t::color
mrpt::img::TColor color
Definition: render_params.h:188
mp2p_icp::render_params_t::points
render_params_points_t points
Definition: render_params.h:173
mp2p_icp::pairings_render_params_t::pt2pt
render_params_pairings_pt2pt_t pt2pt
Definition: render_params.h:218
mp2p_icp::render_params_point_layer_t::render_voxelmaps_as_points
bool render_voxelmaps_as_points
Definition: render_params.h:130
mp2p_icp::render_params_pairings_pt2pl_t::visible
bool visible
Definition: render_params.h:195
mp2p_icp::render_params_point_layer_t::operator==
bool operator==(const render_params_point_layer_t &o) const
Definition: render_params.h:133
mp2p_icp::Coordinate::Y
@ Y
mp2p_icp::render_params_point_layer_t
Definition: render_params.h:115
mp2p_icp::render_params_pairings_pt2ln_t::segmentColor
mrpt::img::TColor segmentColor
Definition: render_params.h:208
mp2p_icp::render_params_pairings_pt2pl_t::segmentColor
mrpt::img::TColor segmentColor
Definition: render_params.h:197
mp2p_icp::render_params_planes_t::visible
bool visible
Definition: render_params.h:36
mp2p_icp::render_params_pairings_pt2pt_t::visible
bool visible
Definition: render_params.h:186
mp2p_icp::color_mode_t::recolorizeByCoordinate
std::optional< Coordinate > recolorizeByCoordinate
Definition: render_params.h:83
mp2p_icp::Coordinate::Z
@ Z
mp2p_icp::render_params_t::planes
render_params_planes_t planes
Definition: render_params.h:171
mp2p_icp::color_mode_t::autoBoundingBoxOutliersPercentile
std::optional< float > autoBoundingBoxOutliersPercentile
Definition: render_params.h:101
mp2p_icp::render_params_planes_t::render_params_planes_t
render_params_planes_t()=default
mp2p_icp::render_params_pairings_pt2pl_t
Definition: render_params.h:191
mp2p_icp::color_mode_t::colorMapMinCoord
std::optional< float > colorMapMinCoord
Definition: render_params.h:92
mp2p_icp::render_params_pairings_pt2pl_t::planePatchSize
double planePatchSize
Definition: render_params.h:199
mp2p_icp::pairings_render_params_t::pt2ln
render_params_pairings_pt2ln_t pt2ln
Definition: render_params.h:220
mp2p_icp::render_params_planes_t
Definition: render_params.h:32
mp2p_icp::render_params_pairings_pt2pl_t::render_params_pairings_pt2pl_t
render_params_pairings_pt2pl_t()=default
mp2p_icp::render_params_lines_t::length
double length
all lines with same length
Definition: render_params.h:56
mp2p_icp::render_params_pairings_pt2ln_t::visible
bool visible
Definition: render_params.h:206
mp2p_icp::pairings_render_params_t::pairings_render_params_t
pairings_render_params_t()=default
mp2p_icp::Coordinate
Coordinate
Definition: render_params.h:67
mp2p_icp::render_params_planes_t::operator!=
bool operator!=(const render_params_planes_t &o) const
Definition: render_params.h:46
mp2p_icp::render_params_planes_t::halfWidth
double halfWidth
Definition: render_params.h:37
layer_name_t.h
mp2p_icp::render_params_point_layer_t::render_voxelmaps_free_space
bool render_voxelmaps_free_space
Definition: render_params.h:131
mp2p_icp::render_params_lines_t
Definition: render_params.h:50
mp2p_icp::render_params_points_t::allLayers
render_params_point_layer_t allLayers
Definition: render_params.h:153
mp2p_icp::render_params_point_layer_t::color
mrpt::img::TColor color
Definition: render_params.h:124
mp2p_icp::render_params_point_layer_t::pointSize
float pointSize
Definition: render_params.h:121
mp2p_icp::render_params_point_layer_t::render_params_point_layer_t
render_params_point_layer_t()=default
mp2p_icp::color_mode_t::keep_original_cloud_color
bool keep_original_cloud_color
Definition: render_params.h:77
mp2p_icp::render_params_planes_t::gridSpacing
double gridSpacing
Definition: render_params.h:38
mp2p_icp::render_params_t::lines
render_params_lines_t lines
Definition: render_params.h:172
mp2p_icp::render_params_t
Definition: render_params.h:167
mp2p_icp::render_params_lines_t::operator==
bool operator==(const render_params_lines_t &o) const
Definition: render_params.h:59
MRPT_FILL_ENUM_MEMBER
MRPT_FILL_ENUM_MEMBER(mp2p_icp::Coordinate, X)
mp2p_icp::render_params_pairings_pt2ln_t::lineColor
mrpt::img::TColor lineColor
Definition: render_params.h:209
mp2p_icp::render_params_lines_t::lengths
std::optional< std::vector< double > > lengths
individual lengths
Definition: render_params.h:57
mp2p_icp::render_params_points_t::perLayer
std::map< layer_name_t, render_params_point_layer_t > perLayer
Definition: render_params.h:157
mp2p_icp::render_params_lines_t::render_params_lines_t
render_params_lines_t()=default
mp2p_icp::render_params_pairings_pt2ln_t::lineLength
double lineLength
Definition: render_params.h:210
mp2p_icp::color_mode_t
Definition: render_params.h:74
mp2p_icp::render_params_planes_t::operator==
bool operator==(const render_params_planes_t &o) const
Definition: render_params.h:41
mp2p_icp::render_params_pairings_pt2pt_t
Definition: render_params.h:182
mp2p_icp::render_params_t::operator==
bool operator==(const render_params_t &o) const
Definition: render_params.h:175
mp2p_icp::render_params_points_t::operator!=
bool operator!=(const render_params_points_t &o) const
Definition: render_params.h:163
mp2p_icp::render_params_points_t::operator==
bool operator==(const render_params_points_t &o) const
Definition: render_params.h:159
mp2p_icp::render_params_points_t::render_params_points_t
render_params_points_t()=default
mp2p_icp::render_params_points_t
Definition: render_params.h:143
mp2p_icp::render_params_point_layer_t::colorMode
std::optional< color_mode_t > colorMode
Definition: render_params.h:128
mp2p_icp::render_params_pairings_pt2ln_t::render_params_pairings_pt2ln_t
render_params_pairings_pt2ln_t()=default
mp2p_icp::render_params_lines_t::color
mrpt::img::TColor color
Definition: render_params.h:55
mp2p_icp::render_params_t::operator!=
bool operator!=(const render_params_t &o) const
Definition: render_params.h:179
mp2p_icp::render_params_planes_t::color
mrpt::img::TColor color
Definition: render_params.h:39
mp2p_icp::Coordinate::X
@ X
mp2p_icp::render_params_pairings_pt2ln_t
Definition: render_params.h:202
mp2p_icp::pairings_render_params_t
Definition: render_params.h:214
mp2p_icp::color_mode_t::colorMapMaxCoord
std::optional< float > colorMapMaxCoord
Definition: render_params.h:92
mp2p_icp::render_params_lines_t::operator!=
bool operator!=(const render_params_lines_t &o) const
Definition: render_params.h:64
mp2p_icp::color_mode_t::colorMap
mrpt::img::TColormap colorMap
Definition: render_params.h:80
mp2p_icp::render_params_points_t::visible
bool visible
Definition: render_params.h:149
mp2p_icp::render_params_t::render_params_t
render_params_t()=default


mp2p_icp
Author(s):
autogenerated on Mon May 26 2025 02:45:50