SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Segmentation.h
Go to the documentation of this file.
1
23#ifndef _SEFRAMEWORK_PIPELINE_SEGMENTATION_H
24#define _SEFRAMEWORK_PIPELINE_SEGMENTATION_H
25
26#include <memory>
27#include <type_traits>
28
36
37namespace SourceXtractor {
38
46
53class Segmentation : public PipelineEmitter<SourceInterface> , public Observable<SegmentationProgress> {
54
55public:
57 class Labelling;
58
60 virtual ~Segmentation() = default;
61
63
64 template<class LabellingType, typename ... Args>
67 "LabellingType must inherit from SourceXtractor::Segmentation::Labelling");
68 static_assert(std::is_constructible<LabellingType, Args...>::value,
69 "LabellingType must be constructible from args");
70
72 }
73
76
77private:
80
81}; /* End of Segmentation class */
82
108
116
117} /* namespace SourceXtractor */
118
119#endif
Implements the Observer pattern. Notifications will be made using a message of type T.
Definition Observable.h:51
void requestProcessing(const ProcessSourcesEvent &event)
std::shared_ptr< DetectionImageFrame > m_detection_frame
LabellingListener(const Segmentation &segmentation, std::shared_ptr< DetectionImageFrame > detection_frame)
void publishSource(std::unique_ptr< SourceInterface > source) const
void notifyProgress(int position, int total)
virtual void labelImage(Segmentation::LabellingListener &listener, std::shared_ptr< const DetectionImageFrame > frame)=0
Segmentation takes an image and splits it into individual Sources for further refinement....
void setLabelling(Args... args)
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter_image_processing
Segmentation(std::shared_ptr< DetectionImageFrame::ImageFilter > image_processing)
void processFrame(std::shared_ptr< DetectionImageFrame > frame) const
Processes a Frame notifying Observers with a Source object for each detection.
std::unique_ptr< Labelling > m_labelling
virtual ~Segmentation()=default
Destructor.
T move(T... args)
Event received by SourceGrouping to request the processing of some of the Sources stored.
Used to notify observers of the progress of the processing of the image.