2021-09-22 15:38:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonRelaxDepsHook
|
2021-09-22 15:38:15 +00:00
|
|
|
, matplotlib
|
|
|
|
, nibabel
|
|
|
|
, numpy
|
2023-05-24 13:37:59 +00:00
|
|
|
, pydicom
|
|
|
|
, pymedio
|
2021-09-22 15:38:15 +00:00
|
|
|
, scikit-fuzzy
|
2023-05-24 13:37:59 +00:00
|
|
|
, scikit-image
|
2021-09-22 15:38:15 +00:00
|
|
|
, scikit-learn
|
|
|
|
, scipy
|
2023-05-24 13:37:59 +00:00
|
|
|
, simpleitk
|
2021-09-22 15:38:15 +00:00
|
|
|
, statsmodels
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "intensity-normalization";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.2.4";
|
2022-01-25 03:21:06 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "intensity_normalization";
|
|
|
|
inherit version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-s/trDIRoqLFj3NO+iv3E+AEB4grBAHDlEL6+TCdsgmg=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "!=3.10.*," "" --replace "!=3.11.*" ""
|
|
|
|
substituteInPlace setup.cfg --replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
pythonRelaxDeps = [ "nibabel" ];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
nibabel
|
|
|
|
numpy
|
2023-05-24 13:37:59 +00:00
|
|
|
pydicom
|
|
|
|
pymedio
|
2021-09-22 15:38:15 +00:00
|
|
|
scikit-fuzzy
|
2023-05-24 13:37:59 +00:00
|
|
|
scikit-image
|
2021-09-22 15:38:15 +00:00
|
|
|
scikit-learn
|
|
|
|
scipy
|
2023-05-24 13:37:59 +00:00
|
|
|
simpleitk
|
2021-09-22 15:38:15 +00:00
|
|
|
statsmodels
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-25 03:21:06 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestFlagsArray = [ "tests" ];
|
2022-01-25 03:21:06 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"intensity_normalization"
|
|
|
|
"intensity_normalization.normalize"
|
|
|
|
"intensity_normalization.plot"
|
|
|
|
"intensity_normalization.util"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/jcreinhold/intensity-normalization";
|
|
|
|
description = "MRI intensity normalization tools";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|