casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Histogram2dDD.h
Go to the documentation of this file.
1 //# Histogram2dDD.h: 2d histogram DisplayData
2 //# Copyright (C) 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_HISTOGRAM2DDD_H
29 #define TRIALDISPLAY_HISTOGRAM2DDD_H
30 
31 #include <casa/aips.h>
35 
36 namespace casacore{
37 
38  template <class T> class ImageInterface;
39  template <class T> class LatticeStatistics;
40  template <class T> class LatticeHistograms;
41 }
42 
43 namespace casa { //# NAMESPACE CASA - BEGIN
44 
45  class Histogram2dDM;
46 
47 // <summary>
48 // A DisplayData to draw histograms
49 // </summary>
50 //
51 // <use visibility=export>
52 //
53 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
54 // </reviewed>
55 //
56 // <prerequisite>
57 // <li> DisplayData
58 // <li> CachingDisplayData
59 // <li> ActiveCaching2dDD
60 // </prerequisite>
61 //
62 // <etymology>
63 // </etymology>
64 // <synopsis>
65 //
66 // </synopsis>
67 
69 
70  public:
71 
72  // Constructor taking a pointer to an already constructed
73  // ImageInterface.
75 
76  // Constructor taking a pointer to an already constructed casacore::Table,
77  // and a casacore::String indicating a column name.
78  //Histogram2dDD(const casacore::Table *table, const casacore::String column);
79 
80  // Constructor taking a pointer to an Array.
81  //Histogram2dDD(const casacore::Array<casacore::Float> *array);
82 
83  // Destructor.
84  virtual ~Histogram2dDD();
85 
86  // Return the data unit.
87  virtual const casacore::Unit dataUnit();
88 
89  // casacore::Format the histogram value at the given world position.
91 
92  // Install the default options for this DisplayData.
93  virtual void setDefaultOptions();
94 
95  // Apply options stored in <src>rec</src> to the DisplayData. A
96  // return value of <src>true</src> means a refresh is needed.
97  // <src>recOut</src> contains any fields which were implicitly
98  // changed as a result of the call to this function.
100 
101  // Retrieve the current and default options and parameter types.
102  virtual casacore::Record getOptions( bool scrub=false ) const;
103 
104  // Return the type of this DisplayData.
107  }
108 
109  // Create a new AxesDisplayMethod for drawing on the given
110  // WorldCanvas when the AttributeBuffers are suitably matched to the
111  // current state of this DisplayData and of the WorldCanvas/Holder.
112  // The tag is a unique number used to identify the age of the newly
113  // constructed CachingDisplayMethod.
114  virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas,
115  AttributeBuffer *wchAttributes,
116  AttributeBuffer *ddAttributes,
117  CachingDisplayData *dd);
118 
119  // Return the current options of this DisplayData as an
120  // AttributeBuffer.
122 
123  // Provide read-only access to the Lattice.
125  return *itsMaskedLattice;
126  }
127 
128  // Provide read-only access to the MaskedLattce.
130  return *itsMaskedLattice;
131  }
132 
133  protected:
134 
135  // (Required) default constructor.
136  Histogram2dDD();
137 
138  // (Required) copy constructor.
139  Histogram2dDD(const Histogram2dDD &other);
140 
141  // (Required) copy assignment.
142  void operator=(const Histogram2dDD &other);
143 
144  private:
145 
146  friend class Histogram2dDM;
147 
148  // The base image cloned at construction.
150 
151  // The masked lattice, effectively referencing one of itsBaseImage,
152  // ...
154 
155  // Object to use for calculating statistics.
157 
158  // Object ot use for calculating histograms.
160 
161  };
162 
163 
164 } //# NAMESPACE CASA - END
165 
166 #endif
Class providing active behaviour for 2d CachingDisplayDatas.
Assistance class for auto-caching of DisplayData objects.
A DisplayMethod to draw histograms.
Definition: Histogram2dDM.h:58
virtual casacore::Record getOptions(bool scrub=false) const
Retrieve the current and default options and parameter types.
virtual casacore::Bool setOptions(casacore::Record &rec, casacore::Record &recOut)
Apply options stored in rec to the DisplayData.
DisplayDataType
WorldCanvasHolder - what type of DisplayData is this, need to know for drawing order.
Definition: DisplayEnums.h:355
Buffer for storing Attributes.
virtual CachingDisplayMethod * newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
Create a new AxesDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are sui...
virtual const casacore::Unit dataUnit()
Return the data unit.
virtual ~Histogram2dDD()
Constructor taking a pointer to an already constructed casacore::Table, and a casacore::String indica...
Histogram2dDD()
(Required) default constructor.
virtual AttributeBuffer optionsAsAttributes()
Return the current options of this DisplayData as an AttributeBuffer.
virtual Display::DisplayDataType classType()
Return the type of this DisplayData.
defines physical units
Definition: Unit.h:189
casacore::LatticeStatistics< casacore::Float > * itsLatticeStatistics
Object to use for calculating statistics.
Base class for auto-caching DisplayData objects.
void operator=(const Histogram2dDD &other)
(Required) copy assignment.
A DisplayData to draw histograms.
Definition: Histogram2dDD.h:68
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
const casacore::MaskedLattice< casacore::Float > & maskedLattice() const
Provide read-only access to the MaskedLattce.
casacore::ImageInterface< casacore::Float > * itsBaseImage
The base image cloned at construction.
virtual casacore::String showValue(const casacore::Vector< casacore::Double > &world)
casacore::Format the histogram value at the given world position.
const casacore::Lattice< casacore::Float > & lattice() const
Provide read-only access to the Lattice.
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
virtual void setDefaultOptions()
Install the default options for this DisplayData.
casacore::LatticeHistograms< casacore::Float > * itsLatticeHistograms
Object ot use for calculating histograms.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::MaskedLattice< casacore::Float > * itsMaskedLattice
The masked lattice, effectively referencing one of itsBaseImage, ...
Canvas annotation - can draw outside draw area.
Definition: DisplayEnums.h:363
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42