|
open_iA 2024.9
|
Child window of MainWindow's mdi area for showing datasets and visualizations. More...
#include <mdichild.h>
Public Slots | |
| void | enableRendererInteraction (bool enable) |
| set renderer interaction on / off | |
| void | enableSlicerInteraction (bool enable) |
| set slicer interaction on / off | |
| void | maximizeRenderer () |
| maximize the renderer (so that it takes all of the child's space, all other dock widgets are hidden) | |
| void | setPredefCamPos (int pos) |
| Calls the setCamPosition function of iARenderer (described there in more detail). | |
| void | toggleProfileHandles (bool isChecked) |
| called when the user wants to display the profile handles inside the views showing the dataset (3D renderer and slicers) | |
| void | updateRenderer () override |
| Update 3D renderer. | |
| void | updateSlicer (int index) |
| update a specific slicer (specified through slicer mode, | |
| void | updateSlicers () override |
| Update all 3 axis-aligned slicer. | |
| void | updateViews () override |
| Update all dataset views (3D renderer + all 3 axis-aligned slicers) | |
Public Slots inherited from iAMdiChild | |
| virtual void | updateRenderer ()=0 |
| Update 3D renderer. | |
| virtual void | updateSlicers ()=0 |
| Update all 3 axis-aligned slicers. | |
| virtual void | updateViews ()=0 |
| Updates all views (slicers, renderers) | |
Public Member Functions | |
| MdiChild (MainWindow *mainWnd, iAPreferences const &preferences, bool unsavedChanges) | |
| size_t | addDataSet (std::shared_ptr< iADataSet > dataSet) override |
| apply the given (3D) renderer settings | |
| void | addTool (QString const &key, std::shared_ptr< iATool > tool) override |
| Add a new tool to this child window. | |
| void | applyPreferences (iAPreferences const &p) |
| void | applySlicerSettings (iASlicerSettings const &ss) |
| std::shared_ptr< iADataSet > | chooseDataSet (QString const &title="Choose dataset") override |
| If more than one dataset loaded, ask user to choose one of them (used for saving) | |
| void | clearDataSets () override |
| clear (remove) all datasets | |
| QString | currentFile () const override |
| Name of the currently open file (project file / first modality file / ...) If possible, use something more specific (e.g. | |
| QDockWidget * | dataInfoDockWidget () override |
| Access to dataset information dock widget. | |
| std::shared_ptr< iADataSet > | dataSet (size_t dataSetIdx) const override |
| Retrieve a dataset by its index. | |
| size_t | dataSetIndex (iADataSet const *dataSet) const override |
| Retrieve the index of a dataset. | |
| iADataSetListWidget * | dataSetListWidget () override |
| Retrieve dataset list. | |
| std::map< size_t, std::shared_ptr< iADataSet > > const & | dataSetMap () const override |
| Retrieve a list of the indices of all datasets loaded in this window. | |
| iADataSetViewer * | dataSetViewer (size_t idx) const override |
| Retrieve the viewer for the dataset with given index. | |
| bool | doSaveProject (QString const &projectFileName) override |
| Store current situation in the given project file: | |
| QFileInfo const & | fileInfo () const override |
| Access to file info of "current" file. | |
| QString | filePath () const override |
| vtkSmartPointer< vtkImageData > | firstImageData () const override |
| Retrieve the first image dataset (if any loaded). | |
| size_t | firstImageDataSetIdx () const override |
| Retrieve the index of the first image data set (if any loaded), or NoDataSet if none loaded. | |
| bool | hasUnsavedData () const |
| void | initializeViews () |
| performs initialization that needs to be done after the widget is being displayed | |
| void | initProfilePoints (double const *start, double const *end) override |
| called to initialize profile point positions in renderer and slicer | |
| iAInteractionMode | interactionMode () const override |
| Retrieve the current interaction mode (whether camera is changed, or manual registration is active, see iAInteractionMode) | |
| bool | isRendererInteractionEnabled () const |
| return true if interaction is enabled in renderer, false otherwise | |
| bool | isSliceProfileEnabled () const |
| bool | isSlicerInteractionEnabled () const |
| return true if interaction is enabled in all slicers, false otherwise (i.e. if disabled in at least one) | |
| bool | isVolumeDataLoaded () const override |
| Whether volume data is loaded (only checks filename and volume dimensions). | |
| QString | layoutName () const override |
| Returns the name of the layout currently applied to this child window. | |
| bool | linkedMDIs () const |
| Whether this child has the linked MDIs feature enabled. | |
| bool | linkedViews () const override |
| Whether this child has the linked views feature enabled. | |
| void | linkMDIs (bool lm) |
| Enable or disable linked MDI windows for this MDI child. | |
| void | linkSliceViews (bool l) |
| Enable or disable linked slicers. | |
| void | loadLayout (QString const &layout) override |
| Loads the layout with the given name from the settings store, and tries to restore the according dockwidgets configuration. | |
| void | loadSettings (QSettings const &settings) override |
| load state (saved via saveState) | |
| void | maximizeSlicer (int mode) |
| maximize slicer dockwidget with the given mode | |
| void | multiview () override |
| Apply the "multiview" layout (i.e. where not only one dock widget but multiple are shown) | |
| iAPreferences const & | preferences () const override |
| bool | profileHandlesEnabled () const |
| whether profile handles are currently shown (i.e. "Edit profile points" mode is enabled) | |
| void | removeDataSet (size_t dataSetIdx) override |
| remove dataset with given ID | |
| void | removeTool (QString const &key) override |
| Remove tool with the given key from this window. | |
| QDockWidget * | renderDockWidget () override |
| Access to 3D renderer dock widget. | |
| iARenderer * | renderer () override |
| Access to the 3D renderer widget. | |
| QWidget * | rendererWidget () override |
| Access to 3D renderer widget. | |
| void | resetLayout () |
| reset the layout to the way it was directly after setting up this child | |
| bool | resultInNewWindow () const |
| Whether results should be opened in a new window; if false, they replace the content of the current window instead. | |
| bool | save () |
| void | saveSettings (QSettings &settings) override |
| save state, for example camera position | |
| void | saveVolumeStack () |
| void | set3DControlVisibility (bool visible) override |
| void | setDataSetMovable (size_t dataSetIdx) override |
| a crutch for letting interactor know which dataset is to be moved and synced across slicers | |
| void | setInteractionMode (iAInteractionMode mode) |
| void | setROIVisible (bool visible) override |
| void | setWindowTitleAndFile (const QString &f) override |
| set window title, and if a file name is given, set it as window file and add it to recent files | |
| int | sliceNumber (int mode) const |
| Get current slice number in the respective slicer. | |
| iASlicer * | slicer (int mode) override |
| Access slicer for given mode (use iASlicerMode enum for mode values) | |
| QHBoxLayout * | slicerContainerLayout (int mode) override |
| Access to the layout in the slicer dockwidget containing the actual iASlicer. | |
| QDockWidget * | slicerDockWidget (int mode) override |
| Access to slicer dock widget for the given mode. | |
| QSlider * | slicerScrollBar (int mode) override |
| Access to the scroll bar next to a slicer. | |
| iASlicerSettings const & | slicerSettings () const override |
| void | toggleSliceProfile (bool isEnabled) |
| QMap< QString, std::shared_ptr< iATool > > const & | tools () override |
| Retrieve all currently attached tools and their keys. | |
| void | updateLayout () override |
| Apply the layout currently selected in the layout combobox in the main window. | |
| void | updatePositionMarkerSize () override |
| update the size of position markers in slicers and renderers based on the marker size setting and the unit distance (spacing) of datasets | |
| void | updateROI (int const roi[6]) override |
| uint | createChannel () override |
| void | updateChannel (uint id, vtkSmartPointer< vtkImageData > imgData, vtkScalarsToColors *ctf, vtkPiecewiseFunction *otf, bool enable) override |
| Update the data of the given channel ID. | |
| void | updateChannelOpacity (uint id, double opacity) override |
| Update opacity of the given channel ID. | |
| void | setChannelRenderingEnabled (uint, bool enabled) override |
| Enable/Disable channel rendering for a given channel ID. | |
| void | setSlicerChannelEnabled (uint id, bool enabled) |
| Enable / disable a channel in all slicers. | |
| void | removeChannel (uint id) override |
| Remove channel in all slicers. | |
| iAChannelData * | channelData (uint id) override |
| iAChannelData const * | channelData (uint id) const override |
| void | initChannelRenderer (uint id, bool use3D, bool enableChannel=true) override |
| Initialize the renderers for a channel. | |
| void | toggleMagicLens3D (bool isEnabled) |
| 3D Magic Lens | |
| bool | isMagicLens3DEnabled () const |
| vtkRenderer * | magicLens3DRenderer () const override |
| Reinitialize magic lens channel? | |
| void | toggleMagicLens2D (bool isEnabled) |
| 2D Magic Lens | |
| bool | isMagicLens2DEnabled () const override |
| whether the 2D magic lens in slicer is currently enabled | |
| void | setMagicLensInput (uint id) override |
| Set the ID of the channel which should be the input to the 2D magic lens in slicer. | |
| void | setMagicLensEnabled (bool isOn) override |
| Enable/Disable the 2D magic lens in slicer. | |
| int | magicLensSize () const |
| int | magicLensFrameWidth () const |
Public Member Functions inherited from iAMdiChild | |
Public Member Functions inherited from iASavableProject | |
| QString const & | fileName () const |
| return the name of the last file that was stored | |
| bool | saveProject (QString const &basePath) |
| Called from main window to save the project of the current window. | |
Additional Inherited Members | |
Public Types inherited from iAMdiChild | |
| enum | iAInteractionMode { imCamera , imRegistration } |
Signals inherited from iAMdiChild | |
| void | closed (iAMdiChild *child) |
| Emitted when this child window is about to be closed; the closing child will still be within the lists of open windows, e.g. | |
| void | dataSetChanged (size_t dataSetIdx) |
| emitted when properties of a dataset have been changed | |
| void | dataSetPrepared (size_t dataSetIdx) |
| emitted when all data for displaying a dataset has been prepared | |
| void | dataSetRemoved (size_t dataSetIdx) |
| emitted when a dataset has been removed | |
| void | dataSetRendered (size_t dataSetIdx) |
| emitted when the dataset has been added to all relevant views | |
| void | dataSetSelected (size_t dataSetIdx) |
| emitted when a dataset has been selected in the data list | |
| void | fileLoaded () |
| emitted when the file data is loaded; the initialization operations are not fully done yet then - use dataSetRendered instead if you require the file to be fully loaded! | |
| void | linkSliceViewsChanged (bool linked) |
| emitted when the link slice views setting changes | |
| void | magicLensToggled (bool isToggled) |
| emitted whenever the magic lens has been toggled on or off | |
| void | preferencesChanged () |
| emitted when the preferences have changed | |
| void | profilePointChanged (int pointIdx, double *globalPos) |
| emitted whenever one of the profile points changes | |
| void | renderSettingsChanged () |
| emitted when the renderer settings have changed | |
| void | slicerSettingsChanged () |
| emitted when the slicer settings have changed | |
| void | toolRemoved (QString const &id) |
| emitted when a tool is removed from this child | |
| void | viewsUpdated () |
| emitted when the slicer/renderer views have been updated, and when their camera has been reset | |
Static Public Attributes inherited from iAMdiChild | |
| static const size_t | NoDataSet = std::numeric_limits<size_t>::max() |
| Constant indicating an invalid dataset index. | |
Protected Member Functions inherited from iASavableProject | |
| virtual | ~iASavableProject () |
| Prevent destruction of the object through this interface. | |
Child window of MainWindow's mdi area for showing datasets and visualizations.
Most tools in the modules can be added to MdiChild to extend its functionality.
| MdiChild::MdiChild | ( | MainWindow * | mainWnd, |
| iAPreferences const & | preferences, | ||
| bool | unsavedChanges ) |
|
overridevirtual |
|
overridevirtual |
Add a new tool to this child window.
| key | a unique key for identifying this tool; will also be used for storing the tool state in a project file |
| tool | an instance of an iATool-derived class providing some graphical or computational tool |
Implements iAMdiChild.
| void MdiChild::applyPreferences | ( | iAPreferences const & | p | ) |
| void MdiChild::applySlicerSettings | ( | iASlicerSettings const & | ss | ) |
|
overridevirtual |
Implements iAMdiChild.
|
overridevirtual |
|
overridevirtual |
If more than one dataset loaded, ask user to choose one of them (used for saving)
Implements iAMdiChild.
|
overridevirtual |
clear (remove) all datasets
Implements iAMdiChild.
|
overridevirtual |
Multi-Channel rendering TODO NEWIO: check if we still need multi-channel feature or if it can be replaced with dataSets! Create a new channel, return its ID.
Implements iAMdiChild.
|
overridevirtual |
Name of the currently open file (project file / first modality file / ...) If possible, use something more specific (e.g.
file name from specific modality)
Implements iAMdiChild.
|
overridevirtual |
Access to dataset information dock widget.
Implements iAMdiChild.
|
overridevirtual |
Retrieve a dataset by its index.
Implements iAMdiChild.
|
overridevirtual |
Retrieve the index of a dataset.
Implements iAMdiChild.
|
overridevirtual |
Retrieve dataset list.
Implements iAMdiChild.
|
overridevirtual |
Retrieve a list of the indices of all datasets loaded in this window.
Implements iAMdiChild.
|
overridevirtual |
Retrieve the viewer for the dataset with given index.
Implements iAMdiChild.
|
overridevirtual |
Store current situation in the given project file:
Implements iASavableProject.
|
slot |
set renderer interaction on / off
|
slot |
set slicer interaction on / off
|
overridevirtual |
Access to file info of "current" file.
Implements iAMdiChild.
|
overridevirtual |
Implements iAMdiChild.
|
overridevirtual |
Retrieve the first image dataset (if any loaded).
Will produce an error log entry if no image data is found so use with care
Implements iAMdiChild.
|
overridevirtual |
Retrieve the index of the first image data set (if any loaded), or NoDataSet if none loaded.
Implements iAMdiChild.
| bool MdiChild::hasUnsavedData | ( | ) | const |
|
overridevirtual |
| void MdiChild::initializeViews | ( | ) |
performs initialization that needs to be done after the widget is being displayed
|
overridevirtual |
called to initialize profile point positions in renderer and slicer
Implements iAMdiChild.
|
overridevirtual |
Retrieve the current interaction mode (whether camera is changed, or manual registration is active, see iAInteractionMode)
Implements iAMdiChild.
|
overridevirtual |
whether the 2D magic lens in slicer is currently enabled
Implements iAMdiChild.
| bool MdiChild::isMagicLens3DEnabled | ( | ) | const |
| bool MdiChild::isRendererInteractionEnabled | ( | ) | const |
return true if interaction is enabled in renderer, false otherwise
| bool MdiChild::isSliceProfileEnabled | ( | ) | const |
| bool MdiChild::isSlicerInteractionEnabled | ( | ) | const |
return true if interaction is enabled in all slicers, false otherwise (i.e. if disabled in at least one)
|
overridevirtual |
Whether volume data is loaded (only checks filename and volume dimensions).
Implements iAMdiChild.
|
overridevirtual |
Returns the name of the layout currently applied to this child window.
Implements iAMdiChild.
| bool MdiChild::linkedMDIs | ( | ) | const |
Whether this child has the linked MDIs feature enabled.
|
overridevirtual |
Whether this child has the linked views feature enabled.
Implements iAMdiChild.
| void MdiChild::linkMDIs | ( | bool | lm | ) |
Enable or disable linked MDI windows for this MDI child.
| void MdiChild::linkSliceViews | ( | bool | l | ) |
Enable or disable linked slicers.
|
overridevirtual |
Loads the layout with the given name from the settings store, and tries to restore the according dockwidgets configuration.
Implements iAMdiChild.
|
overridevirtual |
load state (saved via saveState)
Implements iAMdiChild.
|
overridevirtual |
Reinitialize magic lens channel?
Implements iAMdiChild.
| int MdiChild::magicLensFrameWidth | ( | ) | const |
| int MdiChild::magicLensSize | ( | ) | const |
|
slot |
maximize the renderer (so that it takes all of the child's space, all other dock widgets are hidden)
| void MdiChild::maximizeSlicer | ( | int | mode | ) |
maximize slicer dockwidget with the given mode
|
overridevirtual |
Apply the "multiview" layout (i.e. where not only one dock widget but multiple are shown)
Implements iAMdiChild.
|
overridevirtual |
Implements iAMdiChild.
| bool MdiChild::profileHandlesEnabled | ( | ) | const |
whether profile handles are currently shown (i.e. "Edit profile points" mode is enabled)
|
overridevirtual |
Remove channel in all slicers.
Implements iAMdiChild.
|
overridevirtual |
remove dataset with given ID
Implements iAMdiChild.
|
overridevirtual |
Remove tool with the given key from this window.
| key | the tool's unique identifying key (the one that was used in addTool for adding the same tool) |
Implements iAMdiChild.
|
overridevirtual |
Access to 3D renderer dock widget.
Implements iAMdiChild.
|
overridevirtual |
Access to the 3D renderer widget.
Implements iAMdiChild.
|
overridevirtual |
Access to 3D renderer widget.
Implements iAMdiChild.
| void MdiChild::resetLayout | ( | ) |
reset the layout to the way it was directly after setting up this child
| bool MdiChild::resultInNewWindow | ( | ) | const |
Whether results should be opened in a new window; if false, they replace the content of the current window instead.
| bool MdiChild::save | ( | ) |
|
overridevirtual |
save state, for example camera position
Implements iAMdiChild.
| void MdiChild::saveVolumeStack | ( | ) |
|
overridevirtual |
Implements iAMdiChild.
|
overridevirtual |
Enable/Disable channel rendering for a given channel ID.
Implements iAMdiChild.
|
overridevirtual |
a crutch for letting interactor know which dataset is to be moved and synced across slicers
Implements iAMdiChild.
| void MdiChild::setInteractionMode | ( | iAInteractionMode | mode | ) |
|
overridevirtual |
Enable/Disable the 2D magic lens in slicer.
Implements iAMdiChild.
|
overridevirtual |
Set the ID of the channel which should be the input to the 2D magic lens in slicer.
Implements iAMdiChild.
|
slot |
Calls the setCamPosition function of iARenderer (described there in more detail).
| pos | set one of the predefined camera positions |
|
overridevirtual |
Implements iAMdiChild.
| void MdiChild::setSlicerChannelEnabled | ( | uint | id, |
| bool | enabled ) |
Enable / disable a channel in all slicers.
|
overridevirtual |
set window title, and if a file name is given, set it as window file and add it to recent files
Implements iAMdiChild.
| int MdiChild::sliceNumber | ( | int | mode | ) | const |
Get current slice number in the respective slicer.
|
overridevirtual |
Access slicer for given mode (use iASlicerMode enum for mode values)
Implements iAMdiChild.
|
overridevirtual |
Access to the layout in the slicer dockwidget containing the actual iASlicer.
Implements iAMdiChild.
|
overridevirtual |
Access to slicer dock widget for the given mode.
| mode | slicer to access - use constants from iASlicerMode enum |
Implements iAMdiChild.
|
overridevirtual |
Access to the scroll bar next to a slicer.
Implements iAMdiChild.
|
overridevirtual |
Implements iAMdiChild.
| void MdiChild::toggleMagicLens2D | ( | bool | isEnabled | ) |
2D Magic Lens
| void MdiChild::toggleMagicLens3D | ( | bool | isEnabled | ) |
3D Magic Lens
|
slot |
called when the user wants to display the profile handles inside the views showing the dataset (3D renderer and slicers)
| void MdiChild::toggleSliceProfile | ( | bool | isEnabled | ) |
|
overridevirtual |
Retrieve all currently attached tools and their keys.
Implements iAMdiChild.
|
overridevirtual |
Update the data of the given channel ID.
Implements iAMdiChild.
|
overridevirtual |
Update opacity of the given channel ID.
Implements iAMdiChild.
|
overridevirtual |
Apply the layout currently selected in the layout combobox in the main window.
Implements iAMdiChild.
|
overridevirtual |
update the size of position markers in slicers and renderers based on the marker size setting and the unit distance (spacing) of datasets
Implements iAMdiChild.
|
overrideslot |
Update 3D renderer.
|
overridevirtual |
Implements iAMdiChild.
|
slot |
update a specific slicer (specified through slicer mode,
|
overrideslot |
Update all 3 axis-aligned slicer.
|
overrideslot |
Update all dataset views (3D renderer + all 3 axis-aligned slicers)