# SlicerIDCBrowser: browse, download and load public DICOM data from the NCI # Imaging Data Commons in 3D Slicer. One scripted module; the query and # download work is done by python3-idc-index (DuckDB over the bundled index, # s5cmd for the transfers), which this package requires instead of letting the # module pip-install it (Patch0). %global commit edb59346b5efea2ea5555ff2665577ad168cf1c0 %global shortcommit %(c=%{commit}; echo ${c:0:8}) %global snapdate 20260806 %global slicer_inst %{_prefix}/lib/slicer %global slicer_subdir Slicer-5.12 %global qtsm %{slicer_inst}/lib/%{slicer_subdir}/qt-scripted-modules Name: 3dslicer-idcbrowser Version: 0 Release: 0.1.%{snapdate}git%{shortcommit}%{?dist} Summary: NCI Imaging Data Commons browser for 3D Slicer (IDCBrowser) License: BSD-3-Clause URL: https://github.com/ImagingDataCommons/SlicerIDCBrowser Source0: %{url}/archive/%{commit}/SlicerIDCBrowser-%{shortcommit}.tar.gz # Never pip-install or pip-upgrade idc-index from the panel: it is the # python3-idc-index RPM. Fedora-specific, not for upstream. Patch0: 3dslicer-idcbrowser-fedora-packages.patch BuildArch: noarch # %%check only: the module must still parse after Patch0. BuildRequires: python3 Requires: 3dslicer Requires: python3-idc-index Requires: python3-pydicom Requires: python3-pandas # Upstream's EXTENSION_DEPENDS: QuantitativeReporting supplies the DICOM SEG and # SR (TID 1500) plugins that load IDC's segmentations and measurements. CT/MR/PT # series load without it. Becomes a Requires once it is packaged. Recommends: 3dslicer-quantitativereporting %description IDCBrowser is a 3D Slicer module for exploring the NCI Imaging Data Commons (IDC), a public repository of cancer imaging data in DICOM. It lists the IDC collections, patients, studies and series, downloads the selected ones from the public cloud buckets and loads them into Slicer's DICOM database. The IDC index is the python3-idc-index-data package; downloads use s5cmd. Each IDC collection has its own licence (many are CC-BY, some CC-BY-NC), shown in the module. %prep %autosetup -n SlicerIDCBrowser-%{commit} -p1 %build %install _dir=IDCBrowser; _mod=IDCBrowser; _n=0 for _f in $(sed -n '/^set(MODULE_PYTHON_\(SCRIPTS\|RESOURCES\)$/,/^ )$/p' $_dir/CMakeLists.txt \ | grep -vE '^set\(|^ \)$' | sed -e 's/^ *//' -e "s/\${MODULE_NAME}/$_mod/g"); do test -f "$_dir/$_f" || { echo "ERROR: $_mod lists $_f, which is missing" >&2; exit 1; } install -Dpm0644 "$_dir/$_f" "%{buildroot}%{qtsm}/$_f" _n=$((_n + 1)) done test "$_n" -eq 10 || { echo "ERROR: installed $_n $_mod files, expected 10" >&2; exit 1; } ( cd %{buildroot} && find . \( -type f -o -type l \) | sed 's|^\.||' ) > %{_builddir}/idcbrowser.files %check # Patch0 took: no pip_install of idc-index is left in the module. ! grep -n 'pip_install("idc-index")' %{buildroot}%{qtsm}/IDCBrowser.py # Parses (compile() writes no __pycache__ into the buildroot). %{python3} -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' %{buildroot}%{qtsm}/IDCBrowser.py %files -f %{_builddir}/idcbrowser.files %license LICENSE %doc README.md %changelog * Sun Oct 11 2026 Morgan Hough - 0-0.1.20260806gitedb59346 - Initial package. idc-index from python3-idc-index, never pip (Patch0).