|
1 | 1 | #include "scope/command-line/execution/executors.hpp" |
2 | | -#include "scope/common/style.hpp" |
3 | | -#include "common/logging.hpp" |
4 | | -#include "common/time/time.hpp" |
5 | 2 |
|
| 3 | +#include <cstring> |
| 4 | + |
| 5 | +#include <iostream> |
6 | 6 | #include <memory> |
7 | 7 | #include <utility> |
8 | | -#include <cstring> |
| 8 | +#include <vector> |
9 | 9 |
|
10 | | -namespace scope { |
| 10 | +#include "scope/common/style.hpp" |
| 11 | +#include "common/logging.hpp" |
| 12 | +#include "common/time/time.hpp" |
11 | 13 |
|
12 | | -using Image = found::Image; |
| 14 | +namespace scope { |
13 | 15 |
|
14 | | -PrimaryScopePipelineExecutor::PrimaryScopePipelineExecutor(RecalibrationOptions &&options, |
15 | | - std::unique_ptr<NoiseFilterAlgorithm> noiseFilterAlgorithm, |
16 | | - std::unique_ptr<StarCentroidAlgorithm> starCentroidAlgorithm, |
17 | | - std::unique_ptr<OptimizationAlgorithm> optimizationAlgorithm) |
18 | | - : options_(std::move(options)) { |
| 16 | +PrimaryScopePipelineExecutor::PrimaryScopePipelineExecutor( |
| 17 | + RecalibrationOptions &&options, std::unique_ptr<NoiseFilterAlgorithm> noiseFilterAlgorithm, |
| 18 | + std::unique_ptr<StarCentroidAlgorithm> starCentroidAlgorithm, |
| 19 | + std::unique_ptr<OptimizationAlgorithm> optimizationAlgorithm) : |
| 20 | + options_(std::move(options)) { |
19 | 21 | // TODO: change inputs + outputs of stages to actual values we will use |
20 | 22 | std::unique_ptr<found::FunctionStage<Images, Image>> noiseFilterStage(std::move(noiseFilterAlgorithm)); |
21 | | - std::unique_ptr<found::FunctionStage<Image, std::vector<float>>> starCentroidStage(std::move(starCentroidAlgorithm)); |
22 | | - std::unique_ptr<found::FunctionStage<std::vector<float>, std::vector<float>>> optimizationStage(std::move(optimizationAlgorithm)); |
| 23 | + std::unique_ptr<found::FunctionStage<Image, std::vector<float>>> starCentroidStage( |
| 24 | + std::move(starCentroidAlgorithm)); |
| 25 | + std::unique_ptr<found::FunctionStage<std::vector<float>, std::vector<float>>> optimizationStage( |
| 26 | + std::move(optimizationAlgorithm)); |
23 | 27 | this->pipeline_.AddStage(std::move(noiseFilterStage)) |
24 | | - .AddStage(std::move(starCentroidStage)) |
25 | | - .Complete(std::move(optimizationStage)); |
| 28 | + .AddStage(std::move(starCentroidStage)) |
| 29 | + .Complete(std::move(optimizationStage)); |
26 | 30 | } |
27 | 31 |
|
28 | 32 | void PrimaryScopePipelineExecutor::ExecutePipeline() { |
29 | | - // Results are stored within the pipeline, can also be accessed |
30 | | - // via this function call |
31 | 33 | this->pipeline_.Run(this->options_.images); |
32 | 34 | } |
33 | 35 |
|
34 | | -// Will output the values found by this recalibration |
35 | 36 | void PrimaryScopePipelineExecutor::OutputResults() { |
36 | | - //std::vector<float> *&output = this->pipeline_.GetProduct(); |
| 37 | + // std::vector<float> *&output = this->pipeline_.GetProduct(); |
37 | 38 | // TODO: something with output |
38 | 39 | std::cout << "Nothing is implemented :(" << std::endl; |
39 | 40 | } |
40 | 41 |
|
41 | | -} // namespace scope |
| 42 | +} // namespace scope |
0 commit comments