CFStore.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SYNTHESIS_TRANSFORM2_CFSTORE_H
00029 #define SYNTHESIS_TRANSFORM2_CFSTORE_H
00030 #include <synthesis/TransformMachines2/CFDefs.h>
00031 #include <synthesis/TransformMachines/SynthesisError.h>
00032 #include <coordinates/Coordinates/CoordinateSystem.h>
00033 #include <casa/Logging/LogIO.h>
00034 #include <casa/Logging/LogSink.h>
00035 #include <casa/Logging/LogOrigin.h>
00036 #include <casa/Utilities/CountedPtr.h>
00037 #include <images/Images/ImageInterface.h>
00038 #include <msvis/MSVis/VisBuffer2.h>
00039 namespace casa {
00040 using namespace vi;
00041 namespace refim{
00042 using namespace CFDefs;
00043 class CFStore
00044 {
00045 public:
00046 CFStore():data(), rdata(), coordSys(), sampling(),
00047 xSupport(), ySupport(),
00048 maxXSupport(-1), maxYSupport(-1),
00049 pa(), mosPointingPos(0) {};
00050
00051 CFStore(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp,
00052 Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup,
00053 Quantity PA, Int mosPointing):
00054 data(),rdata(), coordSys(cs), sampling(samp),
00055 xSupport(xsup), ySupport(ysup), maxXSupport(maxXSup),
00056 maxYSupport(maxYSup), pa(PA), mosPointingPos(mosPointing)
00057 {data = new CFType(*dataPtr);};
00058
00059 ~CFStore() {};
00060
00061 CFStore& operator=(const CFStore& other);
00062 void show(const char *Mesg=NULL,ostream &os=cerr);
00063 Bool null() {return data.null();};
00064 void set(const CFStore& other)
00065 {
00066 coordSys = other.coordSys; sampling.assign(other.sampling);
00067 xSupport.assign(other.xSupport); ySupport.assign(other.ySupport);
00068 maxXSupport=other.maxXSupport; maxYSupport=other.maxYSupport; pa=other.pa;
00069 mosPointingPos = other.mosPointingPos;
00070 }
00071 void set(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp,
00072 Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup,
00073 Quantity PA, const Int mosPointing=0)
00074 {
00075 data=dataPtr; coordSys=cs; sampling.assign(samp);
00076 xSupport.assign(xsup); ySupport.assign(ysup);
00077 maxXSupport=maxXSup;maxYSupport=maxYSup;
00078 pa=PA;
00079 mosPointingPos = mosPointing;
00080 }
00081
00082 void resize(Int nw, Bool retainValues=False);
00083 void resize(IPosition imShape, Bool retainValues=False);
00084
00085
00086 CountedPtr<CFType> data;
00087 CountedPtr<CFTypeReal> rdata;
00088 CoordinateSystem coordSys;
00089 Vector<Float> sampling;
00090 Vector<Int> xSupport,ySupport;
00091 Int maxXSupport, maxYSupport;
00092 Quantity pa;
00093 Int mosPointingPos;
00094 };
00095 }
00096 }
00097 #endif