EZC3D
include
Header.h
Go to the documentation of this file.
1
#ifndef HEADER_H
2
#define HEADER_H
3
11
#include <
ezc3d.h
>
12
16
class
EZC3D_API
ezc3d
::
Header
{
17
//---- CONSTRUCTORS ----//
18
public
:
22
Header
();
23
29
Header
(
c3d
&
c3d
,
30
std::fstream &file);
31
32
33
//---- STREAM ----//
34
public
:
38
void
print
()
const
;
39
45
void
write
(std::fstream &f, std::streampos &dataStartPosition)
const
;
46
52
void
read
(
c3d
&
c3d
,
53
std::fstream &file);
54
55
56
//---- HEADER ----//
57
protected
:
58
size_t
_nbOfZerosBeforeHeader
;
59
61
size_t
_parametersAddress
;
62
65
public
:
70
size_t
nbOfZerosBeforeHeader
()
const
;
71
76
size_t
parametersAddress
()
const
;
77
78
protected
:
85
PROCESSOR_TYPE
readProcessorType
(
c3d
&
c3d
, std::fstream &file);
86
87
protected
:
88
size_t
_checksum
;
89
92
public
:
99
size_t
checksum
()
const
;
100
101
protected
:
102
size_t
_nb3dPoints
;
103
106
public
:
111
size_t
nb3dPoints
()
const
;
112
117
void
nb3dPoints
(
size_t
numberOfPoints);
118
119
protected
:
120
size_t
_nbAnalogsMeasurement
;
121
124
public
:
129
size_t
nbAnalogs
()
const
;
130
135
void
nbAnalogs
(
size_t
nbOfAnalogs);
136
141
size_t
nbAnalogsMeasurement
()
const
;
142
143
protected
:
144
size_t
_firstFrame
;
145
size_t
_lastFrame
;
150
155
public
:
160
size_t
nbFrames
()
const
;
161
166
size_t
firstFrame
()
const
;
167
172
void
firstFrame
(
size_t
frame);
173
178
size_t
lastFrame
()
const
;
179
184
void
lastFrame
(
size_t
frame);
185
186
protected
:
187
size_t
_nbMaxInterpGap
;
188
191
public
:
196
size_t
nbMaxInterpGap
()
const
;
197
198
protected
:
199
float
_scaleFactor
;
200
204
public
:
211
float
scaleFactor
()
const
;
212
213
protected
:
214
size_t
_dataStart
;
215
218
public
:
223
size_t
dataStart
()
const
;
224
225
protected
:
226
size_t
_nbAnalogByFrame
;
227
public
:
234
size_t
nbAnalogByFrame
()
const
;
235
240
void
nbAnalogByFrame
(
size_t
nbOfAnalogsByFrame);
241
242
protected
:
243
float
_frameRate
;
244
247
public
:
252
float
frameRate
()
const
;
253
258
void
frameRate
(
float
pointFrameRate);
259
260
protected
:
261
int
_emptyBlock1
;
262
265
int
_emptyBlock2
;
266
269
int
_emptyBlock3
;
270
273
int
_emptyBlock4
;
274
277
public
:
282
int
emptyBlock1
()
const
;
283
288
int
emptyBlock2
()
const
;
289
294
int
emptyBlock3
()
const
;
295
300
int
emptyBlock4
()
const
;
301
302
protected
:
303
size_t
_keyLabelPresent
;
304
308
public
:
316
size_t
keyLabelPresent
()
const
;
317
318
protected
:
319
size_t
_firstBlockKeyLabel
;
320
size_t
_fourCharPresent
;
323
327
size_t
_nbEvents
;
328
331
std::vector<float>
_eventsTime
;
332
335
std::vector<size_t>
_eventsDisplay
;
336
340
std::vector<std::string>
_eventsLabel
;
341
344
public
:
349
size_t
firstBlockKeyLabel
()
const
;
350
355
size_t
fourCharPresent
()
const
;
356
361
size_t
nbEvents
()
const
;
362
367
const
std::vector<float>&
eventsTime
()
const
;
368
376
float
eventsTime
(
size_t
idx)
const
;
377
385
std::vector<size_t>
eventsDisplay
()
const
;
386
397
size_t
eventsDisplay
(
size_t
idx)
const
;
398
403
const
std::vector<std::string>&
eventsLabel
()
const
;
404
412
const
std::string&
eventsLabel
(
size_t
idx)
const
;
413
414
};
415
416
#endif
ezc3d::Header::emptyBlock3
int emptyBlock3() const
Get the empty block 3.
Definition:
Header.cpp:349
ezc3d::Header::_emptyBlock1
int _emptyBlock1
Definition:
Header.h:261
ezc3d::Header::_eventsDisplay
std::vector< size_t > _eventsDisplay
Definition:
Header.h:335
ezc3d::Header::_nb3dPoints
size_t _nb3dPoints
Definition:
Header.h:102
ezc3d::Header::emptyBlock4
int emptyBlock4() const
Get the empty block 4.
Definition:
Header.cpp:354
ezc3d::Header::write
void write(std::fstream &f, std::streampos &dataStartPosition) const
Write the header to an opened file.
Definition:
Header.cpp:94
ezc3d::Header::nbFrames
size_t nbFrames() const
Get the number of frames.
Definition:
Header.cpp:274
ezc3d::Header::_checksum
size_t _checksum
Definition:
Header.h:88
ezc3d::Header::_nbEvents
size_t _nbEvents
Definition:
Header.h:327
ezc3d::Header::nbMaxInterpGap
size_t nbMaxInterpGap() const
Get the maximal gap used for interpolation.
Definition:
Header.cpp:302
ezc3d::Header::frameRate
float frameRate() const
Get the points frame rate in Hz.
Definition:
Header.cpp:329
ezc3d::PROCESSOR_TYPE
PROCESSOR_TYPE
The type of processor used to store the data.
Definition:
ezc3d.h:85
ezc3d::Header::_parametersAddress
size_t _parametersAddress
Definition:
Header.h:61
ezc3d::Header::emptyBlock1
int emptyBlock1() const
Get the empty block 1.
Definition:
Header.cpp:339
ezc3d::Header::checksum
size_t checksum() const
Get the checksum of the header.
Definition:
Header.cpp:241
ezc3d::Header::keyLabelPresent
size_t keyLabelPresent() const
Get the present label flag.
Definition:
Header.cpp:359
ezc3d::Header
Header of a C3D file.
Definition:
Header.h:16
ezc3d::Header::_eventsTime
std::vector< float > _eventsTime
Definition:
Header.h:331
ezc3d::Header::lastFrame
size_t lastFrame() const
Get the last frame.
Definition:
Header.cpp:292
ezc3d::Header::_dataStart
size_t _dataStart
Definition:
Header.h:214
ezc3d::Header::_emptyBlock2
int _emptyBlock2
Definition:
Header.h:265
ezc3d::Header::_nbOfZerosBeforeHeader
size_t _nbOfZerosBeforeHeader
Definition:
Header.h:58
ezc3d::Header::scaleFactor
float scaleFactor() const
Get the scaling factor to convert the 3D point.
Definition:
Header.cpp:307
ezc3d
Namespace ezc3d.
Definition:
ezc3d.h:68
ezc3d::Header::_emptyBlock3
int _emptyBlock3
Definition:
Header.h:269
ezc3d::Header::_scaleFactor
float _scaleFactor
Definition:
Header.h:199
ezc3d::Header::_emptyBlock4
int _emptyBlock4
Definition:
Header.h:273
ezc3d::Header::firstBlockKeyLabel
size_t firstBlockKeyLabel() const
Get the first block of key labels (if present)
Definition:
Header.cpp:364
ezc3d::Header::nbEvents
size_t nbEvents() const
Get the number of defined time events (0 to 18)
Definition:
Header.cpp:374
ezc3d::Header::_eventsLabel
std::vector< std::string > _eventsLabel
Definition:
Header.h:340
ezc3d::Header::eventsDisplay
std::vector< size_t > eventsDisplay() const
Get the display flags.
Definition:
Header.cpp:396
ezc3d::Header::fourCharPresent
size_t fourCharPresent() const
fourCharPresent
Definition:
Header.cpp:369
ezc3d::c3d
Main class for C3D holder.
Definition:
ezc3d.h:154
ezc3d::Header::parametersAddress
size_t parametersAddress() const
Get the byte at which the parameters start in the file.
Definition:
Header.cpp:214
ezc3d::Header::nbAnalogByFrame
size_t nbAnalogByFrame() const
Get the number of analog by frame.
Definition:
Header.cpp:317
ezc3d::Header::_firstFrame
size_t _firstFrame
Definition:
Header.h:144
ezc3d::Header::emptyBlock2
int emptyBlock2() const
Get the empty block 2.
Definition:
Header.cpp:344
ezc3d::Header::read
void read(c3d &c3d, std::fstream &file)
Read and store a header from an opened C3D file.
Definition:
Header.cpp:148
ezc3d::Header::nbOfZerosBeforeHeader
size_t nbOfZerosBeforeHeader() const
Get the number of zeros before the header starts in the file.
Definition:
Header.cpp:209
ezc3d::Header::firstFrame
size_t firstFrame() const
Get the first frame.
Definition:
Header.cpp:282
ezc3d::Header::_lastFrame
size_t _lastFrame
Definition:
Header.h:149
ezc3d::Header::dataStart
size_t dataStart() const
Get the number of 256-byte blocks to get to the points and analogous data in the file.
Definition:
Header.cpp:312
ezc3d::Header::_nbMaxInterpGap
size_t _nbMaxInterpGap
Definition:
Header.h:187
ezc3d::Header::eventsTime
const std::vector< float > & eventsTime() const
Get the event times in seconds.
Definition:
Header.cpp:379
ezc3d::Header::nbAnalogsMeasurement
size_t nbAnalogsMeasurement() const
Get the number of recorded analogs.
Definition:
Header.cpp:269
ezc3d.h
Declaration of ezc3d class.
ezc3d::Header::_nbAnalogsMeasurement
size_t _nbAnalogsMeasurement
Definition:
Header.h:120
ezc3d::Header::_fourCharPresent
size_t _fourCharPresent
Definition:
Header.h:322
ezc3d::Header::_nbAnalogByFrame
size_t _nbAnalogByFrame
Definition:
Header.h:226
ezc3d::Header::_frameRate
float _frameRate
Definition:
Header.h:243
ezc3d::Header::nb3dPoints
size_t nb3dPoints() const
Get the number 3D points.
Definition:
Header.cpp:246
ezc3d::Header::_firstBlockKeyLabel
size_t _firstBlockKeyLabel
Definition:
Header.h:319
ezc3d::Header::_keyLabelPresent
size_t _keyLabelPresent
Definition:
Header.h:303
ezc3d::Header::print
void print() const
Print the header.
Definition:
Header.cpp:68
ezc3d::Header::readProcessorType
PROCESSOR_TYPE readProcessorType(c3d &c3d, std::fstream &file)
Reads the processor type in the parameter section, returns the file pointer where it was at the beggi...
Definition:
Header.cpp:219
ezc3d::Header::eventsLabel
const std::vector< std::string > & eventsLabel() const
Get the event labels.
Definition:
Header.cpp:412
ezc3d::Header::nbAnalogs
size_t nbAnalogs() const
Get the number of analogs.
Definition:
Header.cpp:256
ezc3d::Header::Header
Header()
Create a valid header with minimal informations.
Definition:
Header.cpp:13
Generated by
1.8.14