28 #ifndef QTDISPLAYDATA_H
29 #define QTDISPLAYDATA_H
55 template <
class T>
class ImageInterface;
64 class WorldCanvasHolder;
66 class QtDisplayPanelGui;
84 virtual std::string
name() {
182 bool allChannels=
false,
208 bool displayColorBar =
false;
212 displayColorBar =
true;
214 wouldDisplayColorBar =
hasColorBar() && displayColorBar;
222 bool colorBarExists =
false;
224 colorBarExists =
true;
226 return colorBarExists;
330 virtual void checkAxis(
bool changeSpectrum =
true);
474 const std::string
MS;
475 std::shared_ptr<casacore::ImageInterface<float> >
im_;
476 std::shared_ptr<casacore::ImageInterface<casacore::Complex> >
cim_;
A Vector of integers, for indexing into Array<T> objects.
static const casacore::String WEDGE_YES
std::shared_ptr< casacore::ImageInterface< float > > im_
casacore::String clrMapName_
Name of colormap used by dd_ ("" if none)
void emitOptionsChanged(casacore::Record changedOpts)
virtual bool setCMShiftSlope(const casacore::Vector< float > ¶ms)
DParameterChoice * colorBarDisplayOpt_
Is color bar display turned on? ("Yes" / "No")
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 > ¶ms) const
Get/set colormap shift/slope ('fiddle') 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_
"horizontal" / "vertical"
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.)
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 'pseudoregion' (or 'mouse region' casacore::Record, from the region mouse tools) to a ful...
bool setColorBarOptions(casacore::Record &opts, casacore::Record &chgdOpts)
void setColorMap(Colormap *colorMap)
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?
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.
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.
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.
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()
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 ('wedge') DD.
void setRasterPowerScaling(float powerScale)
virtual bool getCMBrtCont(casacore::Vector< float > ¶ms) 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 ('primary') colormap names.
virtual bool printLayerStats(casacore::ImageRegion &imgReg)
void globalOptionsChanged(QtDisplayData *, casacore::Record)
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.
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.
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 > ¶ms)
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
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's original image lattice and coordinate system (...
Class to hold a region of interest in an image.
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.
A holder to interface between DisplayDatas and a WorldCanvas.
DParameterRange< float > * colorBarThicknessOpt_
Manual user adjustment factor for color bar thickness.
A DisplayData to draw color wedges.
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.
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
colormapnamemap clrMapNames_
Base class for display objects.
DParameterChoice * clrMapOpt_
Parses colormap choice out of a setOptions record.
std::shared_ptr< casacore::ImageInterface< float > > imageInterface()
Canvas annotation - can draw outside draw area.
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
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
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual std::string displayType()