#include <controller.h>
Inherits QObject.
Collaboration diagram for Controller:
Public Types | |
typedef std::string | dataset_key_type |
Public Slots | |
void | datasetChangedSlot (dataset_key_type const &dataset_key) |
Public Member Functions | |
std::pair< dataset_key_type, dataset_type > | loadDataset (std::string filename) throw (FormatNotSupportedException, NullPointerException) |
void | writeDataset (dataset_key_type dataset_key, std::string filename) throw (DatasetNotFoundException, FormatNotSupportedException) |
bool | removeDataset (dataset_key_type dataset_key) |
std::string const & | getDatasetFilename (dataset_key_type dataset_key) throw (DatasetNotFoundException) |
void | getLoadedDatasetKeys (std::vector< dataset_key_type > &key_container) const |
dataset_pointer_type | getDataset (dataset_key_type dataset_key) const throw (DatasetNotFoundException) |
metadata_pointer_type | getMetadataFor (dataset_key_type dataset_key) const throw (DatasetNotFoundException, NullPointerException) |
void | getDatasetKeysOfType (dataset_type type, dataset_key_container_type &dataset_key_container) throw (NullPointerException) |
void | getDatasetKeysOfTypes (AlgorithmDefinition::accepted_datasets_type types, dataset_key_container_type &dataset_key_container) throw (NullPointerException) |
view_pointer_type | getViewOfDataset (view_type type, dataset_key_type dataset_key) throw (DatasetNotFoundException) |
void | getDependentViewIDsOfDataset (dataset_key_type dataset_key, view_id_container_type &target_container) const throw (DatasetNotFoundException, NullPointerException) |
view_type | getViewTypeForDatasetSlice (dataset_key_type dataset_key, slice_type slice) throw (DatasetNotFoundException) |
slice_type | getDatasetSliceForViewType (dataset_key_type dataset_key, view_type type) throw (DatasetNotFoundException) |
void | deleteViews (view_id_container_type view_ids) throw (NullPointerException) |
void | loadConfiguration (std::string config_file_name) |
algorithm_name_container_type | getLoadedAlgorithmNames () const |
AlgorithmConfig::algorithm_definition_pointer_type | getAlgorithmDefinition (std::string name) const throw (AlgorithmNotFoundException) |
void | runAlgorithm (std::string key, configuration_pointer_type algorithm_config) throw (AlgorithmNotFoundException, NullPointerException) |
config_widget_pointer_type | createConfigWidget (std::string key) const throw (AlgorithmNotFoundException, NullPointerException) |
configuration_pointer_type | createConfiguration (std::string key) const throw (AlgorithmNotFoundException, NullPointerException) |
void | loadAlgorithm (std::string name) throw (AlgorithmNotFoundException) |
bool | isAlgorithmLoaded (std::string name) |
metadata_pointer_type | getMetadataForDataset (std::string dataset_key) const throw (DatasetNotFoundException, NullPointerException) |
void | setGuiInteractionMode (gui_interaction_mode_type gui_interaction_mode) |
gui_interaction_mode_type | getGuiInteractionMode () |
void | setInputDatasetsInConfiguration (configuration_pointer_type configuration, config_dataset_id_to_input_map_type input_datasets, std::map< config_dataset_id_type, std::pair< dataset_key_type, dataset_type > > &new_dataset_keys_and_types) throw (NullPointerException, DatasetNotFoundException, InvalidCastException) |
void | setOutputDatasetsInConfiguration (configuration_pointer_type configuration, config_dataset_id_to_output_map_type output_datasets, std::map< config_dataset_id_type, std::pair< dataset_key_type, dataset_type > > &new_dataset_keys_and_types) throw (NullPointerException) |
Static Public Member Functions | |
static Controller & | getInstance () |
The controller implements the core application logic. It represents the interface between the graphical user interface and the core application. The Controller is implmented as a singleton to be accessible from anywhere in the application.
Christian Koerner (christian.koerner@imedgine.org)
Alexander Lex (alexander.lex@imedgine.org)
Marc Streit (marc.streit@imedgine.org)
Martin Reininger (martin.reininger@imedgine.org)
Definition at line 65 of file controller.h.
|
the type describing a dataset key Definition at line 75 of file controller.h. |
|
Creates a configuration object and returns a smart pointer to it
|
|
Creates a configuration widget object and returns a smart pointer to it
Definition at line 482 of file controller.cpp. References ConfigWidget::setConfiguration(). Here is the call graph for this function: |
|
Slot that handles changes to the dataset with the given key. Triggers view updates.
Definition at line 796 of file controller.cpp. References DataViewMediator::updateDataChanged(). |
|
Delete a set of views registered in the data view mediator
Definition at line 325 of file controller.cpp. Referenced by ViewContainerWidget::~ViewContainerWidget(). |
|
Get the definition from configuration of algorithm with a certain name.
Definition at line 434 of file controller.cpp. |
|
Return a pointer to the dataset with the given key
Definition at line 151 of file controller.cpp. |
|
Returns the filename the dataset associated with the given key has been read from. If the dataset was created by the application an empty string is returned.
Definition at line 124 of file controller.cpp. |
|
Returns the keys of all datasets of the given dataset type
Definition at line 186 of file controller.cpp. |
|
Returns the keys of all datasets of the given dataset types
Definition at line 207 of file controller.cpp. |
|
Return the type dataset slice (one of AXIAL_SLICE, CORONAL_SLICE, SAGATTAL_SLICE) that is associated with the given view type (XY_SLICE_VIEW, XZ_SLICE_VIEW or YZ_SLICE_VIEW) for the given dataset. NOTE: For analyze datasets this is always (XY - axial, XZ - sagittal, YZ - coronal). For dicom datasets this may vary.
Definition at line 290 of file controller.cpp. |
|
Return the IDs of all dependent views ot the given dataset
Definition at line 238 of file controller.cpp. Referenced by TabOrganizer::closeTab(). |
|
Retrieve the current gui interaction mode
Definition at line 524 of file controller.cpp. |
|
Returns the singleton instance ot the Controller
Definition at line 57 of file controller.cpp. Referenced by DatasetConfigurationTabWidget::addDatasetConfigurationTab(), ImedgineSliceViewer::buildPopupMenu(), TabOrganizer::closeTab(), ImedgineSliceViewer::menuSelection(), AlgorithmWidget::okPressed(), TabOrganizer::openOverviewForImage(), TabOrganizer::openOverviewForVolume(), ChooseViewsDialog::show(), and ViewContainerWidget::~ViewContainerWidget(). |
|
A multimap of the names of all loaded algorithms, key is the algorithm classification
Definition at line 350 of file controller.cpp. |
|
Write the keys of all loaded datasets into the container given as parameter
Definition at line 139 of file controller.cpp. Referenced by ImedgineSliceViewer::buildPopupMenu(), ImedgineSliceViewer::menuSelection(), and ChooseViewsDialog::show(). |
|
Return a pointer to the metadata of the dataset with the given key
Definition at line 166 of file controller.cpp. |
|
Retrieve the metadata for a given dataset
Definition at line 494 of file controller.cpp. |
|
Return the view of the specified type of the given dataset
Definition at line 221 of file controller.cpp. Referenced by DatasetConfigurationTabWidget::addDatasetConfigurationTab(), TabOrganizer::openOverviewForImage(), and TabOrganizer::openOverviewForVolume(). |
|
Return the type of slice view (XY_SLICE_VIEW, XZ_SLICE_VIEW, YZ_SLICE_VIEW) that is associated with the given slice type (axial, coronal, sagittal) for the given dataset. NOTE: For analyze datasets this is always (XY - axial, XZ - sagittal, YZ - coronal). For dicom datasets this may vary.
Definition at line 255 of file controller.cpp. |
|
Tells whether an algorithm with the given name has been previously loaded
Definition at line 442 of file controller.cpp. References AlgorithmFactory::isAlgorithmLoaded(). Here is the call graph for this function: |
|
Load algorithm with name from external library name has to be a valid name
Definition at line 449 of file controller.cpp. |
|
Load the configuration from the given config_file_name.
Definition at line 336 of file controller.cpp. References Settings::getInstance(), and ConfigParser::parseConfiguration(). Here is the call graph for this function: |
|
Loads a dataset with given filename.
Definition at line 66 of file controller.cpp. |
|
Remove the dataset associated with the given dataset key.
Definition at line 117 of file controller.cpp. References DataViewMediator::removeDataset(). Here is the call graph for this function: |
|
Create a new Algorithm pointer object by calling algorithm_factory_'s createAlgorithm method
Definition at line 460 of file controller.cpp. Referenced by AlgorithmWidget::okPressed(). |
|
Set the Gui Interaction Mode
Definition at line 517 of file controller.cpp. |
|
Set the input datasets in the dataset configuration object according to a given mapping from config file dataset IDs defined by the algorithm developer to the keys of the datasets and the datset parts the application chose to use
Definition at line 531 of file controller.cpp. |
|
Set the output datasets in the dataset configuration object according to a given mapping from config file dataset IDs defined by the algorithm developer to the output dataset types that are specified in the algorithm config file or derived from the input dataset types the application user chose respectively.
Definition at line 671 of file controller.cpp. |
|
Writes the dataset associated with the given key to the given file.
Definition at line 96 of file controller.cpp. |