3
// Copyright (c) 1998-2010 by The VoxBo Development Team
5
// This file is part of VoxBo
7
// VoxBo is free software: you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
12
// VoxBo is distributed in the hope that it will be useful, but
13
// WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
// General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with VoxBo. If not, see <http://www.gnu.org/licenses/>.
20
// For general information on VoxBo, including the latest complete
21
// source code and binary distributions, manual, and associated files,
22
// see the VoxBo home page at: http://www.voxbo.org/
24
// original version written by Kosh Banerjee
26
/*********************************************************************
28
*********************************************************************/
32
/*********************************************************************
33
* Required include files. *
34
*********************************************************************/
40
#include "vb_common_incs.h"
41
#include "genericexcep.h"
47
/*********************************************************************
49
* currentSeries - keeps track of the current time series. The range *
50
* for currentSeries is [0, dimx * dimy * dimz - 1]. *
51
* dimT - the number of time series. *
52
* dimX - the number of voxels in the X direction. *
53
* dimY - the number of voxels in the Y direction. *
54
* dimZ - the number of voxels in the Z direction. *
55
* indexX - used to hold the X spatial index corresponding to a voxel *
57
* indexY - used to hold the Y spatial index corresponding to a voxel *
59
* indexZ - used to hold the Z spatial index corresponding to a voxel *
61
* theTes - a Tes object whose time series is to be read. *
62
* tesFileName - the 4D data file name. *
63
*********************************************************************/
64
unsigned long currentSeries;
65
unsigned int dimX, dimY, dimZ, dimT;
66
unsigned int indexX, indexY, indexZ;
70
/*********************************************************************
72
*********************************************************************/
73
void init(const string& tesFile) throw (GenericExcep);
74
void init(const Tes& theTes) throw (GenericExcep);
78
/*********************************************************************
80
*********************************************************************/
82
TimeSeries(const string& tesFileName);
83
TimeSeries(const char *tesFileName);
84
TimeSeries(const Tes& theTes);
85
TimeSeries(const TimeSeries& T); // Copy constructor.
87
/*********************************************************************
89
*********************************************************************/
92
/*********************************************************************
94
*********************************************************************/
95
unsigned int getDimX() const;
96
unsigned int getDimY() const;
97
unsigned int getDimZ() const;
98
unsigned int getDimT() const;
100
unsigned int getIndexX() const;
101
unsigned int getIndexY() const;
102
unsigned int getIndexZ() const;
103
unsigned long getCurrentSeries() const;
107
/*********************************************************************
109
*********************************************************************/
110
int getCurrentTimeSeries(double *tSeries);
112
void zeroOut(const unsigned int x, const unsigned int y, const unsigned int z) throw ();
113
void zeroOut(const unsigned long index) throw ();
114
void toString() const;
115
unsigned int getTimeSeriesIndex() const;
116
int getTimeSeries(double *tSeries, const unsigned int i) throw ();
118
void getTimeSeries(double *tSeries, const unsigned int xIndex,
119
unsigned int yIndex, const unsigned int zIndex) throw ();
120
int getSameSeries(double *tSeries) throw();
122
}; // class TimeSeries
124
#endif // TIMESERIES_H