Blob Blame History Raw
%global _description %{expand:
Read / write access to some common neuroimaging file formats

This package provides read +/- write access to some common medical and
neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2 and
later), GIFTI, NIfTI1, NIfTI2, MINC1, MINC2, MGH and ECAT as well as Philips
PAR/REC. We can read and write Freesurfer geometry, and read Freesurfer
morphometry and annotation files. There is some very limited support for DICOM.
NiBabel is the successor of PyNIfTI.

The various image format classes give full or selective access to header (meta)
information and access to the image data is made available via NumPy arrays.

Name:           python-nibabel
Version:        3.2.2
Release:        %autorelease
Summary:        Python package to access a cacophony of neuro-imaging file formats

License:        MIT and PDDL-1.0

BuildArch:      noarch

%description %_description

%package -n python3-nibabel
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest
Recommends:     python3-scipy
Recommends:     python3-pydicom
# Bundles their own veresion of netcdf reader
# that is different from Scipy version
Provides:       bundled(python%{python3_version}dist(netcdf))

%description -n python3-nibabel %_description

%autosetup -n nibabel-%{version}

%pyproject_buildrequires -x dicom,minc2,spm


%pyproject_save_files nibabel nisext

# TestCifti2ImageAPI.test_filenames fails due to setuptools-bundled distutils'
# LooseVersion issue:
# This can be worked around by setting the environment variable to point
# to distutils from Python's standard library instead.
# The workaround may be removed once nibabel disposes of distutils:
%{pytest} -v

%files -n python3-nibabel -f %{pyproject_files}