SourceXtractorPlusPlus  0.11
Please provide a description of the project.
SourceIdCheckImage.cpp
Go to the documentation of this file.
1 
17 /*
18  * SegmentationCheckImage.h
19  *
20  * Created on: Dec 11, 2017
21  * Author: mschefer
22  */
23 
27 
29 
30 namespace SourceXtractor {
31 
33  if (m_check_image) {
35  for (auto& source : *group) {
36  auto coordinates = source.getProperty<PixelCoordinateList>();
37 
38  // get the ID for each (multithresholded) source
39  const auto& source_id = source.getProperty<SourceID>().getId();
40 
41  // iterate over the pixels and set the source-id value
42  for (auto& coord : coordinates.getCoordinateList()) {
43  m_check_image->setValue(coord.m_x, coord.m_y, source_id);
44  }
45  }
46  }
47 }
48 
49 }
PixelCoordinateList.h
SourceXtractor::PixelCoordinateList
Definition: PixelCoordinateList.h:31
std::lock
T lock(T... args)
std::shared_ptr< SourceGroupInterface >
CheckImages.h
SourceXtractor::SourceIdCheckImage::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceGroupInterface > &group)
Definition: SourceIdCheckImage.cpp:32
std::lock_guard
STL class.
SourceID.h
SourceXtractor::SourceID
Definition: SourceID.h:33
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition: CheckImages.h:114
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::SourceIdCheckImage::m_check_image
std::shared_ptr< WriteableImage< unsigned int > > m_check_image
Definition: SourceIdCheckImage.h:43
SourceIdCheckImage.h