00001 #ifndef FLOATDATA_H
00002 #define FLOATDATA_H
00003
00004 #include "common.h"
00005 #include "FlowGeometry.h"
00006 #include "FlowChannel.h"
00007
00008 #include <string>
00009
00010 using namespace std;
00011
00012
00013 class FlowData
00014 {
00015
00016 private:
00017
00019 bool loaded;
00020
00022 int timesteps;
00023
00025 FlowGeometry* geometry;
00026
00028 bool freeChannel[max_channels];
00029
00031 ScalarDataT scalarChannel[max_channels];
00032
00034 string channelNames[max_channels];
00035
00037 FlowChannel* channels[max_channels];
00038
00041 int numChannels;
00042
00044 int numScalarChannels;
00045
00048
00049
00051 int dimX, dimY, dimZ;
00052
00054 int velocityMagnitudeId;
00055
00058
00059 public:
00060
00062 FlowData();
00063
00065 ~FlowData();
00066
00068 bool loadDataset(string filename, bool bigEndian);
00069
00071 ScalarDataT getIsScalar(int i);
00072
00074 int getNumTimesteps();
00075
00077 void printData();
00078
00079
00080
00081
00083 int createChannel( string channelName );
00084
00086 void deleteChannel(int i);
00087
00089 FlowChannel* getChannel(int i);
00090
00092 FlowGeometry* getGeometry() const;
00093
00094
00095
00096
00098
00099
00100
00102 int createChannelVectorLength(int chX, int chY, int chZ = -1);
00103
00105 int createChannelVectorLength(FlowChannel* chX, FlowChannel* chY, FlowChannel* chZ = NULL);
00106
00108 void normalizeVelocityChannels(FlowChannel* chX, FlowChannel* chY, FlowChannel* chZ = NULL);
00109
00111 void normalizeVelocityChannels(int chX, int chY, int chZ = -1);
00112
00114 int getChannelCount();
00115
00117 int getScalarChannelCount();
00118
00120
00121
00123 int getVelMagID ();
00124
00125
00126
00128
00129
00130
00131
00132 void rescaleScalarData();
00133 };
00134 #endif