diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-10-25 20:35:14 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-10-25 20:35:14 (GMT) |
commit | 1a9b04572570e68d2f14e520d7bd74ddab7432c9 (patch) | |
tree | 3c61ffa1dcebdf635fab276306a2a57e46bd7595 /tksao/frame/frameload.C | |
parent | af2f4891ad47c1e5b8ce3c7bfd4b6be888bd5dcc (diff) | |
download | blt-1a9b04572570e68d2f14e520d7bd74ddab7432c9.zip blt-1a9b04572570e68d2f14e520d7bd74ddab7432c9.tar.gz blt-1a9b04572570e68d2f14e520d7bd74ddab7432c9.tar.bz2 |
new mask
Diffstat (limited to 'tksao/frame/frameload.C')
-rw-r--r-- | tksao/frame/frameload.C | 172 |
1 files changed, 171 insertions, 1 deletions
diff --git a/tksao/frame/frameload.C b/tksao/frame/frameload.C index b3e1b2d..79f4b89 100644 --- a/tksao/frame/frameload.C +++ b/tksao/frame/frameload.C @@ -395,7 +395,8 @@ void Frame::loadNRRDMMapCmd(const char* fn, LayerType ll) } } -void Frame::loadNRRDShareCmd(ShmType stype, int id, const char* fn, LayerType ll) +void Frame::loadNRRDShareCmd(ShmType stype, int id, const char* fn, + LayerType ll) { switch (ll) { case IMG: @@ -444,6 +445,175 @@ void Frame::loadNRRDVarCmd(const char* ch, const char* fn, LayerType ll) } } +// *** Mosaic Image *** + +void Frame::loadMosaicImageAllocCmd(MosaicType type, Coord::CoordSystem sys, + const char* ch, const char* fn, + LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageAllocCmd(type, sys, ch, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicAlloc(cc, interp, + ch, fn, FitsFile::NOFLUSH, 1); + loadDone(cc->loadMosaicImage(ALLOC, fn, img, type, sys)); + break; + } + +} + +void Frame::loadMosaicImageAllocGZCmd(MosaicType type, Coord::CoordSystem sys, + const char* ch, const char* fn, + LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageAllocGZCmd(type, sys, ch, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicAllocGZ(cc, interp, + ch, fn, FitsFile::NOFLUSH, 1); + loadDone(cc->loadMosaicImage(ALLOCGZ, fn, img, type, sys)); + break; + } + +} + +void Frame::loadMosaicImageChannelCmd(MosaicType type, Coord::CoordSystem sys, + const char* ch, const char* fn, + LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageChannelCmd(type, sys, ch, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicChannel(cc, interp, + ch, fn, FitsFile::NOFLUSH, 1); + loadDone(cc->loadMosaicImage(CHANNEL, fn, img, type, sys)); + break; + } +} + +void Frame::loadMosaicImageMMapCmd(MosaicType type, Coord::CoordSystem sys, + const char* fn, LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageMMapCmd(type, sys, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicMMap(cc, interp, fn, 1); + loadDone(cc->loadMosaicImage(MMAP, fn, img, type, sys)); + break; + } +} + +void Frame::loadMosaicImageMMapIncrCmd(MosaicType type, Coord::CoordSystem sys, + const char* fn, LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageMMapIncrCmd(type, sys, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicMMapIncr(cc, interp, fn, 1); + loadDone(cc->loadMosaicImage(MMAPINCR, fn, img, type, sys)); + break; + } + +} + +void Frame::loadMosaicImageShareCmd(MosaicType type, Coord::CoordSystem sys, + ShmType stype, int id, const char* fn, + LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageShareCmd(type, sys, stype, id, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicShare(cc, interp, stype, id, fn, 1); + loadDone(cc->loadMosaicImage(SHARE, fn, img, type, sys)); + break; + } + +} + +void Frame::loadMosaicImageSocketCmd(MosaicType type, Coord::CoordSystem sys, + int s, const char* fn, LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageSocketCmd(type, sys, s, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicSocket(cc, interp, + s, fn, FitsFile::NOFLUSH, 1); + loadDone(cc->loadMosaicImage(SOCKET, fn, img, type, sys)); + break; + } +} + +void Frame::loadMosaicImageSocketGZCmd(MosaicType type, Coord::CoordSystem sys, + int s, const char* fn, LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageSocketGZCmd(type, sys, s, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicSocketGZ(cc, interp, + s, fn, FitsFile::NOFLUSH, 1); + loadDone(cc->loadMosaicImage(SOCKETGZ, fn, img, type, sys)); + break; + } +} + +void Frame::loadMosaicImageVarCmd(MosaicType type, Coord::CoordSystem sys, + const char* ch, const char* fn, LayerType ll) +{ + switch (ll) { + case IMG: + Base::loadMosaicImageVarCmd(type, sys, ch, fn, ll); + break; + case MASK: + FitsMask* msk = new FitsMask(this, maskColorName, maskMark); + mask.append(msk); + Context* cc = msk->context(); + FitsImage* img = new FitsImageMosaicVar(cc, interp, ch, fn, 1); + loadDone(cc->loadMosaicImage(VAR, fn, img, type, sys)); + break; + } + +} + // Support void Frame::loadDone(int rr) |