casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtDisplayData.qo.h
Go to the documentation of this file.
1 //# QtDisplayData.qo.h: Qt DisplayData wrapper.
2 //# Copyright (C) 2005
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 QTDISPLAYDATA_H
29 #define QTDISPLAYDATA_H
30 
31 #include <casa/aips.h>
32 #include <casa/BasicSL/String.h>
33 #include <casa/Containers/Record.h>
37 #include <casa/BasicMath/Math.h>
42 #include <vector>
43 
44 
45 #include <graphics/X11/X_enter.h>
46 #include <QtCore>
47 #include <QObject>
48 #include <graphics/X11/X_exit.h>
49 
50 
51 namespace casacore{
52 
53  class String;
54  class Record;
55  template <class T> class ImageInterface;
56  class ImageRegion;
57 }
58 
59 namespace casa { //# NAMESPACE CASA - BEGIN
60 
61  class DisplayData;
62  class WCMotionEvent;
63  class QtDisplayPanel;
64  class WorldCanvasHolder;
65  class Colormap;
66  class QtDisplayPanelGui;
67  class WedgeDD;
68 
69  class QtDisplayData : public QObject {
70 
71  Q_OBJECT //# Allows slot/signal definition. Must only occur in
72  //# implement/.../*.h files; also, makefile must include
73  //# name of this file in 'mocs' section.
74 
75  public:
76 
77  static std::string path(const DisplayData *);
78 
84  virtual std::string name() {
85  return name_;
86  }
87  virtual const char* nameChrs() {
88  return name_.c_str();
89  }
90  virtual void setName(const std::string& name) {
91  name_ = name;
92  }
93  const std::string DISPLAY_RASTER;
94  const std::string DISPLAY_CONTOUR;
95  const std::string DISPLAY_VECTOR;
96  const std::string DISPLAY_MARKER;
97  virtual std::string dataType() const {
98  return dataType_;
99  }
100  virtual std::string displayType() {
101  return displayType_;
102  }
103 
104  //Display Type
105  bool isRaster() const;
106  bool isContour() const;
107  bool isVector() const;
108  bool isMarker() const;
109  bool isImage() const;
110 
111  //virtual bool delTmpData() const;
112  virtual void delTmpData() const;
113  virtual void setDelTmpData(bool delTmpData);
114 
115  std::string description( ) const;
116  std::string path( ) const {
117  return path_;
118  }
119 
121  return errMsg_;
122  }
123 
124  // retrieve the casacore::Record of options. This is similar to a 'Parameter Set',
125  // containing option types, default values, and meta-information,
126  // suitable for building a user interface for controlling the DD.
127  virtual casacore::Record getOptions();
128 
129  // retrieve wrapped DisplayData.
130  //# (should probably be private, and 'friend'ed only to QtDP, which
131  //# needs it for purposes like registration...).
132  virtual DisplayData* dd() {
133  return dd_;
134  }
135 
136  // Did creation of wrapped DD fail?
137  virtual bool isEmpty() {
138  return dd_==0;
139  }
140 
141 
142 
143  // Possible valuse: Raster, casacore::Vector, Annotation, CanvasAnnotation
145  bool isSkyCatalog() const;
146  bool isMS() const;
147 
148 
149  // Can the QDD display tracking information?
150  virtual bool usesTracking() {
151  return !isEmpty() &&
154  }
155 
156  // Returns a casacore::String with value and position information,
157  // suitable for a cursor tracking display.
158  virtual std::pair<casacore::String,casacore::String> trackingInfo(const WCMotionEvent& ev);
159 
160 
161  // Convert 2-D 'pseudoregion' (or 'mouse region' casacore::Record, from the region
162  // mouse tools) to a full Image Region, with same number of axes as the
163  // DD's casacore::Lattice (and relative to its DisplayCoordinateSystem).
164  // Return value is 0 if the conversion can't be made or does not apply
165  // to this DD for any reason (ignored by non-casacore::Lattice DDs, e.g.).
166  //
167  // If allChannels==true, the region is extended along spectral axis, if
168  // it exists (but ONLY if the spectral axis is not also on display; the
169  // visible mouse region always defines region shape on the display axes).
170  //
171  // If allAxes is true, the region is extended over all (non-display)
172  // axes (including any spectral axis; allAxes=true makes the allChannels
173  // setting irrelevant).
174  //
175  // If both allchannels and allAxes are false (the default), the region
176  // will be confined to the currently-displayed plane.
177  //
178  // -->If the returned casacore::ImageRegion* is non-zero, the caller
179  // -->is responsible for deleting it.
181  WorldCanvasHolder* wch,
182  bool allChannels=false,
183  bool allPols=false,
184  bool allRAs=false,
185  bool allDECs=false,
186  bool allAxes=false);
188  casacore::Record mouseRegion, WorldCanvasHolder* wch,
189  casacore::String& extChan, casacore::String& extPol);
190 
191  // Print statistics on image for given region.
192  // Returns false if unable to do so.
193  virtual bool printRegionStats(casacore::ImageRegion& imgReg);
194  virtual bool printLayerStats(casacore::ImageRegion& imgReg);
195 
196 
197  // Return the number of the spectral axis within the DD's original
198  // image lattice and coordinate system (-1 if none).
199  //virtual int spectralAxis();
200  virtual int getAxisIndex(casacore::String axtype=casacore::String("Spectral"));
201 
202  //# colorbar methods
203 
204 
205  // Would this QDD want to display a color bar if registered and
206  // conformant for drawing?
207  virtual bool wouldDisplayColorBar() {
208  bool displayColorBar = false;
209  bool wouldDisplayColorBar = false;
210  if ( colorBarDisplayOpt_ != NULL ) {
211  if (colorBarDisplayOpt_->value() == WEDGE_YES) {
212  displayColorBar = true;
213  }
214  wouldDisplayColorBar = hasColorBar() && displayColorBar;
215  }
216  return wouldDisplayColorBar;
217  }
218 
219 
220  // Is a color bar WDD defined for this QDD?
221  virtual bool hasColorBar() {
222  bool colorBarExists = false;
223  if ( colorBar_!= 0 ) {
224  colorBarExists = true;
225  }
226  return colorBarExists;
227  }
228 
229 
230  // User-requested adjustment to colorbar thickness (will probably
231  // remain at the default value of 1). Used by QtDisplayPanel to
232  // aid in sizing colorbar panels.
233  virtual float colorBarSizeAdj() {
234  if(!wouldDisplayColorBar()) return 0.;
238  }
239 
240 
241  // Used (by QtDisplayPanel) to compute margin space for colorbar labels.
242  // It is the (pgplot) character size for colorbar labels (default 1.2)
243  // times a label space 'adjustment' user option (default 1.).
244  virtual float colorBarLabelSpaceAdj();
245 
246 
247  // Retrieve color bar ('wedge') DD. (0 if none. It will exist if
248  // hasColorBar() is true). (Not for general use).
249  //# (should probably be private, and 'friend'ed only to QtDP, which
250  //# which manages its registration and other aspects).
251  virtual WedgeDD* colorBar() {
252  return colorBar_;
253  }
254 
255  Colormap* getColorMap() const;
256 
257 
258  // Does this DD currently own a colormap?
259  virtual bool hasColormap() const {
260  return clrMap_!=0;
261  }
262  // Different DisplayDatas *could* have different colormap palettes
263  // thus this is non-static and specific to a display data
264  virtual bool isValidColormap( const QString &name ) const;
265  void setColorMap( Colormap* colorMap );
266  //Set the transparence of the color map for overlaying images.
267  bool setColormapAlpha( casacore::uInt alpha );
268  void removeColorMap( const casacore::String& name );
269 
270  // Get/set colormap shift/slope ('fiddle') and brightness/contrast
271  // settings. (At present this is usually set for the PC's current
272  // colormap via mouse tools. These may want to to into get/setOptions
273  // (thus into guis) eventually...). Return value will be false if
274  // DD has no colormap [at present].
275  //<group>
276  virtual bool getCMShiftSlope(casacore::Vector<float>& params) const;
277  virtual bool getCMBrtCont(casacore::Vector<float>& params) const;
278  virtual bool setCMShiftSlope(const casacore::Vector<float>& params);
279  virtual bool setCMBrtCont(const casacore::Vector<float>& params);
280  //</group>
281 
282  //Return the name of the z-axis.
284 
285  //# (dk note: If you use this, you must assure you do not change it in ways
286  //# that will crash QDD. Do not assume it is non-zero -- im_ may be zero if
287  //# the QDD's image is complex. However, if it _is_ non-zero, you should
288  //# be able to assume it will exist for the life of the QDD).
289  std::shared_ptr<casacore::ImageInterface<float> > imageInterface() {
290  return im_;
291  }
293 
294  // force unlocking of paged images
295  void unlock( );
298 
299 
300  void init();
301  void initImage();
302  void setImage(std::shared_ptr< casacore::ImageInterface<float> > img);
303  static void setGlobalColorOptions( bool global );
304  void setHistogramColorProperties( bool invert, int logScale );
305 
306  public slots:
307 
308  // (Should only be used by QtDisplayPanels to notify the QDD that it
309  // has been registered, or is about to be unregistered, on the QDP).
310  //<group>
311  virtual void registerNotice(QtDisplayPanel*);
312  virtual void unregisterNotice(QtDisplayPanel*);
313  //</group>
314 
315  // Apply option values to the DisplayData. Method will
316  // emit optionsChanged() if other option values, limits, etc.
317  // should also change as a result.
318  // Set emitAll = true if the call was not initiated by the options gui
319  // itself (e.g. via scripting or save-restore); that will assure that
320  // the options gui does receive all option updates (via the optionsChanged
321  // signal) and updates its user interface accordingly.
322 
323  virtual void setOptions(casacore::Record opts, bool emitAll=false);
324  void emitOptionsChanged( casacore::Record changedOpts );
325  void setPlotTitle();
326 
327 
328 
329 
330  virtual void checkAxis( bool changeSpectrum = true);
331 
332 
334  return clrMapName_;
335  }
336  void setColormap(const casacore::String& clrMapName) {
337  setColormap_(clrMapName);
338  }
339 
340  void setRasterPowerScaling( float powerScale );
341 
342  void setHistogramColorMapping( float minValue, float maxValue, float powerScale );
343  // This is used to get the display data to set a saturation range
344  // from another image.
345  void setSaturationRange( double min, double max );
346 
347  signals:
348 
349  // Signals changes the DD has made internally to option values, limits,
350  // etc., that ui (if any) will want to reflect. Calling setOptions()
351  // to change one option value may cause this to be emitted with any other
352  // options which have changed as a result.
353  void optionsChanged(casacore::Record changedOptions);
354 
355  // Emitted when problems encountered (in setOptions, e.g.)
356  void qddError(casacore::String errmsg);
357 
358  // Emitted when options successfully set without error.
359  //# (same purpose as above -- clean this up).
360  void optionsSet();
361 
362  // Emitted when color bars may need rearrangement on panels where
363  // this QDD is registered. QDP connects this to its checkColorBars_()
364  // slot.
365  void colorBarChange();
366 
367  // Emitted when something in the DD (besides mouse movement) means
368  // that tracking data for this QDD could be usefully recomputed
369  // and redisplayed. Underlying DDs can indicate this in setOptions
370  // by defining the "trackingchange" field in chgdOpts (recOut).
372 
373 
374  //# Emitted when an operation is successfully completed. It is intended
375  //# that, e.g., a gui that responds to qddError signals by setting
376  //# an error message onto a status line vould clear the status line
377  //# when this signal occurs.
378  //# (let qdpg clear status line itself b4 QDP calls instead?...)
379 //#void qddOK();
380 
381  //# This object will be destroyed after this signal is processed.
382  //# (Note: if this DD is managed in QtViewer's list, it is preferable
383  //# to connect to QtViewerBase::ddRemoved() instead).
384 //# void dying(QtDisplayData*);
385 
386  // (mkApr2012) axisChanged and axisChangedProfile have the identical
387  // functionality, to send out the names of the current x/y/z axes.
388  // The profiler needs to be notified first such subsequent plot
389  // request from regions are accepted. For that reason there is the
390  // signal axisChangedProfile which connects to the profiler and is
391  // emitted prior to axisChanged (in QtDisplayData::checkAxis())
394 
395  void spectrumChanged(casacore::String spcTypeUnit, casacore::String spcRval, casacore::String spcSys);
396 
397  void statsReady(const casacore::String&);
399 
401 
402  protected slots:
403 
404  // Set the color bar orientation option according to the master
405  // value stored in the QtViewerBase (panel_->viewer()->colorBarsVertical_).
406  // Connected to QtViewerBase's colorBarOrientationChange() signal;
407  // also called during initialization.
408  virtual void setColorBarOrientation_();
409 
410 
411  protected:
412 
413  // Heuristic used internally to set initial axes to display on X, Y and Z,
414  // for PADDs. shape should be that of Image/casacore::Array, and have same nelements
415  // as axs. On return, axs[0], axs[1] and (if it exists) axs[2] will be axes
416  // to display initially on X, Y, and animator, respectively.
417  // If you pass a CS for the image, it will give special consideration to
418  // Spectral [/ Direction] axes (users expect their spectral axes on Z, e.g.)
419  //# (Lifted bodily from GTkDD).
421  const DisplayCoordinateSystem &cs);
422 
423  // Set named colormap onto underlying dd (called from public setOptions()).
424  // Pass "" to remove/delete any existing colormap for the QDD.
425  // In the case that no colormap is set on a dd that needs one (raster dds,
426  // mostly), the drawing canvas will provide a default.
427  // See ColormapDefinition.h, and the casacore::Table gui/colormaps/default.tbl (in the
428  // data repository) for the list of valid default colormap names (and
429  // information on creating/installing custom ones). If an invalid name is
430  // passed, an (ignorable) error message is signalled, and the dd's colormap
431  // will remain unchanged.
432  virtual void setColormap_(const casacore::String& clrMapName, bool invertChanged = false);
433  virtual void removeColormap_() {
434  setColormap_("");
435  }
436 
437 
438 
439  //# (could be exposed publicly, if useful).
440  // Does this DD use/need a public colormap?
441  virtual bool usesClrMap_() {
442  return (isRaster() || displayType_=="pksmultibeam");
443  }
444  //# These are the only DD types currently needing a colormap and
445  //# supporting the selection option; add more if/when needed....
446 
447  // Can this QDD use a color bar?
448  virtual bool usesColorBar_() {
449  return isRaster();
450  }
451 
452  typedef std::map<const DisplayData*,QtDisplayData*> data_to_qtdata_map_type;
454 
455  private:
456  // Not intended for use.
457  QtDisplayData() : panel_(0), im_(), cim_(), dd_(0) { }
458  static bool globalColorSettings;
459  bool setColorBarOptions( casacore::Record& opts, casacore::Record& chgdOpts );
460  void checkGlobalChange( casacore::Record& chgdOpts );
461  void done();
462  //If global color settings is checked and a new QtDisplayData is added,
463  //it should pick up the global color settings already in place.
465  void initColorSettings();
467  //# data
468 
470  std::string path_, dataType_, displayType_;
471 
472  const std::string TYPE_IMAGE;
473  const std::string SKY_CATALOG;
474  const std::string MS;
475  std::shared_ptr<casacore::ImageInterface<float> > im_;
476  std::shared_ptr<casacore::ImageInterface<casacore::Complex> > cim_;
478 
479  std::string name_;
480 
483 
484  // Name of colormap used by dd_ ("" if none)
486  // Color maps can be removed. In such a case, the restoreColorMapName
487  //holds the previous one so we can reset to that in case the one we
488  //are using is removed.
490 
491  // Will be set onto underlying dd_ if needed (0 if none)
493 
494  // Parses colormap choice out of a setOptions record.
496 
497  // All the valid ('primary') colormap names.
498  // (This interface doesn't support use of 'synonym' names).
501 
502  // Set of colormaps currently or previously used by this DD. Once
503  // a Colormap is created, it is retained for the life of the DD.
504  //# (A main reason for this is to remember the colormap's
505  //# 'transfer function' state (brightness/contrast/shift/slope) in case
506  //# it is reused -- see PCITFiddler.h (colormap mouse tools)).
507  typedef std::map<casacore::String, Colormap*> colormapmap;
510 
511 
512  // Latest error message, retrievable via errMsg(). (Where possible, errors
513  // are indicated via the qddError signal rather than a throw, and the code
514  // attempts something sensible in case the caller chooses to ignore it).
516 
517 
518  // The DD that draws the color bar key for the main DD -- 0 if N/A.
520 
521  //# User interface parsing objects for some color bar parameters that are
522  //# controlled externally to the WedgeDD (colorBar_): whether to display
523  //# the color bar, its thickness, label (margin) space, orientation,
524  //# and character size.
525  //# Changes to any of these DisplayParameters means that the arrangement
526  //# of colorbars must be checked on all QtDisplayPanels where this QDD
527  //# is registered (orientation change is sent to base viewer class and
528  //# handled there).
529 
530  // Is color bar display turned on? ("Yes" / "No")
532 
533  // Manual user adjustment factor for color bar thickness. Hopefully
534  // the automatic choice (by QtDisplayPanel) will be adequate in most
535  // cases, and this can remain at the default value of 1.
537 
538  // Manual user adjustment factor for color bar label space. Hopefully
539  // the automatic choice (by QtDisplayPanel) will be adequate in most
540  // cases, and this can remain at the default value of 1.
542 
543  // "horizontal" / "vertical"
545 
546  // Size of label characters on color bar (affects margins only).
547  //# (WedgeDD reacts to this option, but it is also monitored on this level).
549 
551 
552  };
553 
554 
555 } //# NAMESPACE CASA - END
556 
557 
558 //# Allows QtDisplayData* to be stored in a QVariant; e.g., to be
559 //# the data associated with a QAction.... See QMetaType and
560 //# QVariant class doc. QVariants are rather well-designed
561 //# generic value holders.
562 //# Note: this declaration cannot be placed within the casa namespace.
563 Q_DECLARE_METATYPE(casa::QtDisplayData*)
564 
565 
566 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
static const casacore::String WEDGE_YES
std::shared_ptr< casacore::ImageInterface< float > > im_
casacore::String clrMapName_
Name of colormap used by dd_ (&quot;&quot; if none)
void emitOptionsChanged(casacore::Record changedOpts)
virtual bool setCMShiftSlope(const casacore::Vector< float > &params)
DParameterChoice * colorBarDisplayOpt_
Is color bar display turned on? (&quot;Yes&quot; / &quot;No&quot;)
bool isRaster() const
Display Type.
virtual bool wouldDisplayColorBar()
Would this QDD want to display a color bar if registered and conformant for drawing?
virtual std::pair< casacore::String, casacore::String > trackingInfo(const WCMotionEvent &ev)
Returns a casacore::String with value and position information, suitable for a cursor tracking displa...
virtual bool getCMShiftSlope(casacore::Vector< float > &params) const
Get/set colormap shift/slope (&#39;fiddle&#39;) and brightness/contrast settings.
virtual bool hasColorBar()
Is a color bar WDD defined for this QDD?
Colormap * clrMap_
Will be set onto underlying dd_ if needed (0 if none)
virtual const char * nameChrs()
DParameterChoice * colorBarOrientationOpt_
&quot;horizontal&quot; / &quot;vertical&quot;
void colorBarChange()
Emitted when color bars may need rearrangement on panels where this QDD is registered.
void qddError(casacore::String errmsg)
Emitted when problems encountered (in setOptions, e.g.)
#define max(a, b)
Definition: hio.h:44
static data_to_qtdata_map_type dd_source_map
virtual casacore::ImageRegion * mouseToImageRegion(casacore::Record mouseRegion, WorldCanvasHolder *wch, bool allChannels=false, bool allPols=false, bool allRAs=false, bool allDECs=false, bool allAxes=false)
Convert 2-D &#39;pseudoregion&#39; (or &#39;mouse region&#39; casacore::Record, from the region mouse tools) to a ful...
bool setColorBarOptions(casacore::Record &opts, casacore::Record &chgdOpts)
void setColorMap(Colormap *colorMap)
bool isMarker() const
DParameterRange< float > * colorBarLabelSpaceOpt_
Manual user adjustment factor for color bar label space.
virtual Display::DisplayDataType ddType()
Possible valuse: Raster, casacore::Vector, Annotation, CanvasAnnotation.
virtual bool usesTracking()
Can the QDD display tracking information?
#define min(a, b)
Definition: hio.h:45
const std::string TYPE_IMAGE
void removeColorMap(const casacore::String &name)
DisplayDataType
WorldCanvasHolder - what type of DisplayData is this, need to know for drawing order.
Definition: DisplayEnums.h:355
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
casacore::String getPositionInformation(const casacore::Vector< double > world)
std::map< casacore::String, bool > colormapnamemap
Return the names of the built-in colormaps.
bool isContour() const
viewer::ImageProperties image_properties
virtual void delTmpData() const
virtual bool delTmpData() const;
casacore::String restoreColorMapName
Color maps can be removed.
bool isSkyCatalog() const
casacore::String errMsg_
Latest error message, retrievable via errMsg().
bool setColormapAlpha(casacore::uInt alpha)
Set the transparence of the color map for overlaying images.
T maximum()
Return the maximum for this parameter.
std::string path() const
virtual void registerNotice(QtDisplayPanel *)
(Should only be used by QtDisplayPanels to notify the QDD that it has been registered, or is about to be unregistered, on the QDP).
void axisChangedProfile(casacore::String, casacore::String, casacore::String, std::vector< int >)
void showColorHistogram(QtDisplayData *)
virtual std::string name()
const viewer::ImageProperties & imageProperties()
bool isMS() const
static void setGlobalColorOptions(bool global)
WedgeDD * colorBar_
The DD that draws the color bar key for the main DD – 0 if N/A.
virtual casacore::String errMsg()
virtual WedgeDD * colorBar()
Retrieve color bar (&#39;wedge&#39;) DD.
void setRasterPowerScaling(float powerScale)
virtual bool getCMBrtCont(casacore::Vector< float > &params) const
virtual bool usesClrMap_()
Does this DD use/need a public colormap?
virtual float colorBarSizeAdj()
User-requested adjustment to colorbar thickness (will probably remain at the default value of 1)...
std::map< const DisplayData *, QtDisplayData * > data_to_qtdata_map_type
void statsReady(const casacore::String &)
static bool globalColorSettings
virtual void removeColormap_()
void setHistogramColorMapping(float minValue, float maxValue, float powerScale)
virtual void getInitialAxes_(casacore::Block< casacore::uInt > &axs, const casacore::IPosition &shape, const DisplayCoordinateSystem &cs)
Heuristic used internally to set initial axes to display on X, Y and Z, for PADDs.
void checkGlobalChange(casacore::Record &chgdOpts)
const casacore::String & getColormap()
ColormapDefinition::colormapnamemap colormapnamemap
All the valid (&#39;primary&#39;) colormap names.
virtual bool printLayerStats(casacore::ImageRegion &imgReg)
void globalOptionsChanged(QtDisplayData *, casacore::Record)
bool isVector() const
void setColormap(const casacore::String &clrMapName)
Colormap * getColorMap() const
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
const std::string DISPLAY_VECTOR
virtual bool usesColorBar_()
Can this QDD use a color bar?
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
virtual bool isValidColormap(const QString &name) const
Different DisplayDatas could have different colormap palettes thus this is non-static and specific to...
void setHistogramColorProperties(bool invert, int logScale)
void initGlobalColorSettings()
If global color settings is checked and a new QtDisplayData is added, it should pick up the global co...
virtual void setDelTmpData(bool delTmpData)
virtual void setName(const std::string &name)
T minimum()
Return the minimum for this parameter.
The main display window for the Qt version of the viewer.
const std::string DISPLAY_CONTOUR
void axisChanged(casacore::String, casacore::String, casacore::String, std::vector< int >)
(mkApr2012) axisChanged and axisChangedProfile have the identical functionality, to send out the name...
This class provides a priori image information derived from the image itself.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
std::map< casacore::String, Colormap * > colormapmap
Set of colormaps currently or previously used by this DD.
const std::string DISPLAY_RASTER
virtual bool printRegionStats(casacore::ImageRegion &imgReg)
Print statistics on image for given region.
QtDisplayPanelGui * panel_
virtual bool isEmpty()
Did creation of wrapped DD fail?
void setSaturationRange(double min, double max)
This is used to get the display data to set a saturation range from another image.
void setImage(std::shared_ptr< casacore::ImageInterface< float > > img)
virtual void setColorBarOrientation_()
Set the color bar orientation option according to the master value stored in the QtViewerBase (panel_...
const std::string DISPLAY_MARKER
Implementation of DisplayParameter to store choice parameters.
virtual bool setCMBrtCont(const casacore::Vector< float > &params)
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
virtual float colorBarLabelSpaceAdj()
Used (by QtDisplayPanel) to compute margin space for colorbar labels.
virtual int getAxisIndex(casacore::String axtype=casacore::String("Spectral"))
Return the number of the spectral axis within the DD&#39;s original image lattice and coordinate system (...
Class to hold a region of interest in an image.
Definition: ImageRegion.h:86
virtual std::string dataType() const
T value()
Return the current value of this parameter.
DParameterRange< float > * colorBarCharSizeOpt_
Size of label characters on color bar (affects margins only).
static const casacore::String COLOR_MAP
casacore::String getZAxisName()
Return the name of the z-axis.
void spectrumChanged(casacore::String spcTypeUnit, casacore::String spcRval, casacore::String spcSys)
virtual void unregisterNotice(QtDisplayPanel *)
Describes a method of generating a table of colors.
Definition: Colormap.h:104
A holder to interface between DisplayDatas and a WorldCanvas.
DParameterRange< float > * colorBarThicknessOpt_
Manual user adjustment factor for color bar thickness.
const std::string MS
A DisplayData to draw color wedges.
Definition: WedgeDD.h:85
void unlock()
force unlocking of paged images
static const casacore::String WEDGE_LABEL_CHAR_SIZE
casacore::String value()
Return the current value of this parameter.
void optionsSet()
Emitted when options successfully set without error.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void trackingChange(QtDisplayData *)
Emitted when something in the DD (besides mouse movement) means that tracking data for this QDD could...
virtual void checkAxis(bool changeSpectrum=true)
virtual bool hasColormap() const
Does this DD currently own a colormap?
QtDisplayData()
Not intended for use.
casacore::Record getGlobalColorChangeRecord(casacore::Record &opts) const
bool isImage() const
colormapnamemap clrMapNames_
Base class for display objects.
Definition: DisplayData.h:317
DParameterChoice * clrMapOpt_
Parses colormap choice out of a setOptions record.
std::shared_ptr< casacore::ImageInterface< float > > imageInterface()
Canvas annotation - can draw outside draw area.
Definition: DisplayEnums.h:363
virtual casacore::Record getOptions()
retrieve the casacore::Record of options.
std::string description() const
virtual DisplayData * dd()
retrieve wrapped DisplayData.
virtual void setColormap_(const casacore::String &clrMapName, bool invertChanged=false)
Set named colormap onto underlying dd (called from public setOptions()).
void optionsChanged(casacore::Record changedOptions)
Signals changes the DD has made internally to option values, limits, etc., that ui (if any) will want...
const std::string SKY_CATALOG
unsigned int uInt
Definition: aipstype.h:51
virtual void setOptions(casacore::Record opts, bool emitAll=false)
Apply option values to the DisplayData.
std::shared_ptr< casacore::ImageInterface< casacore::Complex > > cim_
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
virtual std::string displayType()