CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Data
Descriptors
SegmentDescriptors.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
#ifndef __SegmentDescriptors_H__
23
#define __SegmentDescriptors_H__
24
25
#include "
Descriptor.hxx
"
26
27
#include "
AudioDescriptors.hxx
"
28
#include "
FrameDescriptors.hxx
"
29
#include "
MorphologicalSegmentDescriptors.hxx
"
30
#include "
List.hxx
"
31
32
namespace
CLAM
33
{
34
35
class
Segment;
36
37
/*
38
* This class holds Descriptors computed from Segment data
39
*
40
*/
41
class
SegmentDescriptors
:
public
Descriptor
42
{
43
public
:
44
DYNAMIC_TYPE_USING_INTERFACE
(
SegmentDescriptors
, 9,
Descriptor
);
47
DYN_ATTRIBUTE
(0,
public
,
FrameDescriptors
, MeanD);
50
DYN_ATTRIBUTE
(1,
public
,
FrameDescriptors
, MaxD);
53
DYN_ATTRIBUTE
(2,
public
,
FrameDescriptors
, MinD);
56
DYN_ATTRIBUTE
(3,
public
,
FrameDescriptors
, VarianceD);
57
59
DYN_ATTRIBUTE
(4,
public
,
TData
,
Fundamental
);
60
61
DYN_ATTRIBUTE
(5,
public
,
AudioDescriptors
, AudioD);
62
64
DYN_ATTRIBUTE
(6,
public
,
Array<FrameDescriptors>
, FramesD);
65
69
DYN_ATTRIBUTE
(7,
public
,
MorphologicalSegmentDescriptors
, MorphologicalSegmentD);
70
72
DYN_ATTRIBUTE
(8,
public
,
List<SegmentDescriptors>
, ChildrenD);
73
74
public
:
75
76
SegmentDescriptors
(
Segment
* pSegment);
77
78
void
SetpSegment
(
const
Segment
* pSegment);
79
const
Segment
*
GetpSegment
()
const
;
80
FrameDescriptors
&
GetFrameD
(
TIndex
pos) {
return
GetFramesD()[pos];}
81
void
Compute
();
82
void
ConcreteCompute
();
83
void
SetFramePrototype
(
const
FrameDescriptors
& proto,
int
nFrames);
84
85
86
87
private
:
88
void
DefaultInit();
89
void
CopyInit(
const
SegmentDescriptors
& copied);
90
91
private
:
92
const
Segment
* mpSegment;
93
StatsTmpl<false,FrameDescriptors,FrameDescriptors>
* mSegmentStats;
94
95
};
96
97
}
// namespace CLAM
98
99
#endif
/* __SegmentDescriptors_H__ */
100
Generated by
1.8.1