# Test data for MITK's unit and rendering test suites. Only ever pulled in as a # BuildRequires by mitk with "--with testing"; nothing a user installs. # Upstream does NOT tag or version this repository -- CMakeExternals/MITKData.cmake # has its GIT_TAG line commented out, so MITK's own superbuild clones whatever the # default branch happens to be at build time. There is therefore no "the data that # matches release X"; we pin a commit ourselves so the package is reproducible. # Worth asking upstream to tag per release. %global commit 08f86e5569405d802bb707334b1b9c5a041558c5 %global shortcommit %(c=%{commit}; echo ${c:0:8}) %global snapdate 20260804 Name: mitk-data Version: 0 Release: 0.1.%{snapdate}git%{shortcommit}%{?dist} Summary: Test data for the Medical Imaging Interaction Toolkit test suites # LICENSE.txt at the repository root: BSD-3-Clause, German Cancer Research Center # (DKFZ), Division of Medical and Biological Informatics -- the same terms as MITK. License: BSD-3-Clause URL: https://codebase.helmholtz.cloud/mitk/mitk-data Source0: %{url}/-/archive/%{commit}/mitk-data-%{commit}.tar.gz BuildArch: noarch %description Reference images, segmentations, surfaces, DICOM series and rendering baselines used by MITK's unit and rendering tests. MITK normally git-clones this at build time; packaging it lets the test suite run in a network-isolated build root by pointing MITK_DATA_DIR at the installed copy. This package is a build-time dependency of mitk's test suite. It is not needed to run MITK or the MITK Workbench. %prep %autosetup -n mitk-data-%{commit} %build # Nothing to build -- this is data. %install mkdir -p %{buildroot}%{_datadir}/mitk-data # Copy everything except the license, which is installed via %%license below. find . -mindepth 1 -maxdepth 1 ! -name LICENSE.txt \ -exec cp -a {} %{buildroot}%{_datadir}/mitk-data/ \; # The tests resolve paths relative to MITK_DATA_DIR, so the layout must be # preserved exactly as it appears in the repository. Spot-check a few files the # segmentation and core suites reference by name; a silent layout change upstream # would otherwise ship a package whose tests all fail for no obvious reason. for f in Multilabel/EmptyMultiLabelSegmentation.nrrd \ BallBinary30x30x30.nrrd \ brain.nrrd; do test -f %{buildroot}%{_datadir}/mitk-data/"$f" \ || { echo "ERROR: expected test datum missing: $f"; exit 1; } done %files %license LICENSE.txt %{_datadir}/mitk-data/ %changelog * Tue Aug 04 2026 Morgan Hough - 0-0.1.20260804git08f86e55 - Initial package, pinned at 08f86e55. MITK's test suites need this data and cannot download it in a build root. CMakeExternals/MITKData.cmake already supports being pointed at a pre-existing tree: when MITK_DATA_DIR is defined it uses mitkMacroEmptyExternalProject() instead of cloning, which is exactly the hook a packaged copy needs. Enables 38 segmentation tests (Modules/{Segmentation,Multilabel, SurfaceInterpolation,ContourModel}/Testing) plus the other 27 test directories. - Upstream pins no revision -- the GIT_TAG line in MITKData.cmake is commented out, so the superbuild tracks the default branch. The commit here is therefore chosen by us, not matched to MITK 2026.06.