diff --git a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.cpp b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.cpp index 1e6507b408..3de6ca7bca 100644 --- a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.cpp +++ b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.cpp @@ -1,411 +1,398 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkImageStatisticsReloadedView.h" #include <utility> // berry includes #include <berryWorkbenchPlugin.h> #include <berryIQtStyleManager.h> #include <QmitkChartWidget.h> -#include <QmitkRenderWindow.h> #include <mitkNodePredicateOr.h> #include <mitkStatusBar.h> #include <mitkIntensityProfile.h> #include <mitkImageStatisticsPredicateHelper.h> #include <mitkImageStatisticsContainerNodeHelper.h> #include <mitkNodePredicateAnd.h> #include <mitkSliceNavigationController.h> #include <mitkStatisticsToImageRelationRule.h> #include <mitkStatisticsToMaskRelationRule.h> #include <mitkPlanarFigureInteractor.h> const std::string QmitkImageStatisticsReloadedView::VIEW_ID = "org.mitk.views.imagestatisticsReloaded"; QmitkImageStatisticsReloadedView::QmitkImageStatisticsReloadedView(QObject* /*parent*/, const char* /*name*/) { this->m_CalculationThread = new QmitkImageStatisticsCalculationJob(); } QmitkImageStatisticsReloadedView::~QmitkImageStatisticsReloadedView() { if (m_selectedPlanarFigure) m_selectedPlanarFigure->RemoveObserver(m_PlanarFigureObserverTag); } void QmitkImageStatisticsReloadedView::CreateQtPartControl(QWidget *parent) { m_Controls.setupUi(parent); m_Controls.widget_histogram->SetTheme(this->GetColorTheme()); m_Controls.widget_intensityProfile->SetTheme(this->GetColorTheme()); m_Controls.groupBox_histogram->setVisible(true); m_Controls.groupBox_intensityProfile->setVisible(false); m_Controls.label_currentlyComputingStatistics->setVisible(false); + m_Controls.sliderWidget_histogram->setPrefix("Time: "); + m_Controls.sliderWidget_histogram->setDecimals(0); + m_Controls.sliderWidget_histogram->setVisible(false); m_statisticsManager = mitk::ImageStatisticsContainerManager::New(); m_statisticsManager->SetDataStorage(this->GetDataStorage().GetPointer()); PrepareDataStorageComboBoxes(); CreateConnections(); } void QmitkImageStatisticsReloadedView::CreateConnections() { connect(this->m_CalculationThread, &QmitkImageStatisticsCalculationJob::finished, this, &QmitkImageStatisticsReloadedView::OnStatisticsCalculationEnds, Qt::QueuedConnection); connect(this->m_Controls.checkBox_ignoreZero, &QCheckBox::stateChanged, this, &QmitkImageStatisticsReloadedView::OnCheckBoxIgnoreZeroStateChanged); + connect(this->m_Controls.sliderWidget_histogram, &ctkSliderWidget::valueChanged, this, &QmitkImageStatisticsReloadedView::OnSliderWidgetHistogramChanged); } void QmitkImageStatisticsReloadedView::OnCheckBoxIgnoreZeroStateChanged(int state) { m_ForceRecompute = true; if (state != Qt::Unchecked) { this->m_CalculationThread->SetIgnoreZeroValueVoxel(true); } else { this->m_CalculationThread->SetIgnoreZeroValueVoxel(false); } OnImageOrMaskSelectorChanged(); } +void QmitkImageStatisticsReloadedView::OnSliderWidgetHistogramChanged(double value) +{ + unsigned int timeStep = static_cast<unsigned int>(value); + HistogramType::ConstPointer histogram = this->m_CalculationThread->GetTimeStepHistogram(timeStep); + + if (histogram.IsNotNull() && this->m_CalculationThread->GetStatisticsUpdateSuccessFlag()) + { + this->FillHistogramWidget({ histogram }, { m_selectedImageNode->GetName() }); + } +} + void QmitkImageStatisticsReloadedView::PartClosed(const berry::IWorkbenchPartReference::Pointer& ) { } void QmitkImageStatisticsReloadedView::FillStatisticsWidget(const std::vector<mitk::StatisticsContainer::ConstPointer>& statistics) { m_Controls.widget_statistics->Reset(); m_Controls.widget_statistics->SetStatistics(statistics); m_Controls.widget_statistics->SetImageNodes({ m_selectedImageNode }); if (m_selectedMaskNode) { m_Controls.widget_statistics->SetMaskNodes({ m_selectedMaskNode }); } m_Controls.widget_statistics->setEnabled(true); } void QmitkImageStatisticsReloadedView::FillHistogramWidget(const std::vector<HistogramType::ConstPointer>& histogram, const std::vector<std::string>& dataLabels) { m_Controls.groupBox_histogram->setVisible(true); m_Controls.widget_histogram->SetTheme(this->GetColorTheme()); m_Controls.widget_histogram->Reset(); m_Controls.widget_histogram->SetHistogram(histogram.front(), dataLabels.front()); connect(m_Controls.widget_histogram, &QmitkHistogramVisualizationWidget::RequestHistogramUpdate, this, &QmitkImageStatisticsReloadedView::OnRequestHistogramUpdate); } QmitkChartWidget::ChartStyle QmitkImageStatisticsReloadedView::GetColorTheme() const { ctkPluginContext* context = berry::WorkbenchPlugin::GetDefault()->GetPluginContext(); ctkServiceReference styleManagerRef = context->getServiceReference<berry::IQtStyleManager>(); if (styleManagerRef) { auto styleManager = context->getService<berry::IQtStyleManager>(styleManagerRef); if (styleManager->GetStyle().name == "Dark") { return QmitkChartWidget::ChartStyle::darkstyle; } else { return QmitkChartWidget::ChartStyle::lightstyle; } } return QmitkChartWidget::ChartStyle::darkstyle; } void QmitkImageStatisticsReloadedView::OnImageOrMaskSelectorChanged() { if (this->m_selectedPlanarFigure) { this->m_selectedPlanarFigure->RemoveObserver(this->m_PlanarFigureObserverTag); this->m_selectedPlanarFigure = nullptr; } m_selectedImageNode = m_Controls.imageSelector->GetSelectedNode(); m_selectedMaskNode = m_Controls.maskImageSelector->GetSelectedNode(); m_Controls.groupBox_intensityProfile->setVisible(false); //m_statisticContainerRules.clear(); if (m_selectedImageNode != nullptr) { auto image = dynamic_cast<mitk::Image*>(m_selectedImageNode->GetData()); mitk::Image::Pointer mask = nullptr; mitk::PlanarFigure::Pointer maskPlanarFigure = nullptr; + + if (image->GetDimension() == 4){ + m_Controls.sliderWidget_histogram->setVisible(true); + unsigned int maxTimestep = image->GetTimeSteps(); + m_Controls.sliderWidget_histogram->setMaximum(maxTimestep); + } + else { + m_Controls.sliderWidget_histogram->setVisible(false); + } + if (m_selectedMaskNode != nullptr) { mask = dynamic_cast<mitk::Image*>(m_selectedMaskNode->GetData()); if (mask == nullptr) { maskPlanarFigure = dynamic_cast<mitk::PlanarFigure*>(m_selectedMaskNode->GetData()); } } if (mask) { auto imageStatistics = m_statisticsManager->GetImageStatistics(image, mask.GetPointer()); bool imageStatisticsOlderThanInputs = false; if (imageStatistics && (imageStatistics->GetMTime() < image->GetMTime() || imageStatistics->GetMTime() < mask->GetMTime())) { imageStatisticsOlderThanInputs = true; } //compute statistics with given mask if (!imageStatistics || imageStatisticsOlderThanInputs || m_ForceRecompute) { CalculateStatistics(image, mask.GetPointer()); } //statistics already computed else { this->FillStatisticsWidget({ imageStatistics }); this->FillHistogramWidget({ imageStatistics->GetHistogram().GetPointer() }, { m_selectedImageNode->GetName() }); } } else if (maskPlanarFigure) { m_selectedPlanarFigure = maskPlanarFigure; ITKCommandType::Pointer changeListener = ITKCommandType::New(); changeListener->SetCallbackFunction(this, &QmitkImageStatisticsReloadedView::OnImageOrMaskSelectorChanged); this->m_PlanarFigureObserverTag = m_selectedPlanarFigure->AddObserver(mitk::EndInteractionPlanarFigureEvent(), changeListener); if (!maskPlanarFigure->IsClosed()) { //compute line profile and display statistics for voxels on line auto intensityProfile = mitk::ComputeIntensityProfile(image, maskPlanarFigure); //Don't show histogram for intensity profiles m_Controls.groupBox_histogram->setVisible(false); m_Controls.groupBox_intensityProfile->setVisible(true); m_Controls.widget_intensityProfile->Reset(); m_Controls.widget_intensityProfile->SetIntensityProfile(intensityProfile.GetPointer(), "Intensity Profile of " + m_selectedImageNode->GetName()); } auto imageStatistics = m_statisticsManager->GetImageStatistics(image, maskPlanarFigure.GetPointer()); bool imageStatisticsOlderThanInputs = false; if (imageStatistics && (imageStatistics->GetMTime() < image->GetMTime() || imageStatistics->GetMTime() < maskPlanarFigure->GetMTime())) { imageStatisticsOlderThanInputs = true; } //for all planar figures: compute statistics with planarFigure as mask if (!imageStatistics || imageStatisticsOlderThanInputs || m_ForceRecompute) { CalculateStatistics(image, nullptr, maskPlanarFigure.GetPointer()); } //statistics already computed else { this->FillStatisticsWidget({ imageStatistics }); if (maskPlanarFigure->IsClosed()) { this->FillHistogramWidget({ imageStatistics->GetHistogram().GetPointer() }, { m_selectedImageNode->GetName() }); } } } else { auto imageStatistics = m_statisticsManager->GetImageStatistics(image); bool imageStatisticsOlderThanInputs = false; if (imageStatistics && (imageStatistics->GetMTime() < image->GetMTime())) { imageStatisticsOlderThanInputs = true; } //compute statistics with image only if (!imageStatistics || imageStatisticsOlderThanInputs || m_ForceRecompute) { CalculateStatistics(image); } //statistics already computed else { this->FillStatisticsWidget({ imageStatistics }); this->FillHistogramWidget({ imageStatistics->GetHistogram().GetPointer() }, { m_selectedImageNode->GetName() }); } } } else { ResetGUI(); } m_ForceRecompute = false; } void QmitkImageStatisticsReloadedView::ResetGUI() { m_Controls.widget_statistics->Reset(); m_Controls.widget_statistics->setEnabled(false); m_Controls.widget_histogram->Reset(); m_Controls.widget_histogram->setEnabled(false); } void QmitkImageStatisticsReloadedView::OnStatisticsCalculationEnds() { mitk::StatusBar::GetInstance()->Clear(); if (this->m_CalculationThread->GetStatisticsUpdateSuccessFlag()) { auto statistics = m_CalculationThread->GetStatisticsData(); for (auto& statistic : statistics) { mitk::PropertyRelations::RuleResultVectorType rulesForCurrentStatistic; auto statisticNonConst = statistic->Clone(); auto statisticsNodeName = m_selectedImageNode->GetName(); if (m_selectedMaskNode) { statisticsNodeName += "_" + m_selectedMaskNode->GetName(); } statisticsNodeName += "_statistics"; auto statisticsNode = mitk::CreateImageStatisticsNode(statisticNonConst, statisticsNodeName); auto imageRule = mitk::StatisticsToImageRelationRule::New(); imageRule->Connect(statisticNonConst.GetPointer(), m_CalculationThread->GetStatisticsImage().GetPointer()); rulesForCurrentStatistic.push_back(imageRule.GetPointer()); if (m_CalculationThread->GetMaskImage()) { auto maskRule = mitk::StatisticsToMaskRelationRule::New(); maskRule->Connect(statisticNonConst.GetPointer(), m_CalculationThread->GetMaskImage().GetPointer()); rulesForCurrentStatistic.push_back(maskRule.GetPointer()); } else if (m_CalculationThread->GetPlanarFigure()) { auto planarFigureRule = mitk::StatisticsToMaskRelationRule::New(); planarFigureRule->Connect(statisticNonConst.GetPointer(), m_CalculationThread->GetPlanarFigure().GetPointer()); rulesForCurrentStatistic.push_back(planarFigureRule.GetPointer()); } m_statisticContainerRules.push_back(rulesForCurrentStatistic); this->GetDataStorage()->Add(statisticsNode); m_statisticsManager->SetRules(m_statisticContainerRules); } this->FillStatisticsWidget(statistics); if (!m_selectedPlanarFigure || m_selectedPlanarFigure->IsClosed()) { this->FillHistogramWidget({ m_CalculationThread->GetTimeStepHistogram() }, { m_selectedImageNode->GetName() }); } } else { mitk::StatusBar::GetInstance()->DisplayErrorText(m_CalculationThread->GetLastErrorMessage().c_str()); m_Controls.widget_histogram->setEnabled(false); m_Controls.widget_statistics->setEnabled(false); } m_Controls.label_currentlyComputingStatistics->setVisible(false); } void QmitkImageStatisticsReloadedView::OnRequestHistogramUpdate(unsigned int nBins) { m_CalculationThread->SetHistogramNBins(nBins); m_CalculationThread->start(); } void QmitkImageStatisticsReloadedView::CalculateStatistics(mitk::Image::ConstPointer image, mitk::Image::ConstPointer mask, mitk::PlanarFigure::ConstPointer maskPlanarFigure) { this->m_StatisticsUpdatePending = true; auto renderPart = this->GetRenderWindowPart(); unsigned int timeStep = renderPart->GetTimeNavigationController()->GetTime()->GetPos(); this->m_CalculationThread->Initialize(image, mask, maskPlanarFigure); this->m_CalculationThread->SetTimeStep(timeStep); try { // Compute statistics this->m_CalculationThread->start(); m_Controls.label_currentlyComputingStatistics->setVisible(true); } catch (const mitk::Exception& e) { mitk::StatusBar::GetInstance()->DisplayErrorText(e.GetDescription()); this->m_StatisticsUpdatePending = false; m_Controls.label_currentlyComputingStatistics->setVisible(false); } catch (const std::runtime_error &e) { mitk::StatusBar::GetInstance()->DisplayErrorText(e.what()); this->m_StatisticsUpdatePending = false; m_Controls.label_currentlyComputingStatistics->setVisible(false); } catch (const std::exception &e) { mitk::StatusBar::GetInstance()->DisplayErrorText(e.what()); this->m_StatisticsUpdatePending = false; m_Controls.label_currentlyComputingStatistics->setVisible(false); } } void QmitkImageStatisticsReloadedView::OnSelectionChanged( berry::IWorkbenchPart::Pointer part, const QList<mitk::DataNode::Pointer> &nodes ) { Q_UNUSED(part); Q_UNUSED(nodes); } -void QmitkImageStatisticsReloadedView::OnTimeChanged(const itk::EventObject& event) -{ - const mitk::SliceNavigationController::GeometryTimeEvent* timeEvent = dynamic_cast<const mitk::SliceNavigationController::GeometryTimeEvent*>(&event); - if (this->m_selectedImageNode == nullptr || timeEvent == nullptr) - return; - - int timeStep = timeEvent->GetPos(); - HistogramType::ConstPointer histogram = this->m_CalculationThread->GetTimeStepHistogram(timeStep); - - if (histogram.IsNotNull() && this->m_CalculationThread->GetStatisticsUpdateSuccessFlag()) - { - this->FillHistogramWidget({ histogram }, { m_selectedImageNode->GetName() }); - } -} - void QmitkImageStatisticsReloadedView::PrepareDataStorageComboBoxes() { auto isPlanarFigurePredicate = mitk::GetImageStatisticsPlanarFigurePredicate(); auto isMaskPredicate = mitk::GetImageStatisticsMaskPredicate(); auto isImagePredicate = mitk::GetImageStatisticsImagePredicate(); auto isMaskOrPlanarFigurePredicate = mitk::NodePredicateOr::New(isPlanarFigurePredicate, isMaskPredicate); m_Controls.imageSelector->SetDataStorage(GetDataStorage()); m_Controls.imageSelector->SetPredicate(isImagePredicate); m_Controls.maskImageSelector->SetDataStorage(GetDataStorage()); m_Controls.maskImageSelector->SetPredicate(isMaskOrPlanarFigurePredicate); m_Controls.maskImageSelector->SetZeroEntryText("<none>"); } void QmitkImageStatisticsReloadedView::Activated() { } void QmitkImageStatisticsReloadedView::Deactivated() { } void QmitkImageStatisticsReloadedView::Visible() { connect(m_Controls.imageSelector, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &QmitkImageStatisticsReloadedView::OnImageOrMaskSelectorChanged); connect(m_Controls.maskImageSelector, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &QmitkImageStatisticsReloadedView::OnImageOrMaskSelectorChanged); - - mitk::IRenderWindowPart* renderWindow = GetRenderWindowPart(); - if (renderWindow) { - itk::ReceptorMemberCommand<QmitkImageStatisticsReloadedView>::Pointer cmdTimeEvent = itk::ReceptorMemberCommand<QmitkImageStatisticsReloadedView>::New(); - cmdTimeEvent->SetCallbackFunction(this, &QmitkImageStatisticsReloadedView::OnTimeChanged); - // It is sufficient to add the observer to the axial render window since the GeometryTimeEvent - // is always triggered by all views. - m_TimeObserverTag = renderWindow->GetQmitkRenderWindow("axial")->GetSliceNavigationController()->AddObserver(mitk::SliceNavigationController::GeometryTimeEvent(nullptr, 0), cmdTimeEvent); - } m_selectedImageNode = m_Controls.imageSelector->GetSelectedNode(); if (m_selectedImageNode) { OnImageOrMaskSelectorChanged(); } else { ResetGUI(); } } void QmitkImageStatisticsReloadedView::Hidden() { m_Controls.imageSelector->disconnect(); m_Controls.maskImageSelector->disconnect(); - // The slice navigation controller observer is removed here instead of in the destructor. - // If it was called in the destructor, the application would freeze because the view's - // destructor gets called after the render windows have been destructed. - if (m_TimeObserverTag != 0) - { - mitk::IRenderWindowPart* renderWindow = GetRenderWindowPart(); - - if (renderWindow) - { - renderWindow->GetQmitkRenderWindow("axial")->GetSliceNavigationController()->RemoveObserver(m_TimeObserverTag); - } - m_TimeObserverTag = 0; - } } void QmitkImageStatisticsReloadedView::SetFocus() { } diff --git a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.h b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.h index 7ed8a7e6de..94d90d1d7c 100644 --- a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.h +++ b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedView.h @@ -1,112 +1,110 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkImageStatisticsReloadedView_H__INCLUDED #define QmitkImageStatisticsReloadedView_H__INCLUDED #include "ui_QmitkImageStatisticsReloadedViewControls.h" // Qmitk includes #include <QmitkAbstractView.h> #include <QmitkImageStatisticsCalculationJob.h> #include <mitkImageStatisticsContainerManager.h> #include <mitkImageStatisticsContainer.h> #include <mitkILifecycleAwarePart.h> #include <berryIPartListener.h> #include <mitkPropertyRelations.h> /*! \brief QmitkImageStatisticsView is a bundle that allows statistics calculation from images. Three modes are supported: 1. Statistics of one image, 2. Statistics of an image and a segmentation, 3. Statistics of an image and a Planar Figure. The statistics calculation is realized in a separate thread to keep the gui accessible during calculation. \ingroup Plugins/org.mitk.gui.qt.measurementtoolbox */ class QmitkImageStatisticsReloadedView : public QmitkAbstractView, public mitk::ILifecycleAwarePart, public berry::IPartListener { Q_OBJECT public: using HistogramType = mitk::StatisticsContainer::HistogramType; /*! \brief default constructor */ QmitkImageStatisticsReloadedView(QObject *parent = nullptr, const char *name = nullptr); /*! \brief default destructor */ virtual ~QmitkImageStatisticsReloadedView(); /*! \brief method for creating the widget containing the application controls, like sliders, buttons etc. */ virtual void CreateQtPartControl(QWidget *parent) override; /*! \brief method for creating the connections of main and control widget */ virtual void CreateConnections(); /*! \brief Is called from the selection mechanism once the data manager selection has changed*/ void OnSelectionChanged(berry::IWorkbenchPart::Pointer part, const QList<mitk::DataNode::Pointer> &selectedNodes) override; - /*! - \brief Is called from the image navigator once the time step has changed */ - void OnTimeChanged(const itk::EventObject&); + void PrepareDataStorageComboBoxes(); static const std::string VIEW_ID; void FillStatisticsWidget(const std::vector<mitk::StatisticsContainer::ConstPointer>& statistics); void FillHistogramWidget(const std::vector<HistogramType::ConstPointer>& histogram, const std::vector<std::string>& dataLabels); QmitkChartWidget::ChartStyle GetColorTheme() const; protected: virtual void Activated() override; virtual void Deactivated() override; virtual void Visible() override; virtual void Hidden() override; virtual void SetFocus() override; /** \brief Is called right before the view closes (before the destructor) */ virtual void PartClosed(const berry::IWorkbenchPartReference::Pointer&) override; /** \brief Required for berry::IPartListener */ virtual Events::Types GetPartEventTypes() const override { return Events::CLOSED; } void OnImageOrMaskSelectorChanged(); void ResetGUI(); void OnStatisticsCalculationEnds(); void OnRequestHistogramUpdate(unsigned int nBins); void OnCheckBoxIgnoreZeroStateChanged(int state); + void OnSliderWidgetHistogramChanged(double value); void CalculateStatistics(mitk::Image::ConstPointer image, mitk::Image::ConstPointer mask=nullptr, mitk::PlanarFigure::ConstPointer maskPlanarFigure = nullptr); // member variables Ui::QmitkImageStatisticsReloadedViewControls m_Controls; private: typedef itk::SimpleMemberCommand< QmitkImageStatisticsReloadedView > ITKCommandType; QmitkImageStatisticsCalculationJob * m_CalculationThread = nullptr; bool m_StatisticsUpdatePending=false; mitk::DataNode::ConstPointer m_selectedImageNode = nullptr, m_selectedMaskNode = nullptr; std::vector<mitk::PropertyRelations::RuleResultVectorType> m_statisticContainerRules; mitk::PlanarFigure::Pointer m_selectedPlanarFigure=nullptr; mitk::ImageStatisticsContainerManager::Pointer m_statisticsManager; long m_PlanarFigureObserverTag; - long m_TimeObserverTag; bool m_ForceRecompute = false; }; #endif // QmitkImageStatisticsView_H__INCLUDED diff --git a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedViewControls.ui b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedViewControls.ui index 9a8f74a71b..2c4970a684 100644 --- a/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedViewControls.ui +++ b/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsReloadedViewControls.ui @@ -1,427 +1,457 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>QmitkImageStatisticsReloadedViewControls</class> <widget class="QWidget" name="QmitkImageStatisticsReloadedViewControls"> <property name="enabled"> <bool>true</bool> </property> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>419</width> <height>1016</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout_4"> <item> <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0"> <property name="sizeConstraint"> <enum>QLayout::SetMinimumSize</enum> </property> <property name="spacing"> <number>4</number> </property> <item row="0" column="1"> <widget class="QmitkDataStorageComboBox" name="imageSelector"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="autoFillBackground"> <bool>false</bool> </property> </widget> </item> <item row="3" column="1"> <widget class="QLabel" name="label_currentlyComputingStatistics"> <property name="palette"> <palette> <active> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </active> <inactive> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </inactive> <disabled> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> </disabled> </palette> </property> <property name="text"> <string>Calculating statistics...</string> </property> </widget> </item> <item row="1" column="0"> <widget class="QLabel" name="label_maskImage"> <property name="sizePolicy"> <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="palette"> <palette> <active> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </active> <inactive> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </inactive> <disabled> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> </disabled> </palette> </property> <property name="text"> <string>Mask image:</string> </property> </widget> </item> <item row="0" column="0"> <widget class="QLabel" name="label_calibrationImage"> <property name="sizePolicy"> <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="palette"> <palette> <active> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </active> <inactive> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>0</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </inactive> <disabled> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> </disabled> </palette> </property> <property name="text"> <string>Image:</string> </property> </widget> </item> <item row="1" column="1"> <widget class="QmitkDataStorageComboBoxWithSelectNone" name="maskImageSelector"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="autoFillBackground"> <bool>false</bool> </property> </widget> </item> <item row="2" column="1"> <widget class="QCheckBox" name="checkBox_ignoreZero"> <property name="text"> <string>Ignore zero-valued voxels</string> </property> </widget> </item> </layout> </item> <item> <widget class="QGroupBox" name="groupBox_statistics"> <property name="minimumSize"> <size> <width>0</width> <height>200</height> </size> </property> <property name="title"> <string>Statistics</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QmitkImageStatisticsWidget" name="widget_statistics" native="true"> <property name="palette"> <palette> <active> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="ButtonText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </active> <inactive> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> <colorrole role="ButtonText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>0</green> <blue>0</blue> </color> </brush> </colorrole> </inactive> <disabled> <colorrole role="WindowText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> <colorrole role="Text"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> <colorrole role="ButtonText"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>120</red> <green>120</green> <blue>120</blue> </color> </brush> </colorrole> </disabled> </palette> </property> </widget> </item> </layout> </widget> </item> <item> <widget class="QGroupBox" name="groupBox_histogram"> <property name="minimumSize"> <size> <width>0</width> <height>200</height> </size> </property> <property name="title"> <string>Histogram</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> + <layout class="QVBoxLayout" name="verticalLayout_6"> <item> - <widget class="QmitkHistogramVisualizationWidget" name="widget_histogram" native="true"/> + <widget class="ctkSliderWidget" name="sliderWidget_histogram" native="true"/> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QmitkHistogramVisualizationWidget" name="widget_histogram" native="true"/> + </item> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> </item> </layout> </widget> </item> <item> <widget class="QGroupBox" name="groupBox_intensityProfile"> <property name="minimumSize"> <size> <width>0</width> <height>200</height> </size> </property> <property name="title"> <string>Intensity Profile</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <widget class="QmitkIntensityProfileVisualizationWidget" name="widget_intensityProfile" native="true"/> </item> </layout> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> </layout> </widget> <customwidgets> <customwidget> <class>QmitkDataStorageComboBox</class> <extends>QComboBox</extends> <header location="global">QmitkDataStorageComboBox.h</header> </customwidget> <customwidget> <class>QmitkHistogramVisualizationWidget</class> <extends>QWidget</extends> <header location="global">QmitkHistogramVisualizationWidget.h</header> <container>1</container> </customwidget> <customwidget> <class>QmitkImageStatisticsWidget</class> <extends>QWidget</extends> <header location="global">QmitkImageStatisticsWidget.h</header> <container>1</container> </customwidget> <customwidget> <class>QmitkDataStorageComboBoxWithSelectNone</class> <extends>QComboBox</extends> <header location="global">QmitkDataStorageComboBoxWithSelectNone.h</header> </customwidget> <customwidget> <class>QmitkIntensityProfileVisualizationWidget</class> <extends>QWidget</extends> <header location="global">QmitkIntensityProfileVisualizationWidget.h</header> <container>1</container> </customwidget> + <customwidget> + <class>ctkSliderWidget</class> + <extends>QWidget</extends> + <header location="global">ctkSliderWidget.h</header> + <container>1</container> + </customwidget> </customwidgets> <resources/> <connections/> </ui>