diff --git a/Modules/QmitkExt/CMakeLists.txt b/Modules/QmitkExt/CMakeLists.txt index 43ee146960..d6b4fbfbe4 100644 --- a/Modules/QmitkExt/CMakeLists.txt +++ b/Modules/QmitkExt/CMakeLists.txt @@ -1,10 +1,10 @@ SET(QT_USE_QT3SUPPORT 1) MITK_GENERATE_TOOLS_LIBRARY(QmitkExt "NO") MITK_CREATE_MODULE( QmitkExt - INCLUDE_DIRS QmitkApplicationBase QmitkPropertyObservers + INCLUDE_DIRS QmitkApplicationBase QmitkPropertyObservers QmitkFunctionalityComponents DEPENDS MitkExt Qmitk qwt QT_MODULE GENERATED_CPP ${TOOL_GUI_CPPS} ${TOOL_CPPS} ) diff --git a/Modules/QmitkExt/QmitkBaseFunctionalityComponent.cpp b/Modules/QmitkExt/QmitkBaseFunctionalityComponent.cpp index 5fdb6fa94c..68e66a27d6 100644 --- a/Modules/QmitkExt/QmitkBaseFunctionalityComponent.cpp +++ b/Modules/QmitkExt/QmitkBaseFunctionalityComponent.cpp @@ -1,43 +1,48 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: -1 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "QmitkBaseFunctionalityComponent.h" #include #include #include /*************** CONSTRUCTOR ***************/ QmitkBaseFunctionalityComponent::QmitkBaseFunctionalityComponent(QObject *parent, const char *name) : QmitkBaseComponent(parent, name), m_ParentMitkImage(NULL) { } /*************** DESTRUCTOR ***************/ QmitkBaseFunctionalityComponent::~QmitkBaseFunctionalityComponent() { } void QmitkBaseFunctionalityComponent::ImageSelected(const mitk::DataTreeNode::Pointer item) { } +void QmitkBaseFunctionalityComponent::DataStorageChanged(mitk::DataStorage::Pointer ds) +{ + +} + mitk::DataStorage::Pointer QmitkBaseFunctionalityComponent::GetDefaultDataStorage() { return m_DataStorage; } diff --git a/Modules/QmitkExt/QmitkBaseFunctionalityComponent.h b/Modules/QmitkExt/QmitkBaseFunctionalityComponent.h index ec05ce3eff..70eca03d10 100644 --- a/Modules/QmitkExt/QmitkBaseFunctionalityComponent.h +++ b/Modules/QmitkExt/QmitkBaseFunctionalityComponent.h @@ -1,93 +1,95 @@ #ifndef QMITK_BASEFUNCTIONALITYCOMPONENT_H #define QMITK_BASEFUNCTIONALITYCOMPONENT_H /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: -1 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ /** * \brief Base class for hierarchical functionality components. This class contains the DataTreeIterator, access by the usual set-and get-methods, and the name-attribut of a component * \ingroup QmitkFunctionalityComponent * * * * * \section BaseFunctionalityComponent Overview * * The BaseFunctionalityComponent is the root-class for all component-based functionalities. * As common ground for all inherit classes it contains the DataTreeIterator, i.e an iterator * on the current node of the data tree, and the name-attribute of the component. * Inherit classes are: * * - \ref QmitkAlgorithmFunctionalityComponent * - \ref QmitkInteractionFunctionalityComponent * - \ref QmitkFunctionalityComponentContainer * */ #include #include "QmitkBaseComponent.h" #include "mitkDataTreeNode.h" #include class QMITKEXT_EXPORT QmitkBaseFunctionalityComponent : public QmitkBaseComponent { Q_OBJECT public: /*************** CONSTRUCTOR ***************/ /** * \brief Constructor. */ QmitkBaseFunctionalityComponent(QObject *parent=0, const char *name=0); /*************** DESTRUCTOR ***************/ /** * @brief Destructor. */ virtual ~QmitkBaseFunctionalityComponent(); /*************** DESTRUCTOR ***************/ /** * @brief Return an object of mitkDataStorage */ mitk::DataStorage::Pointer GetDefaultDataStorage(); /*************** OHTER METHODS ***************/ + + void DataStorageChanged(mitk::DataStorage::Pointer ds); /** \brief Slot method that will be called if TreeNodeSelector widget was activated to select the current image. */ void ImageSelected(const mitk::DataTreeNode::Pointer item); /*! * @brief Image selected in MainSelector */ mitk::Image* m_ParentMitkImage; /*! * @brief Image selected in MainSelector */ mitk::Image* m_MitkImage; mitk::DataStorage::Pointer m_DataStorage; }; #endif diff --git a/Modules/QmitkExt/QmitkFunctionalityComponentContainer.cpp b/Modules/QmitkExt/QmitkFunctionalityComponentContainer.cpp index 189c002887..77dec8e113 100644 --- a/Modules/QmitkExt/QmitkFunctionalityComponentContainer.cpp +++ b/Modules/QmitkExt/QmitkFunctionalityComponentContainer.cpp @@ -1,532 +1,571 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: -1 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "QmitkFunctionalityComponentContainer.h" //#include "QmitkBaseFunctionalityComponent.h" #include "ui_QmitkFunctionalityComponentContainerControls.h" #include #include "mitkDataTreeFilterFunctions.h" #include #include #include "mitkProperties.h" /*****Qt-Elements***/ #include #include #include //#include #include #include #include //#include #include #include const QSizePolicy preferred(QSizePolicy::Preferred, QSizePolicy::Preferred); /*************** CONSTRUCTOR ***************/ QmitkFunctionalityComponentContainer::QmitkFunctionalityComponentContainer(QObject *parent, const char *parentName, bool updateSelector, bool showSelector) : QmitkBaseFunctionalityComponent(parent, parentName), m_UpdateSelector(updateSelector), m_ShowSelector(showSelector), m_GUI(NULL), //m_ParentMitkImage(NULL), //m_ParentMitkImageIterator(NULL), m_Active(false), m_SelectedItem(NULL), m_FunctionalityComponentContainerGUI(NULL), m_Parent(parent), //m_ParentName(parentName), m_ComponentName("ComponentContainer"), //m_MultiWidget(mitkStdMultiWidget), m_Spacer(NULL), //m_MulitWidget(this->GetActiveStdMultiWidget()), m_BackButton(NULL), m_NextButton(NULL), m_MaximumWidgedStackSize(-1) { SetAvailability(true); } /*************** DESTRUCTOR ***************/ QmitkFunctionalityComponentContainer::~QmitkFunctionalityComponentContainer() { } /*************** SET COMPONENT NAME ***************/ void QmitkFunctionalityComponentContainer::SetComponentName(QString name) { m_ComponentName = name; } /*************** GET COMPONENT NAME ***************/ QString QmitkFunctionalityComponentContainer::GetComponentName() { return m_ComponentName; } /************* SET SHOW TREE NODE SELECTOR ***********/ void QmitkFunctionalityComponentContainer::SetShowTreeNodeSelector(bool show) { GetImageContent()->setShown(show); } /*************** GET IMAGE CONTENT ***************/ QGroupBox* QmitkFunctionalityComponentContainer::GetImageContent() { return (QGroupBox*) m_FunctionalityComponentContainerGUI->m_ImageContent; } /*************** GET GUI ***************/ QWidget* QmitkFunctionalityComponentContainer::GetGUI() { return m_GUI; } /*************** GET PARTENT MITK IMAGE ***************/ mitk::Image* QmitkFunctionalityComponentContainer::GetParentMitkImage() { return m_ParentMitkImage; } /******** ******* GET TREE NODE SELECTOR ***************/ QmitkDataStorageComboBox * QmitkFunctionalityComponentContainer::GetTreeNodeSelector() { if(m_FunctionalityComponentContainerGUI) { return m_FunctionalityComponentContainerGUI->m_TreeNodeSelector; } else return NULL; } /******** ******* GET MULTI WIDGET ***************/ QmitkStdMultiWidget * QmitkFunctionalityComponentContainer::GetMultiWidget() { return m_MulitWidget; } /*************** TREE CHANGED ( EVENT ) ***************/ void QmitkFunctionalityComponentContainer::TreeChanged(const itk::EventObject & /*treeChangedEvent*/) { if(IsActivated()) { TreeChanged(); } else TreeChanged(); } /*************** TREE CHANGED ( ) ***************/ void QmitkFunctionalityComponentContainer::TreeChanged() { UpdateDataTreeComboBoxes(); for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->TreeChanged(); } } /************ Update DATATREECOMBOBOX(ES) *************/ void QmitkFunctionalityComponentContainer::UpdateDataTreeComboBoxes() { //if(GetTreeNodeSelector() != NULL) //{ // m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->Update(); //} } /*************** CONNECTIONS ***************/ void QmitkFunctionalityComponentContainer::CreateConnections() { if ( m_FunctionalityComponentContainerGUI ) { connect( (QObject*)(m_FunctionalityComponentContainerGUI->m_TreeNodeSelector), SIGNAL(activated(const mitk::DataTreeFilter::Item *)), (QObject*) this, SLOT(ImageSelected(const mitk::DataTreeFilter::Item *))); connect( (QObject*)(m_FunctionalityComponentContainerGUI->m_ContainerBorder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(SetContentContainerVisibility(bool))); } } /** \brief Method to set the DataStorage*/ void QmitkFunctionalityComponentContainer::SetDataStorage(mitk::DataStorage::Pointer dataStorage) { m_DataStorage = dataStorage; } /** \brief Method to get the DataStorage*/ mitk::DataStorage::Pointer QmitkFunctionalityComponentContainer::GetDataStorage() { return m_DataStorage; } +/*************** DATA STORAGE CHANGED ***************/ +void QmitkFunctionalityComponentContainer::DataStorageChanged(mitk::DataStorage::Pointer ds) +{ + if(m_FunctionalityComponentContainerGUI != NULL) + { + for(unsigned int i = 0; i < m_AddedChildList.size(); i++) + { + QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast(m_AddedChildList[i]); + if (functionalityComponent != NULL) + functionalityComponent->DataStorageChanged(ds); + } + } + + if(m_FunctionalityComponentContainerGUI) + { + if(!ds) + return; + if(!ds->GetNode()) + return; + if(!ds->GetNode()->GetData()) + return; + m_ParentMitkImage = static_cast (ds->GetNode()->GetData()); + + + if(m_FunctionalityComponentContainerGUI != NULL) + { + for(unsigned int i = 0; i < m_AddedChildList.size(); i++) + { + QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast(m_AddedChildList[i]); + if (functionalityComponent != NULL) + { + functionalityComponent->m_ParentMitkImage = static_cast (ds->GetNode()->GetData()); + } + } + } + } + TreeChanged(); +} + /*************** IMAGE SELECTED ***************/ void QmitkFunctionalityComponentContainer::ImageSelected(mitk::DataTreeNode::Pointer item) { if(m_FunctionalityComponentContainerGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast(m_AddedChildList[i]); if (functionalityComponent != NULL) functionalityComponent->ImageSelected(item); } } if(m_FunctionalityComponentContainerGUI) { m_ParentMitkImage = static_cast (item->GetData()); if(m_FunctionalityComponentContainerGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast(m_AddedChildList[i]); if (functionalityComponent != NULL) { functionalityComponent->m_ParentMitkImage = static_cast (item->GetData()); } } } } TreeChanged(); } /*************** CREATE CONTAINER WIDGET **************/ void QmitkFunctionalityComponentContainer::CreateQtPartControl(QWidget *parent, mitk::DataStorage::Pointer dataStorage) { if (m_FunctionalityComponentContainerGUI == NULL) { m_GUI = new QWidget; m_FunctionalityComponentContainerGUI = new Ui::QmitkFunctionalityComponentContainerGUI; m_FunctionalityComponentContainerGUI->setupUi(m_GUI); //m_GUI = parent; this->SetDataStorage(dataStorage); m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->SetDataStorage(dataStorage); m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->SetPredicate(mitk::NodePredicateDataType::New("Image")); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(0); //m_FunctionalityComponentContainerGUI->m_TreeNodeSelector()->SetDataTree(GetDataTreeIterator()); //m_FunctionalityComponentContainerGUI->GetContainerBorder()->setTitle("Select Image<\bold>"); //m_FunctionalityComponentContainerGUI->GetContainerBorder()->setLineWidth(0); } this->CreateConnections(); //m_MulitWidget = parent->GetActiveMultiWidget(); //m_FunctionalityComponentContainerGUI->m_TreeNodeSelector()->GetFilter()->SetFilter(mitk::IsBaseDataTypeWithoutProperty("isComponentThresholdImage")); } /*************** GET CONTENT CONTAINER ***************/ QGroupBox * QmitkFunctionalityComponentContainer::GetContentContainer() { return m_FunctionalityComponentContainerGUI->m_ImageContent; } /************ GET MAIN CHECK BOX CONTAINER ************/ QGroupBox * QmitkFunctionalityComponentContainer::GetMainCheckBoxContainer() { return m_FunctionalityComponentContainerGUI->m_ContainerBorder; } /*********** SET CONTENT CONTAINER VISIBLE ************/ void QmitkFunctionalityComponentContainer::SetContentContainerVisibility(bool) { if(GetMainCheckBoxContainer() != NULL) { if(GetMainCheckBoxContainer()->isChecked()) { Activated(); } else { Deactivated(); } } for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { if(m_AddedChildList[i]->GetContentContainer() != NULL) { m_AddedChildList[i]->GetContentContainer()->setShown(GetMainCheckBoxContainer()->isChecked()); } if(m_AddedChildList[i]->GetMainCheckBoxContainer() != NULL) { m_AddedChildList[i]->GetMainCheckBoxContainer()->setChecked(GetMainCheckBoxContainer()->isChecked()); } m_AddedChildList[i]->SetContentContainerVisibility(GetMainCheckBoxContainer()->isChecked()); } } /************** SET SELECTOR VISIBILITY ***************/ void QmitkFunctionalityComponentContainer::SetSelectorVisibility(bool visibility) { if(m_GUI) { m_FunctionalityComponentContainerGUI->m_ImageContent->setShown(visibility); } m_ShowSelector = visibility; } /*************** ACTIVATED ***************/ void QmitkFunctionalityComponentContainer::Activated() { TreeChanged(); QmitkBaseFunctionalityComponent::Activated(); m_Active = true; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Activated(); } } /*************** DEACTIVATED ***************/ void QmitkFunctionalityComponentContainer::Deactivated() { QmitkBaseFunctionalityComponent::Deactivated(); m_Active = false; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Deactivated(); } } /*************** ADD COMPONENT ***************/ void QmitkFunctionalityComponentContainer::AddComponent(QmitkFunctionalityComponentContainer* component) { if(component!=NULL) { QWidget* componentWidget = component->CreateControlWidget(m_GUI); AddComponentListener(component); m_GUI->layout()->add(componentWidget); component->CreateConnections(); if(m_Spacer != NULL) { m_GUI->layout()->removeItem(m_Spacer); } QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); m_Spacer = spacer; m_GUI->layout()->addItem( m_Spacer ); m_GUI->repaint(); } } /** \brief Method to return the NextButton to switch to the next widgetStackPage*/ QPushButton* QmitkFunctionalityComponentContainer::GetNextButton() { return m_NextButton; } /** \brief Method to return the BackButton to switch to the last widgetStackPage*/ QPushButton* QmitkFunctionalityComponentContainer::GetBackButton() { return m_BackButton; } /*************** ADD COMPONENT ***************/ void QmitkFunctionalityComponentContainer::AddComponent(QmitkFunctionalityComponentContainer* component, QString label, int stackPage) { if(component!=NULL) { QWidget* visibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); int idVisibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->indexOf(visibleWidget); if(idVisibleWidget > m_MaximumWidgedStackSize) { m_MaximumWidgedStackSize = idVisibleWidget; } if(m_MaximumWidgedStackSize < stackPage) { QWidget* w = new QWidget(m_FunctionalityComponentContainerGUI->m_WidgetStack); m_FunctionalityComponentContainerGUI->m_WidgetStack->insertTab(w, label, stackPage); m_MaximumWidgedStackSize++; m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentPage(stackPage); visibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); idVisibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->indexOf(visibleWidget); new QVBoxLayout(visibleWidget, QBoxLayout::TopToBottom); } QLayout* layout; if(m_FunctionalityComponentContainerGUI->m_WidgetStack->layout() == 0) { layout = new QVBoxLayout((QWidget*)(m_FunctionalityComponentContainerGUI->m_WidgetStack), QBoxLayout::TopToBottom); } else { layout = m_FunctionalityComponentContainerGUI->m_WidgetStack->layout(); } component->CreateQtPartControl(m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(), this->m_DataStorage); QWidget* componentWidget = component->GetGUI(); //CreateControlWidget(m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget()); AddComponentListener(component); //QTabWidget* myTabWidget = //m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(stackPage); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(stackPage); QWidget* theCurrentWidget=m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); QLayout* theCurrentLayout = theCurrentWidget->layout(); theCurrentLayout->addWidget(componentWidget); //m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget()->layout()->addWidget(componentWidget); // QWidget* myWidget = myTabWidget->page(stackPage); // QLayout* myLayout = myWidget->layout(); // myWidget->layout()->add(componentWidget); m_FunctionalityComponentContainerGUI->m_WidgetStack->setShown(true); m_FunctionalityComponentContainerGUI->m_WidgetStack->updateGeometry(); m_FunctionalityComponentContainerGUI->m_WidgetStack->layout()->activate(); componentWidget->setShown(true); component->CreateConnections(); m_GUI->repaint(); } } void QmitkFunctionalityComponentContainer::CreateNavigationButtons() { //QBoxLayout * buttonLayout = new QHBoxLayout(GetImageContent()->layout()); QWidget* funcWidget = (QWidget*)m_FunctionalityComponentContainerGUI; QBoxLayout * buttonLayout = new QHBoxLayout(funcWidget->layout()); //if(m_BackButton==NULL) //{ // m_BackButton = new QPushButton("<<", GetImageContent()); //} //if(m_NextButton==NULL) //{ // m_NextButton = new QPushButton(">>", GetImageContent()); //} if(m_BackButton==NULL) { m_BackButton = new QPushButton("<<", (QWidget*)(m_FunctionalityComponentContainerGUI)); } if(m_NextButton==NULL) { m_NextButton = new QPushButton(">>", (QWidget*)(m_FunctionalityComponentContainerGUI)); } buttonLayout->addWidget(m_BackButton); buttonLayout->addWidget(m_NextButton); //m_GUI->layout()->addChildLayout(buttonLayout); m_BackButton->setShown(true); m_NextButton->setShown(true); //m_GUI->layout()->AlignTop; m_GUI->layout()->activate(); m_GUI->repaint(); // connect( (QObject*)(m_NextButton), SIGNAL(pressed()), (QObject*) this, SLOT(NextButtonPressed())); // connect( (QObject*)(m_BackButton), SIGNAL(pressed()), (QObject*) this, SLOT(BackButtonPressed())); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentPage(1); SetWizardText(""); GetImageContent()->updateGeometry(); if(m_Spacer != NULL) { m_GUI->layout()->removeItem(m_Spacer); } QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); m_Spacer = spacer; m_GUI->layout()->addItem( m_Spacer ); m_GUI->updateGeometry(); m_GUI->repaint(); } void QmitkFunctionalityComponentContainer::SetWizardText(const QString& /*text*/) { //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setText(text); //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setAlignment(Qt::WordBreak); GetImageContent()->updateGeometry(); GetImageContent()->repaint(); m_GUI->updateGeometry(); //m_GUI->layout()->AlignTop; m_GUI->layout()->activate(); m_GUI->repaint(); } //void QmitkFunctionalityComponentContainer::ChooseWizardText(int page) //{ // switch(page) // { // case 1: // SetWizardText("Step 1 Minimize the dataset:
a) If you have a 4D-Dataset export one time step with the TimeStepExporter.
b) Crop the image by selecting a shape and placing it (STRG + Mouse) around the relevant areas. Everything around the shape will be cut off."); // break; // case 2: // SetWizardText("Step 2 Create an STL-Model:
a) Choose a threshold with the Threshold Finder where all areas that shall be used for the model are marked (green).
b) If there are special areas that have to be manipulated use the PixelGreyValueManipulator and do not forget to select the new created image.>
c) Create a Surface with the SurfaceCreator."); // break; // case 3: // SetWizardText("Step 3 Surface Finish:
a) If you have your surface you can use the connectivity filter where you can mark all connected areas in different colours or delete alle areas instead of the biggest."); // break; // default: // SetWizardText("Step 1 Minimize the dataset:
a) If you have a 4D-Dataset export one time step with the TimeStepExporter.
b) Crop the image by selecting a shape and placing it (STRG + Mouse) around the relevant areas. Everything around the shape will be cut off."); // break; // }; //} //void QmitkFunctionalityComponentContainer::NextButtonPressed() //{ // int actualPage = m_FunctionalityComponentContainerGUI->m_WidgetStack->id(m_FunctionalityComponentContainerGUI->m_WidgetStack->visibleWidget()); // switch(actualPage) // { // case 1: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(2); // ChooseWizardText(2); // break; // case 2: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(3); // ChooseWizardText(3); // break; // case 3: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(1); // ChooseWizardText(1); // break; // default: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(1); // ChooseWizardText(1); // break; // }; // //} //void QmitkFunctionalityComponentContainer::BackButtonPressed() //{ // int actualPage = m_FunctionalityComponentContainerGUI->m_WidgetStack->id(m_FunctionalityComponentContainerGUI->m_WidgetStack->visibleWidget()); // switch(actualPage) // { // case 1: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(3); // ChooseWizardText(3); // break; // case 2: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(1); // ChooseWizardText(1); // break; // case 3: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(2); // ChooseWizardText(2); // break; // default: // m_FunctionalityComponentContainerGUI->m_WidgetStack->raiseWidget(1); // ChooseWizardText(1); // break; // }; //} Ui::QmitkFunctionalityComponentContainerGUI* QmitkFunctionalityComponentContainer::GetFunctionalityComponentContainerGUI() { return m_FunctionalityComponentContainerGUI; } diff --git a/Modules/QmitkExt/QmitkFunctionalityComponentContainer.h b/Modules/QmitkExt/QmitkFunctionalityComponentContainer.h index 1addd1d4af..809a2b0b20 100644 --- a/Modules/QmitkExt/QmitkFunctionalityComponentContainer.h +++ b/Modules/QmitkExt/QmitkFunctionalityComponentContainer.h @@ -1,257 +1,257 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: -1 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef QMITK_FUNCTIONALITYCOMPONENTCONTAINER_H #define QMITK_FUNCTIONALITYCOMPONENTCONTAINER_H #include "QmitkBaseFunctionalityComponent.h" #include #include #include #include #include #include #include #include #include "ui_QmitkFunctionalityComponentContainerControls.h" #include /** * \brief ContainerClass for components * \ingroup QmitkFunctionalityComponent * * * - \ref QmitkBaseFunctionalityComponent * * \section QmitkFunctionalityComponentContainer Overview * * The FunctionalityComponentContainer is a containerclass for several components inherit from it. * All Components including to one FunctionalityComponentContainer can be used together as one applied * functionality. I.e. in particular that new functionalities can be combined with different components. * As common ground for all inherit classes the FunctionalityComponentContainer includes a selector for * marked data like image(s), segmentation(s) or model(s). */ class QMITKEXT_EXPORT QmitkFunctionalityComponentContainer : public QmitkBaseFunctionalityComponent { Q_OBJECT public: /*************** CONSTRUCTOR ***************/ /** \brief Standard-Constructor. */ QmitkFunctionalityComponentContainer(QObject *parent=0, const char * parentName = 0, bool updateSelector = true, bool showSelector = true); /*************** DESTRUCTOR ***************/ /** \brief Destructor. */ virtual ~QmitkFunctionalityComponentContainer(); /*************** CREATE ***************/ /*! \brief Method to create all Signale-Slot-Connections */ virtual void CreateConnections(); /*! \brief Method to create the GUI-Object */ virtual void CreateQtPartControl(QWidget *parent, mitk::DataStorage::Pointer dataStorage); /** \brief Method to create the forward and backward -buttons to navigate through the wizard */ void CreateNavigationButtons(); ///** \brief Method to change the wizardText */ //void CreateWizardTextLabel(); /** \brief Method to create a textLabel at the Top of the wizard where a description can be created */ void SetWizardText(const QString & text); // ///** \brief Method to choose the right wizard text, depending on the wizardpage*/ //void ChooseWizardText(int page); /** \brief also the Graphical User Interface for the component, like m_GUI, but with its specific type */ Ui::QmitkFunctionalityComponentContainerGUI* GetFunctionalityComponentContainerGUI(); /*************** SET AND GET ***************/ /** \brief Method to set the DataStorage*/ virtual void SetDataStorage(mitk::DataStorage::Pointer dataStorage); /** \brief Method to get the DataStorage*/ virtual mitk::DataStorage::Pointer GetDataStorage(); /** \brief Method to set the Name of the FunctionalityComponent */ virtual void SetComponentName(QString name); /** \brief Method to get the Name of the FunctionalityComponent */ virtual QString GetComponentName(); /** \brief Method to get the GUI of this component.*/ QWidget* GetGUI(); virtual QmitkDataStorageComboBox * GetTreeNodeSelector(); /** \brief Method to set the Image Selector visible or invisible */ virtual void SetSelectorVisibility(bool visibility); QmitkStdMultiWidget * GetMultiWidget(); /** \brief Method to return the ComboBox that includes all GUI-elements instead of the outermost checkable CheckBox and that can be set visible or not*/ virtual QGroupBox * GetContentContainer(); /** \brief Method to return the outermost checkable ComboBox that is to decide whether the content shall be shown or not */ virtual QGroupBox * GetMainCheckBoxContainer(); /** \brief Method to set the Tree-Node-Selector visible or not as his parent group-box is set shown or not. */ virtual void SetShowTreeNodeSelector(bool show); /** \brief Method to return the group-box that contains the tree-node-selector */ virtual QGroupBox* GetImageContent(); /** \brief Method to return the Image Selected in the Container Combo Box */ virtual mitk::Image* GetParentMitkImage(); /** \brief Method to return the NextButton to switch to the next widgetStackPage*/ QPushButton* GetNextButton(); /** \brief Method to return the BackButton to switch to the last widgetStackPage*/ QPushButton* GetBackButton(); /*************** ADD COMPONENTS ***************/ /** \brief method to add components into this component. */ virtual void AddComponent(QmitkFunctionalityComponentContainer* componentContainer); /** \brief method to add components into this component. */ virtual void AddComponent(QmitkFunctionalityComponentContainer* componentContainer, QString label, int stackPage); /*************** TREE CHANGED ( ) ***************/ virtual void TreeChanged(const itk::EventObject & treeChangedEvent); /*************** (DE)ACTIVATED ***************/ ///** \brief Method to set m_Activated to true */ virtual void Activated(); ///** \brief Method to set m_Activated to false */ virtual void Deactivated(); /** \brief Attribute to decide whether the selector shall be updated when a parent-Selector is updatet or not */ bool m_UpdateSelector; /** \brief Attribute to decide whether the selector shall be shown or not */ bool m_ShowSelector; protected slots: public slots: /** \brief Method to set the "GetContentContainer"-visible or not, addicted to the visibility of a parent-component and the status of the checkable ComboBox from "GetMainCheckBoxContainer()" */ virtual void SetContentContainerVisibility(bool); /*************** TREE CHANGED ( ) ***************/ // /** \brief The TreeChanged-slot-method updates the TreeNodeSelector if the datatree changes. */ virtual void TreeChanged(); /*************** OHTER METHODS ***************/ -// virtual void DataStorageChanged(mitk::DataStorage::Pointer ds); + virtual void DataStorageChanged(mitk::DataStorage::Pointer ds); /** \brief Slot method that will be called if TreeNodeSelector widget was activated. */ void ImageSelected(const mitk::DataTreeNode::Pointer item); //void NextButtonPressed(); //void BackButtonPressed(); protected: /** \brief Vector with all added components */ //std::vector> m_WidgetStackAddedChildList; /** \brief Method to update the content of all DataTreeComboBoxes. */ virtual void UpdateDataTreeComboBoxes(); /*************** ATTRIBUTES ***************/ /** \brief ObserverTag */ unsigned long m_ObserverTag; /** \brief Graphical User Interface for the component in general QWidget-Type */ QWidget* m_GUI; // /*! //* image selected in MainSelector //*/ //mitk::Image* m_ParentMitkImage; ///*! //* iterator on current image //*/ //mitk::DataTreeIteratorClone m_ParentMitkImageIterator; /** \brief Attribute whether the component is active or not */ bool m_Active; /** \brief Item on the actual selected Image in the TreeNodeSelector */ QmitkDataStorageComboBox * m_SelectedItem; /** \brief Item on the actual selected Image in the TreeNodeSelector */ mitk::DataStorage::Pointer m_DataStorage; private: /*************** ATTRIBUTES ***************/ /** \brief also the Graphical User Interface for the component, like m_GUI, but with its specific type */ Ui::QmitkFunctionalityComponentContainerGUI * m_FunctionalityComponentContainerGUI; /** \brief parent of the component */ QObject *m_Parent; /** \brief name of this the component */ QString m_ComponentName; // QmitkStdMultiWidget * m_MultiWidget; // QmitkFunctionalityComponentContainerGUI * m_GUI; /** \brief Spacer added at the end of the component */ QSpacerItem* m_Spacer; QmitkStdMultiWidget *m_MulitWidget; QPushButton* m_BackButton; QPushButton* m_NextButton; int m_MaximumWidgedStackSize; }; #endif diff --git a/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.cpp b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.cpp index e6bd194f93..dbc5f5a03f 100644 --- a/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.cpp +++ b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.cpp @@ -1,553 +1,647 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "QmitkThresholdComponent.h" #include "ui_QmitkThresholdComponentControls.h" #include #include #include "mitkRenderingManager.h" #include "mitkProperties.h" #include "mitkDataTreeFilterFunctions.h" #include "mitkDataTreeNodeFactory.h" #include "mitkLevelWindowProperty.h" #include #include #include #include #include #include #include #include #include /*************** CONSTRUCTOR ***************/ QmitkThresholdComponent::QmitkThresholdComponent(QObject * parent, const char * parentName, bool updateSelector, bool showSelector, QmitkStdMultiWidget * /*mitkStdMultiWidget*/, mitk::DataTreeIteratorBase* it) : QmitkFunctionalityComponentContainer(parent, parentName, updateSelector, showSelector), m_ThresholdImageNode(NULL), m_ThresholdComponentGUI(NULL), m_ThresholdNodeExisting(false) { SetAvailability(true); SetComponentName("ThresholdFinder"); m_Node = this->GetDefaultDataStorage()->GetNode(); } /*************** DESTRUCTOR ***************/ QmitkThresholdComponent::~QmitkThresholdComponent() { } /************** SET SELECTOR VISIBILITY ***************/ void QmitkThresholdComponent::SetSelectorVisibility(bool visibility) { if(m_ThresholdComponentGUI) { - m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->setShown(visibility); + //m_ImageContent->setShown(visibility); + m_ImageContent->setShown(true); } } /*************** GET IMAGE CONTENT ***************/ QGroupBox* QmitkThresholdComponent::GetImageContent() { - return (QGroupBox*) m_ThresholdComponentGUI->m_ImageContent; + return (QGroupBox*) m_ImageContent; } /*************** GET TREE NODE SELECTOR ***************/ QmitkDataStorageComboBox* QmitkThresholdComponent::GetTreeNodeSelector() { - return m_ThresholdComponentGUI->m_TreeNodeSelector; + return m_TreeNodeSelector; } /*************** CONNECTIONS ***************/ void QmitkThresholdComponent::CreateConnections() { if ( m_ThresholdComponentGUI ) { - connect( (QObject*)(m_ThresholdComponentGUI->m_TreeNodeSelector), SIGNAL(activated(const mitk::DataTreeFilter::Item *)), (QObject*) this, SLOT(ImageSelected(const mitk::DataTreeFilter::Item *))); - connect( (QObject*)(m_ThresholdComponentGUI->m_ThresholdFinder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowThresholdFinderContent(bool))); - connect( (QObject*)(m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowImageContent(bool))); + connect( (QObject*)(m_TreeNodeSelector), SIGNAL(activated(const mitk::DataTreeFilter::Item *)), (QObject*) this, SLOT(ImageSelected(const mitk::DataTreeFilter::Item *))); + connect( (QObject*)(m_ThresholdFinder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowThresholdFinderContent(bool))); + connect( (QObject*)(m_ThresholdSelectDataGroupBox), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowImageContent(bool))); - connect( (QObject*)(m_ThresholdComponentGUI->m_ThresholdInputSlider), SIGNAL(sliderMoved(int)), (QObject*) this, SLOT(ThresholdSliderChanged(int))); - connect( (QObject*)(m_ThresholdComponentGUI->m_ThresholdInputNumber), SIGNAL(returnPressed()), (QObject*) this, SLOT(ThresholdValueChanged())); - //connect( (QObject*)(m_ThresholdComponentGUI->m_ShowThresholdGroupBox), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowThreshold(bool))); + connect( (QObject*)(m_ThresholdInputSlider), SIGNAL(sliderMoved(int)), (QObject*) this, SLOT(ThresholdSliderChanged(int))); + connect( (QObject*)(m_ThresholdInputNumber), SIGNAL(returnPressed()), (QObject*) this, SLOT(ThresholdValueChanged())); + //connect( (QObject*)( m_ShowThresholdGroupBox), SIGNAL(toggled(bool)), (QObject*) this, SLOT(ShowThreshold(bool))); //to connect the toplevel checkable GroupBox with the method SetContentContainerVisibility to inform all containing komponent to shrink or to expand - connect( (QObject*)(m_ThresholdComponentGUI->m_ThresholdFinder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(SetContentContainerVisibility(bool))); - connect( (QObject*)(m_ThresholdComponentGUI->m_CreateSegmentationButton), SIGNAL(pressed()), (QObject*) this, SLOT(CreateThresholdSegmentation())); + connect( (QObject*)(m_ThresholdFinder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(SetContentContainerVisibility(bool))); + connect( (QObject*)(m_CreateSegmentationButton), SIGNAL(pressed()), (QObject*) this, SLOT(CreateThresholdSegmentation())); } } +/*************** DATA STORAGE CHANGED ***************/ +void QmitkThresholdComponent::DataStorageChanged(mitk::DataStorage::Pointer ds) +{ + +} /*************** IMAGE SELECTED ***************/ void QmitkThresholdComponent::ImageSelected(mitk::DataTreeNode::Pointer item) { if(m_ThresholdComponentGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast(m_AddedChildList[i]); if (functionalityComponent != NULL) functionalityComponent->ImageSelected(item); } } m_Node = item; DataObjectSelected(); SetSliderRange(); ShowThreshold(); } /*************** DATA OBJECT SELECTED **************/ void QmitkThresholdComponent::DataObjectSelected() { if(m_Active) { if(m_ThresholdNodeExisting) { m_ThresholdImageNode->SetData(m_Node->GetData()); } else { CreateThresholdImageNode(); m_ThresholdImageNode->SetData(m_Node->GetData()); } ShowThreshold(); } } /** \brief Method to set the DataStorage*/ void QmitkThresholdComponent::SetDataStorage(mitk::DataStorage::Pointer dataStorage) { m_DataStorage = dataStorage; } /** \brief Method to get the DataStorage*/ mitk::DataStorage::Pointer QmitkThresholdComponent::GetDataStorage() { return m_DataStorage; } /*************** CREATE CONTAINER WIDGET **************/ void QmitkThresholdComponent::CreateQtPartControl(QWidget *parent, mitk::DataStorage::Pointer dataStorage) { m_GUI = new QWidget; m_ThresholdComponentGUI = new Ui::QmitkThresholdComponentControls; m_ThresholdComponentGUI->setupUi(m_GUI); - this->CreateConnections(); + + + + /*CREATE GUI ELEMENTS*/ + + m_ThresholdFinder = new QGroupBox("2. Find Threshold", m_GUI); + m_ThresholdSelectDataGroupBox = new QGroupBox("Show Image Selector", m_ThresholdFinder); + m_TreeNodeSelector = new QmitkDataStorageComboBox(m_ThresholdSelectDataGroupBox); + m_ImageContent = new QGroupBox("m_ImageContent", m_ThresholdSelectDataGroupBox); + m_ContainerContent = new QGroupBox(m_ImageContent); + m_ShowThresholdGroupBox = new QGroupBox("m_ShowThresholdGroupBox", m_ContainerContent); + m_ThresholdInputNumber = new QLineEdit(m_ShowThresholdGroupBox); + m_ThresholdInputSlider = new QSlider(m_ShowThresholdGroupBox); + m_ThresholdInputSlider->setOrientation(Qt::Orientation::Horizontal); + m_ThresholdValueContent = new QGroupBox("m_ThresholdValueContent", m_ShowThresholdGroupBox); + m_CreateSegmentationButton = new QPushButton("Create Segmentation", m_ThresholdValueContent); + m_DeleateImageIfDeactivatedCheckBox = new QCheckBox("Deleate Threshold Image if \nComponent is deactivated", m_ThresholdValueContent); + + m_ThresholdFinder->setCheckable(true); + m_ThresholdFinder->setChecked(true); + m_ThresholdSelectDataGroupBox->setCheckable(true); + m_ThresholdSelectDataGroupBox->setChecked(true); + m_ThresholdInputNumber->setFixedSize(40, 20); + m_ThresholdValueContent->setMaximumHeight(90); + + // m_ThresholdSelectDataGroupBox->setContentsMargins(0,9,9,9); + // m_ImageContent->setContentsMargins(0,9,9,9); + // m_ContainerContent->setContentsMargins(0,9,9,9); + // m_ShowThresholdGroupBox->setContentsMargins(0,9,9,9); + //m_ThresholdValueContent->setContentsMargins(0,9,9,9); + + //m_ThresholdFinder->setFlat(true); + //m_ThresholdSelectDataGroupBox->setFlat(true); + //m_ImageContent->setFlat(true); + //m_ContainerContent->setFlat(true); + //m_ShowThresholdGroupBox->setFlat(true); + //m_ThresholdValueContent->setFlat(true); + + + + QVBoxLayout* guiLayout = new QVBoxLayout(m_GUI); + m_GUI->setLayout(guiLayout); + guiLayout->addWidget(m_ThresholdFinder); + + QVBoxLayout* thresholdFinderLayout = new QVBoxLayout(m_ThresholdFinder); + thresholdFinderLayout->setContentsMargins(0,9,0,9); + m_ThresholdFinder->setLayout(thresholdFinderLayout); + thresholdFinderLayout->addWidget(m_ThresholdSelectDataGroupBox); + thresholdFinderLayout->addWidget(m_ImageContent); + + QVBoxLayout* thresholdSelectDataGroupBoxLayout = new QVBoxLayout(m_ThresholdSelectDataGroupBox); + thresholdSelectDataGroupBoxLayout->setContentsMargins(0,9,0,9); + m_ThresholdSelectDataGroupBox->setLayout(thresholdSelectDataGroupBoxLayout); + thresholdSelectDataGroupBoxLayout->addWidget(m_TreeNodeSelector); + + + QVBoxLayout* imageContentLayout = new QVBoxLayout(m_ImageContent); + imageContentLayout->setContentsMargins(0,9,0,9); + m_ImageContent->setLayout(imageContentLayout); + imageContentLayout->addWidget(m_ContainerContent); + + QVBoxLayout* containerContentLayout = new QVBoxLayout(m_ContainerContent); + containerContentLayout->setContentsMargins(0,9,0,9); + m_ContainerContent->setLayout(containerContentLayout); + containerContentLayout->addWidget(m_ShowThresholdGroupBox); + + QVBoxLayout* showThresholdGroupBoxLayout = new QVBoxLayout(m_ShowThresholdGroupBox); + showThresholdGroupBoxLayout->setContentsMargins(0,9,0,9); + m_ShowThresholdGroupBox->setLayout(showThresholdGroupBoxLayout); + QHBoxLayout* thresholdInputLayout = new QHBoxLayout(m_ShowThresholdGroupBox); + thresholdInputLayout->addWidget(m_ThresholdInputNumber); + thresholdInputLayout->addWidget(m_ThresholdInputSlider); + showThresholdGroupBoxLayout->addLayout(thresholdInputLayout); + showThresholdGroupBoxLayout->addWidget(m_ThresholdValueContent); + + QVBoxLayout* thresholdValueContentLayout = new QVBoxLayout(m_ThresholdValueContent); + thresholdValueContentLayout->setContentsMargins(0,9,0,9); + m_ThresholdValueContent->setLayout(thresholdValueContentLayout); + thresholdValueContentLayout->addWidget(m_DeleateImageIfDeactivatedCheckBox); + thresholdValueContentLayout->addWidget(m_CreateSegmentationButton); - SetDataStorage(dataStorage); + this->CreateConnections(); + SetDataStorage(dataStorage); - m_ThresholdComponentGUI->m_TreeNodeSelector->SetDataStorage(dataStorage); - m_ThresholdComponentGUI->m_TreeNodeSelector->SetPredicate(mitk::NodePredicateDataType::New("Image")); + m_TreeNodeSelector->SetDataStorage(dataStorage); + m_TreeNodeSelector->SetPredicate(mitk::NodePredicateDataType::New("Image")); // m_GUI = m_ThresholdComponentGUI; - // m_ThresholdComponentGUI->m_TreeNodeSelector->SetDataTree(GetDataTreeIterator()); + // m_TreeNodeSelector->SetDataTree(GetDataTreeIterator()); if(m_ShowSelector) { - m_ThresholdComponentGUI->m_ImageContent->setShown(m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->isChecked()); + m_ImageContent->setShown( m_ThresholdSelectDataGroupBox->isChecked()); + //m_ImageContent->setShown(true); } else { - m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->setShown(m_ShowSelector); + m_ThresholdSelectDataGroupBox->setShown(m_ShowSelector); + //m_ThresholdSelectDataGroupBox->setShown(true); } - //m_ThresholdComponentGUI->m_TreeNodeSelector->GetFilter()->SetFilter(mitk::IsBaseDataTypeWithoutProperty("isComponentThresholdImage")); + // m_TreeNodeSelector->GetFilter()->SetFilter(mitk::IsBaseDataTypeWithoutProperty("isComponentThresholdImage")); } /*************** GET CONTENT CONTAINER ***************/ QGroupBox * QmitkThresholdComponent::GetContentContainer() { - return m_ThresholdComponentGUI->m_ContainerContent; + return m_ContainerContent; } /************ GET MAIN CHECK BOX CONTAINER ************/ QGroupBox * QmitkThresholdComponent::GetMainCheckBoxContainer() { - return m_ThresholdComponentGUI->m_ThresholdFinder; + return m_ThresholdFinder; } ///*********** SET CONTENT CONTAINER VISIBLE ************/ //void QmitkThresholdComponent::SetContentContainerVisibility() //{ // for(unsigned int i = 0; i < m_AddedChildList.size(); i++) // { // if(m_AddedChildList[i]->GetContentContainer() != NULL) // { // m_AddedChildList[i]->GetContentContainer()->setShown(GetMainCheckBoxContainer()->isChecked()); // } // } //} /*************** ACTIVATED ***************/ void QmitkThresholdComponent::Activated() { QmitkBaseFunctionalityComponent::Activated(); m_Active = true; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Activated(); } CreateThresholdImageNode(); ShowThreshold(); SetSliderRange(); } /*************** DEACTIVATED ***************/ void QmitkThresholdComponent::Deactivated() { QmitkBaseFunctionalityComponent::Deactivated(); m_Active = false; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Deactivated(); } ShowThreshold(); - if(m_ThresholdComponentGUI->m_DeleateImageIfDeactivatedCheckBox->isChecked()) + if( m_DeleateImageIfDeactivatedCheckBox->isChecked()) { DeleteThresholdNode(); } } ///************ SHOW THRESHOLD FINDER CONTENT ***********/ void QmitkThresholdComponent::ShowThresholdFinderContent(bool) { - //m_ThresholdComponentGUI->m_ShowThresholdGroupBox->setShown(m_ThresholdComponentGUI->m_ThresholdFinder->isChecked()); - m_ThresholdComponentGUI->m_ContainerContent->setShown(m_ThresholdComponentGUI->m_ThresholdFinder->isChecked()); + // m_ShowThresholdGroupBox->setShown( m_ThresholdFinder->isChecked()); + // m_ContainerContent->setShown( m_ThresholdSelectDataGroupBox->isChecked()); + m_ContainerContent->setShown( m_ThresholdFinder->isChecked()); if(m_ShowSelector) { - m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->setShown(m_ThresholdComponentGUI->m_ThresholdFinder->isChecked()); + //m_ThresholdSelectDataGroupBox->setShown( m_ThresholdSelectDataGroupBox->isChecked()); + //m_ThresholdSelectDataGroupBox->setShown( true); + m_ThresholdSelectDataGroupBox->setShown(m_ThresholdFinder->isChecked()); } //ShowThreshold(); } ///*************** SHOW IMAGE CONTENT **************/ void QmitkThresholdComponent::ShowImageContent(bool) { - m_ThresholdComponentGUI->m_ImageContent->setShown(m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->isChecked()); + //m_ImageContent->setShown( m_ThresholdSelectDataGroupBox->isChecked()); + m_ImageContent->setShown( true); if(m_ShowSelector) { - m_ThresholdComponentGUI->m_ImageContent->setShown(m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->isChecked()); + //m_ImageContent->setShown( m_ThresholdSelectDataGroupBox->isChecked()); + m_ImageContent->setShown( true); } else { - m_ThresholdComponentGUI->m_ThresholdSelectDataGroupBox->setShown(m_ShowSelector); + //m_ThresholdSelectDataGroupBox->setShown(m_ShowSelector); + m_ThresholdSelectDataGroupBox->setShown(true); } } ///*************** SHOW THRESHOLD **************/ void QmitkThresholdComponent::ShowThreshold(bool) { if(m_ThresholdImageNode) { if(m_Active == true) { - m_ThresholdImageNode->SetProperty("visible", mitk::BoolProperty::New((m_ThresholdComponentGUI->m_ThresholdFinder->isChecked())) ); + m_ThresholdImageNode->SetProperty("visible", mitk::BoolProperty::New(( m_ThresholdFinder->isChecked())) ); } else { - if(m_ThresholdComponentGUI->m_DeleateImageIfDeactivatedCheckBox->isChecked()) + if( m_DeleateImageIfDeactivatedCheckBox->isChecked()) { m_ThresholdImageNode->SetProperty("visible", mitk::BoolProperty::New((false)) ); } } mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } } ///*************** THRESHOLD VALUE CHANGED **************/ //By Slider void QmitkThresholdComponent::ThresholdSliderChanged(int) { - int value = m_ThresholdComponentGUI->m_ThresholdInputSlider->value(); + int value = m_ThresholdInputSlider->value(); if (m_ThresholdImageNode) { m_ThresholdImageNode->SetLevelWindow(mitk::LevelWindow(value,1)); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } - m_ThresholdComponentGUI->m_ThresholdInputNumber->setText(QString::number(value)); + m_ThresholdInputNumber->setText(QString::number(value)); } ///*************** THRESHOLD VALUE CHANGED **************/ //By LineEdit void QmitkThresholdComponent::ThresholdValueChanged( ) { - int value = atoi(m_ThresholdComponentGUI->m_ThresholdInputNumber->text()); + int value = atoi( m_ThresholdInputNumber->text()); if (m_ThresholdImageNode) { m_ThresholdImageNode->SetLevelWindow(mitk::LevelWindow(value,1)); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } - m_ThresholdComponentGUI->m_ThresholdInputSlider->setValue(value); + m_ThresholdInputSlider->setValue(value); } ///*************** SET SLIDER RANGE **************/ void QmitkThresholdComponent::SetSliderRange() { if(m_Active) { - if(m_ThresholdComponentGUI->m_ThresholdFinder->isChecked()==true) + if( m_ThresholdFinder->isChecked()==true) { mitk::Image* currentImage = dynamic_cast(m_ThresholdImageNode->GetData()); if(currentImage) { int min = (int) currentImage->GetScalarValueMin(); int max = (int) currentImage->GetScalarValueMaxNoRecompute(); //int realMax = currentImage->GetScalarValueMax(); if(min < -32000) { min = (int) currentImage->GetScalarValue2ndMin(); max = (int) currentImage->GetScalarValue2ndMaxNoRecompute(); } - m_ThresholdComponentGUI->m_ThresholdInputSlider->setMinValue(min); - m_ThresholdComponentGUI->m_ThresholdInputSlider->setMaxValue(max); - /*m_ThresholdComponentGUI->m_ThresholdInputSlider->setMinValue((int)currentImage->GetScalarValueMin()); - m_ThresholdComponentGUI->m_ThresholdInputSlider->setMaxValue((int)currentImage->GetScalarValueMaxNoRecompute());*/ + m_ThresholdInputSlider->setMinValue(min); + m_ThresholdInputSlider->setMaxValue(max); + /* m_ThresholdInputSlider->setMinValue((int)currentImage->GetScalarValueMin()); + m_ThresholdInputSlider->setMaxValue((int)currentImage->GetScalarValueMaxNoRecompute());*/ } } } } ///*************** DELETE THRESHOLD NODE **************/ void QmitkThresholdComponent::DeleteThresholdNode() { if(m_ThresholdImageNode) { mitk::DataTreeNode::Pointer foundNode = GetDefaultDataStorage()->GetNamedNode("Thresholdview image"); foundNode->Delete(); m_ThresholdNodeExisting = false; return; } } ///*************CREATE THRESHOLD IMAGE NODE************/ void QmitkThresholdComponent::CreateThresholdImageNode() { if(m_Active) { if(!m_ThresholdNodeExisting) { if (m_Node) { m_ThresholdImageNode = mitk::DataTreeNode::New(); mitk::StringProperty::Pointer nameProp = mitk::StringProperty::New("Thresholdview image" ); m_ThresholdImageNode->SetProperty( "name", nameProp ); mitk::BoolProperty::Pointer componentThresholdImageProp = mitk::BoolProperty::New(true); m_ThresholdImageNode->SetProperty( "isComponentThresholdImage", componentThresholdImageProp ); m_ThresholdImageNode->SetData(m_Node->GetData()); m_ThresholdImageNode->SetColor(0.0,1.0,0.0); m_ThresholdImageNode->SetOpacity(.25); int layer = 0; m_Node->GetIntProperty("layer", layer); m_ThresholdImageNode->SetIntProperty("layer", layer+1); - m_ThresholdImageNode->SetLevelWindow(mitk::LevelWindow(atoi(m_ThresholdComponentGUI->m_ThresholdInputNumber->text()),1)); + m_ThresholdImageNode->SetLevelWindow(mitk::LevelWindow(atoi( m_ThresholdInputNumber->text()),1)); GetDefaultDataStorage()->Add(m_ThresholdImageNode); m_ThresholdNodeExisting = true; } } } } /*************CREAET THRESHOLD SEGMENTATION************/ void QmitkThresholdComponent::CreateThresholdSegmentation() { //mitk::DataTreeNode::Pointer segmentationNode = m_Controls->m_ToolDataSelectionBox->GetToolManager()->GetReferenceData(0); mitk::DataTreeNode::Pointer segmentationNode = mitk::DataTreeNode::New(); segmentationNode->SetData(m_Node->GetData()); m_MitkImage = dynamic_cast(m_Node->GetData()); if (segmentationNode.IsNotNull()) { mitk::StringProperty::Pointer nameProp = mitk::StringProperty::New("TH segmentation" ); segmentationNode->SetProperty( "name", nameProp ); segmentationNode->GetPropertyList()->SetProperty("binary", mitk::BoolProperty::New(true)); mitk::BoolProperty::Pointer thresholdBasedSegmentationProp = mitk::BoolProperty::New(true); segmentationNode->SetProperty( "segmentation", thresholdBasedSegmentationProp ); segmentationNode->GetPropertyList()->SetProperty("layer",mitk::IntProperty::New(1)); segmentationNode->SetColor(1.0,0.0,0.0); segmentationNode->SetOpacity(.25); mitk::Image::Pointer image = dynamic_cast( segmentationNode->GetData() ); if (image.IsNotNull()) { // ask the user about an organ type and name, add this information to the image's (!) propertylist // create a new image of the same dimensions and smallest possible pixel type AccessFixedDimensionByItk_2(m_MitkImage, /*the actual selected image */ ThresholdSegmentation, /*called template-method */ 3, /*dimension */ image, /*passed segmentation */ this /* the QmitkSurfaceCreator-object */); //mitk::DataTreeNode::Pointer segmentation = CreateEmptySegmentationNode(image); if (!m_ThresholdSegmentationImage) return; // could be aborted by user segmentationNode->SetData(m_ThresholdSegmentationImage); - mitk::DataTreeNode::Pointer origNode = m_ThresholdComponentGUI->m_TreeNodeSelector->GetSelectedNode(); + mitk::DataTreeNode::Pointer origNode = m_TreeNodeSelector->GetSelectedNode(); GetDefaultDataStorage()->Add(segmentationNode, origNode); //mitk::DataTreeIteratorClone iteratorClone = m_DataTreeIterator; //iteratorClone->GoToBegin(); //while ( !iteratorClone->IsAtEnd() ) //{ // mitk::DataTreeNode::Pointer node = iteratorClone->Get(); // if ( node == m_Node ) // { // iteratorClone->Add(segmentationNode); // } // ++iteratorClone; //} } } mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } mitk::DataTreeNode::Pointer QmitkThresholdComponent::CreateEmptySegmentationNode( mitk::Image* image) { //if (!image) return NULL; //// actually create a new empty segmentation //mitk::PixelType pixelType( typeid(short int) ); //mitk::Image::Pointer segmentation = mitk::Image::New(); //segmentation->Initialize( pixelType, image->GetDimension(), image->GetDimensions() ); //memset( segmentation->GetData(), 0, sizeof(short int) * segmentation->GetDimension(0) * segmentation->GetDimension(1) * segmentation->GetDimension(2) ); //if (image->GetGeometry() ) //{ // mitk::AffineGeometryFrame3D::Pointer originalGeometryAGF = image->GetGeometry()->Clone(); // mitk::Geometry3D::Pointer originalGeometry = dynamic_cast( originalGeometryAGF.GetPointer() ); // segmentation->SetGeometry( originalGeometry ); //} return CreateSegmentationNode(image); } mitk::DataTreeNode::Pointer QmitkThresholdComponent::CreateSegmentationNode( mitk::Image* image) { if (!image) return NULL; // decorate the datatreenode with some properties mitk::DataTreeNode::Pointer segmentationNode = mitk::DataTreeNode::New(); segmentationNode->SetData( image ); // visualization properties segmentationNode->SetProperty( "binary", mitk::BoolProperty::New(true) ); segmentationNode->SetProperty( "layer", mitk::IntProperty::New(10) ); segmentationNode->SetProperty( "segmentation", mitk::BoolProperty::New(true) ); segmentationNode->SetProperty( "opacity", mitk::FloatProperty::New(0.3) ); segmentationNode->SetProperty( "levelwindow", mitk::LevelWindowProperty::New( mitk::LevelWindow(0, 1) ) ); segmentationNode->SetProperty( "color", mitk::ColorProperty::New(0.0, 1.0, 0.0) ); return segmentationNode; } //*************************************TEMPLATE FOR THRESHOLDSEGMENTATION****************************** // // to create a new segmentation that contains those areas above the threshold // called from NewThresholdSegmentation template < typename TPixel, unsigned int VImageDimension > void QmitkThresholdComponent::ThresholdSegmentation(itk::Image< TPixel, VImageDimension >* itkImage, mitk::Image* segmentation, QmitkThresholdComponent * /*thresholdComponent*/) { // iterator on m_MitkImage typedef itk::Image< TPixel, VImageDimension > ItkImageType; itk::ImageRegionConstIterator itMitkImage(itkImage, itkImage->GetLargestPossibleRegion() ); // pointer on segmentation typedef itk::Image< unsigned char, VImageDimension > ItkSegmentationImageType; typename ItkSegmentationImageType::Pointer itkSegmentation; // cast segmentation from mitk-image to itk-image if(segmentation != NULL) { mitk::CastToItkImage(segmentation, itkSegmentation); } // new pointer on segmentation: itkThresholdSegmentedImage typename ItkSegmentationImageType::Pointer itkThresholdSegmentedImage = ItkSegmentationImageType::New(); // properties for itkThresholdSegmentedImage: itkThresholdSegmentedImage->SetRegions(itkImage->GetLargestPossibleRegion()); itkThresholdSegmentedImage->Allocate(); // iterator on itkThresholdSegmentedImage: itSegmented itk::ImageRegionIterator itSegmented(itkThresholdSegmentedImage, itkThresholdSegmentedImage->GetLargestPossibleRegion() ); int thresholdValue(0);//Threshold above that the segmentation shall be created // threshold-input from GUI: - thresholdValue = atoi(m_ThresholdComponentGUI->m_ThresholdInputNumber->text()); + thresholdValue = atoi( m_ThresholdInputNumber->text()); while(!(itMitkImage.IsAtEnd())) { if((signed)itMitkImage.Get() >= thresholdValue) //if the pixel-value of the m_Mitk-Image is higher or equals the threshold { itSegmented.Set(1); // set the pixel-value at the segmentation to "1" } else { itSegmented.Set(0); // else set the pixel-value at the segmentation to "0" } ++itMitkImage; ++itSegmented; //TODO: die Segmentierung aus der Methode returnen }//end of while (!(itMitkImage.IsAtEnd())) // create new mitk-Image: m_ThresholdSegmentationImage m_ThresholdSegmentationImage = mitk::Image::New(); // fill m_ThresholdSegmentationImage with itkThresholdSegmentedImage: mitk::CastToMitkImage(itkThresholdSegmentedImage, m_ThresholdSegmentationImage); } diff --git a/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.h b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.h index 838dca5d2c..23243ae271 100644 --- a/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.h +++ b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.h @@ -1,188 +1,205 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef MITK_THRESHOLDCOMPONENT_H #define MITK_THRESHOLDCOMPONENT_H #include "QmitkFunctionalityComponentContainer.h" #include #include "ui_QmitkThresholdComponentControls.h" class QmitkStdMultiWidget; +#include "qcheckbox.h" + /** * \brief ComponentClass to find an adequate threshold for a selected image * \ingroup QmitkFunctionalityComponent * * This class inherits from * - \ref QmitkFunctionalityComponentContainer * * \section QmitkThresholdComponent Overview * * The ThresholdComponent is a class to easy find an adequate threshold. On two ways the user can insert * a possible threshold: as a number in a textfield or by moving a scrollbar. The selected threshold will * be shown on the image as an new binary layer that contains those areas above the theshold. * Like all other componentes the QmitkThresholdComponent inherits from QmitkFunctionalityComponentContainer. * */ class QMITKEXT_EXPORT QmitkThresholdComponent : public QmitkFunctionalityComponentContainer { Q_OBJECT public: /*************** CONSTRUCTOR ***************/ /** \brief Constructor. */ QmitkThresholdComponent(QObject *parent=0, const char *parentName=0, bool updateSelector = true, bool showSelector = true, QmitkStdMultiWidget *mitkStdMultiWidget = NULL, mitk::DataTreeIteratorBase* dataIt = NULL); /*************** DESTRUCTOR ***************/ /** \brief Destructor. */ virtual ~QmitkThresholdComponent(); /*************** CREATE ***************/ /** \brief Method to create the GUI for the component from the .ui-File. This Method is obligatory */ void CreateQtPartControl(QWidget *parent, mitk::DataStorage::Pointer dataStorage); /** \brief Method to create the connections for the component. This Method is obligatory even if no connections is needed*/ virtual void CreateConnections(); /*************** SET AND GET ***************/ /** \brief Method to set the Image Selector visible or invisible */ virtual void SetSelectorVisibility(bool visibility); /** \brief Method to return the TreeNodeSelector-QmitkDataStorageComboBox */ virtual QmitkDataStorageComboBox* GetTreeNodeSelector(); /** \brief Method to set the DataStorage*/ virtual void SetDataStorage(mitk::DataStorage::Pointer dataStorage); /** \brief Method to get the DataStorage*/ virtual mitk::DataStorage::Pointer GetDataStorage(); /** \brief Method to return the ComboBox that includes all GUI-elements instead of the outermost checkable CheckBox and that can be set visible or not*/ virtual QGroupBox * GetContentContainer(); /** \brief Method to return the outermost checkable ComboBox that is to decide whether the content shall be shown or not */ virtual QGroupBox * GetMainCheckBoxContainer(); /** \brief Method to return the group-box that contains the tree-node-selector */ virtual QGroupBox* GetImageContent(); /*************** (DE)ACTIVATED ***************/ ///** \brief Method to set m_Activated to true */ virtual void Activated(); ///** \brief Method to set m_Activated to false */ virtual void Deactivated(); public slots: /*************** OHTER METHODS ***************/ + void DataStorageChanged(mitk::DataStorage::Pointer ds); + /** \brief Slot method that will be called if TreeNodeSelector widget was activated to select the current image. */ void ImageSelected(const mitk::DataTreeNode::Pointer item); /** \brief Slot method that will be called if the CheckBox at the Threshold-Group-Box was toggled to show the threshold image or not. */ void ShowThreshold(bool show = true); /** \brief Slot method that will be called if the CheckBox at the Threshold-Group-Box was toggled to show the threshold image or not. */ void ShowThresholdFinderContent(bool show = true); /** \brief Slot method that will be called if the CheckBox at the TreeNodeSelector-Group-Box was toggled to show the TreeNodeSelector or not. */ void ShowImageContent(bool show = true); /** \brief Slot method that will be called if the Thresholdslider was moved to update the shown image and the ThresholdLineEdit. */ void ThresholdSliderChanged(int moved = 0); /** \brief Slot method that will be called if the ThresholdLineEdit was changed to update the shown image and the ThresholdSlider. */ void ThresholdValueChanged( ); /** \brief Slot method that will be called if the "Create Segmentation"-Button was pressed to create a new segmentation image. Everything over the threshold will have the value 1, all other 0. */ void CreateThresholdSegmentation(); protected: /*! Method to create a new Segmentation */ mitk::DataTreeNode::Pointer CreateEmptySegmentationNode( mitk::Image* image); /*! Method to create the node for the thresholdbased segmentation */ mitk::DataTreeNode::Pointer CreateSegmentationNode( mitk::Image* image); /** \brief Method that controls everything what happend after an image was selected */ void DataObjectSelected(); /*************** ATTRIBUTES ***************/ /** \brief Item on the actual selected Image in the TreeNodeSelector */ mitk::DataStorage::Pointer m_DataStorage; /*! a reference to the current ImageNode */ mitk::DataTreeNode::Pointer m_Node; /*! a reference to the node with the thresholdImage and adjusted preferences to show the threshold */ mitk::DataTreeNode::Pointer m_ThresholdImageNode; private: /** \brief Method to create an Node that will hold the ThresholdImage and to set that preferences*/ void CreateThresholdImageNode(); /** \brief Method to set the Range of the ThresholdSlider*/ void SetSliderRange(); /** \brief Method to to delete ThresholdNode if Component is deactivated*/ void DeleteThresholdNode(); /*! \brief template to create thresholdSegmentation */ template < typename TPixel, unsigned int VImageDimension > void ThresholdSegmentation(itk::Image< TPixel, VImageDimension >* itkImage, mitk::Image* segmentation, QmitkThresholdComponent * /*thresholdComponent*/); /*************** ATTRIBUTES ***************/ /** \brief The created GUI from the .ui-File. This Attribute is obligatory*/ Ui::QmitkThresholdComponentControls * m_ThresholdComponentGUI; /** \brief This Attribute holds the information if a thresholdnode is already existing or not*/ bool m_ThresholdNodeExisting; /*! * Segmentation made with thresholdSegmentation */ mitk::Image::Pointer m_ThresholdSegmentationImage; + /*******GUI ELEMENTS******/ + QGroupBox* m_ThresholdFinder; + QGroupBox* m_ThresholdSelectDataGroupBox; + QGroupBox* m_ImageContent; + QGroupBox* m_ContainerContent; + QGroupBox* m_ShowThresholdGroupBox; + QLineEdit* m_ThresholdInputNumber; + QSlider* m_ThresholdInputSlider; + QGroupBox* m_ThresholdValueContent; + QPushButton* m_CreateSegmentationButton; + QCheckBox* m_DeleateImageIfDeactivatedCheckBox; + QmitkDataStorageComboBox*m_TreeNodeSelector; + }; #endif diff --git a/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponentControls.ui b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponentControls.ui new file mode 100644 index 0000000000..964db2e6f9 --- /dev/null +++ b/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponentControls.ui @@ -0,0 +1,30 @@ + + QMITKEXT_EXPORT + QmitkThresholdComponentControls + + + + 0 + 0 + 666 + 604 + + + + + 0 + 0 + + + + ThresholdComponent + + + + + mitkCommon.h + mitkDataTree.h + + + + diff --git a/Modules/QmitkExt/files.cmake b/Modules/QmitkExt/files.cmake index 1b2846edee..d04350e22d 100644 --- a/Modules/QmitkExt/files.cmake +++ b/Modules/QmitkExt/files.cmake @@ -1,138 +1,167 @@ SET(CPP_FILES QmitkApplicationBase/QmitkCommonFunctionality.cpp #QmitkModels/QmitkDataStorageListModel.cpp #QmitkModels/QmitkPropertiesTableModel.cpp #QmitkModels/QmitkDataStorageTreeModel.cpp #QmitkModels/QmitkDataStorageTableModel.cpp #QmitkModels/QmitkPropertyDelegate.cpp #QmitkModels/QmitkPointListModel.cpp + #QmitkAlgorithmFunctionalityComponent.cpp + #QmitkBaseAlgorithmComponent.cpp + QmitkBaseComponent.cpp + QmitkBaseFunctionalityComponent.cpp + QmitkFunctionalityComponentContainer.cpp + + QmitkFunctionalityComponents/QmitkThresholdComponent.cpp + #QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.cpp + #QmitkFunctionalityComponents/QmitkPixelGreyValueManipulatorComponent.cpp + #QmitkFunctionalityComponents/QmitkConnectivityFilterComponent.cpp + #QmitkFunctionalityComponents/QmitkImageCropperComponent.cpp + #QmitkFunctionalityComponents/QmitkSeedPointSetComponent.cpp + #QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.cpp + QmitkPropertyObservers/QmitkBasePropertyView.cpp QmitkPropertyObservers/QmitkBoolPropertyEditor.cpp QmitkPropertyObservers/QmitkBoolPropertyView.cpp QmitkPropertyObservers/QmitkColorPropertyEditor.cpp QmitkPropertyObservers/QmitkColorPropertyView.cpp QmitkPropertyObservers/QmitkNumberPropertyEditor.cpp QmitkPropertyObservers/QmitkNumberPropertyView.cpp QmitkPropertyObservers/QmitkPropertyViewFactory.cpp QmitkPropertyObservers/QmitkStringPropertyEditor.cpp QmitkPropertyObservers/QmitkStringPropertyOnDemandEdit.cpp QmitkPropertyObservers/QmitkStringPropertyView.cpp QmitkPropertyObservers/QmitkNumberPropertySlider.cpp qclickablelabel.cpp #QmitkAbortEventFilter.cpp # QmitkApplicationCursor.cpp QmitkCallbackFromGUIThread.cpp QmitkExtRegisterClasses.cpp # QmitkRenderingManager.cpp # QmitkRenderingManagerFactory.cpp # QmitkRenderWindow.cpp # QmitkEventAdapter.cpp QmitkColorTransferFunctionCanvas.cpp QmitkSlicesInterpolator.cpp QmitkStandardViews.cpp QmitkStepperAdapter.cpp # QmitkLineEditLevelWindowWidget.cpp # mitkSliderLevelWindowWidget.cpp # QmitkLevelWindowWidget.cpp # QmitkPointListWidget.cpp # QmitkPointListView.cpp QmitkPiecewiseFunctionCanvas.cpp QmitkSliderNavigatorWidget.cpp QmitkTransferFunctionCanvas.cpp #QmitkLevelWindowRangeChangeDialog.cpp #QmitkLevelWindowPresetDefinitionDialog.cpp # QmitkLevelWindowWidgetContextMenu.cpp QmitkSliceWidget.cpp # QmitkStdMultiWidget.cpp QmitkTransferFunctionWidget.cpp QmitkSelectableGLWidget.cpp QmitkToolReferenceDataSelectionBox.cpp QmitkToolGUIArea.cpp QmitkToolWorkingDataSelectionBox.cpp QmitkToolSelectionBox.cpp # QmitkPropertyListPopup.cpp QmitkToolGUI.cpp QmitkNewSegmentationDialog.cpp QmitkPaintbrushToolGUI.cpp QmitkCopyToClipBoardDialog.cpp # QmitkMaterialEditor.cpp # QmitkMaterialShowcase.cpp # QmitkPropertiesTableEditor.cpp QmitkPrimitiveMovieNavigatorWidget.cpp # QmitkDataStorageComboBox.cpp QmitkHistogram.cpp QmitkHistogramWidget.cpp QmitkPlotWidget.cpp QmitkPlotDialog.cpp QmitkPointListModel.cpp QmitkPointListView.cpp QmitkPointListWidget.cpp QmitkVideoBackground.cpp ) QT4_ADD_RESOURCES(CPP_FILES resources/QmitkResources.qrc) SET(MOC_H_FILES QmitkPropertyObservers/QmitkBasePropertyView.h QmitkPropertyObservers/QmitkBoolPropertyEditor.h QmitkPropertyObservers/QmitkBoolPropertyView.h QmitkPropertyObservers/QmitkColorPropertyEditor.h QmitkPropertyObservers/QmitkColorPropertyView.h QmitkPropertyObservers/QmitkNumberPropertyEditor.h QmitkPropertyObservers/QmitkNumberPropertyView.h QmitkPropertyObservers/QmitkStringPropertyEditor.h QmitkPropertyObservers/QmitkStringPropertyOnDemandEdit.h QmitkPropertyObservers/QmitkStringPropertyView.h QmitkPropertyObservers/QmitkNumberPropertySlider.h + QmitkFunctionalityComponents/QmitkThresholdComponent.h + # QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.h + #QmitkFunctionalityComponents/QmitkPixelGreyValueManipulatorComponent.h + # QmitkFunctionalityComponents/QmitkConnectivityFilterComponent.h + # QmitkFunctionalityComponents/QmitkImageCropperComponent.h + # QmitkFunctionalityComponents/QmitkSeedPointSetComponent.h + # QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.h + qclickablelabel.h QmitkCallbackFromGUIThread.h + #QmitkAlgorithmFunctionalityComponent.h + #QmitkBaseAlgorithmComponent.h + QmitkBaseComponent.h + QmitkBaseFunctionalityComponent.h + QmitkFunctionalityComponentContainer.h QmitkStandardViews.h QmitkStepperAdapter.h QmitkSliderNavigatorWidget.h QmitkSliceWidget.h QmitkSlicesInterpolator.h QmitkColorTransferFunctionCanvas.h QmitkPiecewiseFunctionCanvas.h QmitkTransferFunctionCanvas.h QmitkTransferFunctionWidget.h QmitkToolGUIArea.h QmitkToolGUI.h QmitkToolReferenceDataSelectionBox.h QmitkToolSelectionBox.h # QmitkPropertyListPopup.h QmitkToolWorkingDataSelectionBox.h #QmitkSelectableGLWidget.h QmitkNewSegmentationDialog.h QmitkPaintbrushToolGUI.h QmitkCopyToClipBoardDialog.h QmitkPrimitiveMovieNavigatorWidget.h QmitkPointListModel.h QmitkPointListView.h QmitkPointListWidget.h QmitkHistogramWidget.h QmitkVideoBackground.h ) SET(UI_FILES QmitkSliderNavigator.ui # QmitkLevelWindowRangeChange.ui # QmitkLevelWindowPresetDefinition.ui # QmitkLevelWindowWidget.ui QmitkSliceWidget.ui QmitkTransferFunctionWidget.ui QmitkSelectableGLWidget.ui QmitkPrimitiveMovieNavigatorWidget.ui + QmitkFunctionalityComponentContainerControls.ui + QmitkFunctionalityComponents/QmitkThresholdComponentControls.ui )