diff --git a/Modules/PhotoacousticsLib/files.cmake b/Modules/PhotoacousticsLib/files.cmake index 8b14417421..765b361f87 100644 --- a/Modules/PhotoacousticsLib/files.cmake +++ b/Modules/PhotoacousticsLib/files.cmake @@ -1,52 +1,54 @@ SET(H_FILES include/mitkPAPropertyCalculator.h include/mitkPAVector.h include/mitkPATissueGeneratorParameters.h include/mitkPAInSilicoTissueVolume.h include/mitkPATissueGenerator.h include/mitkPAVesselTree.h include/mitkPAVessel.h include/mitkPAVesselMeanderStrategy.h include/mitkPANoiseGenerator.h include/mitkPAVolume.h include/mitkPAComposedVolume.h include/mitkPASlicedVolumeGenerator.h include/mitkPAProbe.h include/mitkPALightSource.h include/mitkPAIOUtil.h include/mitkPAMonteCarloThreadHandler.h include/mitkPASimulationBatchGenerator.h include/mitkPAFluenceYOffsetPair.h include/mitkPAVolumeManipulator.h include/mitkPAVesselProperties.h include/mitkPASimulationBatchGeneratorParameters.h include/mitkPAExceptions.h + include/mitkPASpectralUnmixingFilter.h ) set(CPP_FILES Domain/Vessel/mitkPAVesselTree.cpp Domain/Vessel/mitkPAVessel.cpp Domain/Vessel/mitkPAVesselMeanderStrategy.cpp Domain/Vessel/mitkPAVesselProperties.cpp Domain/Volume/mitkPAInSilicoTissueVolume.cpp Domain/Volume/mitkPAVolume.cpp Domain/Volume/mitkPAComposedVolume.cpp Domain/Volume/mitkPAFluenceYOffsetPair.cpp Generator/mitkPATissueGenerator.cpp Generator/mitkPANoiseGenerator.cpp Generator/mitkPASlicedVolumeGenerator.cpp Generator/mitkPASimulationBatchGenerator.cpp Generator/mitkPASimulationBatchGeneratorParameters.cpp IO/mitkPAIOUtil.cpp Utils/mitkPAPropertyCalculator.cpp Utils/mitkPAVector.cpp Utils/mitkPATissueGeneratorParameters.cpp Utils/mitkPAVolumeManipulator.cpp Utils/ProbeDesign/mitkPAProbe.cpp Utils/ProbeDesign/mitkPALightSource.cpp Utils/Thread/mitkPAMonteCarloThreadHandler.cpp + SUFilter/mitkPASpectralUnmixingFilter.cpp ) set(RESOURCE_FILES spectralLIB.dat ) diff --git a/Modules/PhotoacousticsLib/include/mitkPASpectralUnmixingFilter.h b/Modules/PhotoacousticsLib/include/mitkPASpectralUnmixingFilter.h new file mode 100644 index 0000000000..74f87d3499 --- /dev/null +++ b/Modules/PhotoacousticsLib/include/mitkPASpectralUnmixingFilter.h @@ -0,0 +1,56 @@ +/*=================================================================== + +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 MITKPHOTOACOUSTICSPECTRALUNMIXINGFILTER_H +#define MITKPHOTOACOUSTICSPECTRALUNMIXINGFILTER_H + +#include "mitkImageToImageFilter.h" + +//Includes for smart pointer usage +#include "mitkCommon.h" +#include "itkLightObject.h" + +#include + +namespace mitk { + namespace pa { + class MITKPHOTOACOUSTICSLIB_EXPORT SpectralUnmixingFilter : public mitk::ImageToImageFilter + { + public: + + mitkClassMacro(SpectralUnmixingFilter, mitk::ImageToImageFilter) + itkFactorylessNewMacro(Self) + + //Contains all (so far) possible chromophores + enum ChromophoreType + { + OXYGENATED, DEOXYGENATED + }; + + void AddWavelength(int wavelength); + + + protected: + SpectralUnmixingFilter(); + virtual ~SpectralUnmixingFilter(); + + private: + std::vector m_Wavelengths; + + }; + } +} +#endif // MITKPHOTOACOUSTICSPECTRALUNMIXINGFILTER_H diff --git a/Modules/PhotoacousticsLib/src/SUFilter/mitkPASpectralUnmixingFilter.cpp b/Modules/PhotoacousticsLib/src/SUFilter/mitkPASpectralUnmixingFilter.cpp new file mode 100644 index 0000000000..20bd001a7e --- /dev/null +++ b/Modules/PhotoacousticsLib/src/SUFilter/mitkPASpectralUnmixingFilter.cpp @@ -0,0 +1,69 @@ +/*=================================================================== + +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 "mitkPASpectralUnmixingFilter.h" + +#include +#include + +mitk::pa::SpectralUnmixingFilter::SpectralUnmixingFilter() +{ + +} + +mitk::pa::SpectralUnmixingFilter::~SpectralUnmixingFilter() +{ + +} + +void mitk::pa::SpectralUnmixingFilter::AddWavelength(int wavelength) +{ + MITK_INFO << "ADD WAVELENGTH..."; + m_Wavelengths.push_back(wavelength); +} + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// VERWORFENES ZEUG: +/* + +void mitk::pa::SpectralUnmixingFilter::GetInputPictures() +{ + MITK_INFO << "GET INPUT PICTURES..."; + unsigned int numberOfInputs = GetNumberOfIndexedInputs(); + unsigned int numberOfOutputs = GetNumberOfIndexedOutputs(); + + MITK_INFO << "Inputs: " << numberOfInputs << " Outputs: " << numberOfOutputs; + + if (m_Wavelengths.empty() || m_Wavelengths.size() != numberOfInputs || numberOfInputs < m_Chromophores.size()) + { + std::string invalidWavelengthError = "Not enough wavelengths given for calculation."; + MITK_ERROR << invalidWavelengthError; + mitkThrow() << invalidWavelengthError; + } + MITK_INFO << "LOADING...[DONE]"; +} + +void mitk::pa::SpectralUnmixingFilter::AddChromophore(int chromophore) +{ + MITK_INFO << "ADD CHROMOPHORE..."; + m_Chromophores.push_back(chromophore); +} +Probably easier to implement in the Plugin like: if (slot x then do algorithm x) +void mitk::pa::SpectralUnmixingFilter::ChooseAlgorithm(int algorithm) +{ + MITK_INFO << "CHOOSE ALGORITHM..."; + m_Chromophores.push_back(algorithm); +}*/ diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 03f3de6e54..abaf758087 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,102 +1,103 @@ # Plug-ins must be ordered according to their dependencies set(MITK_PLUGINS org.blueberry.core.runtime:ON org.blueberry.core.expressions:OFF org.blueberry.core.commands:OFF org.blueberry.core.jobs:OFF org.blueberry.ui.qt:OFF org.blueberry.ui.qt.help:ON org.blueberry.ui.qt.log:ON org.blueberry.ui.qt.objectinspector:OFF #org.blueberry.test:ON #org.blueberry.uitest:ON #Testing/org.blueberry.core.runtime.tests:ON #Testing/org.blueberry.osgi.tests:ON org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight:OFF org.mitk.gui.qt.properties:ON org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.dicominspector:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.diffusionimaging.connectomics:OFF org.mitk.gui.qt.diffusionimaging.denoising:OFF org.mitk.gui.qt.diffusionimaging.fiberfox:OFF org.mitk.gui.qt.diffusionimaging.fiberprocessing:OFF org.mitk.gui.qt.diffusionimaging.ivim:OFF org.mitk.gui.qt.diffusionimaging.odfpeaks:OFF org.mitk.gui.qt.diffusionimaging.partialvolume:OFF org.mitk.gui.qt.diffusionimaging.preprocessing:OFF org.mitk.gui.qt.diffusionimaging.reconstruction:OFF org.mitk.gui.qt.diffusionimaging.registration:OFF org.mitk.gui.qt.diffusionimaging.tbss:OFF org.mitk.gui.qt.diffusionimaging.tractography:OFF org.mitk.gui.qt.diffusionimaging.python:OFF org.mitk.gui.qt.dosevisualization:OFF org.mitk.gui.qt.geometrytools:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.lasercontrol:OFF org.mitk.gui.qt.openigtlink:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.viewnavigator:OFF org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF org.mitk.gui.qt.pointsetinteractionmultispectrum:OFF org.mitk.gui.qt.python:OFF org.mitk.gui.qt.remeshing:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.aicpregistration:OFF org.mitk.gui.qt.renderwindowmanager:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.tubegraph:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.photoacoustics.pausviewer:OFF org.mitk.gui.qt.photoacoustics.imageprocessing:OFF org.mitk.gui.qt.photoacoustics.simulation:OFF + org.mitk.gui.qt.photoacoustics.spectralunmixing:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF org.mitk.gui.qt.eventrecorder:OFF org.mitk.gui.qt.xnat:OFF org.mitk.gui.qt.igt.app.echotrack:OFF org.mitk.gui.qt.spectrocamrecorder:OFF org.mitk.gui.qt.classificationsegmentation:OFF org.mitk.gui.qt.overlaymanager:OFF org.mitk.gui.qt.igt.app.hummelprotocolmeasurements:OFF org.mitk.gui.qt.multilabelsegmentation:OFF org.mitk.matchpoint.core.helper:OFF org.mitk.gui.qt.matchpoint.algorithm.browser:OFF org.mitk.gui.qt.matchpoint.algorithm.control:OFF org.mitk.gui.qt.matchpoint.algorithm.batch:OFF org.mitk.gui.qt.matchpoint.mapper:OFF org.mitk.gui.qt.matchpoint.framereg:OFF org.mitk.gui.qt.matchpoint.visualizer:OFF org.mitk.gui.qt.matchpoint.evaluator:OFF org.mitk.gui.qt.matchpoint.manipulator:OFF org.mitk.gui.qt.preprocessing.resampling:OFF org.mitk.gui.qt.cest:OFF ) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/CMakeLists.txt b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/CMakeLists.txt new file mode 100644 index 0000000000..ac2049cb04 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/CMakeLists.txt @@ -0,0 +1,7 @@ +project(org_mitk_gui_qt_photoacoustics_spectralunmixing) + +mitk_create_plugin( + EXPORT_DIRECTIVE SPECTRALUNMIXING_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDS MitkQtWidgetsExt MitkPhotoacousticsLib +) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/Manual.dox new file mode 100644 index 0000000000..6a4d6266a3 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/Manual.dox @@ -0,0 +1,17 @@ +/** +\page org_mitk_gui_qt_photoacoustics_spectralunmixing The Spectralunmixing + +\imageMacro{icon.png,"Icon of Spectralunmixing",2.00} + +\tableofcontents + +\section org_mitk_gui_qt_photoacoustics_spectralunmixingOverview Overview +Describe the features of your awesome plugin here +
    +
  • Increases productivity +
  • Creates beautiful images +
  • Generates PhD thesis +
  • Brings world peace +
