casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ScrollingRasterDD.h
Go to the documentation of this file.
1 //# ScrollingRasterDD.h: Base class for scrolling DisplayData objects
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004
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_SCROLLINGRASTERDD_H
29 #define TRIALDISPLAY_SCROLLINGRASTERDD_H
30 
32 
33 #include <casa/Arrays/Array.h>
35 #include <casa/Containers/Record.h>
36 
42 
43 // <summary>
44 // Base class for scrolling DisplayData objects
45 // </summary>
46 
47 namespace casa { //# NAMESPACE CASA - BEGIN
48 
49  class WCResampleHandler;
50 
51  class ScrollingRasterDM;
52 
54 
55  public:
58  casacore::uInt sAxis = 2, casacore::uInt scanNo = 100);
59  virtual ~ScrollingRasterDD();
60 
61  virtual void updateLattice(const casacore::Record &) {};
63 
64  virtual casacore::String className() const {
65  return casacore::String("ScrollingRasterDD");
66  }
67 
69  virtual casacore::Record getOptions( bool scrub=false ) const;
70 
71  virtual void setDefaultOptions();
72 
73  // distribute options to all the axis labellers - empty here, we use WorldAxesDD
75  return false;
76  }
77 
78  // retrieve options from the axis labellers - empty here, we use WorldAxesDD
79  virtual casacore::Record getLabellerOptions( bool /*scrub*/=false ) const {
80  casacore::Record rec;
81  return rec;
82  }
83 
84 
86  AttributeBuffer& holderBuf);
87 
89  return itsResampleHandler;
90  }
91 
92  protected:
93  friend class ScrollingRasterDM;
94 
96  virtual void initLattice(const casacore::Record &);
97  virtual void initLattice(const casacore::Float, const casacore::Float, const casacore::uInt);
98 
99  virtual void recreateEmptyLattices(casacore::uInt changedScanNumber = 0);
100 
101  virtual const casacore::IPosition dataShape() const;
102  virtual casacore::uInt dataDim() const;
103  virtual const casacore::Unit dataUnit() const;
104  virtual void setupElements();
105  virtual void getMinAndMax();
106  virtual void updateLatticeStatistics();
107 
108  //virtual void refresh(casacore::Bool);
109 
110  virtual casacore::Bool labelAxes(const WCRefreshEvent &ev);
111 
113  return itsLatticeConcatPtr;
114  }
115 
117  return Display::Raster;
118  }
119  // Pure virtual function from DisplayData...
121  return "scrolling";
122  }
123 
126  virtual casacore::Bool maskValue(const casacore::IPosition &pos);
127 
130 
131  // (Required) default constructor.
132  ScrollingRasterDD(casacore::uInt mAxis=2, casacore::uInt scanNo=100);
133 
134  // (Required) copy constructor.
135  ScrollingRasterDD(const ScrollingRasterDD &other);
136 
137  // (Required) copy assignment.
138  void operator=(const ScrollingRasterDD &other);
139 
140  // Set Spectral preference -> not used here.
141  virtual void setSpectralPreference (
142  DisplayCoordinateSystem& /*cSys*/, const casacore::String&, const casacore::String& ) {}
143 
145  itsHeaderMin = x;
146  }
148  itsHeaderMax = x;
149  }
151  return itsHeaderMin;
152  }
154  return itsHeaderMax;
155  }
157  itsScanNumber = x;
158  }
160  return itsScanNumber;
161  }
163  return itsHeaderReceived;
164  }
166  itsHeaderReceived = x;
167  }
168 
170  return itsLattices[0]->shape();
171  }
173  return itsShiftAxis;
174  }
175 
177  itsNeedResize = x;
178  }
180  return itsNeedResize;
181  }
182 
184  return itsFixedPos;
185  }
186 
187  //void setPlaneNumber(const casacore::uInt x) { itsPlaneNumber = x; }
188  //casacore::uInt planeNumber() { return itsPlaneNumber; }
189 
191  itsLatticeShape = x;
192  }
194  return itsLatticeShape;
195  }
196 
197  private:
198  // Worker function for c'tors.
200  casacore::uInt mAxis);
201 
203 
204  //casacore::ImageInterface<casacore::Float> *itsImagePtr;
207  //casacore::MaskedLattice<casacore::Float> *itsMaskedLatticePtr;
210  //casacore::Int itsM2Axis;
212 
214 
216 
219 
225  //casacore::IPosition itsScanShape;
226  //casacore::uInt itsPlaneNumber;
227 
228  // storage for the display parameters
230 
231  // pointer to resampler
233 
234  };
235 
236 
237 } //# NAMESPACE CASA - END
238 
239 #endif
240 
void setNeedResize(const casacore::Bool x)
virtual casacore::uInt dataDim() const
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
casacore::IPosition fixedPos()
int Int
Definition: aipstype.h:50
casacore::Bool headerReceived()
casacore::Float itsHeaderMin
virtual casacore::MaskedLattice< casacore::Float > * maskedLattice()
Class which stores WorldCanvas refresh event information.
virtual casacore::String className() const
Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future u...
casacore::LatticeStatistics< casacore::Float > * itsLatticeStatisticsPtr
casacore::MaskedLattice&lt;casacore::Float&gt; *itsMaskedLatticePtr;
virtual void updateLattice(const casacore::Record &)
virtual casacore::Bool setLabellerOptions(casacore::Record &, casacore::Record &)
distribute options to all the axis labellers - empty here, we use WorldAxesDD
virtual casacore::Record getLabellerOptions(bool=false) const
retrieve options from the axis labellers - empty here, we use WorldAxesDD
virtual casacore::uInt nDim()
query the number of dimensions in the data
virtual casacore::Float dataValue(casacore::IPosition pos)
void setHeaderReceived(casacore::Bool x)
casacore::Float headerMax()
DisplayDataType
WorldCanvasHolder - what type of DisplayData is this, need to know for drawing order.
Definition: DisplayEnums.h:355
Buffer for storing Attributes.
virtual void updateLatticeStatistics()
virtual void setupElements()
functions need by above
casacore::uInt scanNumber()
casacore::Float headerMin()
casacore::IPosition latticeShape()
virtual WCResampleHandler * resampleHandler()
virtual void getMinAndMax()
Interface for DisplayDatas which have data arranged in axes.
virtual casacore::Bool maskValue(const casacore::IPosition &pos)
virtual void recreateEmptyLattices(casacore::uInt changedScanNumber=0)
virtual const casacore::IPosition dataShape() const
casacore::Bool itsHeaderReceived
defines physical units
Definition: Unit.h:189
virtual void setDefaultOptions()
install the default options for this DisplayData
casacore::Float itsHeaderMax
virtual void initLattice(const casacore::Record &)
casacore::Bool needResize()
casacore::String dataType() const
Pure virtual function from DisplayData...
virtual casacore::Bool sizeControl(WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf)
sizeControlFunction, called by the WorldCanvasHolder to setup the WorldCanvas linear coordinate syste...
virtual casacore::Bool labelAxes(const WCRefreshEvent &ev)
virtual void refresh(casacore::Bool);
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
casacore::LatticeConcat< casacore::Float > * itsLatticeConcatPtr
casacore::ImageInterface&lt;casacore::Float&gt; *itsImagePtr; casacore::Array&lt;casacore::Float&gt; *itsBaseArra...
casacore::SubLattice< casacore::Float > * itsFilledDisplayedLatticePtr
virtual casacore::Bool setOptions(casacore::Record &rec, casacore::Record &recOut)
apply options stored in val to the DisplayData; return value true means a refresh is needed...
virtual casacore::Vector< casacore::String > worldAxisNames() const
Miscellaneous information supply routines.
void initSRDD(const casacore::Vector< casacore::String > aAxisNames, const casacore::Vector< casacore::String > aAxisUnits, casacore::uInt mAxis)
Worker function for c&#39;tors.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
void operator=(const ScrollingRasterDD &other)
(Required) copy assignment.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Rastered data - should go first.
Definition: DisplayEnums.h:357
void setHeaderMin(casacore::Float x)
casacore::String itsResample
casacore::IPosition itsScanShape; casacore::uInt itsPlaneNumber;
virtual Display::DisplayDataType classType()
Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing...
float Float
Definition: aipstype.h:54
virtual void updateLatticeConcat(casacore::Array< casacore::Float > *=NULL, DisplayCoordinateSystem *=NULL)
virtual casacore::Vector< casacore::String > worldAxisUnits() const
Base class for scrolling DisplayData objects.
WCResampleHandler * itsResampleHandler
pointer to resampler
virtual casacore::String showValue(const casacore::Vector< casacore::Double > &world)
casacore::Format a string containing value information at the given world coordinate ...
Base class for resampling data pixels to World/PixelCanvas pixels.
casacore::uInt shiftAxis()
casacore::IPosition itsLatticeShape
A holder to interface between DisplayDatas and a WorldCanvas.
void setLatticeShape(const casacore::IPosition x)
void setPlaneNumber(const casacore::uInt x) { itsPlaneNumber = x; } casacore::uInt planeNumber() { re...
virtual const casacore::Unit dataUnit() const
void setScanNumber(casacore::uInt x)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::IPosition itsFixedPos
casacore::Int itsM2Axis;
casacore::IPosition latticesShape()
ScrollingRasterDD(const casacore::uInt nDim, const casacore::IPosition, const casacore::Vector< casacore::String >, const casacore::Vector< casacore::String >, casacore::uInt sAxis=2, casacore::uInt scanNo=100)
virtual casacore::Record getOptions(bool scrub=false) const
retrieve the current and default options and parameter types.
casacore::MaskedLattice< casacore::Float > ** itsLattices
virtual void setSpectralPreference(DisplayCoordinateSystem &, const casacore::String &, const casacore::String &)
Set Spectral preference -&gt; not used here.
void setHeaderMax(casacore::Float x)
unsigned int uInt
Definition: aipstype.h:51