diff options
Diffstat (limited to 'tksao/frame/frame.C')
-rw-r--r-- | tksao/frame/frame.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tksao/frame/frame.C b/tksao/frame/frame.C index efadfb1..7cf1677 100644 --- a/tksao/frame/frame.C +++ b/tksao/frame/frame.C @@ -276,6 +276,22 @@ unsigned char* Frame::fillMask(FitsMask* msk, int width, int height, *(dest+3) = 1; } break; + case FitsMask::NaN: + if (isnan(value) || isinf(value)) { + *dest = ((unsigned char)maskColor->red)*maskAlpha; + *(dest+1) = ((unsigned char)maskColor->green)*maskAlpha; + *(dest+2) = ((unsigned char)maskColor->blue)*maskAlpha; + *(dest+3) = 1; + } + break; + case FitsMask::NONNaN: + if (!isnan(value) && !isinf(value)) { + *dest = ((unsigned char)maskColor->red)*maskAlpha; + *(dest+1) = ((unsigned char)maskColor->green)*maskAlpha; + *(dest+2) = ((unsigned char)maskColor->blue)*maskAlpha; + *(dest+3) = 1; + } + break; case FitsMask::RANGE: if (value>=low && value<=high) { *dest = ((unsigned char)maskColor->red)*maskAlpha; @@ -465,6 +481,12 @@ void Frame::getMaskMarkCmd() case FitsMask::NONZERO: Tcl_AppendResult(interp, "nonzero", NULL); break; + case FitsMask::NaN: + Tcl_AppendResult(interp, "nan", NULL); + break; + case FitsMask::NONNaN: + Tcl_AppendResult(interp, "nonnan", NULL); + break; case FitsMask::RANGE: Tcl_AppendResult(interp, "range", NULL); break; |