diff --git a/Modules/US/USHardwareEpiphan/CMakeLists.txt b/Modules/US/USHardwareEpiphan/CMakeLists.txt index 766e169fa5..e38c9d1719 100644 --- a/Modules/US/USHardwareEpiphan/CMakeLists.txt +++ b/Modules/US/USHardwareEpiphan/CMakeLists.txt @@ -1,19 +1,29 @@ -OPTION(MITK_USE_EPIPHAN_SDK "Enable support for Epiphan devices" OFF) +option(MITK_USE_EPIPHAN_SDK "Enable support for Epiphan devices" OFF) -IF(MITK_USE_EPIPHAN_SDK) +if(MITK_USE_EPIPHAN_SDK) -SET(MITK_EPIPHAN_INCLUDE_DIR "" CACHE PATH "Path to Epiphan SDK main include dir containing e.g. v2u_defs.h") -SET(MITK_EPIPHAN_FRMGRAB_INCLUDE_DIR "" CACHE PATH "Path to Epiphan SDK include dir of frmgrab component including frmgrab.h") -FIND_LIBRARY(MITK_EPIPHAN_FRMGRAB_LIBRARY frmgrab DOC "Epiphan frmgrab library (frmgrab.lib).") +set(MITK_EPIPHAN_SDK_PATH CACHE PATH "") + +if(MITK_EPIPHAN_SDK_PATH) + +set(MITK_EPIPHAN_INCLUDE_DIR ${MITK_EPIPHAN_SDK_PATH}/include) +set(MITK_EPIPHAN_FRMGRAB_INCLUDE_DIR ${MITK_EPIPHAN_SDK_PATH}/frmgrab/include) +set(MITK_EPIPHAN_FRMGRAB_LIBRARY ${MITK_EPIPHAN_SDK_PATH}/frmgrab/lib/win/x64/frmgrab.lib) MITK_CREATE_MODULE( SUBPROJECTS DEPENDS MitkUS INCLUDE_DIRS ${MITK_EPIPHAN_INCLUDE_DIR} ${MITK_EPIPHAN_FRMGRAB_INCLUDE_DIR} INTERNAL_INCLUDE_DIRS ${INCLUDE_DIRS_INTERNAL} ADDITIONAL_LIBS ${MITK_EPIPHAN_FRMGRAB_LIBRARY} AUTOLOAD_WITH MitkUS ) -ENDIF(MITK_USE_EPIPHAN_SDK) +else() + +message(FATAL_ERROR "Please set the Epiphan SDK root path (MITK_EPIPHAN_SDK_PATH).") + +endif() + +endif() diff --git a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/QmitkUltrasoundSupport.h b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/QmitkUltrasoundSupport.h index e1b319c182..6be8dc1b45 100644 --- a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/QmitkUltrasoundSupport.h +++ b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/QmitkUltrasoundSupport.h @@ -1,175 +1,174 @@ /*=================================================================== 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 QmitkUltrasoundSupport_h #define QmitkUltrasoundSupport_h #include #include #include #include #include "ui_QmitkUltrasoundSupportControls.h" #include "QmitkUSAbstractCustomWidget.h" #include "QmitkUSControlsBModeWidget.h" #include "QmitkUSControlsDopplerWidget.h" #include "QmitkUSControlsProbesWidget.h" #include #include "QmitkRenderWindow.h" #include #include #include #include #include /*! \brief UltrasoundSupport This plugin provides functionality to manage Ultrasound devices, create video devices and to view device images. \ingroup ${plugin_target}_internal */ class QmitkUltrasoundSupport : 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: virtual void SetFocus() override; static const std::string VIEW_ID; virtual void CreateQtPartControl(QWidget *parent) override; QmitkUltrasoundSupport(); virtual ~QmitkUltrasoundSupport(); public slots: /* * \brief This is called when the newDeviceWidget is closed */ void OnNewDeviceWidgetDone(); protected slots: void OnClickedAddNewDevice(); void OnChangedFramerateLimit(); void OnClickedEditDevice(); /* *\brief Called, when the selection in the list of the active devices changes. */ void OnChangedActiveDevice(); void OnClickedFreezeButton(); void OnDeviceServiceEvent(const ctkServiceEvent event); /* * \brief This is the main imaging loop that updates the image and is called regularily during the imaging process */ void UpdateImage(); void RenderImage2d(); void RenderImage3d(); void StartTimers(); void StopTimers(); protected: void CreateControlWidgets(); void RemoveControlWidgets(); Ui::UltrasoundSupportControls* m_Controls; QmitkUSAbstractCustomWidget* m_ControlCustomWidget; QmitkUSControlsBModeWidget* m_ControlBModeWidget; QmitkUSControlsDopplerWidget* m_ControlDopplerWidget; QmitkUSControlsProbesWidget* m_ControlProbesWidget; bool m_ImageAlreadySetToNode; unsigned int m_CurrentImageWidth; unsigned int m_CurrentImageHeight; /** Keeps track of the amount of output Nodes*/ unsigned int m_AmountOfOutputs; /** The device that is currently used to aquire images */ mitk::USDevice::Pointer m_Device; void SetTimerIntervals(int intervalPipeline, int interval2D, int interval3D); /** This timer triggers periodic updates to the pipeline */ QTimer* m_UpdateTimer; QTimer* m_RenderingTimer2d; QTimer* m_RenderingTimer3d; /** These clocks are used to compute the framerate in the methods DisplayImage(),RenderImage2d() and RenderImage3d(). */ QTime m_Clock; QTime m_Clock2d; QTime m_Clock3d; /** A counter to comute the framerate. */ int m_FrameCounterPipeline; int m_FrameCounter2d; int m_FrameCounter3d; int m_FPSPipeline, m_FPS2d, m_FPS3d; /** Stores the properties of some QWidgets (and the tool storage file name) to QSettings.*/ void StoreUISettings(); /** Loads the properties of some QWidgets (and the tool storage file name) from QSettings.*/ void LoadUISettings(); /** The nodes that we feed images into.*/ std::vector m_Node; /** Adds a new node to the m_Nodes vector*/ void InitNewNode(); /** Destroys the last node in the m_Nodes vector */ void DestroyLastNode(); - /** Checks the amount of slices in the image from the USDevice and creates as many Nod - es as there are slices */ + /** Checks the amount of slices in the image from the USDevice and creates as many Nodes as there are slices */ void UpdateAmountOfOutputs(); /** This function just checks how many nodes there are currently and sets the laser image to a jet transparent colormap. */ void UpdateLevelWindows(); bool m_ForceRequestUpdateAll; void SetColormap(mitk::DataNode::Pointer node, mitk::LookupTable::LookupTableType type); /** The seperated slices from m_Image */ std::vector m_curOutput; /** The old geometry of m_Image. It is needed to check if the geometry changed (e.g. because * the zoom factor was modified) and the image needs to be reinitialized. */ mitk::SlicedGeometry3D::Pointer m_OldGeometry; QList m_CustomWidgetServiceReference; double m_CurrentDynamicRange; }; #endif // UltrasoundSupport_h