+ +*/ diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/icon.xpm new file mode 100644 index 0000000000..9057c20bc6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/UserManual/icon.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * icon_xpm[] = { +"16 16 2 1", +" c #FF0000", +". c #000000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/doxygen/modules.dox new file mode 100644 index 0000000000..de1394cc0e --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/documentation/doxygen/modules.dox @@ -0,0 +1,16 @@ +/** + \defgroup org_mitk_gui_qt_photoacoustics_spectralunmixing org.mitk.gui.qt.photoacoustics.spectralunmixing + \ingroup MITKPlugins + + \brief Describe your plugin here. + +*/ + +/** + \defgroup org_mitk_gui_qt_photoacoustics_spectralunmixing_internal Internal + \ingroup org_mitk_gui_qt_photoacoustics_spectralunmixing + + \brief This subcategory includes the internal classes of the org.mitk.gui.qt.photoacoustics.spectralunmixing plugin. Other + plugins must not rely on these classes. They contain implementation details and their interface + may change at any time. We mean it. +*/ diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/files.cmake b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/files.cmake new file mode 100644 index 0000000000..e780fe6bfe --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/files.cmake @@ -0,0 +1,42 @@ +set(SRC_CPP_FILES + +) + +set(INTERNAL_CPP_FILES + org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.cpp + SpectralUnmixing.cpp +) + +set(UI_FILES + src/internal/SpectralUnmixingControls.ui +) + +set(MOC_H_FILES + src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.h + src/internal/SpectralUnmixing.h +) + +# list of resource files which can be used by the plug-in +# system without loading the plug-ins shared library, +# for example the icon used in the menu and tabs for the +# plug-in views in the workbench +set(CACHED_RESOURCE_FILES + resources/icon.xpm + plugin.xml +) + +# list of Qt .qrc files which contain additional resources +# specific to this plugin +set(QRC_FILES + +) + +set(CPP_FILES ) + +foreach(file ${SRC_CPP_FILES}) + set(CPP_FILES ${CPP_FILES} src/${file}) +endforeach(file ${SRC_CPP_FILES}) + +foreach(file ${INTERNAL_CPP_FILES}) + set(CPP_FILES ${CPP_FILES} src/internal/${file}) +endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/manifest_headers.cmake new file mode 100644 index 0000000000..a537cfdfe3 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "Spectralunmixing") +set(Plugin-Version "0.1") +set(Plugin-Vendor "DKFZ") +set(Plugin-ContactAddress "") +set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/plugin.xml b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/plugin.xml new file mode 100644 index 0000000000..063fe5556e --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/resources/icon.xpm b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/resources/icon.xpm new file mode 100644 index 0000000000..9057c20bc6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/resources/icon.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * icon_xpm[] = { +"16 16 2 1", +" c #FF0000", +". c #000000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.cpp b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.cpp new file mode 100644 index 0000000000..672d6b88bb --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.cpp @@ -0,0 +1,123 @@ +/*=================================================================== + +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. + +===================================================================*/ + + +// Blueberry +#include +#include + +// Qmitk +#include "SpectralUnmixing.h" + +// Qt +#include + +// mitk image +#include + +// Perform Spectral Unmixing + +#include "mitkPASpectralUnmixingFilter.h" + +const std::string SpectralUnmixing::VIEW_ID = "org.mitk.views.spectralunmixing"; + +void SpectralUnmixing::SetFocus() +{ + m_Controls.buttonPerformImageProcessing->setFocus(); +} + +void SpectralUnmixing::CreateQtPartControl(QWidget *parent) +{ + // create GUI widgets from the Qt Designer's .ui file + m_Controls.setupUi(parent); + connect(m_Controls.buttonPerformImageProcessing, &QPushButton::clicked, this, &SpectralUnmixing::DoImageProcessing); +} + +void SpectralUnmixing::OnSelectionChanged(berry::IWorkbenchPart::Pointer /*source*/, + const QList &nodes) +{ + // iterate all selected objects, adjust warning visibility + foreach (mitk::DataNode::Pointer node, nodes) + { + if (node.IsNotNull() && dynamic_cast(node->GetData())) + { + m_Controls.labelWarning->setVisible(false); + m_Controls.buttonPerformImageProcessing->setEnabled(true); + return; + } + } + + m_Controls.labelWarning->setVisible(true); + m_Controls.buttonPerformImageProcessing->setEnabled(false); +} + +void SpectralUnmixing::DoImageProcessing() +{ + QList nodes = this->GetDataManagerSelection(); + if (nodes.empty()) + return; + + mitk::DataNode *node = nodes.front(); + + if (!node) + { + // Nothing selected. Inform the user and return + QMessageBox::information(nullptr, "Template", "Please load and select an image before starting image processing."); + return; + } + + // here we have a valid mitk::DataNode + + // a node itself is not very useful, we need its data item (the image) + mitk::BaseData *data = node->GetData(); + if (data) + { + // test if this data item is an image or not (could also be a surface or something totally different) + mitk::Image *image = dynamic_cast(data); + if (image) + { + std::stringstream message; + std::string name; + message << "Performing image processing for image "; + if (node->GetName(name)) + { + // a property called "name" was found for this DataNode + message << "'" << name << "'"; + } + message << "."; + MITK_INFO << message.str(); + + // actually do something here... + + // Add Wavelength + + auto m_SpectralUnmixingFilter = mitk::pa::SpectralUnmixingFilter::New(); + unsigned int wavelength1 = m_Controls.spinBoxWavelength1->value(); + unsigned int wavelength2 = m_Controls.spinBoxWavelength2->value(); + + unsigned int dimension = 3; + mitk::PixelType TPixel = mitk::MakeScalarPixelType(); + + MITK_INFO << wavelength1; + m_SpectralUnmixingFilter->AddWavelength(wavelength1); + MITK_INFO << wavelength2; + m_SpectralUnmixingFilter->AddWavelength(wavelength2); + //MITK_INFO << m_SpectralUnmixingFilter; + + + } + } +} diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.h b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.h new file mode 100644 index 0000000000..b1dd4095d2 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixing.h @@ -0,0 +1,65 @@ +/*=================================================================== + +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 SpectralUnmixing_h +#define SpectralUnmixing_h + +#include + +#include + +#include "ui_SpectralUnmixingControls.h" + +// Perform Spectral Unmixing +//include "mitkPASpectralUnmixingFilter.h" +//--> include does not work +//solution fprr cpp file 'Just right-click on the project -> Configuration Properties -> C/C++ -> General -> Additional Include Directories.' +//https://stackoverflow.com/questions/12561048/visual-studio-cannot-include-header-file + +/** + \brief SpectralUnmixing + + \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation. + + \sa QmitkAbstractView + \ingroup ${plugin_target}_internal +*/ +class SpectralUnmixing : public QmitkAbstractView +{ + // this is needed for all Qt objects that should have a Qt meta-object + // (everything that derives from QObject and wants to have signal/slots) + Q_OBJECT + +public: + static const std::string VIEW_ID; + +protected: + virtual void CreateQtPartControl(QWidget *parent) override; + + virtual void SetFocus() override; + + /// \brief called by QmitkFunctionality when DataManager's selection has changed + virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer source, + const QList &nodes) override; + + /// \brief Called when the user clicks the GUI button + void DoImageProcessing(); + + Ui::SpectralUnmixingControls m_Controls; +}; + +#endif // SpectralUnmixing_h diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixingControls.ui b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixingControls.ui new file mode 100644 index 0000000000..a205e5e112 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/SpectralUnmixingControls.ui @@ -0,0 +1,113 @@ + + + SpectralUnmixingControls + + + + 0 + 0 + 222 + 161 + + + + + 0 + 0 + + + + QmitkTemplate + + + + + + + + Do image processing + + + Do Something + + + + + + + + + Wavelength 1 + + + + + + + 500 + + + 1500 + + + 666 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + QLabel { color: rgb(255, 0, 0) } + + + Please select an image! + + + + + + + + + Wavelength 2 + + + + + + + 500 + + + 1500 + + + 666 + + + + + + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.cpp b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.cpp new file mode 100644 index 0000000000..000fc8d83d --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.cpp @@ -0,0 +1,29 @@ +/*=================================================================== + +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 "org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.h" +#include "SpectralUnmixing.h" + +namespace mitk +{ + void org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator::start(ctkPluginContext *context) + { + BERRY_REGISTER_EXTENSION_CLASS(SpectralUnmixing, context) + } + + void org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator::stop(ctkPluginContext *context) { Q_UNUSED(context) } +} diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.h b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.h new file mode 100644 index 0000000000..08d0614225 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.spectralunmixing/src/internal/org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator.h @@ -0,0 +1,38 @@ +/*=================================================================== + +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 org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator_h +#define org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator_h + +#include + +namespace mitk +{ + class org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator : public QObject, public ctkPluginActivator + { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_photoacoustics_spectralunmixing") + Q_INTERFACES(ctkPluginActivator) + + public: + void start(ctkPluginContext *context); + void stop(ctkPluginContext *context); + + }; // org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator +} + +#endif // org_mitk_gui_qt_photoacoustics_spectralunmixing_Activator_h