diff --git a/CMakeExternals/ITK.cmake b/CMakeExternals/ITK.cmake index 4f1f56e819..4201820b9d 100644 --- a/CMakeExternals/ITK.cmake +++ b/CMakeExternals/ITK.cmake @@ -1,76 +1,78 @@ #----------------------------------------------------------------------------- # ITK #----------------------------------------------------------------------------- # Sanity checks if(DEFINED ITK_DIR AND NOT EXISTS ${ITK_DIR}) message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj ITK) set(proj_DEPENDENCIES GDCM) if(MITK_USE_OpenCV) list(APPEND proj_DEPENDENCIES OpenCV) endif() set(ITK_DEPENDS ${proj}) if(NOT DEFINED ITK_DIR) set(additional_cmake_args ) if(MINGW) set(additional_cmake_args -DCMAKE_USE_WIN32_THREADS:BOOL=ON -DCMAKE_USE_PTHREADS:BOOL=OFF) endif() list(APPEND additional_cmake_args -DUSE_WRAP_ITK:BOOL=OFF ) if(MITK_USE_OpenCV) list(APPEND additional_cmake_args -DModule_ITKVideoBridgeOpenCV:BOOL=ON -DOpenCV_DIR:PATH=${OpenCV_DIR} ) endif() # Keep the behaviour of ITK 4.3 which by default turned on ITK Review # see MITK bug #17338 list(APPEND additional_cmake_args -DModule_ITKReview:BOOL=ON + # for 4.7, the OpenJPEG is needed by review but the variable must be set + -DModule_ITKOpenJPEG:BOOL=ON ) set(vcl_constexpr_patch) if(GCC_VERSION VERSION_LESS 4.7 AND GCC_VERSION VERSION_GREATER 4) set(vcl_constexpr_patch COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.5.1-gcc-4.6.patch ) endif() ExternalProject_Add(${proj} LIST_SEPARATOR ${sep} - URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.5.1-3e550bf8.tar.gz - URL_MD5 80e433ffc0e81cdc19a03dd02a3c329b + URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.7.0-1d4dcc92.tar.gz + URL_MD5 d689ccb115d0a8278e9f2b93392c1df7 # work with external GDCM PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.5.1.patch ${vcl_constexpr_patch} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} ${additional_cmake_args} -DBUILD_EXAMPLES:BOOL=OFF -DITK_USE_SYSTEM_GDCM:BOOL=ON -DGDCM_DIR:PATH=${GDCM_DIR} DEPENDS ${proj_DEPENDENCIES} ) set(ITK_DIR ${ep_prefix}) mitkFunctionInstallExternalCMakeProject(${proj}) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() diff --git a/CMakeExternals/PatchITK-4.7.0.cmake b/CMakeExternals/PatchITK-4.7.0.cmake new file mode 100644 index 0000000000..f86ab854bc --- /dev/null +++ b/CMakeExternals/PatchITK-4.7.0.cmake @@ -0,0 +1,9 @@ +# Called by ITK.cmake (ExternalProject_Add) as a patch for ITK to work with external GDCM 2.2.1 + +set(path "Modules/ThirdParty/GDCM/src/CMakeLists.txt") +file(STRINGS ${path} contents NEWLINE_CONSUME) +# more robust search for replacement +string(REPLACE "gdcmMSFF" "gdcmMSFF gdcmDSED gdcmCommon" contents ${contents}) +set(CONTENTS ${contents}) +configure_file(${TEMPLATE_FILE} ${path} @ONLY) + diff --git a/Modules/Core/include/mitkCommon.h b/Modules/Core/include/mitkCommon.h index ae0cfb0f04..fbb9963eb1 100644 --- a/Modules/Core/include/mitkCommon.h +++ b/Modules/Core/include/mitkCommon.h @@ -1,167 +1,182 @@ /*=================================================================== 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 MITK_COMMON_H_DEFINED #define MITK_COMMON_H_DEFINED #ifdef _MSC_VER // This warns about truncation to 255 characters in debug/browse info #pragma warning (disable : 4786) #pragma warning (disable : 4068 ) /* disable unknown pragma warnings */ #endif //add only those headers here that are really necessary for all classes! #include "itkObject.h" #include "mitkConfig.h" #include "mitkLogMacros.h" #include "mitkExceptionMacro.h" #include "mitkGetClassHierarchy.h" #ifndef MITK_UNMANGLE_IPPIC #define mitkIpPicDescriptor mitkIpPicDescriptor #endif typedef unsigned int MapperSlotId; - +/** From ITK 4.7 version, the TypeMacro overrides (by using the explicit attribute) the GetNameOfClass + * hence the SuperClass must provide one. + * + * If not, use the mitkClassMacroNoParent version + */ #define mitkClassMacro(className,SuperClassName) \ typedef className Self; \ typedef SuperClassName Superclass; \ typedef itk::SmartPointer Pointer; \ typedef itk::SmartPointer ConstPointer; \ static const char* GetStaticNameOfClass() { return #className; } \ virtual std::vector GetClassHierarchy() const { return mitk::GetClassHierarchy(); } \ itkTypeMacro(className,SuperClassName) +/** At version 4.7 provides two type macros, the normal one expects the Superclass to provide the + * GetNameOfClass explicitely, the NoParent deos not expect anything. + */ +#define mitkClassMacroNoParent(className) \ + typedef className Self; \ + typedef itk::SmartPointer Pointer; \ + typedef itk::SmartPointer ConstPointer; \ + static const char* GetStaticNameOfClass() { return #className; } \ + virtual std::vector GetClassHierarchy() const { return mitk::GetClassHierarchy(); } \ + itkTypeMacroNoParent(className) + /** * Macro for Constructors with one parameter for classes derived from itk::Lightobject **/ #define mitkNewMacro1Param(classname,type) \ static Pointer New(type _arg) \ { \ Pointer smartPtr = new classname ( _arg ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** * Macro for Constructors with two parameters for classes derived from itk::Lightobject **/ #define mitkNewMacro2Param(classname,typea,typeb) \ static Pointer New(typea _arga, typeb _argb) \ { \ Pointer smartPtr = new classname ( _arga, _argb ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** * Macro for Constructors with three parameters for classes derived from itk::Lightobject **/ #define mitkNewMacro3Param(classname,typea,typeb,typec) \ static Pointer New(typea _arga, typeb _argb, typec _argc) \ { \ Pointer smartPtr = new classname ( _arga, _argb, _argc ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** * Macro for Constructors with four parameters for classes derived from itk::Lightobject **/ #define mitkNewMacro4Param(classname,typea,typeb,typec,typed) \ static Pointer New(typea _arga, typeb _argb, typec _argc, typed _argd) \ { \ Pointer smartPtr = new classname ( _arga, _argb, _argc, _argd ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** * Macro for Constructors with five parameters for classes derived from itk::Lightobject **/ #define mitkNewMacro5Param(classname,typea,typeb,typec,typed,typee) \ static Pointer New(typea _arga, typeb _argb, typec _argc, typed _argd, typee _arge) \ { \ Pointer smartPtr = new classname ( _arga, _argb, _argc, _argd, _arge ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** * Macro for Constructors with six parameters for classes derived from itk::Lightobject **/ #define mitkNewMacro6Param(classname,typea,typeb,typec,typed,typee, typef) \ static Pointer New(typea _arga, typeb _argb, typec _argc, typed _argd, typee _arge, typef _argf) \ { \ Pointer smartPtr = new classname ( _arga, _argb, _argc, _argd, _arge, _argf ); \ smartPtr->UnRegister(); \ return smartPtr; \ } \ /** Get a smart const pointer to an object. Creates the member * Get"name"() (e.g., GetPoints()). */ #define mitkGetObjectMacroConst(name,type) \ virtual type * Get##name () const \ { \ itkDebugMacro("returning " #name " address " << this->m_##name ); \ return this->m_##name.GetPointer(); \ } /** Creates a Clone() method for "Classname". Returns a smartPtr of a clone of the calling object*/ #define mitkCloneMacro(classname) \ virtual itk::LightObject::Pointer InternalClone() const \ { \ Pointer smartPtr = new classname(*this); \ smartPtr->UnRegister(); \ return smartPtr.GetPointer(); \ } /** cross-platform deprecation macro \todo maybe there is something in external toolkits (ITK, VTK,...) that we could reulse -- would be much preferable */ #ifdef MITK_NO_DEPRECATED_WARNINGS #define DEPRECATED(func) func #elif defined(__GNUC__) #define DEPRECATED(...) __VA_ARGS__ __attribute__((deprecated)) #elif defined(_MSC_VER) #define DEPRECATED(...) __declspec(deprecated) ##__VA_ARGS__ #else #pragma message("WARNING: You need to implement DEPRECATED for your compiler!") #define DEPRECATED(func) func #endif /** * Mark templates as exported to generate public RTTI symbols which are * needed for GCC and Clang to support e.g. dynamic_cast between DSOs. */ #if defined(__clang__) || defined(__GNUC__) #define MITK_EXPORT __attribute__ ((visibility ("default"))) #define MITK_IMPORT __attribute__ ((visibility ("default"))) #define MITK_LOCAL __attribute__ ((visibility ("hidden"))) #elif defined(WIN32) #define MITK_EXPORT __declspec(dllexport) #define MITK_IMPORT __declspec(dllimport) #define MITK_LOCAL #else #define MITK_EXPORT #define MITK_IMPORT #define MITK_LOCAL #endif #endif // MITK_COMMON_H_DEFINED diff --git a/Modules/Core/include/mitkFileReader.h b/Modules/Core/include/mitkFileReader.h index b41b6942cd..807e349415 100644 --- a/Modules/Core/include/mitkFileReader.h +++ b/Modules/Core/include/mitkFileReader.h @@ -1,107 +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 FILEREADER_H_HEADER_INCLUDED_C1E7E521 #define FILEREADER_H_HEADER_INCLUDED_C1E7E521 #include +#include namespace mitk { //##Documentation //## @brief Interface class of readers that read from files //## @ingroup DeprecatedIO //## @deprecatedSince{2014_10} Use mitk::IFileReader instead. class MITKCORE_EXPORT FileReader { public: + itkTypeMacroNoParent(FileReader) + //##Documentation //## @brief Get the specified the file to load. //## //## Either the FileName or FilePrefix plus FilePattern are used to read. virtual const char* GetFileName() const = 0; //##Documentation //## @brief Specify the file to load. //## //## Either the FileName or FilePrefix plus FilePattern are used to read. virtual void SetFileName(const char* aFileName) = 0; //##Documentation //## @brief Get the specified file prefix for the file(s) to load. //## //## You should specify either a FileName or FilePrefix. Use FilePrefix if //## the data is stored in multiple files. virtual const char* GetFilePrefix() const = 0; //##Documentation //## @brief Specify file prefix for the file(s) to load. //## //## You should specify either a FileName or FilePrefix. Use FilePrefix if //## the data is stored in multiple files. virtual void SetFilePrefix(const char* aFilePrefix) = 0; //##Documentation //## @brief Get the specified file pattern for the file(s) to load. The //## sprintf format used to build filename from FilePrefix and number. //## //## You should specify either a FileName or FilePrefix. Use FilePrefix if //## the data is stored in multiple files. virtual const char* GetFilePattern() const = 0; /** @brief Specified file pattern for the file(s) to load. The sprintf format used to build filename from FilePrefix and number. You should specify either a FileName or FilePrefix. Use FilePrefix if the data is stored in multiple files. */ virtual void SetFilePattern(const char* aFilePattern) = 0; /** @brief Specifies, whether the file reader also can read a file from a memory buffer */ virtual bool CanReadFromMemory( ); /** @brief Set/Get functions to advise the file reader to use a memory array for reading a file*/ virtual void SetReadFromMemory( bool read ); virtual bool GetReadFromMemory( ); /** @brief To be used along with a call of SetReadFromMemory(true). This sets the memory buffer and the size from which the reader will read.*/ virtual void SetMemoryBuffer(const char* dataArray, unsigned int size); protected: FileReader(); virtual ~FileReader(); bool m_CanReadFromMemory; bool m_ReadFromMemory; const char* m_MemoryBuffer; unsigned int m_MemorySize; public: protected: }; } // namespace mitk #endif /* FILEREADER_H_HEADER_INCLUDED_C1E7E521 */ diff --git a/Modules/Core/include/mitkModeOperation.h b/Modules/Core/include/mitkModeOperation.h index 32dde3014c..a76cfe76ca 100644 --- a/Modules/Core/include/mitkModeOperation.h +++ b/Modules/Core/include/mitkModeOperation.h @@ -1,51 +1,51 @@ /*=================================================================== 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 MODEOPERATION_H_HEADER_INCLUDED #define MODEOPERATION_H_HEADER_INCLUDED #include #include "mitkOperation.h" #include namespace mitk { // class Operation; //##Documentation //## @brief class that holds the information for a change of the modus of an interactor object //## //## @ingroup Undo class MITKCORE_EXPORT ModeOperation : public Operation { public: typedef Interactor::ModeType ModeType; - mitkClassMacro(ModeOperation, Operation); + mitkClassMacro(ModeOperation, Operation) //##Documentation //## Constructor ModeOperation(OperationType operationType, ModeType mode); virtual ~ModeOperation(); ModeType GetMode(); protected: ModeType m_Mode; }; }//namespace mitk #endif /* MODEOPERATION_H_HEADER_INCLUDED */ diff --git a/Modules/Core/include/mitkOperation.h b/Modules/Core/include/mitkOperation.h index afb63b6cad..afbddc4d3d 100644 --- a/Modules/Core/include/mitkOperation.h +++ b/Modules/Core/include/mitkOperation.h @@ -1,67 +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. ===================================================================*/ #ifndef OPERATION_H_HEADER_INCLUDED_C16E7D9E #define OPERATION_H_HEADER_INCLUDED_C16E7D9E #include #include namespace mitk { typedef int OperationType ; //##Documentation //## @brief Base class of all Operation-classes //## //## @ingroup Undo class MITKCORE_EXPORT Operation { public: + itkTypeMacroNoParent(Operation) + //##Documentation //## Constructor Operation(OperationType operationType); virtual ~Operation(); OperationType GetOperationType(); protected: OperationType m_OperationType; }; class MITKCORE_EXPORT OperationEndEvent : public itk::EndEvent { public: typedef OperationEndEvent Self; typedef itk::EndEvent Superclass; OperationEndEvent(Operation* operation = NULL) : m_Operation(operation) {} virtual ~OperationEndEvent() {} virtual const char * GetEventName() const { return "OperationEndEvent"; } virtual bool CheckEvent(const ::itk::EventObject* e) const { return dynamic_cast(e); } virtual ::itk::EventObject* MakeObject() const { return new Self(m_Operation); } Operation* GetOperation() const { return m_Operation; } private: Operation* m_Operation; OperationEndEvent(const Self&); void operator=(const Self&); }; }//namespace mitk #endif /* OPERATION_H_HEADER_INCLUDED_C16E7D9E */ diff --git a/Modules/Core/include/mitkOperationActor.h b/Modules/Core/include/mitkOperationActor.h index bc32d12087..6cc47f9b21 100644 --- a/Modules/Core/include/mitkOperationActor.h +++ b/Modules/Core/include/mitkOperationActor.h @@ -1,52 +1,55 @@ /*=================================================================== 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 OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD #define OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD #include +#include /** Macro for checking the type of an operation */ #define mitkCheckOperationTypeMacro(OperationType, operation, newOperationName) \ OperationType *newOperationName = dynamic_cast(operation); \ if (newOperationName == NULL) \ { \ itkWarningMacro("Recieved wrong type of operation!"); \ return; \ } namespace mitk { class Operation; class OperationEvent; /** * \brief abstract class, that can be used by Undo to undo an operation. * * \ingroup Undo */ class MITKCORE_EXPORT OperationActor { public: + itkTypeMacroNoParent(OperationActor) + virtual ~OperationActor() {} virtual void ExecuteOperation(Operation* operation) = 0; }; } #endif /* OPERATIONACTOR_H_HEADER_INCLUDED_C16E28BD */ diff --git a/Modules/Core/include/mitkStatusBarImplementation.h b/Modules/Core/include/mitkStatusBarImplementation.h index 4327392a3e..c1403cb6b3 100644 --- a/Modules/Core/include/mitkStatusBarImplementation.h +++ b/Modules/Core/include/mitkStatusBarImplementation.h @@ -1,62 +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 MITKSTATUSBARIMPLEMENTATION_H #define MITKSTATUSBARIMPLEMENTATION_H #include +#include namespace mitk { //##Documentation //## @brief GUI indepentent Interface for all Gui depentent implementations of a StatusBar. class MITKCORE_EXPORT StatusBarImplementation { public: + itkTypeMacroNoParent(StatusBarImplementation) + //##Documentation //## @brief Constructor StatusBarImplementation(){}; //##Documentation //## @brief Destructor virtual ~StatusBarImplementation(){}; //##Documentation //## @brief Send a string to the applications StatusBar virtual void DisplayText(const char* t)=0; //##Documentation //## @brief Send a string with a time delay to the applications StatusBar virtual void DisplayText(const char* t, int ms) = 0; virtual void DisplayErrorText(const char *t) = 0; virtual void DisplayWarningText(const char *t) = 0; virtual void DisplayWarningText(const char *t, int ms) = 0; virtual void DisplayGenericOutputText(const char *t) = 0; virtual void DisplayDebugText(const char *t) = 0; virtual void DisplayGreyValueText(const char *t) = 0; //##Documentation //## @brief removes any temporary message being shown. virtual void Clear() = 0; //##Documentation //## @brief Set the SizeGrip of the window //## (the triangle in the lower right Windowcorner for changing the size) //## to enabled or disabled virtual void SetSizeGripEnabled(bool enable) = 0; }; }// end namespace mitk #endif /* define MITKSTATUSBARIMPLEMENTATION_H */ diff --git a/Modules/LegacyIO/mitkFileSeriesReader.h b/Modules/LegacyIO/mitkFileSeriesReader.h index a4bc0ddaa4..11c39d6703 100644 --- a/Modules/LegacyIO/mitkFileSeriesReader.h +++ b/Modules/LegacyIO/mitkFileSeriesReader.h @@ -1,65 +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 __MITK_FILE_SERIES_READER__H_ #define __MITK_FILE_SERIES_READER__H_ #include #include #include #include #include namespace mitk { /** * Provides a function which generates a list of files from * a given prefix and pattern. * Subclasses may use this function to load a series of files. * * @deprecatedSince{2014_10} */ class MITKLEGACYIO_EXPORT FileSeriesReader : public FileReader { public: - mitkClassMacro( FileSeriesReader, FileReader ); + mitkClassMacro( FileSeriesReader, FileReader ) typedef std::vector< std::string > MatchedFileNames; virtual MatchedFileNames GetMatchedFileNames( ); protected: FileSeriesReader(); virtual ~FileSeriesReader(); virtual bool GenerateFileList(); std::string m_FileName; std::string m_FilePrefix; std::string m_FilePattern; MatchedFileNames m_MatchedFileNames; }; } #endif diff --git a/Modules/Segmentation/Algorithms/mitkDiffSliceOperationApplier.h b/Modules/Segmentation/Algorithms/mitkDiffSliceOperationApplier.h index bf0e38cd31..57c69959dc 100644 --- a/Modules/Segmentation/Algorithms/mitkDiffSliceOperationApplier.h +++ b/Modules/Segmentation/Algorithms/mitkDiffSliceOperationApplier.h @@ -1,64 +1,64 @@ /*=================================================================== 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 mitkDiffSliceOpertationApplier_h_Included #define mitkDiffSliceOpertationApplier_h_Included #include #include "mitkCommon.h" #include #include "mitkDiffSliceOperation.h" #include #include namespace mitk { /** \brief Executes a DiffSliceOperation. \sa DiffSliceOperation */ class MITKSEGMENTATION_EXPORT DiffSliceOperationApplier : public OperationActor { public: - mitkClassMacro(DiffSliceOperationApplier, OperationActor); + mitkClassMacro(DiffSliceOperationApplier, OperationActor) //itkFactorylessNewMacro(Self) //itkCloneMacro(Self) /** \brief Returns an instance of the class */ static DiffSliceOperationApplier* GetInstance(); /** \brief Executes a DiffSliceOperation. \sa DiffSliceOperation Note: Only DiffSliceOperation is supported. */ virtual void ExecuteOperation(Operation* op); protected: DiffSliceOperationApplier(); virtual ~DiffSliceOperationApplier(); //static DiffSliceOperationApplier* s_Instance; }; } #endif diff --git a/Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp b/Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp index d8d461229b..5a1c5eaa90 100644 --- a/Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp +++ b/Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp @@ -1,49 +1,49 @@ /*=================================================================== 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 "QmitkToolGUI.h" #include QmitkToolGUI::~QmitkToolGUI() { m_ReferenceCountLock.Lock(); m_ReferenceCount = 0; // otherwise ITK will complain in LightObject's destructor m_ReferenceCountLock.Unlock(); } void QmitkToolGUI::Register() const { // empty on purpose, just don't let ITK handle calls to Register() } -void QmitkToolGUI::UnRegister() const +void QmitkToolGUI::UnRegister() const ITK_NOEXCEPT { // empty on purpose, just don't let ITK handle calls to UnRegister() } void QmitkToolGUI::SetReferenceCount(int) { // empty on purpose, just don't let ITK handle calls to SetReferenceCount() } void QmitkToolGUI::SetTool( mitk::Tool* tool ) { m_Tool = tool; emit( NewToolAssociated(tool) ); } diff --git a/Modules/SegmentationUI/Qmitk/QmitkToolGUI.h b/Modules/SegmentationUI/Qmitk/QmitkToolGUI.h index b1cad09c19..1500b4ab42 100644 --- a/Modules/SegmentationUI/Qmitk/QmitkToolGUI.h +++ b/Modules/SegmentationUI/Qmitk/QmitkToolGUI.h @@ -1,68 +1,68 @@ /*=================================================================== 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 QmitkToolGUI_h_Included #define QmitkToolGUI_h_Included #include #include #include "mitkCommon.h" #include "mitkTool.h" /** \brief Base class for GUIs belonging to mitk::Tool classes. \ingroup org_mitk_gui_qt_interactivesegmentation Created through ITK object factory. TODO May be changed to a toolkit specific way later? Last contributor: $Author$ */ class MITKSEGMENTATIONUI_EXPORT QmitkToolGUI : public QWidget, public itk::Object { Q_OBJECT public: mitkClassMacro(QmitkToolGUI, itk::Object); void SetTool( mitk::Tool* tool ); // just make sure ITK won't take care of anything (especially not destruction) virtual void Register() const; - virtual void UnRegister() const; + virtual void UnRegister() const ITK_NOEXCEPT ITK_OVERRIDE; virtual void SetReferenceCount(int); virtual ~QmitkToolGUI(); signals: void NewToolAssociated( mitk::Tool* ); public slots: protected slots: protected: mitk::Tool::Pointer m_Tool; virtual void BusyStateChanged(bool) {}; }; #endif diff --git a/Plugins/org.mitk.gui.qt.application/src/QmitkStatusBar.h b/Plugins/org.mitk.gui.qt.application/src/QmitkStatusBar.h index d525c45fb8..9204ee47b3 100755 --- a/Plugins/org.mitk.gui.qt.application/src/QmitkStatusBar.h +++ b/Plugins/org.mitk.gui.qt.application/src/QmitkStatusBar.h @@ -1,84 +1,84 @@ /*=================================================================== 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 QMITKSTATUSBAR_H #define QMITKSTATUSBAR_H #include #include #include #include #include /** * \ingroup org_mitk_gui_qt_application * * \brief QT-Toolkit/GUI dependent class that provides to send a Message to the QT's StatusBar * * A delay time can be set. * * All mitk-classes will call this class for output: * mitk::StatusBar::GetInstance(); */ class MITK_QT_APP QmitkStatusBar : public mitk::StatusBarImplementation { public: - mitkClassMacro(QmitkStatusBar, mitk::StatusBarImplementation); + mitkClassMacro(QmitkStatusBar, mitk::StatusBarImplementation) //##Documentation //##@brief Constructor; //## holds param instance internaly and connects this to the mitkStatusBar QmitkStatusBar(QStatusBar* instance); //##Documentation //##@brief Destructor virtual ~QmitkStatusBar(); //##Documentation //## @brief Send a string to the applications StatusBar (QStatusBar). virtual void DisplayText(const char* t); virtual void DisplayText(const char* t, int ms); //##Documentation //## @brief Send a string as an error message to StatusBar. //## The implementation calls DisplayText() virtual void DisplayErrorText(const char *t) { this->DisplayText(t); }; virtual void DisplayWarningText(const char *t) { this->DisplayText(t); }; virtual void DisplayWarningText(const char *t, int ms) { this->DisplayText(t, ms); }; virtual void DisplayGenericOutputText(const char *t) {this->DisplayText(t);} virtual void DisplayDebugText(const char *t) { this->DisplayText(t); }; virtual void DisplayGreyValueText(const char *t); //##Documentation //## @brief removes any temporary message being shown. virtual void Clear(); //##Documentation //## @brief Set the QSizeGrip of the window //## (the triangle in the lower right Windowcorner for changing the size) //## to enabled or disabled virtual void SetSizeGripEnabled(bool enable); private: //static Pointer m_Instance; QStatusBar* m_StatusBar; QLabel* m_GreyValueLabel; }; #endif /* define QMITKSTATUSBAR_H */