SourceXtractorPlusPlus
0.12
Please provide a description of the project.
SEFramework
SEFramework
Image
Image.h
Go to the documentation of this file.
1
23
#ifndef _SEFRAMEWORK_IMAGE_IMAGE_H
24
#define _SEFRAMEWORK_IMAGE_IMAGE_H
25
26
#include <memory>
27
28
#include "
SEUtils/Types.h
"
29
#include "
SEUtils/PixelCoordinate.h
"
30
31
namespace
SourceXtractor
{
32
33
template
<
typename
T>
34
class
ImageChunk
;
35
36
42
template
<
typename
T>
43
class
Image
{
44
45
public
:
46
47
using
PixelType
= T;
48
52
virtual
~Image
() =
default
;
53
55
virtual
std::string
getRepr
()
const
= 0;
56
58
virtual
T
getValue
(
int
x
,
int
y
)
const
= 0;
59
60
T
getValue
(
PixelCoordinate
pc)
const
{
61
return
getValue
(
pc
.m_x,
pc
.m_y);
62
}
63
65
virtual
int
getWidth
()
const
= 0;
66
68
virtual
int
getHeight
()
const
= 0;
69
70
virtual
std::shared_ptr<ImageChunk<T>
>
getChunk
(
int
x
,
int
y
,
int
width,
int
height)
const
= 0;
71
73
bool
isInside
(
int
x
,
int
y
)
const
{
74
return
x
>= 0 &&
y
>= 0 &&
x
<
getWidth
() &&
y
<
getHeight
();
75
}
76
77
};
/* End of Image class */
78
80
using
DetectionImage
=
Image<SeFloat>
;
81
83
using
MeasurementImage
=
Image<SeFloat>
;
84
86
using
WeightImage
=
Image<SeFloat>
;
87
89
using
FlagImage
=
Image<std::int64_t>
;
90
91
}
/* namespace SourceXtractor */
92
93
94
#endif
SourceXtractor::Image::getValue
T getValue(PixelCoordinate pc) const
Definition:
Image.h:60
std::shared_ptr
Types.h
SourceXtractor::Image::PixelType
T PixelType
Definition:
Image.h:47
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:94
SourceXtractor::Image::getRepr
virtual std::string getRepr() const =0
Get a string identifying this image in a human readable manner.
SourceXtractor::Image::getHeight
virtual int getHeight() const =0
Returns the height of the image in pixels.
SourceXtractor::Image::~Image
virtual ~Image()=default
Destructor.
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:94
SourceXtractor::Image::getChunk
virtual std::shared_ptr< ImageChunk< T > > getChunk(int x, int y, int width, int height) const =0
std::string
STL class.
SourceXtractor::Image::isInside
bool isInside(int x, int y) const
Returns true if the given coordinates are inside the image bounds.
Definition:
Image.h:73
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::Image::getValue
virtual T getValue(int x, int y) const =0
Returns the value of the pixel with the coordinates (x,y)
SourceXtractor::ImageChunk
Definition:
Image.h:34
SourceXtractor::PixelCoordinate
A pixel coordinate made of two integers m_x and m_y.
Definition:
PixelCoordinate.h:37
pc
constexpr double pc
PixelCoordinate.h
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::Image::getWidth
virtual int getWidth() const =0
Returns the width of the image in pixels.
Generated by
1.8.14