SourceXtractorPlusPlus  0.12
Please provide a description of the project.
ImageProcessingList.h
Go to the documentation of this file.
1 
17 /*
18  * ImageProcessingList.h
19  *
20  * Created on: Sep 15, 2016
21  * Author: mschefer
22  */
23 
24 #ifndef _SEFRAMEWORK_IMAGE_IMAGEPROCESSINGLIST_H_
25 #define _SEFRAMEWORK_IMAGE_IMAGEPROCESSINGLIST_H_
26 
27 #include <memory>
28 #include <vector>
29 
31 
32 namespace SourceXtractor {
33 
34 template<typename T>
36 public:
37  virtual ~ImageProcessingList() = default;
38 
40  : m_processing_list(processing_list) {}
41 
43  auto processed_image = image;
44  for (auto& processing_step : m_processing_list) {
45  processed_image = processing_step->processImage(processed_image);
46  }
47 
48  return processed_image;
49  }
50  virtual std::shared_ptr<Image<T>> processImage(std::shared_ptr<Image<T>> image, std::shared_ptr<Image<T>> variance, T threshold) const override {
51  auto processed_image = image;
52  for (auto& processing_step : m_processing_list) {
53  processed_image = processing_step->processImage(processed_image, variance, threshold);
54  }
55 
56  return processed_image;
57  }
58 
59 private:
61 
62 };
63 
65 
66 }
67 
68 #endif /* SEFRAMEWORK_SEFRAMEWORK_IMAGE_IMAGEPROCESSINGLIST_H_ */
ImageProcessingList(const std::vector< std::shared_ptr< ImageProcessing< T >>> &processing_list)
virtual ~ImageProcessingList()=default
virtual std::shared_ptr< Image< T > > processImage(std::shared_ptr< Image< T >> image, std::shared_ptr< Image< T >> variance, T threshold) const override
std::vector< std::shared_ptr< ImageProcessing< T > > > m_processing_list
STL class.
virtual std::shared_ptr< Image< T > > processImage(std::shared_ptr< Image< T >> image) const override
Interface representing an image.
Definition: Image.h:43