FotoSHOCK
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
src
core
rootops
RootCreateImage.hpp
1
/*
2
* Copyright 2011, 2012 Lukas Jirkovsky
3
*
4
* This file is part of FotoSHOCKcore.
5
*
6
* FotoSHOCKcore is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, version 3 of the License.
9
*
10
* FotoSHOCKcore is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with FotoSHOCKcore. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef ROOTCREATEIMAGE_H
20
#define ROOTCREATEIMAGE_H
21
22
#include "ImageOperation.hpp"
23
24
namespace
FotoSHOCKcore {
25
27
34
class
RootCreateImage
:
public
ImageOperationDescriptor
,
public
ImageOperation
{
35
public
:
36
RootCreateImage
();
37
RootCreateImage
(
FotoSHOCKcore::PixelData
format,
unsigned
int
width,
unsigned
int
height,
const
std::string color);
38
39
void
prepare(
FotoSHOCKcore::PixelData
format,
unsigned
int
width,
unsigned
int
height,
const
std::string color);
40
41
// ImageOperationDescriptor
42
virtual
const
char
*
name
() {
return
"Root"
; }
43
virtual
const
char
*
description
() {
return
"An image source."
; }
44
virtual
ImageOperation
*
operation
();
45
virtual
InputProto
inputPrototype
() {
InputProto
tmp;
return
tmp; }
46
virtual
ImageOperationType
operationType
() {
return
ImageOperationDescriptor::TypeRoot
; }
47
virtual
OutputProto
outputPrototype
() {
48
OutputProto
proto;
49
proto.
addOutput
(
PixelData
(
ValueTypeEnum::ANY
, 0, 0,
ColorSpaceEnum::ANY
));
50
return
proto;
51
}
52
53
// ImageOperation
54
virtual
void
runOperation(
const
Inputs
& sources,
const
Outputs
& dest, vector<UpdateInfo>& ROI,
const
long
int
stamp);
55
virtual
bool
isPrepared
();
56
virtual
void
serialize
(
XmlSerializer
& serializer);
57
private
:
58
bool
m_prepared;
59
PixelData
m_format;
60
unsigned
int
m_width;
61
unsigned
int
m_height;
62
std::string m_color;
63
};
64
65
}
66
67
#endif // ROOTLOADIMAGE_H
Generated on Sat Jun 29 2013 14:25:18 for FotoSHOCK by
1.8.4