SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
ReferenceCoordinates
ReferenceCoordinatesTask.cpp
Go to the documentation of this file.
1
18
#include "
SEImplementation/Plugin/ReferenceCoordinates/ReferenceCoordinatesTask.h
"
19
20
#include "
SEImplementation/Plugin/DetectionFrameCoordinates/DetectionFrameCoordinates.h
"
21
#include "
SEImplementation/Plugin/MeasurementFrameCoordinates/MeasurementFrameCoordinates.h
"
22
#include "
SEImplementation/Plugin/ReferenceCoordinates/ReferenceCoordinates.h
"
23
24
namespace
SourceXtractor
{
25
26
void
ReferenceCoordinatesTask::computeProperties
(
SourceInterface
&
source
)
const
{
27
28
std::shared_ptr<CoordinateSystem>
ref_coords
;
29
30
// Either detection or first measurement image
31
try
{
32
ref_coords
=
source
.getProperty<
DetectionFrameCoordinates
>().getCoordinateSystem();
33
}
34
catch
(
PropertyNotFoundException
&) {
35
ref_coords
=
source
.getProperty<
MeasurementFrameCoordinates
>(0).getCoordinateSystem();
36
}
37
38
source
.setProperty<
ReferenceCoordinates
>(
ref_coords
);
39
}
40
41
}
// SEImplementation namespace
42
DetectionFrameCoordinates.h
MeasurementFrameCoordinates.h
ReferenceCoordinatesTask.h
ReferenceCoordinates.h
SourceXtractor::DetectionFrameCoordinates
Definition
DetectionFrameCoordinates.h:26
SourceXtractor::MeasurementFrameCoordinates
Definition
MeasurementFrameCoordinates.h:26
SourceXtractor::PropertyNotFoundException
An exception indicating that a Property was not available and could not be computed on demand.
Definition
PropertyNotFoundException.h:36
SourceXtractor::ReferenceCoordinatesTask::computeProperties
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition
ReferenceCoordinatesTask.cpp:26
SourceXtractor::ReferenceCoordinates
Definition
ReferenceCoordinates.h:26
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition
SourceInterface.h:46
std::function
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0