Fix names of format helpers and remove unused

This commit is contained in:
hinger_v committed 2026-08-20 12:30:11 +02:00
1 parent 4bfe7eceea
commit 605c28bc19
4 files changed
+34 -29

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ inline ROI toHalfopenROI(InclusiveROI const &r) {
}
/***********************
* Printint utility
* Printing utility
***********************/
inline std::ostream &operator<<(std::ostream &os, InclusiveROI const &roi) {
os << "ROI (inclusive): x=[" << roi.xmin << ", " << roi.xmax << "], y=["
+4 -4
View File
@@ -3,9 +3,9 @@
#include "aare/RemapDefs.hpp"
namespace aare::remap::format {
static inline std::string toString(defs::Rotation);
static inline std::string toString(defs::SensorPixelGeometry const &g);
static inline std::string toString(defs::GroupStrixelGeometry const &g);
static inline std::string toString(defs::GroupConfig const &c);
// static inline std::string to_string(defs::Rotation);
// static inline std::string to_string(defs::SensorPixelGeometry const &g);
static inline std::string to_string(defs::GroupStrixelGeometry const &g);
static inline std::string to_string(defs::GroupConfig const &c);
inline std::ostream &operator<<(std::ostream &os, defs::GroupConfig const &c);
} // namespace aare::remap::format
+13 -8
View File
@@ -102,20 +102,23 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config,
// -- 1) Rebase the user ROI (rx_roi) into sensor-local coordinates
const InclusiveROI roi_user_local =
inclusiveroi::geom::rebaseROI(roi_user, placement.placement_on_module);
LOG(logDEBUG)
// LOG(logDEBUG)
std::cout
<< "aare::remap::algo::strixel_to_pixel_map: Transformed user ROI: "
<< roi_user_local << std::endl;
LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Group ROI "
"before transformation (as in global config)"
<< group_config.placement_on_sensor << '\n';
// LOG(logDEBUG)
std::cout << "aare::remap::algo::strixel_to_pixel_map: Group ROI "
"before transformation (as in global config)"
<< group_config.placement_on_sensor << '\n';
// -- 2) Apply the physical bond shift first, sensor rotation second.
const InclusiveROI roi_group =
shift_rotate_roi(group_config.placement_on_sensor, pixel, bond_shift,
placement.rotation);
LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Group ROI after "
// LOG(logDEBUG)
std::cout << "aare::remap::algo::strixel_to_pixel_map: Group ROI after "
"transformation (as in local transformation) "
<< roi_group << '\n';
@@ -131,7 +134,8 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config,
return {{}, InclusiveROI::emptyROI()};
}
LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Result of "
// LOG(logDEBUG)
std::cout << "aare::remap::algo::strixel_to_pixel_map: Result of "
"intersecting ROIs "
<< effective_roi << '\n';
@@ -177,7 +181,7 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config,
}
if (min_row > max_row) {
return {{}, effective_roi}; // nothing mapped
return {{}, effective_roi}; // nothing mapped
}
// Now from the found bounds of the strixel grid, we define the space to
@@ -188,7 +192,8 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config,
// And allocate
aare::NDArray<ssize_t, 2> map({nrows, ncols}, -1);
LOG(logDEBUG)
// LOG(logDEBUG)
std::cout
<< "aare::remap::algo::strixel_to_pixel_map: Resulting strixel grid: ("
<< map.shape(0) << ", " << map.shape(1) << ")" << '\n';
+16 -16
View File
@@ -3,23 +3,23 @@
#include <sstream>
namespace aare::remap::format {
static inline std::string toString(defs::Rotation r) {
return (r == defs::Rotation::Identity ? "Identity" : "Rotate180");
}
// static inline std::string to_string(defs::Rotation r) {
// return (r == defs::Rotation::Identity ? "Identity" : "Rotate180");
// }
static inline std::string toString(defs::SensorPixelGeometry const &g) {
std::ostringstream os;
// static inline std::string to_string(defs::SensorPixelGeometry const &g) {
// std::ostringstream os;
os << "SensorPixelGeometry\n"
<< " cols x rows: " << g.num_pix_x << " x " << g.num_pix_y << "\n"
<< " guardring :\n"
<< " x = " << g.guardring.x << "\n"
<< " y = " << g.guardring.y << "\n";
// os << "SensorPixelGeometry\n"
// << " cols x rows: " << g.num_pix_x << " x " << g.num_pix_y << "\n"
// << " guardring :\n"
// << " x = " << g.guardring.x << "\n"
// << " y = " << g.guardring.y << "\n";
return os.str();
}
// return os.str();
// }
static inline std::string toString(defs::GroupStrixelGeometry const &g) {
static inline std::string to_string(defs::GroupStrixelGeometry const &g) {
std::ostringstream os;
os << "GroupStrixelGeometry\n"
@@ -29,11 +29,11 @@ static inline std::string toString(defs::GroupStrixelGeometry const &g) {
return os.str();
}
static inline std::string toString(defs::GroupConfig const &c) {
static inline std::string to_string(defs::GroupConfig const &c) {
std::ostringstream os;
os << "GroupConfig\n"
<< toString(c.strixel) << "\n"
<< to_string(c.strixel) << "\n"
<< " placement on sensor:\n"
<< c.placement_on_sensor << "\n";
@@ -41,6 +41,6 @@ static inline std::string toString(defs::GroupConfig const &c) {
}
inline std::ostream &operator<<(std::ostream &os, defs::GroupConfig const &c) {
return os << toString(c);
return os << to_string(c);
}
} // namespace aare::remap::format