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
SEImplementation
Image
DownSampledImagePsf.h
Go to the documentation of this file.
1
17
/*
18
* DownSampledImagePsf.h
19
*
20
* Created on: Nov 5, 2021
21
* Author: mschefer
22
*/
23
24
#ifndef _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_
25
#define _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_
26
27
#include "
ElementsKernel/Exception.h
"
28
#include "
AlexandriaKernel/memory_tools.h
"
29
#include "
ModelFitting/Image/PsfTraits.h
"
30
#include "
SEFramework/Image/VectorImage.h
"
31
#include "
SEFramework/Image/ProcessedImage.h
"
32
#include "
SEFramework/Convolution/Convolution.h
"
33
34
#include "
SEImplementation/Image/ImagePsf.h
"
35
36
namespace
SourceXtractor {
37
38
/*
39
* Encapsulates ImagePsf to provide a downscaled version for performance
40
*/
41
class
DownSampledImagePsf
{
42
public
:
43
44
DownSampledImagePsf
(
double
pixel_scale
,
std::shared_ptr
<
VectorImage<SeFloat>
> image,
double
down_scaling=1.0);
45
46
virtual
~DownSampledImagePsf
() =
default
;
47
48
double
getPixelScale
()
const
;
49
std::size_t
getSize
()
const
;
50
std::shared_ptr<VectorImage<SourceXtractor::SeFloat>
>
getScaledKernel
(
SeFloat
scale)
const
;
51
void
convolve
(
std::shared_ptr
<
WriteableImage<float>
> image)
const
;
52
53
// For ConvolutionContext optimization
54
std::unique_ptr<DFTConvolution<SeFloat>::ConvolutionContext
>
prepare
(
const
std::shared_ptr
<
const
Image<SeFloat>
>& model_ptr)
const
;
55
void
convolve
(
std::shared_ptr
<
WriteableImage<float>
> image,
std::unique_ptr
<
DFTConvolution<SeFloat>::ConvolutionContext
>& context)
const
;
56
57
private
:
58
double
m_down_scaling
;
59
std::shared_ptr<ImagePsf>
m_psf
;
60
};
61
62
}
// end of SourceXtractor
63
64
namespace
ModelFitting {
65
69
template
<>
70
struct
PsfTraits
<SourceXtractor::DownSampledImagePsf> {
71
using
context_t
=
typename
std::unique_ptr<SourceXtractor::ImagePsf::ConvolutionContext>
;
72
static
constexpr
bool
has_context
=
true
;
73
};
74
75
}
// end of ModelFitting
76
77
#endif
/* _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_ */
SourceXtractor::WriteableImage
Definition:
WriteableImage.h:33
SourceXtractor::DownSampledImagePsf::m_down_scaling
double m_down_scaling
Definition:
DownSampledImagePsf.h:58
std::shared_ptr
SourceXtractor::DownSampledImagePsf
Definition:
DownSampledImagePsf.h:41
SourceXtractor::DownSampledImagePsf::DownSampledImagePsf
DownSampledImagePsf(double pixel_scale, std::shared_ptr< VectorImage< SeFloat >> image, double down_scaling=1.0)
Definition:
DownSampledImagePsf.cpp:32
SourceXtractor::DownSampledImagePsf::getScaledKernel
std::shared_ptr< VectorImage< SourceXtractor::SeFloat > > getScaledKernel(SeFloat scale) const
Definition:
DownSampledImagePsf.cpp:85
SourceXtractor::SeFloat
SeFloat32 SeFloat
Definition:
Types.h:32
std::size_t
ImagePsf.h
SourceXtractor::DFTConvolution::ConvolutionContext
Definition:
DFT.h:57
Convolution.h
ProcessedImage.h
SourceXtractor::VectorImage
Image implementation which keeps the pixel values in memory.
Definition:
VectorImage.h:52
VectorImage.h
memory_tools.h
SourceXtractor::DownSampledImagePsf::prepare
std::unique_ptr< DFTConvolution< SeFloat >::ConvolutionContext > prepare(const std::shared_ptr< const Image< SeFloat >> &model_ptr) const
Definition:
DownSampledImagePsf.cpp:99
SourceXtractor::DownSampledImagePsf::~DownSampledImagePsf
virtual ~DownSampledImagePsf()=default
std::unique_ptr
STL class.
SourceXtractor::DownSampledImagePsf::m_psf
std::shared_ptr< ImagePsf > m_psf
Definition:
DownSampledImagePsf.h:59
SourceXtractor::DownSampledImagePsf::getSize
std::size_t getSize() const
Definition:
DownSampledImagePsf.cpp:77
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
PsfTraits.h
Exception.h
pixel_scale
const double pixel_scale
Definition:
TestImage.cpp:74
ModelFitting::PsfTraits::has_context
static constexpr bool has_context
Definition:
PsfTraits.h:39
SourceXtractor::DownSampledImagePsf::getPixelScale
double getPixelScale() const
Definition:
DownSampledImagePsf.cpp:69
ModelFitting::PsfTraits< SourceXtractor::DownSampledImagePsf >::context_t
typename std::unique_ptr< SourceXtractor::ImagePsf::ConvolutionContext > context_t
Definition:
DownSampledImagePsf.h:71
SourceXtractor::DownSampledImagePsf::convolve
void convolve(std::shared_ptr< WriteableImage< float >> image) const
Definition:
DownSampledImagePsf.cpp:93
ModelFitting::PsfTraits
Definition:
PsfTraits.h:37
Generated by
1.8.5