78# define DBL_INIT(a,b) {(b), (a)}
80# define DBL_INIT(a,b) {(a), (b)}
85 const DBL_UNION
IVALID_MIN8 = { DBL_INIT(0xFFEFFFFF, 0xFFFFFFFA) };
93 const DBL_UNION
INULL8 = { DBL_INIT(0xFFEFFFFF, 0xFFFFFFFB) };
154 const short NULL2 = ((short)(-32768));
163 const unsigned short NULLU2 = ((
unsigned short) 0);
172 const unsigned int NULLUI4 = ((
unsigned int) 0);
182 const unsigned char NULL1 = ((
unsigned char) 0);
382 return result.setNum(d,
'g', precision);
396 QString s = str.toUpper();
399 legal.push_back(
"NULL");
400 legal.push_back(
"HRS");
401 legal.push_back(
"LRS");
402 legal.push_back(
"HIS");
403 legal.push_back(
"LIS");
405 for(
int i = 0; i < (int) legal.size(); i++) {
406 if(legal[i].mid(0, s.size()) == s) {
411 QString msg =
"Input [" + str +
"] is not a unique abbreviation. Use " + s +
"I or " + s +
"R.";
419 QString msg =
"Input [" + str +
"] does not appear to be a legal special pixel abbreviation or double value.";
423 if(s[0] ==
'N')
return Null;
424 if(s.mid(0, 2) ==
"HR")
return Hrs;
425 if(s.mid(0, 2) ==
"LR")
return Lrs;
426 if(s.mid(0, 2) ==
"HI")
return His;
#define _FILEINFO_
Macro for the filename and line number.
Definition IException.h:24
Isis exception class.
Definition IException.h:91
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition IException.h:126
const DBL_UNION IVALID_MIN8
Manipulate special pixel values.
Definition SpecialPixel.h:85
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
const int IHIGH_REPR_SAT4
Definition SpecialPixel.h:145
const double His
Value for an Isis High Instrument Saturation pixel.
Definition SpecialPixel.h:111
double StringToPixel(const QString &str)
Takes the name of the pixel type as a string and returns a double pixel value.
Definition SpecialPixel.h:394
const unsigned short NULLU2
Definition SpecialPixel.h:163
const unsigned int LOW_REPR_SATUI4
Definition SpecialPixel.h:173
const double Hrs
Value for an Isis High Representation Saturation pixel.
Definition SpecialPixel.h:117
const unsigned short VALID_MAXU2
Definition SpecialPixel.h:168
const int IVALID_MAX4
Definition SpecialPixel.h:150
bool IsLrsPixel(const double d)
Returns if the input pixel is low representation saturation.
Definition SpecialPixel.h:307
const double ValidMaximum
The maximum valid double value for Isis pixels.
Definition SpecialPixel.h:122
const DBL_UNION IHIGH_REPR_SAT8
Definition SpecialPixel.h:115
const short VALID_MIN2
Definition SpecialPixel.h:153
const DBL_UNION ILOW_INSTR_SAT8
Definition SpecialPixel.h:103
const double HIGH_REPR_SAT8
Definition SpecialPixel.h:116
const unsigned short LOW_REPR_SATU2
Definition SpecialPixel.h:164
const short VALID_MAX2
Definition SpecialPixel.h:159
const unsigned char HIGH_REPR_SAT1
Definition SpecialPixel.h:186
const int INULL4
Definition SpecialPixel.h:133
const float LOW_REPR_SAT4
Definition SpecialPixel.h:137
bool IsNullPixel(const double d)
Returns if the input pixel is null.
Definition SpecialPixel.h:235
bool IsHrsPixel(const double d)
Returns if the input pixel is high representation saturation.
Definition SpecialPixel.h:271
const double VALID_MAX8
Definition SpecialPixel.h:121
const unsigned int LOW_INSTR_SATUI4
Definition SpecialPixel.h:174
const unsigned short HIGH_REPR_SATU2
Definition SpecialPixel.h:167
const short HIGH_INSTR_SAT2
Definition SpecialPixel.h:157
const unsigned short HIGH_INSTR_SATU2
Definition SpecialPixel.h:166
const float HIGH_REPR_SAT4
Definition SpecialPixel.h:146
const short LOW_REPR_SAT2
Definition SpecialPixel.h:155
const DBL_UNION IHIGH_INSTR_SAT8
Definition SpecialPixel.h:109
const int ILOW_INSTR_SAT4
Definition SpecialPixel.h:139
const short NULL2
Definition SpecialPixel.h:154
const float NULL4
Definition SpecialPixel.h:134
const unsigned char LOW_REPR_SAT1
Definition SpecialPixel.h:183
const unsigned char LOW_INSTR_SAT1
Definition SpecialPixel.h:184
const unsigned char VALID_MAX1
Definition SpecialPixel.h:187
const int IHIGH_INSTR_SAT4
Definition SpecialPixel.h:142
const float HIGH_INSTR_SAT4
Definition SpecialPixel.h:143
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
Definition SpecialPixel.h:223
const unsigned int HIGH_REPR_SATUI4
Definition SpecialPixel.h:176
const int IVALID_MIN4
Definition SpecialPixel.h:129
const double Null
Value for an Isis Null pixel.
Definition SpecialPixel.h:95
const unsigned short LOW_INSTR_SATU2
Definition SpecialPixel.h:165
const float VALID_MAX4
Definition SpecialPixel.h:149
bool IsHisPixel(const double d)
Returns if the input pixel is high instrument saturation.
Definition SpecialPixel.h:283
const double ValidMinimum
The minimum valid double value for Isis pixels.
Definition SpecialPixel.h:87
double TestPixel(const float t)
Converts float pixels to double pixels with special pixel translations.
Definition SpecialPixel.h:319
const double Lrs
Value for an Isis Low Representation Saturation pixel.
Definition SpecialPixel.h:99
const double Lis
Value for an Isis Low Instrument Saturation pixel.
Definition SpecialPixel.h:105
const short LOW_INSTR_SAT2
Definition SpecialPixel.h:156
const unsigned char NULL1
Definition SpecialPixel.h:182
const int ILOW_REPR_SAT4
Definition SpecialPixel.h:136
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition SpecialPixel.h:197
const double LOW_INSTR_SAT8
Definition SpecialPixel.h:104
const unsigned char VALID_MIN1
Definition SpecialPixel.h:181
const unsigned int NULLUI4
Definition SpecialPixel.h:172
const short HIGH_REPR_SAT2
Definition SpecialPixel.h:158
const double HIGH_INSTR_SAT8
Definition SpecialPixel.h:110
const double NULL8
Definition SpecialPixel.h:94
const double LOW_REPR_SAT8
Definition SpecialPixel.h:98
const unsigned int VALID_MINUI4
Definition SpecialPixel.h:171
QString PixelToString(double d, double precision=8)
Takes a double pixel value and returns the name of the pixel type as a string.
Definition SpecialPixel.h:371
bool IsHighPixel(const double d)
Returns if the input pixel is one of the high saturation types.
Definition SpecialPixel.h:247
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition IString.cpp:149
bool IsLisPixel(const double d)
Returns if the input pixel is low instrument saturation.
Definition SpecialPixel.h:295
const unsigned int HIGH_INSTR_SATUI4
Definition SpecialPixel.h:175
const DBL_UNION INULL8
Definition SpecialPixel.h:93
const unsigned short VALID_MINU2
Definition SpecialPixel.h:162
const DBL_UNION ILOW_REPR_SAT8
Definition SpecialPixel.h:97
const float LOW_INSTR_SAT4
Definition SpecialPixel.h:140
bool IsLowPixel(const double d)
Returns if the input pixel is one of the low saturation types.
Definition SpecialPixel.h:259
const unsigned int VALID_MAXUI4
Definition SpecialPixel.h:177
const double VALID_MIN8
Definition SpecialPixel.h:86
const float VALID_MIN4
Definition SpecialPixel.h:130
const unsigned char HIGH_INSTR_SAT1
Definition SpecialPixel.h:185