diff --git a/.gitignore b/.gitignore index af3b8e2508..f25ec28c11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,72 +1,75 @@ CMakeLists.txt.user* .clang_complete .autosave ########## Git related # Patches and similar *.patch *.diff *.rej *.orig !Utilities/qtsingleapplication/*.patch !CMakeExternals/*.patch ########## IDE specific ## Office ~$* ## vim Session.vim *.swp *.swo .vimrc ## Emacs \#*\# /.emacs.desktop /.emacs.desktop.lock .elc auto-save-list tramp .\#* ## Eclipse .cproject .project .settings/ # Org-mode .org-id-locations *_archive +# VS Code +.vs/ + ########## OS specific ## Windows files to ignore # Windows image file caches Thumbs.db ehthumbs.db # Folder config file Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ ## OSX specific .DS_Store .AppleDouble .LSOverride Icon # Thumbnails ._* # Files that might appear on external disk .Spotlight-V100 .Trashes ## Linux *~ diff --git a/CMake/mitkFunctionGetMSVCVersion.cmake b/CMake/mitkFunctionGetMSVCVersion.cmake index 551c3e5d55..e12baec1a3 100644 --- a/CMake/mitkFunctionGetMSVCVersion.cmake +++ b/CMake/mitkFunctionGetMSVCVersion.cmake @@ -1,26 +1,25 @@ -#! \brief Get diverse visual studio ids not directly provided by CMake -#! -#! Sets the following variables in the parent scope -#! VISUAL_STUDIO_VERSION_MAJOR - The Visual Studio Version -#! VISUAL_STUDIO_PRODUCT_NAME - The Visual Studio Product Name - function(mitkFunctionGetMSVCVersion ) if(MSVC) - if(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 2000) + if(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE) set(VISUAL_STUDIO_VERSION_MAJOR 14 PARENT_SCOPE) - string(SUBSTRING ${MSVC_VERSION} 3 -1 version_minor) + string(SUBSTRING ${MSVC_VERSION} 2 -1 version_minor) + set(VISUAL_STUDIO_VERSION_MINOR ${version_minor} PARENT_SCOPE) + elseif(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930) + set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2019" PARENT_SCOPE) + set(VISUAL_STUDIO_VERSION_MAJOR 14 PARENT_SCOPE) + string(SUBSTRING ${MSVC_VERSION} 2 -1 version_minor) set(VISUAL_STUDIO_VERSION_MINOR ${version_minor} PARENT_SCOPE) else() message(WARNING "Unknown Visual Studio version ${MSVC_VERSION} (CMake/mitkFunctionGetMSVCVersion.cmake)") endif() - if("${CMAKE_GENERATOR}" MATCHES ".*Win64") + if(CMAKE_VS_PLATFORM_NAME STREQUAL x64) set(CMAKE_LIBRARY_ARCHITECTURE x64 PARENT_SCOPE) else() set(CMAKE_LIBRARY_ARCHITECTURE x86 PARENT_SCOPE) endif() endif() endfunction() diff --git a/Modules/Core/include/mitkAnnotationUtils.h b/Modules/Core/include/mitkAnnotationUtils.h index ee4a42f2cf..6502fa70b8 100644 --- a/Modules/Core/include/mitkAnnotationUtils.h +++ b/Modules/Core/include/mitkAnnotationUtils.h @@ -1,95 +1,96 @@ /*=================================================================== 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 mitkAnnotationUtils_h #define mitkAnnotationUtils_h #include #include +#include #include class vtkObject; namespace mitk { class AbstractAnnotationRenderer; class Annotation; class BaseRenderer; /** * @brief The AnnotationUtils class provides static functions for accsessing registered AnnotationRenderers and * Annotations */ class MITKCORE_EXPORT AnnotationUtils { public: typedef std::vector> AnnotationRendererServices; AnnotationUtils(); ~AnnotationUtils(); /** * @brief GetAnnotationRenderer returns a registered AnnotationRenderer of a specific type and for a BaseRenderer * @param arTypeID name specifier of the AnnotationRenderer * @param rendererID name specifier of the BaseRenderer * @return */ static AbstractAnnotationRenderer *GetAnnotationRenderer(const std::string &arTypeID, const std::string &rendererID); /** * @brief RegisterAnnotationRenderer registers an AnnotationRenderer as a microservice and saves a reference to it * in a local static list. * @param annotationRenderer */ static void RegisterAnnotationRenderer(AbstractAnnotationRenderer *annotationRenderer); /** * @brief GetAnnotationRenderer returns a list of registered AnnotationRenderers for a specified BaseRenderer * @param rendererID name specifier of the BaseRenderer * @return */ static std::vector GetAnnotationRenderer(const std::string &rendererID); /** * @brief UpdateAnnotationRenderer is a convenience function which calls AbstractAnnotationRenderer::Update for each * registered AnnotationRenderer of a specific BaseRenderer. * @param rendererID */ static void UpdateAnnotationRenderer(const std::string &rendererID); /** * @brief BaseRendererChanged has to be called in the case that the actual BaseRenderer object for a BaseRenderer ID * has changed. E.g. if a RenderWindow was closed and reopened. * @param renderer The new BaseRenderer */ static void BaseRendererChanged(BaseRenderer *renderer); /** * @brief GetAnnotation returns a registered Annotation for a specified ID. * @param AnnotationID * @return */ static mitk::Annotation *GetAnnotation(const std::string &AnnotationID); private: AnnotationUtils(const AnnotationUtils &); AnnotationUtils &operator=(const AnnotationUtils &); static void RenderWindowCallback(vtkObject *caller, unsigned long, void *, void *); }; } #endif