diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-10-20 17:15:50 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-10-20 17:15:50 (GMT) |
commit | 0352ad82c2c4a26fbfedab0cd997b85f3b93e50c (patch) | |
tree | 011f86c7a4a888824dad28d9514d7f414b5f04e0 /tksao | |
parent | 01779e2225fe31245ad94ccd01f95c5c7d805494 (diff) | |
download | blt-0352ad82c2c4a26fbfedab0cd997b85f3b93e50c.zip blt-0352ad82c2c4a26fbfedab0cd997b85f3b93e50c.tar.gz blt-0352ad82c2c4a26fbfedab0cd997b85f3b93e50c.tar.bz2 |
new mask
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/basecommand.C | 3 | ||||
-rw-r--r-- | tksao/frame/context.C | 33 | ||||
-rw-r--r-- | tksao/frame/context.h | 10 | ||||
-rw-r--r-- | tksao/frame/frame.C | 26 | ||||
-rw-r--r-- | tksao/frame/frame.h | 2 |
5 files changed, 55 insertions, 19 deletions
diff --git a/tksao/frame/basecommand.C b/tksao/frame/basecommand.C index aca3715..c082b72 100644 --- a/tksao/frame/basecommand.C +++ b/tksao/frame/basecommand.C @@ -2525,7 +2525,8 @@ void Base::matchCmd(const char* xxname1, const char* yyname1, void Base::maskClearCmd() { - currentContext->mask.deleteAll(); + // waj + // currentContext->mask.deleteAll(); update(BASE); } diff --git a/tksao/frame/context.C b/tksao/frame/context.C index ed27916..d1e86d4 100644 --- a/tksao/frame/context.C +++ b/tksao/frame/context.C @@ -304,9 +304,13 @@ int Context::block() break; } - return rr & blockMask(); + // waj + // return rr & blockMask(); + return rr; } +// waj +/* int Context::blockMask() { int doBlock = (blockFactor_[0] != 1 && blockFactor_[1] != 1) ? 1 : 0; @@ -383,6 +387,7 @@ int Context::blockMask() return rr; } +*/ void Context::bltHist(char* xname, char* yname, int num) { @@ -804,7 +809,8 @@ int Context::load(Base::MemType which, const char* fn, break; case Base::MASK: - mask.append(new FitsMask(parent_, img, parent_->maskColorName, parent_->maskMark)); + // waj + // mask.append(new FitsMask(parent_, img, parent_->maskColorName, parent_->maskMark)); break; } @@ -882,7 +888,8 @@ int Context::load(Base::MemType which, const char* fn, loadFinish(); break; case Base::MASK: - loadFinishMask(); + // waj + // loadFinishMask(); break; } @@ -1034,6 +1041,8 @@ int Context::loadMosaic(Base::MemType which, const char* fn, break; case Base::MASK: + // waj + /* FitsMask* msk = mask.tail(); if (msk) { FitsImage* mskimg = msk->mask(); @@ -1043,6 +1052,7 @@ int Context::loadMosaic(Base::MemType which, const char* fn, } else mask.append(new FitsMask(parent_, img, parent_->maskColorName, parent_->maskMark)); + */ break; } @@ -1123,7 +1133,8 @@ int Context::loadMosaic(Base::MemType which, const char* fn, } break; case Base::MASK: - if (!loadFinishMosaicMask()) + // waj + // if (!loadFinishMosaicMask()) return 0; break; } @@ -1165,7 +1176,8 @@ int Context::loadMosaicImage(Base::MemType which, const char* fn, break; case Base::MASK: - mask.append(new FitsMask(parent_, img, parent_->maskColorName, parent_->maskMark)); + // waj + // mask.append(new FitsMask(parent_, img, parent_->maskColorName, parent_->maskMark)); break; } @@ -1373,7 +1385,8 @@ int Context::loadMosaicImage(Base::MemType which, const char* fn, } break; case Base::MASK: - if (!loadFinishMosaicMask()) + // waj + // if (!loadFinishMosaicMask()) return 0; break; } @@ -1625,6 +1638,8 @@ int Context::loadFinish() return 1; } +// waj +/* void Context::loadFinishMask() { FitsMask* msk = mask.tail(); @@ -1633,6 +1648,7 @@ void Context::loadFinishMask() mskimg->block(); } } +*/ void Context::loadFinishMosaic(FitsImage* ptr) { @@ -1654,6 +1670,7 @@ void Context::loadFinishMosaic(FitsImage* ptr) } } +/* int Context::loadFinishMosaicMask() { FitsMask* msk = mask.tail(); @@ -1662,6 +1679,7 @@ int Context::loadFinishMosaicMask() return blockMask(); } +*/ int Context::loadSlice(Base::MemType which, const char* fn, FitsImage* img) @@ -2588,7 +2606,8 @@ void Context::unload() loadInit(0, Base::NOMOSAIC, Coord::WCS); - mask.deleteAll(); + // waj + // mask.deleteAll(); fvcontour_.lcontourlevel().deleteAll(); auxcontours_.deleteAll(); diff --git a/tksao/frame/context.h b/tksao/frame/context.h index 63b8dac..1ecd737 100644 --- a/tksao/frame/context.h +++ b/tksao/frame/context.h @@ -12,7 +12,6 @@ #include "coord.h" #include "frscale.h" #include "list.h" -#include "fitsmask.h" #include "fitsimage.h" #include "head.h" @@ -81,11 +80,12 @@ class Context { protected: void binFinish(); - int blockMask(); + // waj + // int blockMask(); + // void loadFinishMask(); + // int loadFinishMosaicMask(); int nhdu(); - void loadFinishMask(); void loadFinishMosaic(FitsImage*); - int loadFinishMosaicMask(); int processMosaicKeywords(FitsImage*); void updateClip(FrScale*); void updateClipGlobal(FrScale*); @@ -104,8 +104,6 @@ class Context { FitsImage* fits; FitsImage* cfits; - List <FitsMask> mask; - public: Context(); ~Context(); diff --git a/tksao/frame/frame.C b/tksao/frame/frame.C index 5777e32..ce69756 100644 --- a/tksao/frame/frame.C +++ b/tksao/frame/frame.C @@ -183,6 +183,8 @@ unsigned char* Frame::fillImage(int width, int height, CLEARSIGBUS if (img) { + // waj + /* if (context->mask.head()) { FitsMask* mptr = context->mask.tail(); while (mptr) { @@ -192,6 +194,7 @@ unsigned char* Frame::fillImage(int width, int height, mptr = mptr->previous(); } } + */ } return img; @@ -200,14 +203,15 @@ unsigned char* Frame::fillImage(int width, int height, unsigned char* Frame::fillMask(FitsMask* msk, int width, int height, Coord::InternalSystem sys) { - FitsImage* currentMsk = msk->current(); - XColor* maskColor = msk->color(); - int mark = msk->mark(); - // img unsigned char* img = new unsigned char[width*height*4]; memset(img,0,width*height*4); + /* + FitsImage* currentMsk = msk->current(); + XColor* maskColor = msk->color(); + int mark = msk->mark(); + if (!currentMsk) return img; @@ -268,7 +272,7 @@ unsigned char* Frame::fillMask(FitsMask* msk, int width, int height, } } CLEARSIGBUS - + */ return img; } @@ -284,6 +288,8 @@ void Frame::pushMatrices() // alway identity Matrix rgbToRef; + // waj + /* // now any masks FitsMask* msk = currentContext->mask.tail(); while (msk) { @@ -300,12 +306,15 @@ void Frame::pushMatrices() msk = msk->previous(); } + */ } void Frame::pushMagnifierMatrices() { Base::pushMagnifierMatrices(); + // waj + /* FitsMask* msk = context->mask.tail(); while (msk) { FitsImage* mskimg = msk->mask(); @@ -319,12 +328,15 @@ void Frame::pushMagnifierMatrices() } msk = msk->previous(); } + */ } void Frame::pushPannerMatrices() { Base::pushPannerMatrices(); + // waj + /* FitsMask* msk = context->mask.tail(); while (msk) { FitsImage* mskimg = msk->mask(); @@ -338,12 +350,15 @@ void Frame::pushPannerMatrices() } msk = msk->previous(); } + */ } void Frame::pushPSMatrices(float scale, int width, int height) { Base::pushPSMatrices(scale, width, height); + // waj + /* Matrix mx = psMatrix(scale, width, height); FitsMask* msk = context->mask.tail(); while (msk) { @@ -354,6 +369,7 @@ void Frame::pushPSMatrices(float scale, int width, int height) } msk = msk->previous(); } + */ } void Frame::reset() diff --git a/tksao/frame/frame.h b/tksao/frame/frame.h index 26a4159..c6af322 100644 --- a/tksao/frame/frame.h +++ b/tksao/frame/frame.h @@ -23,6 +23,8 @@ class Frame : public FrameBase { ColorScale* colorScale; // current color scale unsigned char* colorCells; // current color values + // List <FitsMask> mask; + private: unsigned char* blend(unsigned char*, unsigned char*, int, int); int isIIS(); |