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
ProcessingImageSource.h
Go to the documentation of this file.
1
17
/*
18
* ProcessingImageSource.h
19
*
20
* Created on: May 2, 2018
21
* Author: mschefer
22
*/
23
24
#ifndef _SEFRAMEWORK_IMAGE_PROCESSINGIMAGESOURCE_H_
25
#define _SEFRAMEWORK_IMAGE_PROCESSINGIMAGESOURCE_H_
26
27
#include "
SEFramework/Image/Image.h
"
28
#include "
SEFramework/Image/ImageSource.h
"
29
30
namespace
SourceXtractor {
31
32
template
<
typename
T>
33
class
ProcessingImageSource
:
public
ImageSource
<T>,
public
std::enable_shared_from_this
<ImageSource<T>> {
34
public
:
35
36
ProcessingImageSource
(
std::shared_ptr
<
Image<T>
> image) :
m_image
(image) {}
37
38
virtual
~ProcessingImageSource
() =
default
;
39
40
virtual
std::shared_ptr<ImageTile<T>
>
getImageTile
(
int
x
,
int
y
,
int
width
,
int
height
)
const override
{
41
auto
tile = std::make_shared<ImageTile<T>>((
const_cast<
ProcessingImageSource
*
>
(
this
))->shared_from_this(),
x
,
y
,
width
,
height
);
42
43
generateTile
(
m_image
, *tile, x, y, width, height);
44
45
return
tile;
46
}
47
48
virtual
void
saveTile
(
ImageTile<T>
&
/*tile*/
)
override
{
49
assert(
false
);
50
}
51
53
virtual
int
getWidth
()
const override
{
54
return
m_image
->getWidth();
55
}
56
58
virtual
int
getHeight
()
const override
{
59
return
m_image
->getHeight();
60
}
61
62
protected
:
63
virtual
void
generateTile
(
std::shared_ptr
<
Image<T>
> image,
ImageTile<T>
& tile,
int
x
,
int
y
,
int
width
,
int
height
)
const
= 0;
64
65
std::string
getImageRepr
()
const
{
66
return
m_image
->getRepr();
67
}
68
69
private
:
70
std::shared_ptr<Image<T>
>
m_image
;
71
};
72
73
}
74
75
76
77
#endif
/* _SEFRAMEWORK_IMAGE_PROCESSINGIMAGESOURCE_H_ */
std::shared_ptr
ImageSource.h
SourceXtractor::ProcessingImageSource
Definition:
ProcessingImageSource.h:33
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:93
SourceXtractor::ProcessingImageSource::getWidth
virtual int getWidth() const override
Returns the width of the image in pixels.
Definition:
ProcessingImageSource.h:53
SourceXtractor::ProcessingImageSource::m_image
std::shared_ptr< Image< T > > m_image
Definition:
ProcessingImageSource.h:70
SourceXtractor::ProcessingImageSource::getImageTile
virtual std::shared_ptr< ImageTile< T > > getImageTile(int x, int y, int width, int height) const override
Definition:
ProcessingImageSource.h:40
SourceXtractor::ProcessingImageSource::getHeight
virtual int getHeight() const override
Returns the height of the image in pixels.
Definition:
ProcessingImageSource.h:58
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:93
std::string
STL class.
Image.h
SourceXtractor::ProcessingImageSource::generateTile
virtual void generateTile(std::shared_ptr< Image< T >> image, ImageTile< T > &tile, int x, int y, int width, int height) const =0
SourceXtractor::ProcessingImageSource::~ProcessingImageSource
virtual ~ProcessingImageSource()=default
SourceXtractor::ImageTile
Definition:
ImageTile.h:57
SourceXtractor::ProcessingImageSource::getImageRepr
std::string getImageRepr() const
Definition:
ProcessingImageSource.h:65
std::enable_shared_from_this
SourceXtractor::ImageSource
Definition:
ImageSource.h:41
ModelFitting::height
height
Definition:
CompactModelBase.icpp:16
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::ProcessingImageSource::ProcessingImageSource
ProcessingImageSource(std::shared_ptr< Image< T >> image)
Definition:
ProcessingImageSource.h:36
SourceXtractor::ProcessingImageSource::saveTile
virtual void saveTile(ImageTile< T > &) override
Definition:
ProcessingImageSource.h:48
ModelFitting::width
width
Definition:
CompactModelBase.icpp:16
Generated by
1.8.5