SourceXtractorPlusPlus
0.14
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
BufferedImage.h
Go to the documentation of this file.
1
17
/*
18
* BufferedImage.h
19
*
20
* Created on: Feb 14, 2018
21
* Author: mschefer
22
*/
23
24
#ifndef _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_
25
#define _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_
26
27
#include <mutex>
28
29
#include "
SEFramework/Image/ImageBase.h
"
30
#include "
SEFramework/Image/TileManager.h
"
31
32
33
namespace
SourceXtractor {
34
38
template
<
typename
T>
39
class
BufferedImage
:
public
ImageBase
<T> {
40
protected
:
41
42
BufferedImage
(
std::shared_ptr<const ImageSource>
source,
std::shared_ptr<TileManager>
tile_manager);
43
44
public
:
45
virtual
~BufferedImage
() =
default
;
46
47
static
std::shared_ptr<BufferedImage<T>
>
create
(
std::shared_ptr<const ImageSource>
source,
48
std::shared_ptr<TileManager>
tile_manager =
TileManager::getInstance
());
49
50
std::string
getRepr
()
const override
;
51
53
T
getValue
(
int
x
,
int
y
)
const override
;
54
56
int
getWidth
()
const override
;
57
59
int
getHeight
()
const override
;
60
61
std::shared_ptr<ImageChunk<T>
>
getChunk
(
int
x,
int
y,
int
width
,
int
height
)
const override
;
62
63
protected
:
64
std::shared_ptr<const ImageSource>
m_source
;
65
std::shared_ptr<TileManager>
m_tile_manager
;
66
mutable
std::shared_ptr<ImageTile>
m_current_tile
;
67
68
void
copyOverlappingPixels
(
const
ImageTileWithType<T>
&tile,
std::vector<T>
&output,
69
int
x,
int
y,
int
w,
int
h,
70
int
tile_w,
int
tile_h)
const
;
71
};
72
73
}
74
75
76
#endif
/* _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_ */
std::shared_ptr
SourceXtractor::ImageBase
Definition:
ImageBase.h:35
SourceXtractor::BufferedImage::m_source
std::shared_ptr< const ImageSource > m_source
Definition:
BufferedImage.h:64
SourceXtractor::TileManager::getInstance
static std::shared_ptr< TileManager > getInstance()
Definition:
TileManager.h:136
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:94
SourceXtractor::BufferedImage::BufferedImage
BufferedImage(std::shared_ptr< const ImageSource > source, std::shared_ptr< TileManager > tile_manager)
Definition:
BufferedImage.cpp:28
SourceXtractor::BufferedImage::getChunk
std::shared_ptr< ImageChunk< T > > getChunk(int x, int y, int width, int height) const override
Definition:
BufferedImage.cpp:70
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:94
SourceXtractor::ImageTileWithType
Definition:
ImageTile.h:160
std::string
STL class.
SourceXtractor::BufferedImage::getHeight
int getHeight() const override
Returns the height of the image in pixels.
Definition:
BufferedImage.cpp:64
SourceXtractor::BufferedImage::getValue
T getValue(int x, int y) const override
Returns the value of the pixel with the coordinates (x,y)
Definition:
BufferedImage.cpp:46
SourceXtractor::BufferedImage::getWidth
int getWidth() const override
Returns the width of the image in pixels.
Definition:
BufferedImage.cpp:58
SourceXtractor::BufferedImage::~BufferedImage
virtual ~BufferedImage()=default
SourceXtractor::BufferedImage::m_current_tile
std::shared_ptr< ImageTile > m_current_tile
Definition:
BufferedImage.h:66
SourceXtractor::BufferedImage::copyOverlappingPixels
void copyOverlappingPixels(const ImageTileWithType< T > &tile, std::vector< T > &output, int x, int y, int w, int h, int tile_w, int tile_h) const
Definition:
BufferedImage.cpp:116
std::vector
STL class.
SourceXtractor::BufferedImage::getRepr
std::string getRepr() const override
Get a string identifying this image in a human readable manner.
Definition:
BufferedImage.cpp:41
ModelFitting::height
height
Definition:
CompactModelBase.icpp:19
TileManager.h
ModelFitting::width
width
Definition:
CompactModelBase.icpp:19
SourceXtractor::BufferedImage::m_tile_manager
std::shared_ptr< TileManager > m_tile_manager
Definition:
BufferedImage.h:65
ImageBase.h
SourceXtractor::BufferedImage
Definition:
BufferedImage.h:39
SourceXtractor::BufferedImage::create
static std::shared_ptr< BufferedImage< T > > create(std::shared_ptr< const ImageSource > source, std::shared_ptr< TileManager > tile_manager=TileManager::getInstance())
Definition:
BufferedImage.cpp:34
Generated by
1.8.5