SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
CheckImages
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
24
#include "
SEImplementation/Plugin/DetectionFrameInfo/DetectionFrameInfo.h
"
25
#include "
SEImplementation/Property/PixelCoordinateList.h
"
26
#include "
SEImplementation/CheckImages/CheckImages.h
"
27
#include "
SEImplementation/Plugin/SourceIDs/SourceID.h
"
28
29
#include "
SEImplementation/CheckImages/SourceIdCheckImage.h
"
30
31
namespace
SourceXtractor {
32
33
void
SourceIdCheckImage::handleMessage
(
const
SourceGroupInterface
& group) {
34
auto
hdu_index = group.
cbegin
()->getProperty<
DetectionFrameInfo
>().getHduIndex();
35
auto
check_image =
CheckImages::getInstance
().
getPartitionImage
(hdu_index);
36
if
(check_image !=
nullptr
) {
37
for
(
auto
& source : group) {
38
const
auto
& coordinates = source.getProperty<
PixelCoordinateList
>();
39
40
// get the ID for each (multithresholded) source
41
const
auto
& source_id = source.getProperty<
SourceID
>().getId();
42
43
// iterate over the pixels and set the source-id value
44
for
(
auto
& coord : coordinates.getCoordinateList()) {
45
check_image->setValue(coord.m_x, coord.m_y, source_id);
46
}
47
}
48
}
49
}
50
51
}
PixelCoordinateList.h
SourceXtractor::SourceIdCheckImage::handleMessage
void handleMessage(const SourceGroupInterface &group) override
Definition:
SourceIdCheckImage.cpp:33
SourceXtractor::DetectionFrameInfo
Definition:
DetectionFrameInfo.h:29
SourceXtractor::CheckImages::getPartitionImage
std::shared_ptr< WriteableImage< int > > getPartitionImage(size_t index) const
Definition:
CheckImages.h:64
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:31
SourceIdCheckImage.h
SourceID.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:150
SourceXtractor::SourceGroupInterface::cbegin
virtual const_iterator cbegin() const =0
SourceXtractor::SourceGroupInterface
Defines the interface used to group sources.
Definition:
SourceGroupInterface.h:37
SourceXtractor::SourceID
Definition:
SourceID.h:33
DetectionFrameInfo.h
CheckImages.h
Generated by
1.8.5