SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
ReferenceCoordinates
ReferenceCoordinatesTask.cpp
Go to the documentation of this file.
1
17
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
if
(
m_coordinate_system
) {
36
ref_coords =
m_coordinate_system
;
37
}
else
{
38
ref_coords = source.
getProperty
<
MeasurementFrameCoordinates
>(0).getCoordinateSystem();
39
}
40
}
41
42
source.
setProperty
<
ReferenceCoordinates
>(ref_coords);
43
}
44
45
}
// SEImplementation namespace
46
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::ReferenceCoordinatesTask::m_coordinate_system
std::shared_ptr< CoordinateSystem > m_coordinate_system
Definition
ReferenceCoordinatesTask.h:48
SourceXtractor::ReferenceCoordinates
Definition
ReferenceCoordinates.h:26
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition
SourceInterface.h:46
SourceXtractor::SourceInterface::setProperty
void setProperty(Args... args)
Definition
SourceInterface.h:72
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition
SourceInterface.h:57
SourceXtractor
Definition
Aperture.h:30
std::shared_ptr
Generated by
1.15.0