1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 cryptography,
8 nibabel,
9 numpy,
10 pydicom,
11 simpleitk,
12}:
13
14buildPythonPackage rec {
15 pname = "pymedio";
16 version = "0.2.14";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "jcreinhold";
23 repo = "pymedio";
24 tag = "v${version}";
25 hash = "sha256-x3CHoWASDrUoCXfj73NF+0Y/3Mb31dK2Lh+o4OD9ryk=";
26 };
27
28 propagatedBuildInputs = [ numpy ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 cryptography
33 nibabel
34 pydicom
35 simpleitk
36 ];
37
38 pythonImportsCheck = [ "pymedio" ];
39
40 meta = with lib; {
41 description = "Read medical image files into Numpy arrays";
42 homepage = "https://github.com/jcreinhold/pymedio";
43 changelog = "https://github.com/jcreinhold/pymedio/blob/v${version}/HISTORY.rst";
44 license = licenses.mit;
45 maintainers = with maintainers; [ bcdarwin ];
46 };
47}