The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cImageAreaLinearColor.h
Go to the documentation of this file.
1
/**
2
* @file cImageAreaLinearColor
3
* file name: cImageAreaLinearColor.h
4
* @author Betti Oesterholz
5
* @date 26.11.2012
6
* @mail Oesterholz@Fib-development.org
7
*
8
* System: C++
9
*
10
* This header specifies a class to store the data of a area in an image,
11
* which has a linear color gradient.
12
*
13
* Copyright (C) @c GPL3 2012 Betti Oesterholz
14
*
15
* This program is free software: you can redistribute it and/or modify
16
* it under the terms of the GNU General Public License (GPL) as
17
* published by the Free Software Foundation, either version 3 of the
18
* License, or any later version.
19
*
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU Lesser General Public License for more details.
24
*
25
* This header specifies a class to store the data of a area in an image,
26
* which as a linear color gradient (in both directions).
27
* If you want to convert an image to Fib structures, you have to search
28
* the image for structures, which can be converted to Fib.
29
* If you have an area with a linear color gradient, you can use this class
30
* to represent it.
31
* For this three color vectors are stored for the color basis
32
* (vecColorBasis) at the point (0,0) and the slope in the two image
33
* dimensions / directions x (vecColorXSlope) and y (vecColorYSlope).
34
* The colors of the points can then be evalued with:
35
* vecColorBasis + x * vecColorXSlope + y * vecColorYSlope
36
* Where x and y are the coordinate components for the first (x) and second
37
* (y) dimension.
38
*/
39
/*
40
History:
41
26.11.2012 Oesterholz created
42
*/
43
44
45
#ifndef ___C_IMAGE_ARAE_LINEAR_COLOR_H__
46
#define ___C_IMAGE_ARAE_LINEAR_COLOR_H__
47
48
#include "version.h"
49
50
#include "
cImageStructure.h
"
51
52
#include "
cVectorProperty.h
"
53
54
55
namespace
fib{
56
57
namespace
algorithms{
58
59
namespace
nConvertToFib{
60
61
namespace
nImage{
62
63
namespace
nStructureData{
64
65
66
class
cImageAreaLinearColor
:
public
cImageStructure
{
67
protected
:
68
69
/**
70
* The color at the point (0,0).
71
* @see getColorBasisOfArea()
72
* @see setColorBasisOfArea()
73
* @see getColorOfPoint
74
*/
75
cVectorProperty
vecColorBasis
;
76
77
/**
78
* The color slope for the x / first dimension.
79
* @see getColorBasisOfArea()
80
* @see setColorBasisOfArea()
81
* @see getColorOfPoint
82
*/
83
cVectorProperty
vecColorXSlope
;
84
85
/**
86
* The color slope for the y / second dimension.
87
* @see getColorBasisOfArea()
88
* @see setColorBasisOfArea()
89
* @see getColorOfPoint
90
*/
91
cVectorProperty
vecColorYSlope
;
92
93
public
:
94
95
/**
96
* standard constructor
97
*
98
* @param vecInColorBasis the color at the point (0,0)
99
* @param vecInColorXSlope the color slope for the x / first dimension
100
* @param vecInColorYSlope the color slope for the y / second dimension
101
*/
102
cImageAreaLinearColor
(
const
cVectorProperty
& vecInColorBasis,
103
const
cVectorProperty
& vecInColorXSlope,
104
const
cVectorProperty
& vecInColorYSlope );
105
106
/**
107
* copy constructor
108
*
109
* @param structureToCopy the image structure to copy
110
*/
111
cImageAreaLinearColor
(
const
cImageAreaLinearColor
& structureToCopy );
112
113
114
/**
115
* destructor
116
*/
117
virtual
~cImageAreaLinearColor
();
118
119
120
/**
121
* @return the name of the image structure (class name without the leading 'c')
122
*/
123
virtual
string
getName
()
const
;
124
125
/**
126
* @see vecColorBasis
127
* @see setColorBasisOfArea()
128
* @return the color at the point (0,0)
129
*/
130
cVectorProperty
getColorBasisOfArea
()
const
;
131
132
/**
133
* @see vecColorBasis
134
* @see setColorBasisOfArea()
135
* @return the color at the point (0,0)
136
*/
137
const
cVectorProperty
&
getColorBasisOfAreaConst
()
const
;
138
139
/**
140
* This method sets the color at the point (0,0) to the given color.
141
*
142
* @see vecColorBasis
143
* @see getColorBasisOfArea()
144
* @param vecInColor the color at the point (0,0)
145
*/
146
void
setColorBasisOfArea
(
const
cVectorProperty
& vecInColor );
147
148
149
/**
150
* @see vecColorXSlope
151
* @see setColorXSlopeOfArea()
152
* @return the color slope for the x / first dimension
153
*/
154
cVectorProperty
getColorXSlopeOfArea
()
const
;
155
156
/**
157
* @see vecColorXSlope
158
* @see setColorXSlopeOfArea()
159
* @return the color slope for the x / first dimension
160
*/
161
const
cVectorProperty
&
getColorXSlopeOfAreaConst
()
const
;
162
163
/**
164
* This method sets the color slope for the x / first dimension for the
165
* area to the given color.
166
*
167
* @see vecColorXSlope
168
* @see getColorXSlopeOfArea()
169
* @param vecInColor the color slope for the x / first dimension
170
*/
171
void
setColorXSlopeOfArea
(
const
cVectorProperty
& vecInColor );
172
173
/**
174
* @see vecColorYSlope
175
* @see setColorYSlopeOfArea()
176
* @return the color slope for the y / second dimension
177
*/
178
cVectorProperty
getColorYSlopeOfArea
()
const
;
179
180
/**
181
* @see vecColorYSlope
182
* @see setColorYSlopeOfArea()
183
* @return the color slope for the y / second dimension
184
*/
185
const
cVectorProperty
&
getColorYSlopeOfAreaConst
()
const
;
186
187
/**
188
* This method sets the color slope for the y / second dimension for the
189
* area to the given color.
190
*
191
* @see vecColorYSlope
192
* @see getColorYSlopeOfArea()
193
* @param vecInColor the color slope for the y / second dimension
194
*/
195
void
setColorYSlopeOfArea
(
const
cVectorProperty
& vecInColor );
196
197
198
199
/**
200
* This method evalues and returns the color at the given point (x,y):
201
* vecColorBasis + x * vecColorXSlope + y * vecColorYSlope
202
*
203
* @see vecColorBasis
204
* @see getColorBasisOfArea()
205
* @see setColorBasisOfArea()
206
* @param x the x / first dimension coordinate of the point
207
* @param y the y / second dimension coordinate of the point
208
* @return the color at the given point (x,y)
209
*/
210
cVectorProperty
getColorOfPoint
(
const
double
x,
const
double
y )
const
;
211
212
213
};
//class cImageAreaLinearColor
214
215
216
};
//end namespace nStructureData
217
};
//end namespace nImage
218
};
//end namespace nConvertToFib
219
};
//end namespace algorithms
220
};
//end namespace fib
221
222
223
#endif //___C_IMAGE_ARAE_LINEAR_COLOR_H__
fib.algorithms
nConvertToFib
nImage
nStructureData
incl
cImageAreaLinearColor.h
Generated on Thu Feb 14 2013 14:06:55 for The Fib multimedia system by
1.8.1