29 #ifndef QTDISPLAYPANELGUI_H
30 #define QTDISPLAYPANELGUI_H
57 template <
class T>
class ImageInterface;
63 class ViewerPreferences;
68 class QtViewerPrintGui;
70 class QtCanvasManager;
78 class QtRegionManager;
79 class QtRegionShapeManager;
81 class QtExportManager;
82 class QtDataOptionsPanel;
87 class SlicerMainWindow;
89 class ImageManagerDialog;
90 class QtDisplayPanelGui;
91 class CursorTrackingHolder;
92 class AboutDialogViewer;
131 const std::list<std::string> &args = std::list<std::string>( ) );
133 const std::list<std::string> &args = std::list<std::string>( ) );
152 void status(
const std::string &s,
const std::string &
type=
"info" );
183 virtual QVariant
setoptions(
const QMap<QString,QVariant> &input,
int id);
203 bool autoRegister=
true,
int insertPosition = -1,
204 bool masterCoordinate =
false,
bool masterSaturation =
false,
205 bool masterHue =
false,
259 virtual std::string
rcid( )
const {
269 void loadRegions(
const std::string &path,
const std::string &datatype );
271 std::string
outputRegions( std::list<viewer::QtRegionState*>
regions, std::string
file, std::string format, std::string ds9_csys=
"pixel" );
282 typedef std::pair<QString, std::shared_ptr<casacore::ImageInterface<float> > >
OverplotInterface;
284 #if defined(WITHOUT_DBUS)
354 void movieChannels(
int channel,
bool forward,
int stepSize,
int channelStart,
int channelEnd );
377 std::string
getrc(
const std::string &key );
378 void putrc(
const std::string &key,
const std::string &val );
385 bool register =
true,
bool masterCoordinate =
false,
386 bool masterSaturation =
false,
bool masterHue =
false);
389 std::string
id( )
const {
408 void overlay(QList<OverplotInterface>);
432 virtual void close( );
434 virtual void quit( );
447 QMainWindow::hideEvent(ev);
632 bool masterCoordinate,
bool masterSaturation,
bool masterHue,
649 const QList<double>& worldY );
691 static std::string
idGen( );
715 bool autoRegister=
true,
bool tmpData=
false,
718 const QList<double> & worldX,
const QList<double> & worldY,
719 const QList<int> &pixelX,
const QList<int> & pixelY );
720 void addSlice(
int id,
const QString&
shape,
const QString&,
const QList<double>& worldX,
721 const QList<double>& worldY,
const QList<int>& pixelX,
const QList<int>& pixelY,
722 const QString&,
const QString&,
const QString&,
int,
int);
viewer::QtRegionDock * regionDock_
virtual bool supports(SCRIPTING_OPTION option) const
void to_image_mode(bool channelCubes)
AnimatorHolder * animationHolder
Dock widget which manages the cursor tracking dialogs...
QtDisplayData * createDD(casacore::String path, casacore::String dataType, casacore::String displayType, bool autoRegister=true, int insertPosition=-1, bool masterCoordinate=false, bool masterSaturation=false, bool masterHue=false, const viewer::DisplayDataOptions &ddo=viewer::DisplayDataOptions(), const viewer::ImageProperties &props=viewer::ImageProperties())
Create a new QtDD from given parameters, and add to internal DD list.
virtual void showExportManager()
virtual void hideDataOptionsPanel()
Class which stores WorldCanvas refresh event information.
void animationImageChanged(int index)
Written in response to CAS-5101.
virtual void addGuiState_(QDomDocument *)
Responds to qdp_->creatingRstrDoc(QDomDocument*) signal.
virtual void ddRegClicked_()
Respond to registration/close menu clicks.
void cursorPosition(viewer::Position)
void construct_(QtDisplayPanel *newpanel, const std::list< std::string > &args)
portion of construction shared by multiple constructor functions...
std::string outputRegions(std::list< viewer::QtRegionState * > regions, std::string file, std::string format, std::string ds9_csys="pixel")
zero length string indicates OK!
DisplayDataHolder::DisplayDataIterator endDD() const
virtual void showPrintManager()
Show/hide display panel's auxiliary windows.
virtual void regionMoved(Qt::DockWidgetArea)
LinkedCursorEH * linkedCursorHandler
void showColorHistogram(QtDisplayData *displayData)
std::string getrc(const std::string &key)
note that 'key' is prefixed with something like "viewer.dpg."...
Qt implementation of main viewer supervisory object – Gui level.
void removeSkyComponentOverlay(casacore::String path)
LinkedCursorEH(QtDisplayPanelGui *dpg)
QAction * ddPreferencesAct_
virtual void showCanvasManager()
void activate(bool)
called to indicate application activation state...
virtual void hideFileBoxPanel()
virtual void hideCanvasManager()
virtual void doSelectChannel(int channelIndex)
go to a specifc channel
HistogramMain * histogrammer
virtual void hideShapeManager()
void leaveEvent(QEvent *)
viewer::QtRegionDock * regionDock()
virtual void fwdPlayChannelMovie_()
These react to fwd/reverse Play buttons.
void axisToolUpdate(QtDisplayData *controlling_dd)
virtual void stopImageMovie()
void incrementMovieChannel()
std::list< QtDisplayData * > unregisteredDDs()
return the number of user DDs.
virtual Type type()
Return the type enum.
void controlling_dd_axis_change(casacore::String, casacore::String, casacore::String, std::vector< int >)
void disconnectHistogram()
void cursorBoundary(QtDisplayPanel::CursorBoundaryCondition)
virtual casacore::String errMsg()
bool ddExists(const casacore::String& name) { return dd(name)!=0; }
virtual void hidePrintManager()
virtual void displayTrackingData_(casacore::Record trackingRec)
Display tracking data gathered by underlying panel.
virtual void showDataOptionsPanel()
bool colorBarsVertical()
At least for now, colorbars can only be placed horizontally or vertically, identically for all displa...
void histogramRegionChange(int, viewer::region::RegionChanges change=viewer::region::RegionChangeLabel)
virtual void revPlayImageMovie_()
void movieChannels(int startChannel, int endChannel)
Increments the channel in the images from the start channel to the end channel.
QToolBar * customToolBar
public toolbars, for inserting custom buttons.
virtual void showRegionManager()
void colorBarOrientationChange()
QtDisplayData * processDD(casacore::String path, casacore::String dataType, casacore::String displayType, bool autoRegister, int insertPosition, bool masterCoordinate, bool masterSaturation, bool masterHue, QtDisplayData *qdd, const viewer::DisplayDataOptions &ddo=viewer::DisplayDataOptions())
void removeSource(QtDisplayPanelGui *src)
sources_list_t cursor_sources
MakeMask * qap_
QtAnnotatorGui* qap_;.
void showFitInteractive()
std::shared_ptr< ImageManagerDialog > imageManagerDialog
QToolButton * ddCloseBtn_
void updateFrameInformation()
void setControllingDD(QtDisplayData* controlDD);
QString status_bar_stylesheet
virtual QtDisplayData * addDD(casacore::String path, casacore::String dataType, casacore::String displayType, bool autoRegister=true, bool tmpDtata=false, std::shared_ptr< casacore::ImageInterface< float > > img=std::shared_ptr< casacore::ImageInterface< float > >())
add a new DD
void enterEvent(QEvent *)
viewer::Region * findRegion(int id)
ostream-like interface to creating log messages.
virtual QtDisplayPanelGui * createNewPanel()
virtual void revPlayChannelMovie_()
Displays a histogram that allows the user to set the color scale for an image.
virtual void updateAnimUi_()
Reflect animator state [changes] in gui.
virtual void animatorMoved(Qt::DockWidgetArea)
virtual bool syncDataDir_(casacore::String filename)
Keeps current data directory in sync between casacore::DataManager window and save-restore dialogs...
void showSpecFitImageProfile()
virtual void showPreferences()
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
QDockWidget * histogramDockWidget_
virtual bool removeDD(QtDisplayData *&qdd)
Removes the QDD from the list and deletes it (if it existed – Return value: whether qdd was in the li...
virtual void savePanelState_()
Brings up dialog for saving display panel state: reg'd DDs, their options, etc.
void globalColorSettingsChanged(bool global)
void updateSliceCorners(int id, const QList< double > &worldX, const QList< double > &worldY)
Manages the Animator display on the viewer that allows users to scroll through either the channels wi...
QAction * manageImagesAct_
void createDDFailed(casacore::String errMsg, casacore::String path, casacore::String dataType, casacore::String displayType)
DisplayDataList::const_iterator DisplayDataIterator
void sliceMarkerVisibilityChanged(int regionId, bool visible)
virtual void hideImageMenus()
virtual void ddRegChange_()
Respond to QDP::registrationChange() signal.
virtual void setColorBarOrientation(bool vertical)
At least for now, colorbars can only be placed horizontally or vertically, identically for all displa...
std::string rcid_
rc id for this panel type
virtual std::string rcid() const
return the id for viewer state for this type of panel
CursorTrackingHolder * trkgDockWidget_
virtual void deleteTrackBox_(QtDisplayData *qdd)
Deletes the TrackBox for the given QDD, if it exists.
virtual QVariant start_interact(const QVariant &input, int id)
void setAnimatedImage(int index)
Change the image that is being viewed in the blink animator.
virtual void hold()
Hold and release of refresh.
Base class for handling WorldCanvas refresh events.
virtual void showAnnotatorPanel()
virtual void showStats(const casacore::String &)
void addSkyComponentOverlay(casacore::String path, const QString &colorName)
Used when the histogram needs to come up as a main window.
void connectRegionSignals(PanelDisplay *ppd)
virtual void fwdPlayImageMovie()
std::string id() const
retrieve the identifier string for this QtDisplayPanelGui...
virtual void setUseRegion(bool useRegion=true)
void updateFrameInformationImage()
virtual bool restorePanelState(casacore::String filename)
(Attempts to) restore panel state from named file.
QtRegionShapeManager * qsm_
int movieChannel
Animating the channel.
void ddOpen(const casacore::String &path, const casacore::String &dataType, const casacore::String &displayType, int insertPosition=-1, bool register=true, bool masterCoordinate=false, bool masterSaturation=false, bool masterHue=false)
virtual void hideAnnotatorPanel()
void unregisterDD(QtDisplayData *dd)
void ddClose(QtDisplayData *&removeDD)
void unlinkCursorTracking(QtDisplayPanelGui *)
virtual void hideImageProfile()
void generateHistogramRegionUpdates()
QAction * momentsCollapseAct_
void globalOptionsChanged(QtDisplayData *originator, casacore::Record opts)
virtual void revPlayImageMovie()
All regions are specified in "linear coordinates", not "pixel coordinates".
void remove2DFitOverlay(QList< RegionShape * > fitMarkers)
void overlay(QList< OverplotInterface >)
Profile Overplots.
void linkCursorTracking(QtDisplayPanelGui *, QColor)
std::pair< QString, std::shared_ptr< casacore::ImageInterface< float > > > OverplotInterface
casacore::String selectedDMDir
Intended for use only by QtDataManager (or other data dialogs such as for save-restore), to inform QtDisplayPanel of the directory currently selected for data retrieval, if any ("" if none).
QtDisplayData * lookForExistingController()
Management of the controlling DD.
Displays information to the user about the viewer.
virtual void addDDSlot(casacore::String path, casacore::String dataType, casacore::String displayType, bool autoRegister=true, bool tmpData=false, std::shared_ptr< casacore::ImageInterface< float > > img=std::shared_ptr< casacore::ImageInterface< float > >())
virtual void updateDDMenus_(bool doCloseMenu=true)
void updateFrameInformationChannel()
void regionChange(viewer::Region *, std::string)
std::string path(const std::string &name)
void status(const std::string &s, const std::string &type="info")
enter status information...
ColorHistogram * colorHistogram
virtual void hideExportManager()
QtMouseToolBar * mouseToolBar_
void updateMultiSpectralFitLocation(casacore::Record trackingRec)
QtDisplayData * profileDD_
void initAnimationHolder()
bool adjust_image_animator
virtual void trackingMoved(Qt::DockWidgetArea)
The main display window for the Qt version of the viewer.
virtual void ddCloseClicked_()
std::list< Region * > regions() const
std::shared_ptr< DisplayDataHolder > displayDataHolder
Existing user-visible QDDs casacore::List<QtDisplayData*> qdds_;
casacore::String savedTool_
unsigned int showdataoptionspanel_enter_count
void updateColorHistogram(const QString &ddName)
void frameChanged(int)
Notification that the frame has changed.
void replaceControllingDD(QtDisplayData *oldControllingDD, QtDisplayData *newControllingDD)
used to manage generation of the updateAxes() signal...
virtual void showFileBoxPanel()
This class provides a priori image information derived from the image itself.
A hierarchical collection of named fields of various types.
void operator()(const WCRefreshEvent &ev)
original handler interface (still used for WCRefreshEvents)
static bool logger_did_region_warning
QMenu * ddCloseMenu_
ddRegMenu_,
void sliceMarkerPositionChanged(int regionId, int segmentIndex, float percentage)
virtual void restoreGuiState_(QDomDocument *)
Responds to qdp_->restoring(QDomDocument*) signal.
display_panel_gui_status(QWidget *parent=0)
void hideEvent(QHideEvent *ev)
virtual void revPlayChannelMovie()
~display_panel_gui_status()
void putrc(const std::string &key, const std::string &val)
void updateCursorInfo(WorldCanvas *wc, casacore::Quantity x, casacore::Quantity y)
display cursor information for the specified point (in world coordinates)
virtual void arrangeTrackBoxes_()
Reacts to QDP registration change signal.
string addAnimationDockWidget()
Docking/Dock Widgets.
virtual void mousetoolbarMoved(bool)
Note: The purpose of the SpecFitMonitor interface is to provide a communications interface between th...
void addSource(QtDisplayPanelGui *src, QColor color)
const QtDisplayPanel * displayPanel() const
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
QtDataManager * dataMgr()
virtual void showDataManager()
void revokeRegion(viewer::Region *r)
region coupling between QtRegionDock and QtRegionSource(s)...
void loadRegions(const std::string &path, const std::string &datatype)
load casa (or DS9?) region files...
virtual void hideDataManager()
QToolBar * customToolBar2
CursorBoundaryCondition
included in cursor boundary signals...
DisplayDataHolder::DisplayDataIterator beginDD() const
retrieve a copy of the current DD list.
std::map< QtDisplayPanelGui *, cursor_info_t > sources_list_t
void addSlice(int id, const QString &shape, const QString &, const QList< double > &worldX, const QList< double > &worldY, const QList< int > &pixelX, const QList< int > &pixelY, const QString &, const QString &, const QString &, int, int)
virtual void stopChannelMovie()
virtual void addedData(QString type, QtDisplayData *)
the QtDBusViewerAdaptor can handle loading & registering data itself, but to connect up extra functio...
virtual void hideMakeRegionPanel()
int getBoundedChannel(int channelNumber) const
viewer::CleanGui * clean_tool
void profiledImageChange()
virtual void showShapeManager()
virtual void removeAllDDs()
bool colorBarsVertical_
At least for now, colorbars can only be placed horizontally or vertically, identically for all displa...
void boundary(QtDisplayPanel::CursorBoundaryCondition)
virtual void showMakeRegionPanel()
bool useNewRegions() const
QtDisplayData * dd()
retrieve the controlling DD...
SlicerMainWindow * sliceTool
void animationModeChanged(bool modeZ, bool channelCubes)
casacore::LogIO & logIO()
access our logger...
void createRGBImage(QtDisplayData *coordinateMaster, QtDisplayData *redImage, QtDisplayData *greenImage, QtDisplayData *blueImage)
void sliceChanged(int regionId, viewer::region::RegionChanges change, const QList< double > &worldX, const QList< double > &worldY, const QList< int > &pixelX, const QList< int > &pixelY)
QtDisplayPanel * displayPanel()
access to graphics panel 'base'....
void addResidualFitImage(casacore::String path)
void resetListenerImage()
QtViewer * viewer() const
access to our viewer
AboutDialogViewer * aboutDialog
Implementation of drawing in world coordinates on top of a PixelCanvas.
virtual void ddUnregClicked_()
virtual void fwdPlayImageMovie_()
void initCleanTool()
interactive clean...
void initHistogramHolder()
const Double c
Fundamental physical constants (SI units):
void notifyDDRemoval(QtDisplayData *qdd)
void closed(const QtDisplayPanelGui *)
The DD is no longer on QtViewerBase's list, but is not destroyed until after the signal.
A class which creates and manages "panelled" displays.
virtual void showImageProfile()
void registerDD(QtDisplayData *dd, int position)
void resetHistogram(viewer::Region *qtRegion)
virtual QVariant setoptions(const QMap< QString, QVariant > &input, int id)
String: the storage and methods of handling collections of characters.
virtual void fwdPlayChannelMovie()
void revokeRegion(viewer::Region *r)
new Region code – revoke region from region source...
QTimer * status_bar_timer
void ddCreated(QtDisplayData *, bool autoRegister, int insertPosition, bool csMaster)
The DD now exists, and is on QtViewerBase's list.
virtual void setStatsPrint(bool printStats=true)
std::list< viewer::Region * > region_list_t
bool adjust_channel_animator
bool autoDDOptionsShow
true by default.
bool ddExists(QtDisplayData *qdd)
Check that a given DD is on the list.
int buttonToolState(const std::string &tool) const
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
void position(viewer::Position)
static std::string idGen()
void showMomentsCollapseImageProfile()
virtual ~LinkedCursorEH()
viewer::ViewerPreferences * preferences
virtual void hideAllSubwindows()
QtDataOptionsPanel * qdo_
Qt's meta object features not supported for nested classes...
void generateSliceRegionUpdates()
casacore::Casarc & rc
connection to rc file
Why not use casacore::MDirection? It's limited by valid astronomical coordinates on the sky Hz vs arc...
virtual void hideRegionManager()
virtual void refreshImageProfile()
virtual void restorePanelState_()
Brings up dialog for restore file, attempts restore.
void closeEvent(QCloseEvent *event)
scripted (via dbus) panels should override the closeEvent() and hide the gui instead of deleting it w...
void add2DFitOverlay(QList< RegionShape * > fitMarkers)
Defines nreal time structures used by the VLA table filler.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.