SourceXtractorPlusPlus
0.16
Please provide a description of the project.
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_ */
Convolution.h
Exception.h
ImagePsf.h
ProcessedImage.h
PsfTraits.h
pixel_scale
const double pixel_scale
Definition:
TestImage.cpp:74
VectorImage.h
SourceXtractor::DownSampledImagePsf
Definition:
DownSampledImagePsf.h:41
SourceXtractor::DownSampledImagePsf::convolve
void convolve(std::shared_ptr< WriteableImage< float >> image) const
Definition:
DownSampledImagePsf.cpp:78
SourceXtractor::DownSampledImagePsf::m_psf
std::shared_ptr< ImagePsf > m_psf
Definition:
DownSampledImagePsf.h:59
SourceXtractor::DownSampledImagePsf::getPixelScale
double getPixelScale() const
Definition:
DownSampledImagePsf.cpp:66
SourceXtractor::DownSampledImagePsf::m_down_scaling
double m_down_scaling
Definition:
DownSampledImagePsf.h:58
SourceXtractor::DownSampledImagePsf::getScaledKernel
std::shared_ptr< VectorImage< SourceXtractor::SeFloat > > getScaledKernel(SeFloat scale) const
Definition:
DownSampledImagePsf.cpp:74
SourceXtractor::DownSampledImagePsf::prepare
std::unique_ptr< DFTConvolution< SeFloat >::ConvolutionContext > prepare(const std::shared_ptr< const Image< SeFloat >> &model_ptr) const
Definition:
DownSampledImagePsf.cpp:82
SourceXtractor::DownSampledImagePsf::DownSampledImagePsf
DownSampledImagePsf(double pixel_scale, std::shared_ptr< VectorImage< SeFloat >> image, double down_scaling=1.0)
Definition:
DownSampledImagePsf.cpp:32
SourceXtractor::DownSampledImagePsf::~DownSampledImagePsf
virtual ~DownSampledImagePsf()=default
SourceXtractor::DownSampledImagePsf::getSize
std::size_t getSize() const
Definition:
DownSampledImagePsf.cpp:70
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::VectorImage
Image implementation which keeps the pixel values in memory.
Definition:
VectorImage.h:52
SourceXtractor::WriteableImage
Definition:
WriteableImage.h:33
memory_tools.h
ModelFitting
Definition:
AsinhChiSquareComparator.h:30
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::SeFloat
SeFloat32 SeFloat
Definition:
Types.h:32
std::shared_ptr
std::size_t
ModelFitting::PsfTraits< SourceXtractor::DownSampledImagePsf >::context_t
typename std::unique_ptr< SourceXtractor::ImagePsf::ConvolutionContext > context_t
Definition:
DownSampledImagePsf.h:71
ModelFitting::PsfTraits
Definition:
PsfTraits.h:37
ModelFitting::PsfTraits::has_context
static constexpr bool has_context
Definition:
PsfTraits.h:39
SourceXtractor::DFTConvolution::ConvolutionContext
Definition:
DFT.h:57
std::unique_ptr
Generated by
1.9.1