casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCCSNLAxisLabeller.h
Go to the documentation of this file.
1 //# WCCSNLAxisLabeller.h: non-linear axis labelling using a CS on a WC
2 //# Copyright (C) 1999,2000,2001,2002
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_WCCSNLAXISLABELLER_H
29 #define TRIALDISPLAY_WCCSNLAXISLABELLER_H
30 
31 #include <casa/aips.h>
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37 // <summary>
38 // Class which provides non-linear axis labelling using a DisplayCoordinateSystem.
39 // </summary>
40 //
41 // <synopsis>
42 // This class implements the interface defined in WCCSAxisLabeller to
43 // provide arbitrary non-linear axis labelling, using coordinate
44 // transformations provided by a supplied DisplayCoordinateSystem.
45 //
46 // </synopsis>
47 
49 
50  public:
51 
52  // Constructor
54 
55  // Destructor
56  virtual ~WCCSNLAxisLabeller();
57 
58  // Draw axis labels for the provided WorldCanvas refresh event.
59  // Note: it is the responsibility of the caller to assure that this
60  // object is invalidated (or destroyed) _before_ the WorldCanvas
61  // corresponding to ev gets destroyed, so that any cached axis drawing
62  // which the WC is holding for us can be deleted properly.
63  virtual casacore::Bool draw(const WCRefreshEvent &ev);
64 
65  // Invalidate/return any cached drawing list
66  virtual void invalidate();
67 
68  // Install the DisplayCoordinateSystem to use
69  virtual void setCoordinateSystem(const DisplayCoordinateSystem &coordsys);
70 
71  // Set the world min and max ranges (and their associated units)
72  // to be used by the DisplayCoordinateSystem::toMix computations.
73  // If not specified with this function,
74  // -180->180, -90->90 for DirectionCoordinates used (rest
75  // don't matter). Specifying this correctly can make the
76  // toMix computations much faster (it uses an iterative
77  // solution) and avoid solution ambiguities.
79  const casacore::Vector<casacore::Double>& worldMax,
81 
82  // install the default options for this DisplayData
83  virtual void setDefaultOptions();
84 
85  // apply options stored in rec to the DisplayData; return value
86  // true means a refresh is needed. Any fields added to the
87  // updatedOptions argument are options which have changed in
88  // some way due to the setting of other options - ie. they
89  // are context sensitive.
90  virtual casacore::Bool setOptions(const casacore::Record &rec, casacore::Record &updatedOptions);
91 
92  // retrieve the current and default options and parameter types.
93  virtual casacore::Record getOptions() const;
94 
95  private:
96 
97  // Is the drawlist state below valid?
99 
100  // our drawlist number
102 
103  // attribute buffer that suits the drawlist we have made
105 
106  // last WorldCanvas drawn upon
108  };
109 
110 
111 } //# NAMESPACE CASA - END
112 
113 #endif
Base class for WorldCanvas axis labelling using a DisplayCoordinateSystem.
Class which stores WorldCanvas refresh event information.
virtual ~WCCSNLAxisLabeller()
Destructor.
casacore::uInt itsDrawListNumber
our drawlist number
Buffer for storing Attributes.
virtual casacore::Record getOptions() const
retrieve the current and default options and parameter types.
virtual void setDefaultOptions()
install the default options for this DisplayData
void setWorldRanges(const casacore::Vector< casacore::Double > &worldMin, const casacore::Vector< casacore::Double > &worldMax, const casacore::Vector< casacore::String > &units)
Set the world min and max ranges (and their associated units) to be used by the DisplayCoordinateSyst...
virtual casacore::Bool draw(const WCRefreshEvent &ev)
Draw axis labels for the provided WorldCanvas refresh event.
WorldCanvas * itsLastWorldCanvas
last WorldCanvas drawn upon
Class which provides non-linear axis labelling using a DisplayCoordinateSystem.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool itsValid
Is the drawlist state below valid?
virtual casacore::Bool setOptions(const casacore::Record &rec, casacore::Record &updatedOptions)
apply options stored in rec to the DisplayData; return value true means a refresh is needed...
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
virtual void setCoordinateSystem(const DisplayCoordinateSystem &coordsys)
Install the DisplayCoordinateSystem to use.
virtual void invalidate()
Invalidate/return any cached drawing list.
AttributeBuffer itsDrawStateBuffer
attribute buffer that suits the drawlist we have made
WCCSNLAxisLabeller()
Constructor.
unsigned int uInt
Definition: aipstype.h:51