SourceXtractorPlusPlus
0.8
Please provide a description of the project.
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
SEImplementation
CheckImages
CheckImages.h
Go to the documentation of this file.
1
17
/*
18
* CheckImages.h
19
*
20
* Created on: May 30, 2017
21
* Author: mschefer
22
*/
23
24
#ifndef _SEIMPLEMENTATION_CHECKIMAGES_CHECKIMAGES_H_
25
#define _SEIMPLEMENTATION_CHECKIMAGES_CHECKIMAGES_H_
26
27
#include <mutex>
28
#include <map>
29
#include <iostream>
30
31
#include <boost/filesystem/path.hpp>
32
33
#include "
SEFramework/Configuration/Configurable.h
"
34
#include "
SEFramework/CoordinateSystem/CoordinateSystem.h
"
35
#include "
SEFramework/Image/Image.h
"
36
#include "
SEFramework/Image/VectorImage.h
"
37
#include "
SEFramework/Image/ProcessedImage.h
"
38
#include "
SEFramework/Image/WriteableImage.h
"
39
#include "
SEFramework/Frame/Frame.h
"
40
41
42
namespace
SourceXtractor {
43
44
class
CheckImages
:
public
Configurable
{
45
46
public
:
47
48
virtual
~CheckImages
() =
default
;
49
50
void
saveImages
();
51
52
std::shared_ptr<WriteableImage<unsigned int>
>
getSegmentationImage
()
const
{
53
return
m_segmentation_image
;
54
}
55
56
std::shared_ptr<WriteableImage<unsigned int>
>
getPartitionImage
()
const
{
57
return
m_partition_image
;
58
}
59
60
std::shared_ptr<WriteableImage<unsigned int>
>
getGroupImage
()
const
{
61
return
m_group_image
;
62
}
63
64
std::shared_ptr<WriteableImage<unsigned int>
>
getAutoApertureImage
()
const
{
65
return
m_auto_aperture_image
;
66
}
67
68
std::shared_ptr<WriteableImage<unsigned int>
>
getApertureImage
()
const
{
69
return
m_aperture_image
;
70
}
71
72
std::shared_ptr<WriteableImage<SeFloat>
>
getMoffatImage
()
const
{
73
return
m_moffat_image
;
74
}
75
76
std::shared_ptr<WriteableImage<unsigned int>
>
77
getAutoApertureImage
(
std::shared_ptr<const MeasurementImageFrame>
frame);
78
79
std::shared_ptr<WriteableImage<unsigned int>
>
80
getApertureImage
(
std::shared_ptr<const MeasurementImageFrame>
frame);
81
82
std::shared_ptr<WriteableImage<MeasurementImage::PixelType>
>
83
getModelFittingImage
(
std::shared_ptr<const MeasurementImageFrame>
frame);
84
85
std::shared_ptr<WriteableImage<MeasurementImage::PixelType>
>
86
getPsfImage
(
std::shared_ptr<const MeasurementImageFrame>
frame);
87
88
void
setBackgroundCheckImage
(
std::shared_ptr
<
Image<SeFloat>
> background_image) {
89
m_background_image
= background_image;
90
}
91
92
void
setVarianceCheckImage
(
std::shared_ptr
<
Image<SeFloat>
> variance_image) {
93
m_variance_image
= variance_image;
94
}
95
96
void
setFilteredCheckImage
(
std::shared_ptr
<
Image<SeFloat>
> filtered_image) {
97
m_filtered_image
= filtered_image;
98
}
99
100
void
setThresholdedCheckImage
(
std::shared_ptr
<
Image<SeFloat>
> thresholded_image) {
101
m_thresholded_image
= thresholded_image;
102
}
103
104
void
setSnrCheckImage
(
std::shared_ptr
<
Image<SeFloat>
> snr_image) {
105
m_snr_image
= snr_image;
106
}
107
108
std::shared_ptr<WriteableImage<SeFloat>
>
getWriteableCheckImage
(
std::string
id
,
int
width,
int
height);
109
void
setCustomCheckImage
(
std::string
id
,
std::shared_ptr
<
Image<SeFloat>
> image);
110
111
virtual
void
reportConfigDependencies
(
Euclid::Configuration::ConfigManager
& manager)
const override
;
112
virtual
void
configure
(
Euclid::Configuration::ConfigManager
& manager)
override
;
113
114
static
CheckImages
&
getInstance
() {
115
if
(
m_instance
==
nullptr
) {
116
m_instance
.reset(
new
CheckImages
);
117
}
118
119
return
*
m_instance
;
120
}
121
122
void
lock
() {
123
m_access_mutex
.
lock
();
124
}
125
126
void
unlock
() {
127
m_access_mutex
.
unlock
();
128
}
129
130
private
:
131
CheckImages
();
132
133
static
std::unique_ptr<CheckImages>
m_instance
;
134
135
// check image
136
std::shared_ptr<WriteableImage<unsigned int>
>
m_segmentation_image
;
137
std::shared_ptr<WriteableImage<unsigned int>
>
m_partition_image
;
138
std::shared_ptr<WriteableImage<unsigned int>
>
m_group_image
;
139
std::shared_ptr<WriteableImage<unsigned int>
>
m_auto_aperture_image
;
140
std::shared_ptr<WriteableImage<unsigned int>
>
m_aperture_image
;
141
std::shared_ptr<WriteableImage<SeFloat>
>
m_moffat_image
;
142
std::map<std::shared_ptr<const MeasurementImageFrame>
, decltype(
m_aperture_image
)>
m_measurement_aperture_images
;
143
std::map<std::shared_ptr<const MeasurementImageFrame>
, decltype(
m_auto_aperture_image
)>
m_measurement_auto_aperture_images
;
144
std::map<std::shared_ptr<const MeasurementImageFrame>
,
std::shared_ptr<WriteableImage<MeasurementImage::PixelType>
>>
m_check_image_model_fitting
,
m_check_image_psf
;
145
146
std::shared_ptr<DetectionImage>
m_detection_image
;
147
std::shared_ptr<Image<SeFloat>
>
m_background_image
;
148
std::shared_ptr<Image<SeFloat>
>
m_filtered_image
;
149
std::shared_ptr<Image<SeFloat>
>
m_thresholded_image
;
150
std::shared_ptr<Image<SeFloat>
>
m_snr_image
;
151
std::shared_ptr<WeightImage>
m_variance_image
;
152
std::shared_ptr<CoordinateSystem>
m_coordinate_system
;
153
154
boost::filesystem::path
m_model_fitting_image_filename
;
155
boost::filesystem::path
m_residual_filename
;
156
boost::filesystem::path
m_model_background_filename
;
157
boost::filesystem::path
m_model_variance_filename
;
158
boost::filesystem::path
m_segmentation_filename
;
159
boost::filesystem::path
m_partition_filename
;
160
boost::filesystem::path
m_group_filename
;
161
boost::filesystem::path
m_filtered_filename
;
162
boost::filesystem::path
m_thresholded_filename
;
163
boost::filesystem::path
m_snr_filename
;
164
boost::filesystem::path
m_auto_aperture_filename
;
165
boost::filesystem::path
m_aperture_filename
;
166
boost::filesystem::path
m_moffat_filename
;
167
boost::filesystem::path
m_psf_filename
;
168
169
std::map<boost::filesystem::path, std::tuple<std::shared_ptr<Image<SeFloat>
>,
bool
>>
m_custom_images
;
170
171
std::mutex
m_access_mutex
;
172
};
173
174
}
175
176
177
178
#endif
/* _SEIMPLEMENTATION_CHECKIMAGES_CHECKIMAGES_H_ */
SourceXtractor::CheckImages::setBackgroundCheckImage
void setBackgroundCheckImage(std::shared_ptr< Image< SeFloat >> background_image)
Definition:
CheckImages.h:88
SourceXtractor::CheckImages::getAutoApertureImage
std::shared_ptr< WriteableImage< unsigned int > > getAutoApertureImage() const
Definition:
CheckImages.h:64
SourceXtractor::CheckImages::m_partition_filename
boost::filesystem::path m_partition_filename
Definition:
CheckImages.h:159
SourceXtractor::CheckImages::setThresholdedCheckImage
void setThresholdedCheckImage(std::shared_ptr< Image< SeFloat >> thresholded_image)
Definition:
CheckImages.h:100
std::shared_ptr
SourceXtractor::CheckImages::m_model_background_filename
boost::filesystem::path m_model_background_filename
Definition:
CheckImages.h:156
std::mutex::unlock
T unlock(T...args)
SourceXtractor::CheckImages::m_coordinate_system
std::shared_ptr< CoordinateSystem > m_coordinate_system
Definition:
CheckImages.h:152
SourceXtractor::CheckImages::getMoffatImage
std::shared_ptr< WriteableImage< SeFloat > > getMoffatImage() const
Definition:
CheckImages.h:72
SourceXtractor::CheckImages::m_filtered_filename
boost::filesystem::path m_filtered_filename
Definition:
CheckImages.h:161
SourceXtractor::CheckImages::setSnrCheckImage
void setSnrCheckImage(std::shared_ptr< Image< SeFloat >> snr_image)
Definition:
CheckImages.h:104
SourceXtractor::CheckImages::m_partition_image
std::shared_ptr< WriteableImage< unsigned int > > m_partition_image
Definition:
CheckImages.h:137
SourceXtractor::CheckImages::m_thresholded_filename
boost::filesystem::path m_thresholded_filename
Definition:
CheckImages.h:162
SourceXtractor::CheckImages::setCustomCheckImage
void setCustomCheckImage(std::string id, std::shared_ptr< Image< SeFloat >> image)
Definition:
CheckImages.cpp:58
SourceXtractor::CheckImages::~CheckImages
virtual ~CheckImages()=default
SourceXtractor::CheckImages::m_measurement_auto_aperture_images
std::map< std::shared_ptr< const MeasurementImageFrame >, decltype(m_auto_aperture_image)> m_measurement_auto_aperture_images
Definition:
CheckImages.h:143
SourceXtractor::CheckImages::m_custom_images
std::map< boost::filesystem::path, std::tuple< std::shared_ptr< Image< SeFloat > >, bool > > m_custom_images
Definition:
CheckImages.h:169
SourceXtractor::CheckImages::m_model_variance_filename
boost::filesystem::path m_model_variance_filename
Definition:
CheckImages.h:157
SourceXtractor::CheckImages::m_aperture_filename
boost::filesystem::path m_aperture_filename
Definition:
CheckImages.h:165
SourceXtractor::CheckImages
Definition:
CheckImages.h:44
SourceXtractor::CheckImages::m_aperture_image
std::shared_ptr< WriteableImage< unsigned int > > m_aperture_image
Definition:
CheckImages.h:140
SourceXtractor::CheckImages::setFilteredCheckImage
void setFilteredCheckImage(std::shared_ptr< Image< SeFloat >> filtered_image)
Definition:
CheckImages.h:96
SourceXtractor::CheckImages::unlock
void unlock()
Definition:
CheckImages.h:126
SourceXtractor::Configurable
Interface of objects which can be configured.
Definition:
Configurable.h:37
SourceXtractor::CheckImages::m_snr_filename
boost::filesystem::path m_snr_filename
Definition:
CheckImages.h:163
SourceXtractor::CheckImages::m_instance
static std::unique_ptr< CheckImages > m_instance
Definition:
CheckImages.h:133
std::map
STL class.
std::mutex
WriteableImage.h
std::string
STL class.
Image.h
SourceXtractor::CheckImages::m_filtered_image
std::shared_ptr< Image< SeFloat > > m_filtered_image
Definition:
CheckImages.h:148
SourceXtractor::CheckImages::m_measurement_aperture_images
std::map< std::shared_ptr< const MeasurementImageFrame >, decltype(m_aperture_image)> m_measurement_aperture_images
Definition:
CheckImages.h:142
SourceXtractor::CheckImages::m_auto_aperture_filename
boost::filesystem::path m_auto_aperture_filename
Definition:
CheckImages.h:164
SourceXtractor::CheckImages::m_group_filename
boost::filesystem::path m_group_filename
Definition:
CheckImages.h:160
SourceXtractor::CheckImages::getSegmentationImage
std::shared_ptr< WriteableImage< unsigned int > > getSegmentationImage() const
Definition:
CheckImages.h:52
SourceXtractor::CheckImages::getModelFittingImage
std::shared_ptr< WriteableImage< MeasurementImage::PixelType > > getModelFittingImage(std::shared_ptr< const MeasurementImageFrame > frame)
Definition:
CheckImages.cpp:171
ProcessedImage.h
Frame.h
VectorImage.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:114
SourceXtractor::CheckImages::m_psf_filename
boost::filesystem::path m_psf_filename
Definition:
CheckImages.h:167
SourceXtractor::CheckImages::m_segmentation_image
std::shared_ptr< WriteableImage< unsigned int > > m_segmentation_image
Definition:
CheckImages.h:136
Euclid::Configuration::ConfigManager
SourceXtractor::CheckImages::m_access_mutex
std::mutex m_access_mutex
Definition:
CheckImages.h:171
std::mutex::lock
T lock(T...args)
SourceXtractor::CheckImages::configure
virtual void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition:
CheckImages.cpp:62
SourceXtractor::CheckImages::getApertureImage
std::shared_ptr< WriteableImage< unsigned int > > getApertureImage() const
Definition:
CheckImages.h:68
SourceXtractor::CheckImages::lock
void lock()
Definition:
CheckImages.h:122
SourceXtractor::CheckImages::reportConfigDependencies
virtual void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition:
CheckImages.cpp:38
SourceXtractor::CheckImages::m_check_image_model_fitting
std::map< std::shared_ptr< const MeasurementImageFrame >, std::shared_ptr< WriteableImage< MeasurementImage::PixelType > > > m_check_image_model_fitting
Definition:
CheckImages.h:144
SourceXtractor::CheckImages::m_moffat_image
std::shared_ptr< WriteableImage< SeFloat > > m_moffat_image
Definition:
CheckImages.h:141
SourceXtractor::CheckImages::CheckImages
CheckImages()
Definition:
CheckImages.cpp:35
CoordinateSystem.h
SourceXtractor::CheckImages::getPsfImage
std::shared_ptr< WriteableImage< MeasurementImage::PixelType > > getPsfImage(std::shared_ptr< const MeasurementImageFrame > frame)
Definition:
CheckImages.cpp:205
SourceXtractor::CheckImages::m_snr_image
std::shared_ptr< Image< SeFloat > > m_snr_image
Definition:
CheckImages.h:150
std::unique_ptr
STL class.
SourceXtractor::CheckImages::getGroupImage
std::shared_ptr< WriteableImage< unsigned int > > getGroupImage() const
Definition:
CheckImages.h:60
SourceXtractor::CheckImages::m_auto_aperture_image
std::shared_ptr< WriteableImage< unsigned int > > m_auto_aperture_image
Definition:
CheckImages.h:139
SourceXtractor::CheckImages::m_check_image_psf
std::map< std::shared_ptr< const MeasurementImageFrame >, std::shared_ptr< WriteableImage< MeasurementImage::PixelType > > > m_check_image_psf
Definition:
CheckImages.h:144
SourceXtractor::CheckImages::m_background_image
std::shared_ptr< Image< SeFloat > > m_background_image
Definition:
CheckImages.h:147
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::CheckImages::m_thresholded_image
std::shared_ptr< Image< SeFloat > > m_thresholded_image
Definition:
CheckImages.h:149
SourceXtractor::CheckImages::m_detection_image
std::shared_ptr< DetectionImage > m_detection_image
Definition:
CheckImages.h:146
SourceXtractor::CheckImages::m_group_image
std::shared_ptr< WriteableImage< unsigned int > > m_group_image
Definition:
CheckImages.h:138
SourceXtractor::CheckImages::getWriteableCheckImage
std::shared_ptr< WriteableImage< SeFloat > > getWriteableCheckImage(std::string id, int width, int height)
Definition:
CheckImages.cpp:42
SourceXtractor::CheckImages::m_moffat_filename
boost::filesystem::path m_moffat_filename
Definition:
CheckImages.h:166
SourceXtractor::CheckImages::getPartitionImage
std::shared_ptr< WriteableImage< unsigned int > > getPartitionImage() const
Definition:
CheckImages.h:56
SourceXtractor::CheckImages::saveImages
void saveImages()
Definition:
CheckImages.cpp:231
SourceXtractor::CheckImages::setVarianceCheckImage
void setVarianceCheckImage(std::shared_ptr< Image< SeFloat >> variance_image)
Definition:
CheckImages.h:92
SourceXtractor::CheckImages::m_residual_filename
boost::filesystem::path m_residual_filename
Definition:
CheckImages.h:155
SourceXtractor::CheckImages::m_model_fitting_image_filename
boost::filesystem::path m_model_fitting_image_filename
Definition:
CheckImages.h:154
Configurable.h
SourceXtractor::CheckImages::m_variance_image
std::shared_ptr< WeightImage > m_variance_image
Definition:
CheckImages.h:151
SourceXtractor::CheckImages::m_segmentation_filename
boost::filesystem::path m_segmentation_filename
Definition:
CheckImages.h:158
Generated by
1.8.5