28 #include <QStringList> 92 #if ISIS_LITTLE_ENDIAN 93 # define DBL_INIT(a,b) {(b), (a)} 95 # define DBL_INIT(a,b) {(a), (b)} 100 const DBL_UNION
IVALID_MIN8 = { DBL_INIT(0xFFEFFFFF, 0xFFFFFFFA) };
108 const DBL_UNION
INULL8 = { DBL_INIT(0xFFEFFFFF, 0xFFFFFFFB) };
169 const short NULL2 = ((short)(-32768));
178 const unsigned short NULLU2 = ((
unsigned short) 0);
187 const unsigned int NULLUI4 = ((
unsigned int) 0);
197 const unsigned char NULL1 = ((
unsigned char) 0);
397 return result.setNum(d,
'g', 8);
411 QString s = str.toUpper();
414 legal.push_back(
"NULL");
415 legal.push_back(
"HRS");
416 legal.push_back(
"LRS");
417 legal.push_back(
"HIS");
418 legal.push_back(
"LIS");
420 for(
int i = 0; i < (int) legal.size(); i++) {
421 if(legal[i].mid(0, s.size()) == s) {
426 QString msg =
"Input [" + str +
"] is not a unique abbreviation. Use " + s +
"I or " + s +
"R.";
434 QString msg =
"Input [" + str +
"] does not appear to be a legal special pixel abbreviation or double value.";
438 if(s[0] ==
'N')
return Null;
439 if(s.mid(0, 2) ==
"HR")
return Hrs;
440 if(s.mid(0, 2) ==
"LR")
return Lrs;
441 if(s.mid(0, 2) ==
"HI")
return His;
const int IVALID_MAX4
Definition: SpecialPixel.h:165
bool IsLisPixel(const double d)
Returns if the input pixel is low instrument saturation.
Definition: SpecialPixel.h:310
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:110
const unsigned char VALID_MAX1
Definition: SpecialPixel.h:202
bool IsLrsPixel(const double d)
Returns if the input pixel is low representation saturation.
Definition: SpecialPixel.h:322
const unsigned char LOW_REPR_SAT1
Definition: SpecialPixel.h:198
const double ValidMinimum
The minimum valid double value for Isis pixels.
Definition: SpecialPixel.h:102
const float HIGH_REPR_SAT4
Definition: SpecialPixel.h:161
const unsigned int VALID_MINUI4
Definition: SpecialPixel.h:186
const unsigned short HIGH_INSTR_SATU2
Definition: SpecialPixel.h:181
const unsigned char HIGH_INSTR_SAT1
Definition: SpecialPixel.h:200
const double NULL8
Definition: SpecialPixel.h:109
bool IsLowPixel(const double d)
Returns if the input pixel is one of the low saturation types.
Definition: SpecialPixel.h:274
const DBL_UNION IHIGH_INSTR_SAT8
Definition: SpecialPixel.h:124
const unsigned short VALID_MAXU2
Definition: SpecialPixel.h:183
double StringToPixel(const QString &str)
Takes the name of the pixel type as a string and returns a double pixel value.
Definition: SpecialPixel.h:409
const unsigned int NULLUI4
Definition: SpecialPixel.h:187
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
Definition: SpecialPixel.h:238
const unsigned int LOW_INSTR_SATUI4
Definition: SpecialPixel.h:189
const double VALID_MAX8
Definition: SpecialPixel.h:136
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:164
bool IsHisPixel(const double d)
Returns if the input pixel is high instrument saturation.
Definition: SpecialPixel.h:298
bool IsHrsPixel(const double d)
Returns if the input pixel is high representation saturation.
Definition: SpecialPixel.h:286
const unsigned short HIGH_REPR_SATU2
Definition: SpecialPixel.h:182
const unsigned short VALID_MINU2
Definition: SpecialPixel.h:177
const double Lis
Value for an Isis Low Instrument Saturation pixel.
Definition: SpecialPixel.h:120
const double LOW_REPR_SAT8
Definition: SpecialPixel.h:113
const float LOW_INSTR_SAT4
Definition: SpecialPixel.h:155
const int IHIGH_INSTR_SAT4
Definition: SpecialPixel.h:157
const float HIGH_INSTR_SAT4
Definition: SpecialPixel.h:158
const int IHIGH_REPR_SAT4
Definition: SpecialPixel.h:160
const DBL_UNION IVALID_MIN8
Manipulate special pixel values.
Definition: SpecialPixel.h:100
const short HIGH_REPR_SAT2
Definition: SpecialPixel.h:173
const int IVALID_MIN4
Definition: SpecialPixel.h:144
const double HIGH_INSTR_SAT8
Definition: SpecialPixel.h:125
const int ILOW_REPR_SAT4
Definition: SpecialPixel.h:151
const short LOW_INSTR_SAT2
Definition: SpecialPixel.h:171
const short HIGH_INSTR_SAT2
Definition: SpecialPixel.h:172
const DBL_UNION INULL8
Definition: SpecialPixel.h:108
const DBL_UNION ILOW_REPR_SAT8
Definition: SpecialPixel.h:112
const unsigned int VALID_MAXUI4
Definition: SpecialPixel.h:192
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
const short VALID_MIN2
Definition: SpecialPixel.h:168
double TestPixel(const float t)
Converts float pixels to double pixels with special pixel translations.
Definition: SpecialPixel.h:334
const double HIGH_REPR_SAT8
Definition: SpecialPixel.h:131
const unsigned short LOW_INSTR_SATU2
Definition: SpecialPixel.h:180
const unsigned int LOW_REPR_SATUI4
Definition: SpecialPixel.h:188
A type of error that could only have occurred due to a mistake on the user's part (e...
Definition: IException.h:142
const float VALID_MIN4
Definition: SpecialPixel.h:145
const float VALID_MAX4
Definition: SpecialPixel.h:164
const short VALID_MAX2
Definition: SpecialPixel.h:174
const int INULL4
Definition: SpecialPixel.h:148
const unsigned short LOW_REPR_SATU2
Definition: SpecialPixel.h:179
const DBL_UNION ILOW_INSTR_SAT8
Definition: SpecialPixel.h:118
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:212
const unsigned char VALID_MIN1
Definition: SpecialPixel.h:196
const double VALID_MIN8
Definition: SpecialPixel.h:101
const float LOW_REPR_SAT4
Definition: SpecialPixel.h:152
const unsigned char HIGH_REPR_SAT1
Definition: SpecialPixel.h:201
const float NULL4
Definition: SpecialPixel.h:149
const double LOW_INSTR_SAT8
Definition: SpecialPixel.h:119
const unsigned int HIGH_REPR_SATUI4
Definition: SpecialPixel.h:191
const double ValidMaximum
The maximum valid double value for Isis pixels.
Definition: SpecialPixel.h:137
const short LOW_REPR_SAT2
Definition: SpecialPixel.h:170
const unsigned short NULLU2
Definition: SpecialPixel.h:178
bool IsHighPixel(const double d)
Returns if the input pixel is one of the high saturation types.
Definition: SpecialPixel.h:262
const unsigned int HIGH_INSTR_SATUI4
Definition: SpecialPixel.h:190
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string.
Definition: SpecialPixel.h:386
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool IsNullPixel(const double d)
Returns if the input pixel is null.
Definition: SpecialPixel.h:250
const double Lrs
Value for an Isis Low Representation Saturation pixel.
Definition: SpecialPixel.h:114
const DBL_UNION IHIGH_REPR_SAT8
Definition: SpecialPixel.h:130
const short NULL2
Definition: SpecialPixel.h:169
const double His
Value for an Isis High Instrument Saturation pixel.
Definition: SpecialPixel.h:126
const unsigned char LOW_INSTR_SAT1
Definition: SpecialPixel.h:199
const int ILOW_INSTR_SAT4
Definition: SpecialPixel.h:154
const unsigned char NULL1
Definition: SpecialPixel.h:197
const double Hrs
Value for an Isis High Representation Saturation pixel.
Definition: SpecialPixel.h:132