WSF
SOSM_SpectralTable3D.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef SOSM_SPECTRALTABLE3D_HPP
13#define SOSM_SPECTRALTABLE3D_HPP
14
15#include <string>
16#include <vector>
17
18class SOSM_Manager;
19class SOSM_Selector;
21#include "SOSM_TableVar.hpp"
22#include "TblLookup.hpp"
23
26{
27public:
29
30 // Using default copy constructor.
31 // SOSM_SpectralTable3D(const SOSM_SpectralTable3D& aSrc);
32
34 double GetModificationTime() const { return mModificationTime; }
35
37 const TblIndVarU<float>& IV1() const { return mIV1; }
38
40 TblIndVarU<float>& IV1() { return mIV1; }
41
43 const TblIndVarU<float>& IV2() const { return mIV2; }
44
46 TblIndVarU<float>& IV2() { return mIV2; }
47
49 const TblIndVarU<float>& IV3() const { return mIV3; }
50
52 TblIndVarU<float>& IV3() { return mIV3; }
53
55 void SetDV_Info(const SOSM_TableVar& aDV_Info) { mDV_Info = aDV_Info; }
56
58 void SetIV1_Info(const SOSM_TableVar& aIV1_Info) { mIV1_Info = aIV1_Info; }
59
61 void SetIV2_Info(const SOSM_TableVar& aIV2_Info) { mIV2_Info = aIV2_Info; }
62
64 void SetIV3_Info(const SOSM_TableVar& aIV3_Info) { mIV3_Info = aIV3_Info; }
65
66 void Interpolate(std::vector<float>& aOutput,
67 const SOSM_Selector& aSelector,
68 const TblLookupL<float>& aIV1_Lookup,
69 const TblLookupL<float>& aIV2_Lookup,
70 const TblLookupL<float>& aIV3_Lookup) const;
71
72 void Load(const std::string& aFileName, const std::string& aCachePrefix);
73
74 void LoadTextFile(const std::string& aFileName);
75
76 void LoadBinaryFile(const std::string& aFileName);
77
78 void SaveBinaryFile(const std::string& aFileName);
79
80 SOSM_Manager* GetManager() const { return mManagerPtr; }
81
82protected:
83 void ValidateAndScale_IV(TblIndVarU<float>& aIV, const SOSM_TableVar& aIV_Info);
84
86
88 std::string mFileName;
89
92
94 std::string mUserIdent[3];
95
98 std::vector<float> mDV;
99
102 TblIndVarU<float> mIV1;
103
106 TblIndVarU<float> mIV2;
107
110 TblIndVarU<float> mIV3;
111};
112
113#endif
A singleton class that manages SOSM data.
Definition SOSM_Manager.hpp:32
Definition SOSM_Selector.hpp:24
SOSM_SpectralObject()
Definition SOSM_SpectralObject.hpp:49
SOSM_TableVar mIV1_Info
Independent variable 1.
Definition SOSM_SpectralTable3D.hpp:101
TblIndVarU< float > & IV1()
Return the independent variable 1 values (non-const form).
Definition SOSM_SpectralTable3D.hpp:40
std::string mUserIdent[3]
The first three lines from the file.
Definition SOSM_SpectralTable3D.hpp:94
SOSM_TableVar mIV3_Info
Independent variable 3.
Definition SOSM_SpectralTable3D.hpp:109
void ValidateAndScale_IV(TblIndVarU< float > &aIV, const SOSM_TableVar &aIV_Info)
Definition SOSM_SpectralTable3D.cpp:346
std::vector< float > mDV
Definition SOSM_SpectralTable3D.hpp:98
TblIndVarU< float > & IV3()
Return the independent variable 3 values (non-const form).
Definition SOSM_SpectralTable3D.hpp:52
SOSM_Manager * mManagerPtr
Definition SOSM_SpectralTable3D.hpp:85
void SetIV2_Info(const SOSM_TableVar &aIV2_Info)
Set the name, limits and scale for independent variable 2.
Definition SOSM_SpectralTable3D.hpp:61
std::string mFileName
The name of the file from which the table was loaded.
Definition SOSM_SpectralTable3D.hpp:88
void LoadBinaryFile(const std::string &aFileName)
Definition SOSM_SpectralTable3D.cpp:297
void SaveBinaryFile(const std::string &aFileName)
Definition SOSM_SpectralTable3D.cpp:324
SOSM_TableVar mIV2_Info
Independent variable 2.
Definition SOSM_SpectralTable3D.hpp:105
void SetIV3_Info(const SOSM_TableVar &aIV3_Info)
Set the name, limits and scale for independent variable 3.
Definition SOSM_SpectralTable3D.hpp:64
double mModificationTime
The modification date of the above file.
Definition SOSM_SpectralTable3D.hpp:91
void Interpolate(std::vector< float > &aOutput, const SOSM_Selector &aSelector, const TblLookupL< float > &aIV1_Lookup, const TblLookupL< float > &aIV2_Lookup, const TblLookupL< float > &aIV3_Lookup) const
Definition SOSM_SpectralTable3D.cpp:32
void SetDV_Info(const SOSM_TableVar &aDV_Info)
Set the name, limits and scale for the dependent variable.
Definition SOSM_SpectralTable3D.hpp:55
const TblIndVarU< float > & IV2() const
Return the independent variable 2 values (const form).
Definition SOSM_SpectralTable3D.hpp:43
void Load(const std::string &aFileName, const std::string &aCachePrefix)
Definition SOSM_SpectralTable3D.cpp:89
SOSM_SpectralTable3D(SOSM_Manager *aManagerPtr)
Definition SOSM_SpectralTable3D.cpp:25
void SetIV1_Info(const SOSM_TableVar &aIV1_Info)
Set the name, limits and scale for independent variable 1.
Definition SOSM_SpectralTable3D.hpp:58
TblIndVarU< float > mIV1
Definition SOSM_SpectralTable3D.hpp:102
SOSM_Manager * GetManager() const
Definition SOSM_SpectralTable3D.hpp:80
const TblIndVarU< float > & IV1() const
Return the independent variable 1 values (const form).
Definition SOSM_SpectralTable3D.hpp:37
TblIndVarU< float > mIV3
Definition SOSM_SpectralTable3D.hpp:110
const TblIndVarU< float > & IV3() const
Return the independent variable 3 values (const form).
Definition SOSM_SpectralTable3D.hpp:49
SOSM_TableVar mDV_Info
Dependent variable ([iv1][iv2][iv3][sample]).
Definition SOSM_SpectralTable3D.hpp:97
TblIndVarU< float > mIV2
Definition SOSM_SpectralTable3D.hpp:106
double GetModificationTime() const
Return when the source file from which the object was recreated was last modified.
Definition SOSM_SpectralTable3D.hpp:34
TblIndVarU< float > & IV2()
Return the independent variable 2 values (non-const form).
Definition SOSM_SpectralTable3D.hpp:46
void LoadTextFile(const std::string &aFileName)
Definition SOSM_SpectralTable3D.cpp:126
A helper class for specifying data to the table loaders.
Definition SOSM_TableVar.hpp:17
Copyrights Multiple, All Rights Reserved