casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCPGFilter.h
Go to the documentation of this file.
1 //# WCPGFilter.h: interface between WorldCanvas and its PGPLOT driver
2 //# Copyright (C) 1993,1994,1995,1996,1998,1999,2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TRIALDISPLAY_WCPGFILTER_H
29 #define TRIALDISPLAY_WCPGFILTER_H
30 
31 #include <casa/aips.h>
32 
33 namespace casacore{
34 
35  template <class T> class Matrix;
36  template <class T> class Vector;
37 }
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 
41  class WorldCanvas;
42 
43 // <summary>
44 // Interface between the WorldCanvas and its PGPLOT driver.
45 // </summary>
46 
47 // <use visibility=export>
48 
49 // <reviewed>
50 // </reviewed>
51 
52 // <prerequisite>
53 // <li> none
54 // </prerequisite>
55 
56 // <etymology>
57 // "WCPGFilter" is a contraction and concatenation of "WorldCanvas,"
58 // "PGPLOT" and "Filter", and is a simple filtering interface between
59 // the WorldCanvas and its PGPLOT driver.
60 // </etymology>
61 
62 // <synopsis>
63 // </synopsis>
64 
65 // <motivation>
66 // </motivation>
67 
68 // <example>
69 // </example>
70 
71 // <todo>
72 // </todo>
73 
74  class WCPGFilter {
75 
76  public:
77 
78  // Constructor taking a pointer to a WorldCanvas.
80 
81  // Destructor.
82  virtual ~WCPGFilter();
83 
84  // Reference counting: ref, unref and refCount.
85  // <group>
86  virtual void ref() {
87  itsRefCount++;
88  }
89  virtual void unref() {
90  itsRefCount--;
91  }
92  virtual casacore::Int refCount() const {
93  return itsRefCount;
94  }
95  // </group>
96 
97  // Return the PGPLOT device id.
98  virtual casacore::Int pgid() const {
99  return casacore::Int(itsPgPlotID);
100  }
101 
102  // Realign the PGPLOT domain to the WorldCanvas domain. If linear
103  // is false, then the pgplot canvas is setup to match the world
104  // coordinates, but of course is only valid where the world
105  // coordinates are linear to first approximation.
107 
108  // Contour using pgcont function.
110  const casacore::Vector<casacore::Float> &levels,
112 
113  // Contour using pgconb function. (contour with blanks)
115  const casacore::Vector<casacore::Float> &levels,
117  const casacore::Float blank);
118 
119  private:
120 
121  // Store for the WorldCanvas this filters for.
123 
124  // Store the PGPLOT device id here.
126 
127  // Reference counting.
129 
130  // Split contours into positive and negative
132  const casacore::Vector<casacore::Float>& levels);
133 
134 
135  };
136 
137 
138 } //# NAMESPACE CASA - END
139 
140 #endif
141 
int Int
Definition: aipstype.h:50
std::vector< double > Vector
Definition: ds9context.h:24
casacore::Int itsRefCount
Reference counting.
Definition: WCPGFilter.h:128
WorldCanvas * itsWorldCanvas
Store for the WorldCanvas this filters for.
Definition: WCPGFilter.h:122
void splitContours(casacore::Vector< casacore::Float > &neg, casacore::Vector< casacore::Float > &pos, const casacore::Vector< casacore::Float > &levels)
Split contours into positive and negative.
Interface between the WorldCanvas and its PGPLOT driver.
Definition: WCPGFilter.h:74
casacore::Bool realign(const casacore::Bool &linear=true)
Realign the PGPLOT domain to the WorldCanvas domain.
casacore::uInt itsPgPlotID
Store the PGPLOT device id here.
Definition: WCPGFilter.h:125
virtual casacore::Int pgid() const
Return the PGPLOT device id.
Definition: WCPGFilter.h:98
virtual void unref()
Definition: WCPGFilter.h:89
virtual void ref()
Reference counting: ref, unref and refCount.
Definition: WCPGFilter.h:86
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void cont(const casacore::Matrix< casacore::Float > &m, const casacore::Vector< casacore::Float > &levels, const casacore::Matrix< casacore::Float > &tr)
Contour using pgcont function.
float Float
Definition: aipstype.h:54
virtual ~WCPGFilter()
Destructor.
virtual casacore::Int refCount() const
Definition: WCPGFilter.h:92
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
void conb(const casacore::Matrix< casacore::Float > &m, const casacore::Vector< casacore::Float > &levels, const casacore::Matrix< casacore::Float > &tr, const casacore::Float blank)
Contour using pgconb function.
WCPGFilter(WorldCanvas *wc)
Constructor taking a pointer to a WorldCanvas.
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42