SourceXtractorPlusPlus
0.11
Please provide a description of the project.
SEFramework
SEFramework
Image
MirrorImage.h
Go to the documentation of this file.
1
17
/*
18
* @file SEFramework/Image/ReflectImage.h
19
* @date 11/09/18
20
* @author Alejandro Alvarez Ayllon
21
*/
22
23
#ifndef _SEFRAMEWORK_IMAGE_MIRRORIMAGE_H
24
#define _SEFRAMEWORK_IMAGE_MIRRORIMAGE_H
25
26
#include "
SEFramework/Image/ImageBase.h
"
27
28
namespace
SourceXtractor
{
29
34
template
<
typename
T>
35
class
MirrorImage
:
public
ImageBase
<T> {
36
protected
:
37
MirrorImage
(
std::shared_ptr
<
const
Image<T>
> img) :
m_img
{img} {
38
}
39
40
public
:
41
template
<
typename
... Args>
42
static
std::shared_ptr<MirrorImage<T>
>
create
(Args &&... args) {
43
return
std::shared_ptr<MirrorImage<T>
>(
new
MirrorImage
{std::forward<Args>(args)...});
44
}
45
46
std::string
getRepr
()
const override
{
47
return
"MirrorImage("
+
m_img
->getRepr() +
")"
;
48
}
49
50
int
getWidth
()
const override
{
51
return
m_img
->getWidth();
52
}
53
54
int
getHeight
()
const override
{
55
return
m_img
->getHeight();
56
}
57
58
T
getValue
(
int
x
,
int
y
)
const override
{
59
x
=
m_img
->getWidth() -
x
- 1;
60
y
=
m_img
->getHeight() -
y
- 1;
61
return
m_img
->getValue(
x
,
y
);
62
}
63
64
private
:
65
std::shared_ptr<const Image<T>
>
m_img
;
66
};
67
68
}
// end SourceXtractor
69
70
#endif // _SEFRAMEWORK_IMAGE_MIRRORIMAGE_H
ImageBase.h
std::string
STL class.
std::shared_ptr
STL class.
SourceXtractor::MirrorImage::MirrorImage
MirrorImage(std::shared_ptr< const Image< T >> img)
Definition:
MirrorImage.h:37
SourceXtractor::MirrorImage::create
static std::shared_ptr< MirrorImage< T > > create(Args &&... args)
Definition:
MirrorImage.h:42
SourceXtractor::MirrorImage
Mirrors an image in both X and Y axes.
Definition:
MirrorImage.h:35
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::MirrorImage::getValue
T getValue(int x, int y) const override
Returns the value of the pixel with the coordinates (x,y)
Definition:
MirrorImage.h:58
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:93
SourceXtractor::MirrorImage::getRepr
std::string getRepr() const override
Get a string identifying this image in a human readable manner.
Definition:
MirrorImage.h:46
SourceXtractor::MirrorImage::getHeight
int getHeight() const override
Returns the height of the image in pixels.
Definition:
MirrorImage.h:54
SourceXtractor::MirrorImage::getWidth
int getWidth() const override
Returns the width of the image in pixels.
Definition:
MirrorImage.h:50
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:93
SourceXtractor::ImageBase
Definition:
ImageBase.h:35
SourceXtractor::MirrorImage::m_img
std::shared_ptr< const Image< T > > m_img
Definition:
MirrorImage.h:65
Generated by
1.8.18