SourceXtractorPlusPlus  0.15
Please provide a description of the project.
DetectionIdCheckImage.cpp
Go to the documentation of this file.
1 
17 /*
18  * DetectionIdCheckImage.cpp
19  *
20  * Created on: Jun 25, 2018
21  * Author: mschefer
22  */
23 
27 
29 
30 namespace SourceXtractor {
31 
33  auto check_image = CheckImages::getInstance().getSegmentationImage();
34  if (check_image != nullptr) {
35  auto coordinates = source->getProperty<PixelCoordinateList>();
36 
37  // get the ID for each detected source
38  const auto& source_id = source->getProperty<SourceId>().getDetectionId();
39 
40  // iterate over the pixels and set the detection_id value
41  for (auto& coord : coordinates.getCoordinateList()) {
42  check_image->setValue(coord.m_x, coord.m_y, source_id);
43  }
44  }
45 }
46 
47 }
PixelCoordinateList.h
SourceXtractor::PixelCoordinateList
Definition: PixelCoordinateList.h:31
DetectionIdCheckImage.h
std::shared_ptr
STL class.
CheckImages.h
SourceId.h
SourceXtractor::SourceId
Definition: SourceId.h:32
SourceXtractor::DetectionIdCheckImage::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceInterface > &source)
Definition: DetectionIdCheckImage.cpp:32
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition: CheckImages.h:136
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::CheckImages::getSegmentationImage
std::shared_ptr< WriteableImage< int > > getSegmentationImage() const
Definition: CheckImages.h:54