2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, enableVTK ? true
|
|
|
|
, vtk
|
|
|
|
, ApplicationServices
|
|
|
|
, Cocoa
|
|
|
|
, enablePython ? false
|
|
|
|
, python
|
|
|
|
, swig
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gdcm";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "3.0.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "malaterre";
|
|
|
|
repo = "GDCM";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-wqrM8lxJM8VL+1QEdu6Gr1XWT1j9pT6gGd3yn1yokIY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DGDCM_BUILD_APPLICATIONS=ON"
|
|
|
|
"-DGDCM_BUILD_SHARED_LIBS=ON"
|
2021-06-28 23:13:55 +00:00
|
|
|
] ++ lib.optionals enableVTK [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DGDCM_USE_VTK=ON"
|
2021-06-28 23:13:55 +00:00
|
|
|
] ++ lib.optionals enablePython [
|
2020-07-18 16:06:22 +00:00
|
|
|
"-DGDCM_WRAP_PYTHON:BOOL=ON"
|
|
|
|
"-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals enableVTK [
|
|
|
|
vtk
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
ApplicationServices
|
|
|
|
Cocoa
|
|
|
|
] ++ lib.optionals enablePython [ swig python ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The grassroots cross-platform DICOM implementation";
|
|
|
|
longDescription = ''
|
|
|
|
Grassroots DICOM (GDCM) is an implementation of the DICOM standard designed to be open source so that researchers may access clinical data directly.
|
|
|
|
GDCM includes a file format definition and a network communications protocol, both of which should be extended to provide a full set of tools for a researcher or small medical imaging vendor to interface with an existing medical database.
|
|
|
|
'';
|
|
|
|
homepage = "http://gdcm.sourceforge.net/";
|
|
|
|
license = with licenses; [ bsd3 asl20 ];
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ tfmoraes ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|