From: tbaudier Date: Thu, 4 Oct 2018 12:32:55 +0000 (+0200) Subject: Merge branch 'drop_files' of https://github.com/m-pilia/vv into m-pilia-drop_files X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8f42f40e826ecc4cc45e08ed41cc5596da74991c;hp=0e51b8dde15bfe59437d6f351c516f4137faf631;p=clitk.git Merge branch 'drop_files' of https://github.com/m-pilia/vv into m-pilia-drop_files --- diff --git a/.travis.yml b/.travis.yml index a1d3ba9..99db61b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,51 +12,60 @@ compiler: - gcc - clang env: - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=5.5.1 C11=false - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=false - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=5.5.1 C11=false - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=false - - WITH_CMAKE=true VTK_VERSION=5.10 ITK_VERSION=4.6 QT_VERSION=4.8.7 C11=false - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=5.5.1 C11=true - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=true - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=5.5.1 C11=true - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=true - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=false - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=false - - WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=true - - WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=true + - WITH_CMAKE=true VTK_VERSION=v5.10.0 ITK_VERSION=v4.6.0 QT_VERSION=4.8.7 C11=false + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=false + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=false + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=false + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=false + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false + - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=false + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=true + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=true + - WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=4.8.7 C11=true + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.9.1 QT_VERSION=5.5.1 C11=true + - WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true + - WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true matrix: exclude: - - os: osx - env: WITH_CMAKE=true VTK_VERSION=5.10 ITK_VERSION=4.6 QT_VERSION=4.8.7 C11=false #VTK5.10 doesn't work with osX - - os: osx - env: WITH_CMAKE=true VTK_VERSION=5.10 ITK_VERSION=4.6 QT_VERSION=4.8.7 C11=true #VTK5.10 doesn't work with osX - - os: osx - env: WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=false #Qt4 doesn't work with brew anymore - - os: osx - env: WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=true #Qt4 doesn't work with brew anymore - - os: osx - env: WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=false - - os: osx - env: WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.9.1 QT_VERSION=4.8.7 C11=true + - os: osx #VTK5.10, Qt4, ITK < 4.13 doesn't work with osX - os: linux - env: WITH_CMAKE=true VTK_VERSION=5.10 ITK_VERSION=4.6 QT_VERSION=4.8.7 C11=true #Problem with VTK 5.10 and c++11 + env: WITH_CMAKE=true VTK_VERSION=v5.10.0 ITK_VERSION=v4.6.0 QT_VERSION=4.8.7 C11=true #Problem with VTK 5.10 and c++11 - os: linux compiler: clang #Remove ITK with clang on linux include: - os: linux compiler: clang - env: WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=false + env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false + - os: linux + compiler: clang + env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false - os: linux compiler: clang - env: WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=false + env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=false - os: linux compiler: clang - env: WITH_CMAKE=true VTK_VERSION=7.0.0 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=true + env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true - os: linux compiler: clang - env: WITH_CMAKE=true VTK_VERSION=6.3 ITK_VERSION=4.13.0 QT_VERSION=5.5.1 C11=true + env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true + - os: linux + compiler: clang + env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=false + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=flase + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v6.3.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v7.0.0 ITK_VERSION=v4.13.0 QT_VERSION=5.5.1 C11=true + - os: osx + env: WITH_CMAKE=true VTK_VERSION=v8.1.1 ITK_VERSION=v5.0b01 QT_VERSION=5.5.1 C11=true language: cpp @@ -84,16 +93,17 @@ before_install: - export cwd=$(pwd) - export SCRIPTS=$cwd/travis - export EXTERNALS_DIR=$HOME -- export VTK_SOURCE_DIR=${EXTERNALS_DIR}/vtk-${VTK_VERSION} -- export VTK_DIR=${EXTERNALS_DIR}/vtk-${VTK_VERSION}-build -- export ITK_SOURCE_DIR=${EXTERNALS_DIR}/itk-${ITK_VERSION} -- export ITK_DIR=${EXTERNALS_DIR}/itk-${ITK_VERSION}-build +- export VTK_SOURCE_DIR=${EXTERNALS_DIR}/vtk +- export VTK_DIR=${EXTERNALS_DIR}/vtk-build +- export ITK_SOURCE_DIR=${EXTERNALS_DIR}/itk +- export ITK_DIR=${EXTERNALS_DIR}/itk-build - export BUILD_DIR=$cwd/build - if test $TRAVIS_OS_NAME == linux ; then sudo apt-get install -y -qq build-essential cmake; fi #Install qt5 - $SCRIPTS/travis_build_qt.sh - if test $TRAVIS_OS_NAME == linux; then sudo apt-get -y install libgdcm2-dev libpq-dev; fi - if test $TRAVIS_OS_NAME == linux; then if [[ "$QT_VERSION" == "5.5.1" ]] ; then QTDIR="/opt/qt55" && PATH="$PATH:$QTDIR/bin" && qt55-env.sh ; fi; fi +- if test $TRAVIS_OS_NAME == linux; then cd $HOME && wget https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz && tar -xzf cmake-3.11.4-Linux-x86_64.tar.gz && export PATH=$HOME/cmake-3.11.4-Linux-x86_64/bin:${PATH} ; fi - if test $TRAVIS_OS_NAME == osx ; then export HOMEBREW_QT_VERSION=$(brew list --versions qt | rev | cut -d' ' -f1 | rev); fi - if test $TRAVIS_OS_NAME == osx ; then brew install ccache; fi - if test $TRAVIS_OS_NAME == osx ; then export PATH="/usr/local/opt/qt/bin:/usr/local/opt/ccache/libexec:$PATH"; fi @@ -101,18 +111,10 @@ before_install: cache: - directories: - - $HOME/vtk-5.10 - - $HOME/vtk-5.10-build - - $HOME/vtk-6.3 - - $HOME/vtk-6.3-build - - $HOME/vtk-7.0.0 - - $HOME/vtk-7.0.0-build - - $HOME/itk-4.6 - - $HOME/itk-4.6-build - - $HOME/itk-4.9.1 - - $HOME/itk-4.9.1-build - - $HOME/itk-4.13.0 - - $HOME/itk-4.13.0-build + - $HOME/vtk + - $HOME/vtk-build + - $HOME/itk + - $HOME/itk-build - '$HOME/.sonar/cache' - timeout: 10000 diff --git a/itk/RelativePositionPropImageFilter.h b/itk/RelativePositionPropImageFilter.h index 4b30db1..e876f9f 100644 --- a/itk/RelativePositionPropImageFilter.h +++ b/itk/RelativePositionPropImageFilter.h @@ -169,8 +169,11 @@ namespace itk } } - +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; +#else + virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError) ITK_OVERRIDE; +#endif void EnlargeOutputRequestedRegion (DataObject * output) ITK_OVERRIDE; protected: diff --git a/itk/RelativePositionPropImageFilter.txx b/itk/RelativePositionPropImageFilter.txx index 3ee1d0f..c34c7c3 100644 --- a/itk/RelativePositionPropImageFilter.txx +++ b/itk/RelativePositionPropImageFilter.txx @@ -50,7 +50,11 @@ namespace itk template void RelativePositionPropImageFilter +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::GenerateInputRequestedRegion() +#else + ::GenerateInputRequestedRegion() throw (InvalidRequestedRegionError) +#endif { // call the superclass' implementation of this method Superclass::GenerateInputRequestedRegion (); diff --git a/itk/clitkBackProjectImageFilter.h b/itk/clitkBackProjectImageFilter.h index cb68779..9ffaffb 100644 --- a/itk/clitkBackProjectImageFilter.h +++ b/itk/clitkBackProjectImageFilter.h @@ -210,7 +210,11 @@ namespace clitk void SetOutputParametersFromImage( const OutputImageConstPointer image ); +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) void Initialize(void); +#else + void Initialize(void) throw (itk::ExceptionObject); +#endif protected: diff --git a/itk/clitkBackProjectImageFilter.txx b/itk/clitkBackProjectImageFilter.txx index e643226..fa8d261 100644 --- a/itk/clitkBackProjectImageFilter.txx +++ b/itk/clitkBackProjectImageFilter.txx @@ -190,7 +190,11 @@ namespace clitk template void BackProjectImageFilter +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize( void ) +#else + ::Initialize( void ) throw (itk::ExceptionObject) +#endif { //Change the origin of the 2D input typename InputImageType::ConstPointer inputPtr=this->GetInput(); diff --git a/registration/CMakeLists.txt b/registration/CMakeLists.txt index 4ad12a4..91f1e26 100644 --- a/registration/CMakeLists.txt +++ b/registration/CMakeLists.txt @@ -1,16 +1,16 @@ #========================================================= +if(CLITK_BUILD_REGISTRATION) # Add Libraries used in vv and clitk to avoid recompilation -WRAP_GGO(clitkAffineRegistration_GGO_C clitkAffineRegistration.ggo) -add_library(clitkAffineRegistrationLib - clitkAffineRegistrationGenericFilter.cxx - ${clitkAffineRegistration_GGO_C} - clitkLBFGSBOptimizer.cxx - clitkGenericAffineTransform.cxx) + WRAP_GGO(clitkAffineRegistration_GGO_C clitkAffineRegistration.ggo) + add_library(clitkAffineRegistrationLib + clitkAffineRegistrationGenericFilter.cxx + ${clitkAffineRegistration_GGO_C} + clitkLBFGSBOptimizer.cxx + clitkGenericAffineTransform.cxx) #========================================================= -if(CLITK_BUILD_REGISTRATION) ############################## registration algorithms add_executable(clitkAffineRegistration clitkAffineRegistration.cxx) target_link_libraries(clitkAffineRegistration clitkAffineRegistrationLib clitkCommon) diff --git a/registration/clitkCorrelationRatioImageToImageMetric.h b/registration/clitkCorrelationRatioImageToImageMetric.h index 51e15ae..a4bc342 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.h +++ b/registration/clitkCorrelationRatioImageToImageMetric.h @@ -105,7 +105,11 @@ public: * (1) making sure that all the components are present and plugged * together correctly, * (3) allocate memory for bin data structures. */ +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the derivatives of the match measure. */ void GetDerivative( const TransformParametersType & parameters, diff --git a/registration/clitkCorrelationRatioImageToImageMetric.txx b/registration/clitkCorrelationRatioImageToImageMetric.txx index 685a043..1454539 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.txx +++ b/registration/clitkCorrelationRatioImageToImageMetric.txx @@ -51,7 +51,11 @@ CorrelationRatioImageToImageMetric template void CorrelationRatioImageToImageMetric +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h index 12a90ec..067cd87 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h @@ -95,7 +95,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx index b5d28cc..ea2c52a 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx @@ -117,7 +117,11 @@ NormalizedCorrelationImageToImageMetric template void NormalizedCorrelationImageToImageMetric +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( itk::ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h index 6718316..208cb38 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h @@ -95,7 +95,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx index 0389fc5..042b4b7 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx @@ -117,7 +117,11 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD template void NormalizedCorrelationImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( itk::ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h index 9973cc6..c51414e 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h @@ -187,7 +187,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx index 592fe22..ef4257e 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx @@ -183,7 +183,11 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template void MattesMutualInformationImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); this->Superclass::MultiThreadingInitialize(); diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h index ffa6ac9..e12b42f 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h @@ -98,7 +98,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx index af1c986..02427a3 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx @@ -100,7 +100,11 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD template void MeanSquaresImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/travis/travis_build_itk.sh b/travis/travis_build_itk.sh index ed6f89e..e5b55dd 100755 --- a/travis/travis_build_itk.sh +++ b/travis/travis_build_itk.sh @@ -4,27 +4,11 @@ MAKE="make --jobs=$NUM_THREADS --keep-going" #Prepare cmake arguments following the ITK version if [ "$C11" == "true" ]; then - if [ "$ITK_VERSION" == "4.6" ]; then - itk_repo_str=" --branch v4.6.0 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DCMAKE_CXX_FLAGS=-std=c++11 -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - elif [ "$ITK_VERSION" == "4.9.1" ]; then - itk_repo_str=" --branch v4.9.1 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DCMAKE_CXX_FLAGS=-std=c++11 -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - elif [ "$ITK_VERSION" == "4.13.0" ]; then - itk_repo_str=" --branch v4.13.0 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DCMAKE_CXX_FLAGS=-std=c++11 -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - fi + itk_repo_str=" --branch "$ITK_VERSION" https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" + cmake_arg_str=" -DCMAKE_CXX_FLAGS=-std=c++11 -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " else - if [ "$ITK_VERSION" == "4.6" ]; then - itk_repo_str=" --branch v4.6.0 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - elif [ "$ITK_VERSION" == "4.9.1" ]; then - itk_repo_str=" --branch v4.9.1 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - elif [ "$ITK_VERSION" == "4.13.0" ]; then - itk_repo_str=" --branch v4.13.0 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" - cmake_arg_str=" -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " - fi + itk_repo_str=" --branch "$ITK_VERSION" https://github.com/InsightSoftwareConsortium/ITK.git --depth 1" + cmake_arg_str=" -DModule_ITKVtkGlue=ON -DVTK_DIR=$VTK_DIR -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF " fi if [ -d $ITK_SOURCE_DIR ]; then diff --git a/travis/travis_build_qt.sh b/travis/travis_build_qt.sh index 7fffb00..12e137b 100755 --- a/travis/travis_build_qt.sh +++ b/travis/travis_build_qt.sh @@ -7,7 +7,7 @@ if [ "$QT_VERSION" == "4.8.7" ]; then elif [ "$QT_VERSION" == "5.5.1" ]; then if test $TRAVIS_OS_NAME == linux ; then sudo add-apt-repository --yes ppa:beineri/opt-qt551-trusty; fi if test $TRAVIS_OS_NAME == linux ; then sudo apt-get update -qq; fi - if test $TRAVIS_OS_NAME == linux ; then sudo apt-get -y --force-yes install qt55tools; fi + if test $TRAVIS_OS_NAME == linux ; then sudo apt-get -y --force-yes install qt55tools qt55x11extras; fi fi if test $TRAVIS_OS_NAME == osx ; then brew install qt5; fi if test $TRAVIS_OS_NAME == osx ; then brew link qt5 --force; fi diff --git a/travis/travis_build_vtk.sh b/travis/travis_build_vtk.sh index f4dbf32..9d36bdb 100755 --- a/travis/travis_build_vtk.sh +++ b/travis/travis_build_vtk.sh @@ -10,8 +10,8 @@ fi #Prepare cmake arguments following the VTK version if [ "$C11" == "true" ]; then - if [ "$VTK_VERSION" == "5.10" ]; then - vtk_repo_str=" --branch v5.10.0 https://github.com/Kitware/VTK.git --depth 1" + vtk_repo_str=" --branch "$VTK_VERSION" https://github.com/Kitware/VTK.git --depth 1" + if [ "$VTK_VERSION" == "v5.10.0" ]; then cmake_arg_str=" $cmake_arg_str -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS=1 @@ -23,8 +23,7 @@ if [ "$C11" == "true" ]; then -DVTK_USE_RENDERING=ON -DVTK_USE_VIEWS=ON -DVTK_QT_VERSION="$QT_MAJOR_VERSION" " - elif [ "$VTK_VERSION" == "6.3" ]; then - vtk_repo_str=" --branch v6.3.0 https://github.com/Kitware/VTK.git --depth 1" + elif [ "$VTK_VERSION" == "v6.3.0" ] || [ "$VTK_VERSION" == "v8.1.1" ]; then cmake_arg_str=" $cmake_arg_str -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS=1 @@ -45,8 +44,7 @@ if [ "$C11" == "true" ]; then -DModule_vtkRenderingQt=ON -DModule_vtkViewsQt=ON -DVTK_QT_VERSION="$QT_MAJOR_VERSION" " - elif [ "$VTK_VERSION" == "7.0.0" ]; then - vtk_repo_str=" --branch v7.0.0 https://github.com/Kitware/VTK.git --depth 1" + elif [ "$VTK_VERSION" == "v7.0.0" ]; then cmake_arg_str=" $cmake_arg_str -DCMAKE_CXX_FLAGS=-std=c++11 -DBUILD_SHARED_LIBS=1 @@ -70,8 +68,8 @@ if [ "$C11" == "true" ]; then -DVTK_QT_VERSION="$QT_MAJOR_VERSION" " fi else - if [ "$VTK_VERSION" == "5.10" ]; then - vtk_repo_str=" --branch v5.10.0 https://github.com/Kitware/VTK.git --depth 1" + vtk_repo_str=" --branch "$VTK_VERSION" https://github.com/Kitware/VTK.git --depth 1" + if [ "$VTK_VERSION" == "v5.10.0" ]; then cmake_arg_str=" $cmake_arg_str -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release @@ -82,8 +80,7 @@ else -DVTK_USE_RENDERING=ON -DVTK_USE_VIEWS=ON -DVTK_QT_VERSION="$QT_MAJOR_VERSION" " - elif [ "$VTK_VERSION" == "6.3" ]; then - vtk_repo_str=" --branch v6.3.0 https://github.com/Kitware/VTK.git --depth 1" + elif [ "$VTK_VERSION" == "v6.3.0" ] || [ "$VTK_VERSION" == "v8.1.1" ]; then cmake_arg_str=" $cmake_arg_str -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release @@ -103,8 +100,7 @@ else -DModule_vtkRenderingQt=ON -DModule_vtkViewsQt=ON -DVTK_QT_VERSION="$QT_MAJOR_VERSION" " - elif [ "$VTK_VERSION" == "7.0.0" ]; then - vtk_repo_str=" --branch v7.0.0 https://github.com/Kitware/VTK.git --depth 1" + elif [ "$VTK_VERSION" == "v7.0.0" ]; then cmake_arg_str=" $cmake_arg_str -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index fe6120e..9453e1b 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -26,8 +26,6 @@ set(vv_TOOLS vvToolConvert ## with dummy vvToolConvert.ui vvToolROIManager vvToolSegmentation - vvToolProfile - vvToolHistogram ## these ones are for tests (not working) # vvToolTest # vvToolFoo @@ -39,6 +37,12 @@ set(vv_TOOLS # vvToolExtractLung # vvToolStructureSetManager ) +#List of vv tools to compile +#Ensure compatibility with QVTKOpenGL for VTK < v8.1 and QVTKOpenGLNativeWidget for others +set(vv_TOOLS_VTK7 + vvToolProfile + vvToolHistogram +) # dependencies of the tools # Future issues : when tool depend on other tools ... how to manage that ? # >> add the relevant $_LIBS variable to the tool that has dependencies? @@ -65,8 +69,6 @@ set(vv_COMMON_WITH_UI vvOverlayPanel vvLandmarksPanel vvProgressDialog - vvSegmentationDialog - vvSurfaceViewerDialog vvDeformationDialog vvStructSelector vvIntensityValueSlider @@ -76,6 +78,13 @@ set(vv_COMMON_WITH_UI vvToolInputSelectorWidget vvRegisterForm ) +# in COMMON_WITH_UI -> must have .h and .cxx and VTK7.ui +#Ensure compatibility with QVTKOpenGL for VTK < v8.1 and QVTKOpenGLNativeWidget for others +set(vv_COMMON_WITH_UI_VTK7 + vvMainWindow + vvSegmentationDialog + vvSurfaceViewerDialog +) # All others sources set(vv_SRCS @@ -208,7 +217,7 @@ endif(CLITK_USE_PACS_CONNECTION) # variables in vv.cxx for the tools contained in vvLib if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) - foreach(tool ${vv_TOOLS}) + foreach(tool ${vv_TOOLS} ${vv_TOOLS_VTK7}) file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n") @@ -226,6 +235,28 @@ endif(CLITK_USE_PACS_CONNECTION) QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) endif() endforeach(tool) + + #Special case for Main Window with QVTKWidget according VTK version + foreach(tool ${vv_TOOLS_VTK7} ${vv_COMMON_WITH_UI_VTK7}) + set(vv_SRCS ${vv_SRCS} ${tool}.cxx) + if(VTK_VERSION VERSION_GREATER "8.0.0") + if(vv_QT_VERSION VERSION_GREATER "4") + QT5_WRAP_CPP(vv_SRCS ${tool}.h) + QT5_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) + else() + QT4_WRAP_CPP(vv_SRCS ${tool}.h) + QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) + endif() + else() + if(vv_QT_VERSION VERSION_GREATER "4") + QT5_WRAP_CPP(vv_SRCS ${tool}.h) + QT5_WRAP_UI(vv_UI_CXX qt_ui/${tool}VTK7.ui) + else() + QT4_WRAP_CPP(vv_SRCS ${tool}.h) + QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}VTK7.ui) + endif() + endif() + endforeach(tool) # Add the common source files foreach(tool ${vv_COMMON}) @@ -301,7 +332,7 @@ include_directories( #========================================================= #Add each tool's dependencies -foreach(tool ${vv_TOOLS}) +foreach(tool ${vv_TOOLS} ${vv_TOOLS_VTK7}) set(toolLibs ${toolLibs} ${${tool}_LIBS}) endforeach(tool) diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index fa205e0..09050ba 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -651,7 +651,7 @@ 2 - + true @@ -691,7 +691,7 @@ 2 - + true @@ -733,7 +733,7 @@ 2 - + true @@ -770,7 +770,7 @@ 2 - + 0 @@ -1285,9 +1285,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
vvInfoPanel diff --git a/vv/qt_ui/vvMainWindowVTK7.ui b/vv/qt_ui/vvMainWindowVTK7.ui new file mode 100644 index 0000000..fa205e0 --- /dev/null +++ b/vv/qt_ui/vvMainWindowVTK7.ui @@ -0,0 +1,1332 @@ + + + vvMainWindow + + + true + + + + 0 + 0 + 1008 + 758 + + + + + 0 + 0 + + + + vv : the 4D Slicer + + + + :/common/icons/ducky.png:/common/icons/ducky.png + + + Type 'F1' on image to display help on navigation + + + + + 0 + 0 + + + + Type 'F1' on image to display help on navigation + + + + + + + 0 + 0 + + + + + 16 + 36 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Go to cursor + + + + + + + :/common/icons/cross.png:/common/icons/cross.png + + + + + + + QFrame::Sunken + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Play Current Image + + + + + + + :/common/icons/player_play.png:/common/icons/player_play.png + + + + + + + Qt::Vertical + + + + + + + Window : + + + + + + + 6 + + + -66000.000000000000000 + + + 66000.000000000000000 + + + 10.000000000000000 + + + + + + + + 0 + 0 + + + + + 24 + 16777215 + + + + Inverse colors + + + + + + + :/common/icons/invertcolor.png:/common/icons/invertcolor.png + + + + + + + Level : + + + + + + + 6 + + + -66000.000000000000000 + + + 66000.000000000000000 + + + 10.000000000000000 + + + + + + + Preset : + + + + + + + + 0 + 0 + + + + + 100 + 16777215 + + + + + Auto Scale + + + + + Hounsfield Full Scale + + + + + Soft Tissue + + + + + Lungs + + + + + Bones + + + + + Head/Brain + + + + + [0,1] Scale + + + + + User Scale + + + + + Ventilation Image + + + + + + + + Colormap : + + + + + + + + B&W + + + + + Heat + + + + + Cold + + + + + Dosimetry + + + + + Full Color + + + + + Segmentation + + + + + Ventilation + + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Expand window + + + + + + + :/common/icons/adjustsize.png:/common/icons/adjustsize.png + + + + + + + 1 + + + 100 + + + 10 + + + + + + + Speed : + + + + + + + true + + + + 24 + 16777215 + + + + Apply windowing to all images + + + All + + + + + + + + World + + + + + Voxels + + + + + + + + Slice to + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Qt::Horizontal + + + + Qt::Vertical + + + + + 0 + 1 + + + + 0 + + + + Images + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + Qt::ScrollBarAsNeeded + + + false + + + Qt::ElideLeft + + + true + + + 7 + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Data + + + + + 6 + + + + + 8 + + + + + + + + + + 0 + 0 + + + + Overlay + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + ROI + + + + + + + 0 + 0 + + + + Link + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + + 0 + 0 + + + + Landmarks + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + + true + + + + 0 + 0 + + + + + + + + 1 + 0 + + + + Qt::Horizontal + + + + Qt::Vertical + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Vertical + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + + + + + + + 0 + 0 + 1008 + 27 + + + + false + + + + Help + + + + + + + + Overlay + + + + + + + + + Screenshots + + + + + + + + + + + Experimental + + + + + + + + + + Tools + + + + + File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :/common/icons/fileopen.png:/common/icons/fileopen.png + + + Open image(s) + + + Ctrl+O + + + true + + + + + Close images + + + + + + :/common/icons/exit.png:/common/icons/exit.png + + + Exit + + + true + + + + + Save screenshot + + + + + pickable + + + + + dragable + + + + + Set colormap + + + + + IsoContours + + + + + About QtVTKRender2D + + + + + About + + + true + + + + + Reload images + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open Dicom + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Merge several nD images into a single (n+1)D image + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Slice a nD image into several (n-1)D images + + + true + + + + + Open One Image As Multiple + + + + + + :/common/icons/filesave.png:/common/icons/filesave.png + + + Save current image + + + Ctrl+S + + + true + + + + + + :/common/icons/cursor-uparrow.png:/common/icons/cursor-uparrow.png + + + Add deformation field to current image + + + true + + + + + + :/common/icons/NOgrid.png:/common/icons/NOgrid.png + + + Save image in TL + + + true + + + + + + :/common/icons/NEgrid.png:/common/icons/NEgrid.png + + + Save image in TR + + + true + + + + + + :/common/icons/SOgrid.png:/common/icons/SOgrid.png + + + Save image in BL + + + true + + + + + + :/common/icons/SEgrid.png:/common/icons/SEgrid.png + + + Save image in BR + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open a nD image as a (n-1)D + t image + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open several nD images into a single nD+t image + + + true + + + + + + :/common/icons/fusion.png:/common/icons/fusion.png + + + Add fusion image to current image + + + true + + + + + Segmentation + + + true + + + + + Resample + + + + + Surface Viewer + + + true + + + + + joelDebug + + + + + Deformable Registration + + + true + + + + + Verify Registration + + + true + + + + + Maximum Intensity Projection + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open VTK or OBJ contour + + + true + + + + + Navigation Help + + + true + + + QAction::NormalPriority + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open Dicom-Struct + + + true + + + + + Compute mid-position image + + + true + + + + + Experimental... + + + + + Register vv + + + true + + + + + Save all slices (Top-Left view) + + + + + + :/common/icons/filesave.png:/common/icons/filesave.png + + + Save current state + + + Save current window and file states + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Read Saved State + + + true + + + + + + :/common/icons/GPSup.png:/common/icons/GPSup.png + + + Add overlay image to current image + + + true + + + + + + :/common/icons/rotateright.png:/common/icons/rotateright.png + + + Test / Fusion of US & CT sequences + + + true + + + + + Connect Pacs + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+ + vvInfoPanel + QWidget +
vvInfoPanel.h
+
+ + vvLandmarksPanel + QWidget +
vvLandmarksPanel.h
+
+ + vvLinkPanel + QWidget +
vvLinkPanel.h
+
+ + vvOverlayPanel + QWidget +
vvOverlayPanel.h
+
+
+ + presetComboBox + windowSpinBox + levelSpinBox + NOViewWidget + NOVerticalSlider + NOHorizontalSlider + SOVerticalSlider + SOHorizontalSlider + NEVerticalSlider + NEHorizontalSlider + SEVerticalSlider + SEHorizontalSlider + viewButton + + + + + +
diff --git a/vv/qt_ui/vvSegmentationDialog.ui b/vv/qt_ui/vvSegmentationDialog.ui index 4767625..d7e9309 100644 --- a/vv/qt_ui/vvSegmentationDialog.ui +++ b/vv/qt_ui/vvSegmentationDialog.ui @@ -28,7 +28,7 @@
- + @@ -132,9 +132,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvSegmentationDialogVTK7.ui b/vv/qt_ui/vvSegmentationDialogVTK7.ui new file mode 100644 index 0000000..4767625 --- /dev/null +++ b/vv/qt_ui/vvSegmentationDialogVTK7.ui @@ -0,0 +1,159 @@ + + vvSegmentationDialog + + + + 0 + 0 + 561 + 453 + + + + Segmentation tool + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + + + + + 0 + 0 + + + + Min : + + + + + + + Max : + + + + + + + + 0 + 0 + + + + Binarise + + + + + + + Erode + + + + + + + Dilate + + + + + + + Kernel Size : + + + + + + + 1 + + + 2 + + + + + + + + 0 + 0 + + + + 3D + + + + + + + Save As + + + + + + + Close + + + + + + + TextLabel + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + + + closeButton + clicked() + vvSegmentationDialog + reject() + + + 528 + 403 + + + 542 + 423 + + + + +
diff --git a/vv/qt_ui/vvSurfaceViewerDialog.ui b/vv/qt_ui/vvSurfaceViewerDialog.ui index 6683830..a87d8ff 100644 --- a/vv/qt_ui/vvSurfaceViewerDialog.ui +++ b/vv/qt_ui/vvSurfaceViewerDialog.ui @@ -14,7 +14,7 @@ - + @@ -47,9 +47,9 @@
- QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui b/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui new file mode 100644 index 0000000..6683830 --- /dev/null +++ b/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui @@ -0,0 +1,74 @@ + + vvSurfaceViewerDialog + + + + 0 + 0 + 554 + 472 + + + + Dialog + + + + + + + + + Qt::Horizontal + + + + 311 + 20 + + + + + + + + Load + + + + + + + Close + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + + + closeButton + clicked() + vvSurfaceViewerDialog + reject() + + + 492 + 436 + + + 443 + 435 + + + + +
diff --git a/vv/qt_ui/vvToolHistogram.ui b/vv/qt_ui/vvToolHistogram.ui index 01851e0..7cc94e9 100644 --- a/vv/qt_ui/vvToolHistogram.ui +++ b/vv/qt_ui/vvToolHistogram.ui @@ -78,7 +78,7 @@
- + 0 @@ -96,9 +96,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvToolHistogramVTK7.ui b/vv/qt_ui/vvToolHistogramVTK7.ui new file mode 100644 index 0000000..01851e0 --- /dev/null +++ b/vv/qt_ui/vvToolHistogramVTK7.ui @@ -0,0 +1,106 @@ + + + vvToolHistogram + + + + 0 + 0 + 506 + 452 + + + + Histogram image + + + + + + + + 6 + + + + + + + + 0 + 0 + + + + Save Histogram + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 300 + + + + true + + + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + +
diff --git a/vv/qt_ui/vvToolProfile.ui b/vv/qt_ui/vvToolProfile.ui index bc3c9c8..fb0b5ad 100644 --- a/vv/qt_ui/vvToolProfile.ui +++ b/vv/qt_ui/vvToolProfile.ui @@ -141,7 +141,7 @@
- + 0 @@ -159,9 +159,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvToolProfileVTK7.ui b/vv/qt_ui/vvToolProfileVTK7.ui new file mode 100644 index 0000000..bc3c9c8 --- /dev/null +++ b/vv/qt_ui/vvToolProfileVTK7.ui @@ -0,0 +1,169 @@ + + + vvToolProfile + + + + 0 + 0 + 505 + 452 + + + + Profile image + + + + + + + + 6 + + + + + + + Select point 2 + + + + + + + Center of voxel2 (vox): + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + Cancel + + + + + + + + 0 + 0 + + + + Save Profile + + + + + + + + + + + Select point 1 + + + + + + + Center of voxel1 (vox): + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 300 + + + + true + + + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + +
diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 153b461..30f7da5 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -3300,7 +3300,11 @@ void vvMainWindow::SaveSEScreenshot() //------------------------------------------------------------------------------ void vvMainWindow::SaveScreenshotAllSlices() { +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 + QVTKOpenGLNativeWidget *widget = NOViewWidget; +#else QVTKWidget *widget = NOViewWidget; +#endif int index = 0;// GetSlicerIndexFromItem(DataTree->selectedItems()[0]); vvSlicerManager * SM = mSlicerManagers[index]; @@ -3356,7 +3360,11 @@ void vvMainWindow::SaveScreenshotAllSlices() //------------------------------------------------------------------------------ +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +void vvMainWindow::SaveScreenshot(QVTKOpenGLNativeWidget *widget) +#else void vvMainWindow::SaveScreenshot(QVTKWidget *widget) +#endif { QString Extensions = "Images( *.png);;"; Extensions += "Images( *.jpg);;"; diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 2d6a21d..07f38e5 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -22,7 +22,12 @@ #include #include #include +#include "vtkVersion.h" +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvMainWindow.h" +#else +#include "ui_vvMainWindowVTK7.h" +#endif #include "vvMainWindowBase.h" #include "vvToolManager.h" #include "vvImageReader.h" @@ -227,7 +232,11 @@ private: QString GetVectorIntAsString(std::vector vectorInt); int GetSlicerIndexFromItem(QTreeWidgetItem* item); //this actually returns the SlicerManager index TODO: rename it to GetSlicerManagerIndexFromItem QTreeWidgetItem* GetItemFromSlicerManager(vvSlicerManager* sm); +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 + void SaveScreenshot(QVTKOpenGLNativeWidget *widget); +#else void SaveScreenshot(QVTKWidget *widget); +#endif int GetImageDuplicateFilenameNumber(std::string filename); QMenu contextMenu; diff --git a/vv/vvSegmentationDialog.h b/vv/vvSegmentationDialog.h index f457df5..d359e5d 100644 --- a/vv/vvSegmentationDialog.h +++ b/vv/vvSegmentationDialog.h @@ -17,7 +17,12 @@ ===========================================================================**/ #ifndef _VVSEGMENTATIONDIALOG_H #define _VVSEGMENTATIONDIALOG_H +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSegmentationDialog.h" +#else +#include "ui_vvSegmentationDialogVTK7.h" +#endif #include "clitkCommon.h" #include "vvImage.h" #include "vvSlicerManager.h" diff --git a/vv/vvSurfaceViewerDialog.h b/vv/vvSurfaceViewerDialog.h index f53c9bb..c0a8840 100644 --- a/vv/vvSurfaceViewerDialog.h +++ b/vv/vvSurfaceViewerDialog.h @@ -17,7 +17,12 @@ ===========================================================================**/ #ifndef _vvSurfaceViewerDialog_H #define _vvSurfaceViewerDialog_H +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSurfaceViewerDialog.h" +#else +#include "ui_vvSurfaceViewerDialogVTK7.h" +#endif class vtkPolyDataMapper; class vtkActor; diff --git a/vv/vvToolHistogram.cxx b/vv/vvToolHistogram.cxx index 293fbcd..939642a 100644 --- a/vv/vvToolHistogram.cxx +++ b/vv/vvToolHistogram.cxx @@ -311,7 +311,11 @@ void vvToolHistogram::InputIsSelected(vvSlicerManager * m) //------------------------------------------------------------------------------ +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +QVTKOpenGLNativeWidget* vvToolHistogram::GetHistogramWidget() +#else QVTKWidget* vvToolHistogram::GetHistogramWidget() +#endif { return(HistogramWidget); } diff --git a/vv/vvToolHistogram.h b/vv/vvToolHistogram.h index 437e4e6..3897c90 100644 --- a/vv/vvToolHistogram.h +++ b/vv/vvToolHistogram.h @@ -27,7 +27,12 @@ #include "vvToolBase.h" #include "vvToolWidgetBase.h" +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolHistogram.h" +#else +#include "ui_vvToolHistogramVTK7.h" +#endif #include "clitkHistogramImage_ggo.h" #include "clitkHistogramImageGenericFilter.h" @@ -61,7 +66,11 @@ class vvToolHistogram: void displayHistogram(); +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 + QVTKOpenGLNativeWidget* GetHistogramWidget(); +#else QVTKWidget* GetHistogramWidget(); +#endif //----------------------------------------------------- public slots: diff --git a/vv/vvToolProfile.h b/vv/vvToolProfile.h index 0410637..0f94ff3 100644 --- a/vv/vvToolProfile.h +++ b/vv/vvToolProfile.h @@ -29,7 +29,12 @@ #include "vvToolWidgetBase.h" #include "vvImageContour.h" #include "vvLandmarks.h" +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolProfile.h" +#else +#include "ui_vvToolProfileVTK7.h" +#endif #include "vvBinaryImageOverlayActor.h" #include "clitkProfileImage_ggo.h"