SourceXtractorPlusPlus
0.10
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
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
std::shared_ptr
SourceXtractor::MirrorImage
Mirrors an image in both X and Y axes.
Definition:
MirrorImage.h:35
SourceXtractor::ImageBase
Definition:
ImageBase.h:35
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:93
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
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:93
std::string
STL class.
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::create
static std::shared_ptr< MirrorImage< T > > create(Args &&...args)
Definition:
MirrorImage.h:42
SourceXtractor::MirrorImage::MirrorImage
MirrorImage(std::shared_ptr< const Image< T >> img)
Definition:
MirrorImage.h:37
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::MirrorImage::m_img
std::shared_ptr< const Image< T > > m_img
Definition:
MirrorImage.h:65
SourceXtractor::MirrorImage::getWidth
int getWidth() const override
Returns the width of the image in pixels.
Definition:
MirrorImage.h:50
ImageBase.h
Generated by
1.8.5