29 #ifndef GRT_GRT_BASE_HEADER 30 #define GRT_GRT_BASE_HEADER 48 #include "../Util/GRTCommon.h" 59 GRTBase(
const std::string &
id=
"");
81 GRT_DEPRECATED_MSG(
"getClassType is deprecated, use getId() instead!", std::string getClassType()
const );
88 std::string getId()
const;
95 std::string getLastWarningMessage()
const;
102 std::string getLastErrorMessage()
const;
109 std::string getLastInfoMessage()
const;
117 bool setInfoLoggingEnabled(
const bool loggingEnabled);
125 bool setWarningLoggingEnabled(
const bool loggingEnabled);
133 bool setErrorLoggingEnabled(
const bool loggingEnabled);
141 bool setDebugLoggingEnabled(
const bool loggingEnabled);
150 static std::string getGRTVersion(
bool returnRevision =
true);
157 static std::string getGRTRevison();
164 GRTBase* getGRTBasePointer();
171 const GRTBase* getGRTBasePointer()
const;
184 Float
inline scale(
const Float &x,
const Float &minSource,
const Float &maxSource,
const Float &minTarget,
const Float &maxTarget,
const bool constrain=
false){
186 if( x <= minSource )
return minTarget;
187 if( x >= maxSource )
return maxTarget;
189 if( minSource == maxSource )
return minTarget;
190 return (((x-minSource)*(maxTarget-minTarget))/(maxSource-minSource))+minTarget;
193 inline Float SQR(
const Float &x)
const{
return x*x; }
206 #endif //GRT_GRT_BASE_HEADER
std::string classId
Stores the name of the class (e.g., MinDist)
Float scale(const Float &x, const Float &minSource, const Float &maxSource, const Float &minTarget, const Float &maxTarget, const bool constrain=false)