Skip to content

Commit

Permalink
WIP: Fixing compile problem on github.
Browse files Browse the repository at this point in the history
  • Loading branch information
carsten0x51h committed May 5, 2024
1 parent b50fcbd commit 0d42757
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
8 changes: 5 additions & 3 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
TODO
----

-Make fits writer create specified directories if they do not exist
-Replace "star recognizer" test images -> instead of one big, multiple small ones with only 2-5 stars.
-Fix github build
-Make fits writer create specified directories if they do not exist
-Extract starmath library! -> Need a concept of namespaces, overall structure etc. - First plan!

-> See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1204r0.html
-> See https://stackoverflow.com/questions/2360734/whats-a-good-directory-structure-for-larger-c-projects-using-makefile

-Add unit test for remove_nans() - add parameter to allow specifying size of filter matrix
-Add unit tests for pipeline::io::write()
-Add unit tests for nad pixel interpolator
Expand Down
9 changes: 6 additions & 3 deletions source/focus_finder/common/include/pipeline/view/crop.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ namespace starmath::pipeline {
*
*/
template<typename CropRegionRngT, typename ImageType=float>
static auto cropInternal(const CropRegionRngT & crop_regions, const std::shared_ptr<cimg_library::CImg<ImageType>> &image) {
//static auto
static std::vector<std::shared_ptr<cimg_library::CImg<ImageType>>>
cropInternal(const CropRegionRngT & crop_regions, const std::shared_ptr<cimg_library::CImg<ImageType>> &image) {
return crop_regions
| ranges::view::transform(
[=](const auto & crop_region) {
Expand All @@ -59,19 +61,20 @@ namespace starmath::pipeline {
);
}
)
| ranges::to<std::vector<std::shared_ptr<cimg_library::CImg<ImageType>>>>();
| ranges::to<std::vector>();
}


template<typename ImageType=float>
auto
//std::vector<std::shared_ptr<cimg_library::CImg<ImageType>>>
crop() {
return ranges::view::transform(
[=](const auto & imageRectsPair) {
auto img = imageRectsPair.first;
std::vector<RectT<int>> cropRects = imageRectsPair.second;

return cropInternal(cropRects, img);
return cropInternal(cropRects, img); // std::vector<std::shared_ptr<cimg_library::CImg<ImageType>>>
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ BOOST_AUTO_TEST_CASE(pipeline_star_recognizer_test)
)
| crop()
| views::join
| scale_up(3.0F)
| center_on_star(CentroidAlgorithmFactoryT::getInstance(CentroidAlgorithmTypeT::IWC))
| scale_down(3.0F)
| write(std::filesystem::current_path(), "img_%04d.fit") // NOTE; oath must exist
// | scale_up(3.0F)
// | center_on_star(CentroidAlgorithmFactoryT::getInstance(CentroidAlgorithmTypeT::IWC))
// | scale_down(3.0F)
// | write(std::filesystem::current_path(), "img_%04d.fit") // NOTE; path must exist
| to<std::vector>();


Expand Down

0 comments on commit 0d42757

Please sign in to comment.