diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 90be224..8c2d499 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -16,6 +16,10 @@ jobs: CONFIG: linux_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_64_python3.12.____cpython: + CONFIG: linux_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.8.____cpython: CONFIG: linux_64_python3.8.____cpython UPLOAD_PACKAGES: 'True' @@ -25,6 +29,7 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: # configure qemu binfmt-misc running. This allows us to run docker containers @@ -37,6 +42,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 6ba8295..5e755a9 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-12 strategy: matrix: osx_64_python3.10.____cpython: @@ -14,6 +14,9 @@ jobs: osx_64_python3.11.____cpython: CONFIG: osx_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' + osx_64_python3.12.____cpython: + CONFIG: osx_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' osx_64_python3.8.____cpython: CONFIG: osx_64_python3.8.____cpython UPLOAD_PACKAGES: 'True' @@ -21,11 +24,15 @@ jobs: CONFIG: osx_64_python3.9.____cpython UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index b6303f1..d707372 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -14,6 +14,9 @@ jobs: win_64_python3.11.____cpython: CONFIG: win_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' + win_64_python3.12.____cpython: + CONFIG: win_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' win_64_python3.8.____cpython: CONFIG: win_64_python3.8.____cpython UPLOAD_PACKAGES: 'True' @@ -51,6 +54,9 @@ jobs: PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index f7b223f..5de8aa5 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -15,7 +19,7 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_python_devel: -- '1.82' +- '1.84' pin_run_as_build: python: min_pin: x.x @@ -27,7 +31,9 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index 5b1c50d..ba6b0fa 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -15,7 +19,7 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_python_devel: -- '1.82' +- '1.84' pin_run_as_build: python: min_pin: x.x @@ -27,7 +31,9 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml new file mode 100644 index 0000000..4536706 --- /dev/null +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -0,0 +1,39 @@ +c_compiler: +- gcc +c_compiler_version: +- '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' +cdt_name: +- cos6 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +libboost_python_devel: +- '1.84' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- linux-64 +tbb_devel: +- '2021' +vtk: +- 9.3.0 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml index 78756ef..d27baf8 100644 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ b/.ci_support/linux_64_python3.8.____cpython.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -15,7 +19,7 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_python_devel: -- '1.82' +- '1.84' pin_run_as_build: python: min_pin: x.x @@ -27,7 +31,9 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 7cdb980..488455b 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -15,7 +19,7 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_python_devel: -- '1.82' +- '1.84' pin_run_as_build: python: min_pin: x.x @@ -27,7 +31,9 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/migrations/boost_cpp_to_libboost.yaml b/.ci_support/migrations/boost_cpp_to_libboost.yaml deleted file mode 100644 index d4da41e..0000000 --- a/.ci_support/migrations/boost_cpp_to_libboost.yaml +++ /dev/null @@ -1,21 +0,0 @@ -migrator_ts: 1695775149 -__migrator: - kind: version - migration_number: 1 - bump_number: 1 - commit_message: "Rebuild for libboost 1.82" - # limit the number of prs for ramp-up - pr_limit: 20 - max_solver_attempts: 3 # this will make the bot retry "not solvable" stuff 3 times -libboost_devel: - - 1.82 -# This migration is matched with a piggy-back migrator -# (see https://github.com/regro/cf-scripts/pull/1668) -# that will replace boost-cpp with libboost-devel -boost_cpp: - - 1.82 -# same for boost -> libboost-python-devel -libboost_python_devel: - - 1.82 -boost: - - 1.82 diff --git a/.ci_support/migrations/vtk930.yaml b/.ci_support/migrations/vtk930.yaml new file mode 100644 index 0000000..b368222 --- /dev/null +++ b/.ci_support/migrations/vtk930.yaml @@ -0,0 +1,7 @@ +__migrator: + build_number: 1 + kind: version + migration_number: 1 +migrator_ts: 1718606940.144743 +vtk: +- 9.3.0 diff --git a/.ci_support/osx_64_python3.10.____cpython.yaml b/.ci_support/osx_64_python3.10.____cpython.yaml index b46a08a..f9be9ac 100644 --- a/.ci_support/osx_64_python3.10.____cpython.yaml +++ b/.ci_support/osx_64_python3.10.____cpython.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -13,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '16' libboost_python_devel: -- '1.82' +- '1.84' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -27,7 +33,7 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.11.____cpython.yaml b/.ci_support/osx_64_python3.11.____cpython.yaml index 71d9b9d..13a3407 100644 --- a/.ci_support/osx_64_python3.11.____cpython.yaml +++ b/.ci_support/osx_64_python3.11.____cpython.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -13,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '16' libboost_python_devel: -- '1.82' +- '1.84' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -27,7 +33,7 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.12.____cpython.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml new file mode 100644 index 0000000..91cb2ca --- /dev/null +++ b/.ci_support/osx_64_python3.12.____cpython.yaml @@ -0,0 +1,39 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' +c_compiler: +- clang +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '16' +libboost_python_devel: +- '1.84' +macos_machine: +- x86_64-apple-darwin13.4.0 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- osx-64 +tbb_devel: +- '2021' +vtk: +- 9.3.0 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.8.____cpython.yaml b/.ci_support/osx_64_python3.8.____cpython.yaml index 8978c7b..781c998 100644 --- a/.ci_support/osx_64_python3.8.____cpython.yaml +++ b/.ci_support/osx_64_python3.8.____cpython.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -13,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '16' libboost_python_devel: -- '1.82' +- '1.84' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -27,7 +33,7 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.9.____cpython.yaml index 1c10885..c7c10c8 100644 --- a/.ci_support/osx_64_python3.9.____cpython.yaml +++ b/.ci_support/osx_64_python3.9.____cpython.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -13,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '16' libboost_python_devel: -- '1.82' +- '1.84' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -27,7 +33,7 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/win_64_python3.10.____cpython.yaml index cc72e48..0496138 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_python3.10.____cpython.yaml @@ -1,5 +1,7 @@ c_compiler: - vs2019 +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: @@ -17,4 +19,4 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/win_64_python3.11.____cpython.yaml index 48a6ccb..513eff7 100644 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ b/.ci_support/win_64_python3.11.____cpython.yaml @@ -1,5 +1,7 @@ c_compiler: - vs2019 +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: @@ -17,4 +19,4 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 diff --git a/.ci_support/win_64_python3.12.____cpython.yaml b/.ci_support/win_64_python3.12.____cpython.yaml new file mode 100644 index 0000000..938077b --- /dev/null +++ b/.ci_support/win_64_python3.12.____cpython.yaml @@ -0,0 +1,22 @@ +c_compiler: +- vs2019 +c_stdlib: +- vs +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- vs2019 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- win-64 +tbb_devel: +- '2021' +vtk: +- 9.3.0 diff --git a/.ci_support/win_64_python3.8.____cpython.yaml b/.ci_support/win_64_python3.8.____cpython.yaml index d2e6a74..7a0652b 100644 --- a/.ci_support/win_64_python3.8.____cpython.yaml +++ b/.ci_support/win_64_python3.8.____cpython.yaml @@ -1,5 +1,7 @@ c_compiler: - vs2019 +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: @@ -17,4 +19,4 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 diff --git a/.ci_support/win_64_python3.9.____cpython.yaml b/.ci_support/win_64_python3.9.____cpython.yaml index 141e8e0..30f9a6a 100644 --- a/.ci_support/win_64_python3.9.____cpython.yaml +++ b/.ci_support/win_64_python3.9.____cpython.yaml @@ -1,5 +1,7 @@ c_compiler: - vs2019 +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: @@ -17,4 +19,4 @@ target_platform: tbb_devel: - '2021' vtk: -- 9.2.6 +- 9.3.0 diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/.gitignore b/.gitignore index c89ecb7..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -*.pyc +# User content belongs under recipe/. +# Feedstock configuration goes in `conda-forge.yml` +# Everything else is managed by the conda-smithy rerender process. +# Please do not modify + +# Ignore all files and folders in root +* +!/conda-forge.yml + +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders +!/recipe/** +!/.ci_support/** -build_artifacts +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + +*.pyc diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index b206c50..db45603 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,13 +28,15 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -71,9 +73,17 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -91,6 +97,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 4758f0d..0c9e992 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -22,11 +22,13 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" @@ -45,6 +47,10 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -71,9 +77,17 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index c4486d9..24ef201 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -17,10 +17,14 @@ call :start_group "Configuring conda" :: Activate the base conda environment call activate base +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Provision the necessary dependencies to build the recipe later echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes if !errorlevel! neq 0 exit /b !errorlevel! :: Set basic configuration @@ -38,13 +42,22 @@ if EXIST LICENSE.txt ( copy LICENSE.txt "recipe\\recipe-scripts-license.txt" ) +if NOT [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" +) + call :end_group :: Build the recipe echo Building recipe -conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! +call :start_group "Inspecting artifacts" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +call :end_group + :: Prepare some environment variables for the upload step if /i "%CI%" == "github_actions" ( set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" diff --git a/README.md b/README.md index a9e7f34..395744d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,13 @@ Current build status variant + + linux_64_python3.12.____cpython + + + variant + + linux_64_python3.8.____cpython @@ -75,6 +82,13 @@ Current build status variant + + osx_64_python3.12.____cpython + + + variant + + osx_64_python3.8.____cpython @@ -103,6 +117,13 @@ Current build status variant + + win_64_python3.12.____cpython + + + variant + + win_64_python3.8.____cpython @@ -198,7 +219,7 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6b346f5..e5306da 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,5 +4,5 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..e0d408d 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 45a5d07..f0ceafb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,13 +14,15 @@ source: - patches/0002-temporary-patch-for-testing-changes-to-vtkAddon.patch - patches/0003-Disable-joblib.patch # [osx] - patches/0004-Fix-tests-for-new-vtk-version.patch + - patches/0005-Fix-build-errors-with-VTK9.3.patch build: - number: 14 + number: 15 requirements: build: - {{ compiler('c') }} + - {{ stdlib("c") }} - {{ compiler('cxx') }} - {{ cdt('mesa-libgl-devel') }} # [linux] - {{ cdt('mesa-dri-drivers') }} # [linux] @@ -43,7 +45,7 @@ requirements: - xorg-libxfixes # [linux] - llvm - setuptools # [win] - - libboost-python-devel # [unix] + - libboost-python-devel 1.85 # [unix] run: - python - future diff --git a/recipe/patches/0005-Fix-build-errors-with-VTK9.3.patch b/recipe/patches/0005-Fix-build-errors-with-VTK9.3.patch new file mode 100644 index 0000000..f66dc37 --- /dev/null +++ b/recipe/patches/0005-Fix-build-errors-with-VTK9.3.patch @@ -0,0 +1,615 @@ +From f355f8066159fba2665a3937d48b53b6da169a33 Mon Sep 17 00:00:00 2001 +From: Tom Sobczynski +Date: Thu, 11 Apr 2024 17:08:48 -0400 +Subject: [PATCH] Updates for compatibility with ITK 5.4 and VTK 9.3 plus some + extra consideration for CMake 3.29 + +--- + CMakeLists.txt | 10 ++- + .../vtkvmtkSimplifyVoronoiDiagram.cxx | 6 +- + .../Contrib/vtkvmtkCellDimensionFilter.cxx | 11 ++- + ...cDiffusionVesselEnhancementImageFilter.txx | 31 +++++++ + ...stMarchingDirectionalFreezeImageFilter.txx | 8 ++ + ...kFastMarchingUpwindGradientImageFilter.txx | 8 ++ + ...oothed3DToVesselnessMeasureImageFilter.txx | 5 ++ + ...stMarchingDirectionalFreezeImageFilter.cxx | 8 ++ + ...kFastMarchingUpwindGradientImageFilter.cxx | 8 ++ + .../Segmentation/vtkvmtkMedialCurveFilter.cxx | 9 ++- + vtkVmtk/Utilities/Doxygen/CMakeLists.txt | 2 +- + .../vtkvmtkITKArchetypeImageSeriesReader.cxx | 80 +++++++++++++++++++ + .../vtkvmtkITKArchetypeImageSeriesReader.h | 18 +++++ + 13 files changed, 193 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4043110..0d46a7c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.3) ++cmake_minimum_required(VERSION 3.12...3.29.1) + + project(VMTK) + +@@ -27,7 +27,7 @@ if(VMTK_WITH_LIBRARY_VERSION) + ) + endif() + +-find_package( PythonInterp ) ++find_package( Python3 COMPONENTS Interpreter ) + if (NOT VMTK_PYTHON_VERSION) + set(VMTK_PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" CACHE STRING "" FORCE) + endif () +@@ -309,11 +309,17 @@ if(VMTK_SCRIPTS_ENABLED) + ${VMTK_BINARY_DIR}/VMTKConfig.cmake + @ONLY IMMEDIATE + ) ++ install(FILES ${VMTK_BINARY_DIR}/VMTKConfig.cmake ++ TYPE LIB ++ ) + + configure_file( + ${VMTK_SOURCE_DIR}/CMake/VMTKUse.cmake.in + ${VMTK_BINARY_DIR}/VMTKUse.cmake + @ONLY IMMEDIATE + ) ++ install(FILES ${VMTK_BINARY_DIR}/VMTKUse.cmake ++ TYPE LIB ++ ) + + endif() +diff --git a/vtkVmtk/ComputationalGeometry/vtkvmtkSimplifyVoronoiDiagram.cxx b/vtkVmtk/ComputationalGeometry/vtkvmtkSimplifyVoronoiDiagram.cxx +index 3ac28f0..75b0218 100644 +--- a/vtkVmtk/ComputationalGeometry/vtkvmtkSimplifyVoronoiDiagram.cxx ++++ b/vtkVmtk/ComputationalGeometry/vtkvmtkSimplifyVoronoiDiagram.cxx +@@ -195,8 +195,8 @@ int vtkvmtkSimplifyVoronoiDiagram::RequestData( + // return 0; + // } + poly->SetPolys(currentPolys); +- +-#if (VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 0 && VTK_BUILD_VERSION >= 20221108) ++ ++#if ((VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 0 && VTK_BUILD_VERSION >= 20221108) || (VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 2 && VTK_BUILD_VERSION >= 0)) + currentLinks->SetDataSet(poly); + currentLinks->BuildLinks(); + #else +@@ -296,7 +296,7 @@ int vtkvmtkSimplifyVoronoiDiagram::RequestData( + // #pragma message "vtkvmtkSimplifyVoronoiDiagram::RequestData not functional. Must be updated based on Kitware/VTK@88efc809a" + // vtkErrorMacro(<< "!"); + poly->SetPolys(currentPolys); +-#if (VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 0 && VTK_BUILD_VERSION >= 20221108) ++#if ((VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 0 && VTK_BUILD_VERSION >= 20221108) || (VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 2 && VTK_BUILD_VERSION >= 0)) + currentLinks->SetDataSet(poly); + currentLinks->BuildLinks(); + #else +diff --git a/vtkVmtk/Contrib/vtkvmtkCellDimensionFilter.cxx b/vtkVmtk/Contrib/vtkvmtkCellDimensionFilter.cxx +index 4e54cf3..2ea916e 100644 +--- a/vtkVmtk/Contrib/vtkvmtkCellDimensionFilter.cxx ++++ b/vtkVmtk/Contrib/vtkvmtkCellDimensionFilter.cxx +@@ -59,17 +59,22 @@ int vtkvmtkCellDimensionFilter::FillInputPortInformation(int, vtkInformation *in + + void vtkvmtkCellDimensionFilter::ThresholdByLower(int lower) + { +- Threshold->ThresholdByLower(lower); ++ Threshold->SetLowerThreshold(lower); ++ Threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_LOWER); ++ + } + + void vtkvmtkCellDimensionFilter::ThresholdByUpper(int upper) + { +- Threshold->ThresholdByUpper(upper); ++ Threshold->SetUpperThreshold(upper); ++ Threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_UPPER); + } + + void vtkvmtkCellDimensionFilter::ThresholdBetween(int lower, int upper) + { +- Threshold->ThresholdBetween(lower,upper); ++ Threshold->SetLowerThreshold(lower); ++ Threshold->SetUpperThreshold(upper); ++ Threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); + } + + int vtkvmtkCellDimensionFilter::GetLowerThreshold() +diff --git a/vtkVmtk/Segmentation/itkAnisotropicDiffusionVesselEnhancementImageFilter.txx b/vtkVmtk/Segmentation/itkAnisotropicDiffusionVesselEnhancementImageFilter.txx +index 47755ac..5617000 100644 +--- a/vtkVmtk/Segmentation/itkAnisotropicDiffusionVesselEnhancementImageFilter.txx ++++ b/vtkVmtk/Segmentation/itkAnisotropicDiffusionVesselEnhancementImageFilter.txx +@@ -330,7 +330,11 @@ AnisotropicDiffusionVesselEnhancementImageFilter= 5) ++ this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); ++#else + this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfThreads()); ++#endif + this->GetMultiThreader()->SetSingleMethod(this->ApplyUpdateThreaderCallback, + &str); + // Multithread the execution +@@ -342,6 +346,14 @@ itk::ITK_THREAD_RETURN_TYPE + AnisotropicDiffusionVesselEnhancementImageFilter + ::ApplyUpdateThreaderCallback( void * arg ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ using Info = PlatformMultiThreader::WorkUnitInfo; ++ const auto info = reinterpret_cast(arg); ++ const auto threadId = info->WorkUnitID; ++ const auto threadCount = info->NumberOfWorkUnits; ++ const auto str = reinterpret_cast(info->UserData); ++ int total; ++#else + DenseFDThreadStruct * str; + ThreadIdType threadId; + int total, threadCount; +@@ -350,6 +362,8 @@ AnisotropicDiffusionVesselEnhancementImageFilterNumberOfThreads; + + str = (DenseFDThreadStruct *)(((PlatformMultiThreader::ThreadInfoStruct *)(arg))->UserData); ++#endif ++ + + // Execute the actual method with appropriate output region + // first find out how many pieces extent can be split into. +@@ -389,14 +403,22 @@ AnisotropicDiffusionVesselEnhancementImageFilter::Zero; // Not used during the + // calculate change step. ++#if (ITK_VERSION_MAJOR >= 5) ++ this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); ++#else + this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfThreads()); ++#endif + this->GetMultiThreader()->SetSingleMethod(this->CalculateChangeThreaderCallback, + &str); + + // Initialize the list of time step values that will be generated by the + // various threads. There is one distinct slot for each possible thread, + // so this data structure is thread-safe. ++#if (ITK_VERSION_MAJOR >= 5) ++ threadCount = this->GetMultiThreader()->GetNumberOfWorkUnits(); ++#else + threadCount = this->GetMultiThreader()->GetNumberOfThreads(); ++#endif + str.TimeStepList.resize(threadCount); + str.ValidTimeStepList.resize(threadCount); + for (int i =0; i < threadCount; ++i) +@@ -418,6 +440,14 @@ itk::ITK_THREAD_RETURN_TYPE + AnisotropicDiffusionVesselEnhancementImageFilter + ::CalculateChangeThreaderCallback( void * arg ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ using Info = PlatformMultiThreader::WorkUnitInfo; ++ const auto info = reinterpret_cast(arg); ++ const auto threadId = info->WorkUnitID; ++ const auto threadCount = info->NumberOfWorkUnits; ++ const auto str = reinterpret_cast(info->UserData); ++ int total; ++#else + DenseFDThreadStruct * str; + ThreadIdType threadId; + int total, threadCount; +@@ -426,6 +456,7 @@ AnisotropicDiffusionVesselEnhancementImageFilterNumberOfThreads; + + str = (DenseFDThreadStruct *)(((PlatformMultiThreader::ThreadInfoStruct *)(arg))->UserData); ++#endif + + // Execute the actual method with appropriate output region + // first find out how many pieces extent can be split into. +diff --git a/vtkVmtk/Segmentation/itkFastMarchingDirectionalFreezeImageFilter.txx b/vtkVmtk/Segmentation/itkFastMarchingDirectionalFreezeImageFilter.txx +index 286a644..0687a36 100644 +--- a/vtkVmtk/Segmentation/itkFastMarchingDirectionalFreezeImageFilter.txx ++++ b/vtkVmtk/Segmentation/itkFastMarchingDirectionalFreezeImageFilter.txx +@@ -194,7 +194,11 @@ FastMarchingDirectionalFreezeImageFilter + if(! (neighIndex[j] > lastIndex[j] || + neighIndex[j] < startIndex[j]) ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::LabelEnum::AlivePoint ) ++#else + if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::AlivePoint ) ++#endif + { + dx_backward = centerPixel - output->GetPixel( neighIndex ); + } +@@ -206,7 +210,11 @@ FastMarchingDirectionalFreezeImageFilter + if(! (neighIndex[j] > lastIndex[j] || + neighIndex[j] < startIndex[j]) ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::LabelEnum::AlivePoint ) ++#else + if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::AlivePoint ) ++#endif + { + dx_forward = output->GetPixel( neighIndex ) - centerPixel; + } +diff --git a/vtkVmtk/Segmentation/itkFastMarchingUpwindGradientImageFilter.txx b/vtkVmtk/Segmentation/itkFastMarchingUpwindGradientImageFilter.txx +index 4d9acfa..001a49d 100644 +--- a/vtkVmtk/Segmentation/itkFastMarchingUpwindGradientImageFilter.txx ++++ b/vtkVmtk/Segmentation/itkFastMarchingUpwindGradientImageFilter.txx +@@ -286,7 +286,11 @@ FastMarchingUpwindGradientImageFilter + if(! (neighIndex[j] > lastIndex[j] || + neighIndex[j] < startIndex[j]) ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::LabelEnum::AlivePoint ) ++#else + if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::AlivePoint ) ++#endif + { + dx_backward = centerPixel - output->GetPixel( neighIndex ); + } +@@ -298,7 +302,11 @@ FastMarchingUpwindGradientImageFilter + if(! (neighIndex[j] > lastIndex[j] || + neighIndex[j] < startIndex[j]) ) + { ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::LabelEnum::AlivePoint ) ++#else + if ( this->GetLabelImage()->GetPixel( neighIndex ) == Superclass::AlivePoint ) ++#endif + { + dx_forward = output->GetPixel( neighIndex ) - centerPixel; + } +diff --git a/vtkVmtk/Segmentation/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx b/vtkVmtk/Segmentation/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx +index 63de6ed..befdd48 100644 +--- a/vtkVmtk/Segmentation/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx ++++ b/vtkVmtk/Segmentation/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx +@@ -42,8 +42,13 @@ HessianSmoothed3DToVesselnessMeasureImageFilter< TPixel > + + m_SymmetricEigenValueFilter = EigenAnalysisFilterType::New(); + m_SymmetricEigenValueFilter->SetDimension( ImageDimension ); ++#if (ITK_VERSION_MAJOR >=5) ++ m_SymmetricEigenValueFilter->OrderEigenValuesBy( ++ itk::SymmetricEigenAnalysisEnums::EigenValueOrder::OrderByValue ); ++#else + m_SymmetricEigenValueFilter->OrderEigenValuesBy( + EigenAnalysisFilterType::FunctorType::OrderByValue ); ++#endif + + // By default, *do not* scale the vesselness measure by the largest + // eigen value +diff --git a/vtkVmtk/Segmentation/vtkvmtkFastMarchingDirectionalFreezeImageFilter.cxx b/vtkVmtk/Segmentation/vtkvmtkFastMarchingDirectionalFreezeImageFilter.cxx +index 2cd0afa..c02a257 100644 +--- a/vtkVmtk/Segmentation/vtkvmtkFastMarchingDirectionalFreezeImageFilter.cxx ++++ b/vtkVmtk/Segmentation/vtkvmtkFastMarchingDirectionalFreezeImageFilter.cxx +@@ -85,8 +85,12 @@ void vtkvmtkFastMarchingDirectionalFreezeImageFilter::SimpleExecute(vtkImageData + { + // TODO: here we get the point. We should get the cell center instead. + ImageType::PointType seedPoint(input->GetPoint(this->Seeds->GetId(i))); ++#if (ITK_VERSION_MAJOR >= 5) ++ FastMarchingFilterType::NodeType::IndexType seedIndex = inImage->TransformPhysicalPointToIndex(seedPoint); ++#else + FastMarchingFilterType::NodeType::IndexType seedIndex; + inImage->TransformPhysicalPointToIndex(seedPoint,seedIndex); ++#endif + FastMarchingFilterType::PixelType seedValue = itk::NumericTraits::Zero; + FastMarchingFilterType::NodeType seed; + seed.SetValue(seedValue); +@@ -100,8 +104,12 @@ void vtkvmtkFastMarchingDirectionalFreezeImageFilter::SimpleExecute(vtkImageData + { + // TODO: here we get the point. We should get the cell center instead. + ImageType::PointType seedPoint(input->GetPoint(this->Targets->GetId(i))); ++#if (ITK_VERSION_MAJOR >= 5) ++ FastMarchingFilterType::NodeType::IndexType seedIndex = inImage->TransformPhysicalPointToIndex(seedPoint); ++#else + FastMarchingFilterType::NodeType::IndexType seedIndex; + inImage->TransformPhysicalPointToIndex(seedPoint,seedIndex); ++#endif + FastMarchingFilterType::PixelType seedValue = itk::NumericTraits::Zero; + FastMarchingFilterType::NodeType seed; + seed.SetValue(seedValue); +diff --git a/vtkVmtk/Segmentation/vtkvmtkFastMarchingUpwindGradientImageFilter.cxx b/vtkVmtk/Segmentation/vtkvmtkFastMarchingUpwindGradientImageFilter.cxx +index 5fd8616..4a153e2 100644 +--- a/vtkVmtk/Segmentation/vtkvmtkFastMarchingUpwindGradientImageFilter.cxx ++++ b/vtkVmtk/Segmentation/vtkvmtkFastMarchingUpwindGradientImageFilter.cxx +@@ -85,8 +85,12 @@ void vtkvmtkFastMarchingUpwindGradientImageFilter::SimpleExecute(vtkImageData* i + { + // TODO: here we get the point. We should get the cell center instead. + ImageType::PointType seedPoint(input->GetPoint(this->Seeds->GetId(i))); ++#if (ITK_VERSION_MAJOR >= 5) ++ FastMarchingFilterType::NodeType::IndexType seedIndex = inImage->TransformPhysicalPointToIndex(seedPoint); ++#else + FastMarchingFilterType::NodeType::IndexType seedIndex; + inImage->TransformPhysicalPointToIndex(seedPoint,seedIndex); ++#endif + FastMarchingFilterType::PixelType seedValue = itk::NumericTraits::Zero; + FastMarchingFilterType::NodeType seed; + seed.SetValue(seedValue); +@@ -100,8 +104,12 @@ void vtkvmtkFastMarchingUpwindGradientImageFilter::SimpleExecute(vtkImageData* i + { + // TODO: here we get the point. We should get the cell center instead. + ImageType::PointType seedPoint(input->GetPoint(this->Targets->GetId(i))); ++#if (ITK_VERSION_MAJOR >= 5) ++ FastMarchingFilterType::NodeType::IndexType seedIndex = inImage->TransformPhysicalPointToIndex(seedPoint); ++#else + FastMarchingFilterType::NodeType::IndexType seedIndex; + inImage->TransformPhysicalPointToIndex(seedPoint,seedIndex); ++#endif + FastMarchingFilterType::PixelType seedValue = itk::NumericTraits::Zero; + FastMarchingFilterType::NodeType seed; + seed.SetValue(seedValue); +diff --git a/vtkVmtk/Segmentation/vtkvmtkMedialCurveFilter.cxx b/vtkVmtk/Segmentation/vtkvmtkMedialCurveFilter.cxx +index 12d1fc1..ceabb4f 100755 +--- a/vtkVmtk/Segmentation/vtkvmtkMedialCurveFilter.cxx ++++ b/vtkVmtk/Segmentation/vtkvmtkMedialCurveFilter.cxx +@@ -84,10 +84,15 @@ void vtkvmtkMedialCurveFilter::SimpleExecute(vtkImageData* input, vtkImageData* + gaussianFilterY->SetDirection(1); + gaussianFilterZ->SetDirection(2); + ++#if (ITK_VERSION_MAJOR >= 5) ++ gaussianFilterX->SetOrder(itk::RecursiveGaussianImageFilterEnums::GaussianOrder::ZeroOrder); ++ gaussianFilterY->SetOrder(itk::RecursiveGaussianImageFilterEnums::GaussianOrder::ZeroOrder); ++ gaussianFilterZ->SetOrder(itk::RecursiveGaussianImageFilterEnums::GaussianOrder::ZeroOrder); ++#else + gaussianFilterX->SetOrder(RecursiveGaussianFilterType::ZeroOrder); + gaussianFilterY->SetOrder(RecursiveGaussianFilterType::ZeroOrder); + gaussianFilterZ->SetOrder(RecursiveGaussianFilterType::ZeroOrder); +- ++#endif + gaussianFilterX->SetNormalizeAcrossScale(false); + gaussianFilterY->SetNormalizeAcrossScale(false); + gaussianFilterZ->SetNormalizeAcrossScale(false); +@@ -123,4 +128,4 @@ void vtkvmtkMedialCurveFilter::SimpleExecute(vtkImageData* input, vtkImageData* + medialFilter->Update(); + + vtkvmtkITKFilterUtilities::ITKToVTKImage(medialFilter->GetOutput(),output); +-} +\ No newline at end of file ++} +diff --git a/vtkVmtk/Utilities/Doxygen/CMakeLists.txt b/vtkVmtk/Utilities/Doxygen/CMakeLists.txt +index 4202b21..564d178 100644 +--- a/vtkVmtk/Utilities/Doxygen/CMakeLists.txt ++++ b/vtkVmtk/Utilities/Doxygen/CMakeLists.txt +@@ -1,7 +1,7 @@ + # + # Build the documentation + # +-include (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) ++# Deprecated by CMake policy CMP0106: include (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) + + if (BUILD_DOCUMENTATION) + +diff --git a/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.cxx b/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.cxx +index 69225db..8e09895 100644 +--- a/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.cxx ++++ b/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.cxx +@@ -626,43 +626,83 @@ int vtkvmtkITKArchetypeImageSeriesReader::RequestInformation( + { + scalarType = VTK_SHORT; // TODO - figure out why multi-file series doen't have an imageIO + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::UCHAR) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::UCHAR) ++#endif + { + scalarType = VTK_UNSIGNED_CHAR; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::CHAR) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::CHAR) ++#endif + { + scalarType = VTK_CHAR; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::USHORT) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::USHORT) ++#endif + { + scalarType = VTK_UNSIGNED_SHORT; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::SHORT) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::SHORT) ++#endif + { + scalarType = VTK_SHORT; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::UINT) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::UINT) ++#endif + { + scalarType = VTK_UNSIGNED_INT; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::INT) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::INT) ++#endif + { + scalarType = VTK_INT; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::ULONG) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::ULONG) ++#endif + { + scalarType = VTK_UNSIGNED_LONG; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::LONG) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::LONG) ++#endif + { + scalarType = VTK_LONG; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::FLOAT) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::FLOAT) ++#endif + { + scalarType = VTK_FLOAT; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ else if (imageIO->GetComponentType() == itk::IOComponentEnum::DOUBLE) ++#else + else if (imageIO->GetComponentType() == itk::ImageIOBase::DOUBLE) ++#endif + { + scalarType = VTK_DOUBLE; + } +@@ -676,54 +716,94 @@ int vtkvmtkITKArchetypeImageSeriesReader::RequestInformation( + imageIO->SetFileName( this->FileNames[f] ); + imageIO->ReadImageInformation(); + ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::UCHAR ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::UCHAR ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::CHAR ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::CHAR ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::USHORT ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::USHORT ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::SHORT ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::SHORT ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::UINT ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::UINT ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::INT ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::INT ) ++#endif + { + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::ULONG ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::ULONG ) ++#endif + { // note that on windows ULONG is only 32 bit + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::LONG ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::LONG ) ++#endif + { // note that on windows LONG is only 32 bit + min = std::numeric_limits::min() < min ? std::numeric_limits::min() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::FLOAT ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::FLOAT ) ++#endif + { + // use -max() as min() for both float and double as temp workaround + // should switch to lowest() function in C++ 11 in the future + min = -std::numeric_limits::max() < min ? -std::numeric_limits::max() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; + } ++#if (ITK_VERSION_MAJOR >= 5) ++ if ( imageIO->GetComponentType() == itk::IOComponentEnum::DOUBLE ) ++#else + if ( imageIO->GetComponentType() == itk::ImageIOBase::DOUBLE ) ++#endif + { + min = -std::numeric_limits::max() < min ? -std::numeric_limits::max() : min; + max = std::numeric_limits::max() > max ? std::numeric_limits::max() : max; +diff --git a/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.h b/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.h +index 36d35a3..49fddac 100644 +--- a/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.h ++++ b/vtkVmtk/Utilities/vtkvmtkITK/vtkvmtkITKArchetypeImageSeriesReader.h +@@ -49,7 +49,11 @@ public: + vtkTypeMacro(vtkvmtkITKArchetypeImageSeriesReader,vtkImageAlgorithm); + void PrintSelf(std::ostream& os, vtkIndent indent) override; + ++#if (ITK_VERSION_MAJOR >= 5) ++ typedef itk::SpatialOrientationEnums::ValidCoordinateOrientations CoordinateOrientationCode; ++#else + typedef itk::SpatialOrientation::ValidCoordinateOrientationFlags CoordinateOrientationCode; ++#endif + + /// + /// Specify the archetype filename for the series. +@@ -110,16 +114,26 @@ public: + /// Set the orientation of the output image + void SetDesiredCoordinateOrientationToAxial () + { ++#if (ITK_VERSION_MAJOR >= 5) ++ this->DesiredCoordinateOrientation = ++ itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RAI; ++#else + this->DesiredCoordinateOrientation = + itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RAI; ++#endif + /// itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPS; + this->UseNativeCoordinateOrientation = 0; + this->Modified(); + } + void SetDesiredCoordinateOrientationToCoronal () + { ++#if (ITK_VERSION_MAJOR >= 5) ++ this->DesiredCoordinateOrientation = ++ itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RSA; ++#else + this->DesiredCoordinateOrientation = + itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RSA; ++#endif + /// itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP; + this->UseNativeCoordinateOrientation = 0; + this->Modified(); +@@ -127,7 +141,11 @@ public: + void SetDesiredCoordinateOrientationToSagittal () + { + this->DesiredCoordinateOrientation = ++#if (ITK_VERSION_MAJOR >= 5) ++ itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ASL; ++#else + itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_ASL; ++#endif + /// itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_AIR; + this->UseNativeCoordinateOrientation = 0; + this->Modified(); +-- +2.40.0.windows.1 +