diff --git a/CMakeExternals/VTK-9.0.0.patch b/CMakeExternals/VTK-9.0.0.patch deleted file mode 100644 index a468c8fff2..0000000000 --- a/CMakeExternals/VTK-9.0.0.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx -index c54289dc60..03b899c4da 100644 ---- a/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ b/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -378,8 +378,7 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMapCache() - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester( -+static FT_Error vtkFreeTypeToolsFaceRequester( - FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) - { - #if VTK_FTFC_DEBUG_CD - diff --git a/CMakeExternals/VTK-9.0.1.patch b/CMakeExternals/VTK-9.0.1.patch new file mode 100644 index 0000000000..4bb1a4665c --- /dev/null +++ b/CMakeExternals/VTK-9.0.1.patch @@ -0,0 +1,51 @@ +diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx +index c54289dc..03b899c4 100644 +--- a/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ b/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -378,8 +378,7 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMapCache() + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester( ++static FT_Error vtkFreeTypeToolsFaceRequester( + FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) + { + #if VTK_FTFC_DEBUG_CD +diff --git a/ThirdParty/hdf5/vtkhdf5/src/H5Fsuper.c b/ThirdParty/hdf5/vtkhdf5/src/H5Fsuper.c +index 49995651..00a3dc55 100644 +--- a/ThirdParty/hdf5/vtkhdf5/src/H5Fsuper.c ++++ b/ThirdParty/hdf5/vtkhdf5/src/H5Fsuper.c +@@ -54,6 +54,7 @@ + /********************/ + static herr_t H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr); + static herr_t H5F__update_super_ext_driver_msg(H5F_t *f); ++herr_t H5O__fsinfo_set_version(H5F_t *f, H5O_fsinfo_t *fsinfo); + + + /*********************/ +diff --git a/ThirdParty/hdf5/vtkhdf5/src/H5Oint.c b/ThirdParty/hdf5/vtkhdf5/src/H5Oint.c +index 543637c1..a927c0d1 100644 +--- a/ThirdParty/hdf5/vtkhdf5/src/H5Oint.c ++++ b/ThirdParty/hdf5/vtkhdf5/src/H5Oint.c +@@ -82,6 +82,7 @@ static herr_t H5O__free_visit_visited(void *item, void *key, + static herr_t H5O__visit_cb(hid_t group, const char *name, const H5L_info_t *linfo, + void *_udata); + static const H5O_obj_class_t *H5O__obj_class_real(const H5O_t *oh); ++herr_t H5CX_get_ohdr_flags(uint8_t* oh_flags); + + + /*********************/ +diff --git a/ThirdParty/hdf5/vtkhdf5/src/H5Rint.c b/ThirdParty/hdf5/vtkhdf5/src/H5Rint.c +index 159bccac..08bd8c80 100644 +--- a/ThirdParty/hdf5/vtkhdf5/src/H5Rint.c ++++ b/ThirdParty/hdf5/vtkhdf5/src/H5Rint.c +@@ -46,6 +46,8 @@ + /********************/ + /* Local Prototypes */ + /********************/ ++herr_t H5CX_set_libver_bounds(H5F_t*); ++ + + /*********************/ + /* Package Variables */ diff --git a/CMakeExternals/VTK.cmake b/CMakeExternals/VTK.cmake index 96341d9d64..767dff62a1 100644 --- a/CMakeExternals/VTK.cmake +++ b/CMakeExternals/VTK.cmake @@ -1,88 +1,88 @@ #----------------------------------------------------------------------------- # VTK #----------------------------------------------------------------------------- # Sanity checks if(DEFINED VTK_DIR AND NOT EXISTS ${VTK_DIR}) message(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj VTK) set(proj_DEPENDENCIES ) set(VTK_DEPENDS ${proj}) if(MITK_USE_HDF5) list(APPEND proj_DEPENDENCIES HDF5) endif() if(NOT DEFINED VTK_DIR) set(additional_cmake_args ) if(WIN32) list(APPEND additional_cmake_args -DCMAKE_CXX_MP_FLAG:BOOL=ON ) else() list(APPEND additional_cmake_args -DVTK_MODULE_USE_EXTERNAL_VTK_freetype:BOOL=ON ) endif() # Optionally enable memory leak checks for any objects derived from vtkObject. This # will force unit tests to fail if they have any of these memory leaks. option(MITK_VTK_DEBUG_LEAKS OFF) mark_as_advanced(MITK_VTK_DEBUG_LEAKS) list(APPEND additional_cmake_args -DVTK_DEBUG_LEAKS:BOOL=${MITK_VTK_DEBUG_LEAKS} ) if(MITK_USE_Qt5) list(APPEND additional_cmake_args -DVTK_GROUP_ENABLE_Qt:STRING=YES -DQt5_DIR:PATH=${Qt5_DIR} ) endif() if(CTEST_USE_LAUNCHERS) list(APPEND additional_cmake_args "-DCMAKE_PROJECT_${proj}_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake" ) endif() mitk_query_custom_ep_vars() ExternalProject_Add(${proj} LIST_SEPARATOR ${sep} - URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-9.0.0.tar.gz - URL_MD5 fa61cd36491d89a17edab18522bdda49 + URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-9.0.1.tar.gz + URL_MD5 f443c9198495081765910ebbc9dace3a PATCH_COMMAND - ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VTK-9.0.0.patch + ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VTK-9.0.1.patch CMAKE_GENERATOR ${gen} CMAKE_GENERATOR_PLATFORM ${gen_platform} CMAKE_ARGS ${ep_common_args} -DVTK_ENABLE_WRAPPING:BOOL=OFF -DVTK_LEGACY_REMOVE:BOOL=ON -DVTK_MODULE_ENABLE_VTK_TestingRendering:STRING=YES -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=YES -DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2:STRING=YES ${additional_cmake_args} ${${proj}_CUSTOM_CMAKE_ARGS} CMAKE_CACHE_ARGS ${ep_common_cache_args} ${${proj}_CUSTOM_CMAKE_CACHE_ARGS} CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args} ${${proj}_CUSTOM_CMAKE_CACHE_DEFAULT_ARGS} DEPENDS ${proj_DEPENDENCIES} ) set(VTK_DIR ${ep_prefix}) mitkFunctionInstallExternalCMakeProject(${proj}) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() diff --git a/Modules/QtWidgets/src/QmitkMultiWidgetLayoutSelectionWidget.cpp b/Modules/QtWidgets/src/QmitkMultiWidgetLayoutSelectionWidget.cpp index 637997248c..d47adcc5f5 100644 --- a/Modules/QtWidgets/src/QmitkMultiWidgetLayoutSelectionWidget.cpp +++ b/Modules/QtWidgets/src/QmitkMultiWidgetLayoutSelectionWidget.cpp @@ -1,76 +1,76 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "QmitkMultiWidgetLayoutSelectionWidget.h" QmitkMultiWidgetLayoutSelectionWidget::QmitkMultiWidgetLayoutSelectionWidget(QWidget* parent/* = 0*/) : QWidget(parent) { Init(); } void QmitkMultiWidgetLayoutSelectionWidget::Init() { ui.setupUi(this); auto stylesheet = "QTableWidget::item{background-color: white;}\nQTableWidget::item:selected{background-color: #1C97EA;}"; ui.tableWidget->setStyleSheet(stylesheet); connect(ui.tableWidget, &QTableWidget::itemSelectionChanged, this, &QmitkMultiWidgetLayoutSelectionWidget::OnTableItemSelectionChanged); connect(ui.setLayoutPushButton, &QPushButton::clicked, this, &QmitkMultiWidgetLayoutSelectionWidget::OnSetLayoutButtonClicked); } void QmitkMultiWidgetLayoutSelectionWidget::OnTableItemSelectionChanged() { QItemSelectionModel* selectionModel = ui.tableWidget->selectionModel(); int row = 0; int column = 0; QModelIndexList indices = selectionModel->selectedIndexes(); if (indices.size() > 0) { row = indices[0].row(); column = indices[0].column(); QModelIndex topLeft = ui.tableWidget->model()->index(0, 0, QModelIndex()); QModelIndex bottomRight = ui.tableWidget->model()->index(row, column, QModelIndex()); QItemSelection cellSelection; cellSelection.select(topLeft, bottomRight); selectionModel->select(cellSelection, QItemSelectionModel::Select); } } void QmitkMultiWidgetLayoutSelectionWidget::OnSetLayoutButtonClicked() { int row = 0; int column = 0; QModelIndexList indices = ui.tableWidget->selectionModel()->selectedIndexes(); if (indices.size() > 0) { // find largest row and column - for (const QModelIndex modelIndex : indices) + for (const auto& modelIndex : indices) { if (modelIndex.row() > row) { row = modelIndex.row(); } if (modelIndex.column() > column) { column = modelIndex.column(); } } close(); emit LayoutSet(row+1, column+1); } } diff --git a/Utilities/IpPic/ipFRead.c b/Utilities/IpPic/ipFRead.c index 40fe74aad5..d0d84034c5 100755 --- a/Utilities/IpPic/ipFRead.c +++ b/Utilities/IpPic/ipFRead.c @@ -1,172 +1,173 @@ /*============================================================================ Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - All advertising materials mentioning features or use of this software must display the following acknowledgement: "This product includes software developed by the German Cancer Research Center (DKFZ)." - Neither the name of the German Cancer Research Center (DKFZ) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE GERMAN CANCER RESEARCH CENTER (DKFZ) AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE GERMAN CANCER RESEARCH CENTER (DKFZ) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================================================================*/ /* * $RCSfile$ *-------------------------------------------------------------------- * DESCRIPTION * reads big- and litle- endian from disk * and swaps to the other endianess * * $Log$ * Revision 1.14 2005/09/09 09:14:45 ivo * FIX: warnings on windows * * Revision 1.13 2003/03/06 10:53:08 andre * *** empty log message *** * * Revision 1.12 2002/11/13 17:52:59 ivo * new ipPic added. * * Revision 1.10 2002/02/27 08:54:43 andre * zlib changes * * Revision 1.9 2000/05/04 12:52:35 ivo * inserted BSD style license * * Revision 1.8 2000/01/17 18:31:59 andre * *** empty log message *** * * Revision 1.7 1999/12/09 19:12:09 andre * *** empty log message *** * * Revision 1.5 1999/11/29 09:34:34 andre * *** empty log message *** * * Revision 1.4 1999/11/28 16:27:20 andre * *** empty log message *** * * Revision 1.3 1999/11/27 19:15:08 andre * *** empty log message *** * * Revision 1.2 1997/09/15 13:21:08 andre * switched to new what string format * * Revision 1.1.1.1 1997/09/06 19:09:58 andre * initial import * * Revision 0.1 1993/04/02 16:18:39 andre * now works on PC, SUN and DECstation * * Revision 0.0 1993/03/26 12:56:26 andre * Initial revision, NO error checking * * *-------------------------------------------------------------------- * */ #ifndef lint static char *what = { "@(#)_ipFRead\t\tGerman Cancer Research Center (DKFZ)\t"__DATE__"\t$Revision$" }; #endif #include #include +#include #ifdef WIN32 #include #endif #include "mitkIpPic.h" size_t mitkIpFReadCvt( void *ptr, size_t size, size_t nitems, FILE *stream ) { size_t bytes_return; bytes_return = fread( ptr, size, nitems, stream ); _mitkIpCvtEndian( ptr, size*nitems, size ); return( bytes_return ); } #ifdef USE_ZLIB mitkIpBool_t _mitkIpPicCanReadCompressed = mitkIpTrue; #else mitkIpBool_t _mitkIpPicCanReadCompressed = mitkIpFalse; #endif size_t mitkIpPicFReadCvt( void *ptr, size_t size, size_t nitems, mitkIpPicFile_t stream ) { size_t bytes_return; bytes_return = mitkIpPicFRead( ptr, size, nitems, stream ); _mitkIpCvtEndian( ptr, size*nitems, size ); return( bytes_return ); } int mitkIpPicAccess( const char *path, int mode ) { int status; status = access( path, mode ); if( status == -1 ) { char buff[1024]; sprintf( buff, "%s.gz", path ); status = access( buff, mode ); } return( status ); } int mitkIpPicRemoveFile( const char *path ) { int status; status = remove( path ); if( status != 0 ) { char buff[1024]; sprintf( buff, "%s.gz", path ); status = remove( buff ); } return( status ); }