Line data Source code
1 : // -*- C++ -*-
2 : //# CFStore.h: Definition of the CFStore class
3 : //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003
4 : //# Associated Universities, Inc. Washington DC, USA.
5 : //#
6 : //# This library is free software; you can redistribute it and/or modify it
7 : //# under the terms of the GNU Library General Public License as published by
8 : //# the Free Software Foundation; either version 2 of the License, or (at your
9 : //# option) any later version.
10 : //#
11 : //# This library is distributed in the hope that it will be useful, but WITHOUT
12 : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 : //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 : //# License for more details.
15 : //#
16 : //# You should have received a copy of the GNU Library General Public License
17 : //# along with this library; if not, write to the Free Software Foundation,
18 : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 : //#
20 : //# Correspondence concerning AIPS++ should be addressed as follows:
21 : //# Internet email: casa-feedback@nrao.edu.
22 : //# Postal address: AIPS++ Project Office
23 : //# National Radio Astronomy Observatory
24 : //# 520 Edgemont Road
25 : //# Charlottesville, VA 22903-2475 USA
26 : //#
27 : //# $Id$
28 : #ifndef SYNTHESIS_CFSTORE_H
29 : #define SYNTHESIS_CFSTORE_H
30 : #include <synthesis/TransformMachines/CFDefs.h>
31 : #include <synthesis/TransformMachines/SynthesisError.h>
32 : #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
33 : #include <casacore/casa/Logging/LogIO.h>
34 : #include <casacore/casa/Logging/LogSink.h>
35 : #include <casacore/casa/Logging/LogOrigin.h>
36 : #include <casacore/casa/Utilities/CountedPtr.h>
37 : #include <casacore/images/Images/ImageInterface.h>
38 : #include <msvis/MSVis/VisBuffer.h>
39 : namespace casa { //# NAMESPACE CASA - BEGIN
40 : using namespace CFDefs;
41 : class CFStore
42 : {
43 : public:
44 130 : CFStore():data(), rdata(), coordSys(), sampling(),
45 130 : xSupport(), ySupport(),
46 130 : maxXSupport(-1), maxYSupport(-1),
47 130 : pa(), mosPointingPos(0) {};
48 :
49 0 : CFStore(CFType *dataPtr, casacore::CoordinateSystem& cs, casacore::Vector<casacore::Float>& samp,
50 : casacore::Vector<casacore::Int>& xsup, casacore::Vector<casacore::Int>& ysup, casacore::Int maxXSup, casacore::Int maxYSup,
51 0 : casacore::Quantity PA, casacore::Int mosPointing):
52 0 : data(),rdata(), coordSys(cs), sampling(samp),
53 0 : xSupport(xsup), ySupport(ysup), maxXSupport(maxXSup),
54 0 : maxYSupport(maxYSup), pa(PA), mosPointingPos(mosPointing)
55 0 : {data = new CFType(*dataPtr);};
56 :
57 128 : ~CFStore() {};
58 :
59 : CFStore& operator=(const CFStore& other);
60 : void show(const char *Mesg=NULL,std::ostream &os=std::cerr);
61 0 : casacore::Bool null() {return data.null();};
62 : void set(const CFStore& other)
63 : {
64 : coordSys = other.coordSys; sampling.assign(other.sampling);
65 : xSupport.assign(other.xSupport); ySupport.assign(other.ySupport);
66 : maxXSupport=other.maxXSupport; maxYSupport=other.maxYSupport; pa=other.pa;
67 : mosPointingPos = other.mosPointingPos;
68 : }
69 : void set(CFType *dataPtr, casacore::CoordinateSystem& cs, casacore::Vector<casacore::Float>& samp,
70 : casacore::Vector<casacore::Int>& xsup, casacore::Vector<casacore::Int>& ysup, casacore::Int maxXSup, casacore::Int maxYSup,
71 : casacore::Quantity PA, const casacore::Int mosPointing=0)
72 : {
73 : data=dataPtr; coordSys=cs; sampling.assign(samp);
74 : xSupport.assign(xsup); ySupport.assign(ysup);
75 : maxXSupport=maxXSup;maxYSupport=maxYSup;
76 : pa=PA;
77 : mosPointingPos = mosPointing;
78 : }
79 :
80 : void resize(casacore::Int nw, casacore::Bool retainValues=false);
81 : void resize(casacore::IPosition imShape, casacore::Bool retainValues=false);
82 :
83 :
84 : casacore::CountedPtr<CFType> data;
85 : casacore::CountedPtr<CFTypeReal> rdata;
86 : casacore::CoordinateSystem coordSys;
87 : casacore::Vector<casacore::Float> sampling;
88 : casacore::Vector<casacore::Int> xSupport,ySupport;
89 : casacore::Int maxXSupport, maxYSupport;
90 : casacore::Quantity pa;
91 : casacore::Int mosPointingPos;
92 : };
93 : } //# NAMESPACE CASA - END
94 : #endif
|