CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Processing
Controls
ControlIntervalMapper.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 Fundacio Barcelona Media Universitat Pompeu Fabra.
3
*
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program 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 General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
*/
20
21
#ifndef _ControlIntervalMapper_
22
#define _ControlIntervalMapper_
23
24
#include "
DataTypes.hxx
"
25
#include "
Processing.hxx
"
26
#include "
ProcessingConfig.hxx
"
27
#include "
InControl.hxx
"
28
#include "
OutControl.hxx
"
29
30
namespace
CLAM
31
{
32
33
class
ControlIntervalMapperConfig
:
public
ProcessingConfig
34
{
35
public
:
36
DYNAMIC_TYPE_USING_INTERFACE
(
ControlIntervalMapperConfig
, 4,
ProcessingConfig
);
37
DYN_ATTRIBUTE
( 0,
public
,
float
, InputMin);
38
DYN_ATTRIBUTE
( 1,
public
,
float
, InputMax);
39
DYN_ATTRIBUTE
( 2,
public
,
float
, OutputMin);
40
DYN_ATTRIBUTE
( 3,
public
,
float
, OutputMax);
41
42
private
:
43
void
DefaultInit();
44
};
45
46
class
ControlIntervalMapper
:
public
Processing
47
{
48
ControlIntervalMapperConfig
_config;
49
FloatInControl
_inControl;
50
FloatOutControl
_outControl;
51
float
_min;
52
float
_max;
53
float
_newmin;
54
float
_newmax;
55
56
void
InControlCallback(
const
TControlData
& value);
57
58
public
:
59
60
const
char
*
GetClassName
()
const
{
return
"ControlIntervalMapper"
; }
61
62
ControlIntervalMapper
();
63
ControlIntervalMapper
(
const
ControlIntervalMapperConfig
& cfg );
64
65
bool
ConcreteConfigure
(
const
ProcessingConfig
& cfg );
66
67
const
ProcessingConfig
&
GetConfig
()
const
{
return
_config; }
68
69
bool
Do
();
70
};
71
72
}
73
74
#endif
75
Generated by
1.8.1