From patchwork Wed Jun 15 15:39:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 40032 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7DC6F27BBEA; Wed, 15 Jun 2022 16:42:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EAD2B27BBE9 for ; Wed, 15 Jun 2022 16:42:09 +0100 (BST) Received: from localhost ([::1]:46696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1V9l-00060x-1L for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 11:42:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1V8h-0004KJ-1J for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1V8g-0000EW-Op for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1V8g-0003I3-Ly for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55989] [PATCH 1/2] gnu: Add python-pydicom. References: <20220615012714.1414-1-antero@mailbox.org> In-Reply-To: <20220615012714.1414-1-antero@mailbox.org> Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55989@debbugs.gnu.org Received: via spool by 55989-submit@debbugs.gnu.org id=B55989.165530762412582 (code B ref 55989); Wed, 15 Jun 2022 15:41:02 +0000 Received: (at 55989) by debbugs.gnu.org; 15 Jun 2022 15:40:24 +0000 Received: from localhost ([127.0.0.1]:39598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7u-0003Gj-Db for submit@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:24 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:41248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7n-0003Ff-NF for 55989@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:11 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LNTyR0fjdz9sXS for <55989@debbugs.gnu.org>; Wed, 15 Jun 2022 17:39:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1655307599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zn7xmpin7P2y+57d03yzbD6AOkkVH+dbXnarrMwGSD4=; b=MOnicyvcelbB+wR7FfSio71+IWlcT7z0cvHkwXsnruWEJucEAVnwflAbBIEVWl0vXqqeHa lbJhoX4tu/9pbFrpq4GvAXMzQ2hMR1Sk9+LNDWJaN9D/i8GwdkI1OHrSOrnuDhJ+Ljzmhg NtflYoskX31BbIH6oeZqjJSRs3znJUtz8JE7tyBA94y7NTaKdrKlUi5Z34ZKmlYgMezWoL GprGPVCUPvmrhlrx1T6+EH8F5Gw3ap7ZREr6KZM8QDPuWNxrpPODcDi93b3X4Mi2LH6526 gRky3t57IwaZahiGDf+8eQkghabIim7YHcF12BhIOqu79pqZ4T4hHX1/vXnVMw== Date: Wed, 15 Jun 2022 15:39:52 +0000 Message-Id: <20220615153953.32070-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: b183259b34ff8b3c37d X-MBO-RS-META: ryqs7scme5zbp4jmjgicsprrodncyxba X-Rspamd-Queue-Id: 4LNTyR0fjdz9sXS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches Updated to add tests that don't use web resources. Tested using the example code, reading/writing a dicom file and accessing the pixel_array using numpy. * gnu/packages/python-science.scm (python-pydicom): New variable. --- gnu/packages/python-science.scm | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 0684826a6c..d26d3bc9b4 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Wiktor Żelazny ;;; Copyright © 2022 Eric Bavier +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,6 +47,7 @@ (define-module (gnu packages python-science) #:use-module (gnu packages cpp) #:use-module (gnu packages databases) #:use-module (gnu packages gcc) + #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages machine-learning) #:use-module (gnu packages maths) @@ -1367,3 +1369,52 @@ (define-public python-gpy Python, from the Sheffield machine learning group. GPy implements a range of machine learning algorithms based on GPs.") (license license:bsd-3))) + +(define-public python-pydicom + (package + (name "python-pydicom") + (version "2.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pydicom/pydicom") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "18l26s53yf5j9yh2zwq83n74qq4f2iq0cfblamsw4y9k35l1c108")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (chdir "pydicom/tests") + (invoke "python3" "-m" "pytest" "-k" ;skip tests using web data + (string-append + "not test_jpeg_ls_pixel_data.py" + " and not test_gdcm_pixel_data.py" + " and not test_pillow_pixel_data.py" + " and not test_rle_pixel_data.py" + " and not Test_JPEG_LS_Lossless_transfer_syntax" + " and not test_numpy_pixel_data.py" + " and not test_data_manager.py" + " and not test_handler_util.py" + " and not test_overlay_np.py" + " and not test_encoders_pydicom.py" + " and not test_encaps.py" + " and not test_reading_ds_with_known_tags_with_UN_VR" + " and not TestDatasetOverlayArray" + " and not TestReader" + " and not test_filewriter.py")))))))) + (native-inputs (list python-pytest)) + (inputs (list gdcm libjpeg-turbo)) + (propagated-inputs (list python-numpy python-pillow)) + (home-page "https://github.com/pydicom/pydicom") + (synopsis "Python library for reading and writing DICOM data") + (description "@code{python-pydicom} is a Python library for reading +and writing DICOM medical imaging data. It lets developers read, modify and +write DICOM data in a pythonic way.") + (license license:expat))) From patchwork Wed Jun 15 15:39:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 40033 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B5D8A27BBE9; Wed, 15 Jun 2022 16:47:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C8E9027BBEA for ; Wed, 15 Jun 2022 16:47:04 +0100 (BST) Received: from localhost ([::1]:56186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1VEV-0004Dz-T4 for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 11:47:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1V8g-0004JO-Pj for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1V8g-0000EL-GR for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1V8g-0003Hw-9p for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55989] [PATCH 2/2] gnu: Add gdcm. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55989@debbugs.gnu.org Received: via spool by 55989-submit@debbugs.gnu.org id=B55989.165530761212560 (code B ref 55989); Wed, 15 Jun 2022 15:41:02 +0000 Received: (at 55989) by debbugs.gnu.org; 15 Jun 2022 15:40:12 +0000 Received: from localhost ([127.0.0.1]:39596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7s-0003GW-1g for submit@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:12 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:33536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7p-0003Fz-0R for 55989@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:10 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4LNTyR6dNFz9sQL for <55989@debbugs.gnu.org>; Wed, 15 Jun 2022 17:39:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1655307599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OWrOYpHszyYlk+/anpALqkLZ2KyMXvubZgGLa2eKM4w=; b=htk+c8DNbi60/RlGENKU+2bkLdKU/ipbdZAykwlNbW0+jT8+Ww6BK14xk9mDGCcdgRc71L T0BvWIirm48qvJRbYjtWt+juUmFc5MbrkX7qK+Dtv31oFikY6z1waPcdyNwa2A2NPdkQ0e fATL6rnPBhCc/iOgWY+VQXbRZezIF6EhI1puDlnUYOCKgE2YffT8/2fUfnd1IgwGcUXKig Z148K1ODGOB5q+JUyj4Ze/RhEXmihjhacHNo2x6xXohDkfp+cVOwMyeuRaBf6qUWpA9Jyg FDsbjAd8DskZN4/tMGZByOKOCNGsGSv45OKzKW5gQpl78Kz6llY6MglI6c6GWg== Date: Wed, 15 Jun 2022 15:39:53 +0000 Message-Id: <20220615153953.32070-2-antero@mailbox.org> In-Reply-To: <20220615153953.32070-1-antero@mailbox.org> References: <20220615153953.32070-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: bbe582824652dc255cc X-MBO-RS-META: or43ec8x8sg4xj6gidqn9dphjy1q7ucp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches Here's the updated GDCM patch, which is a dependency. * gnu/packages/bioinformatics.scm (gdcm): New variable. --- gnu/packages/bioinformatics.scm | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 87df6c3515..2c9f3b4a6f 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -23,6 +23,7 @@ ;;; Copyright © 2021 Hong Li ;;; Copyright © 2021, 2022 Simon Tournier ;;; Copyright © 2021 Felix Gruber +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -15745,3 +15746,39 @@ (define-public wfmash module capable of computing base-level alignments for very large sequences.") (home-page "https://github.com/ekg/wfmash") (license license:expat))) + +(define-public gdcm + (package + (name "gdcm") + (version "2.8.9") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/malaterre/gdcm") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0v8ggym2kz26rwyvsyy3mg7j5jbvd1pz5cwchh29iyclagf0l9ry")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DGDCM_BUILD_TESTING=true" + (string-append "-DCMAKE_CTEST_ARGUMENTS=-E;" + "'TestFileMetaInformation" + "|TestElement2" + "|TestSCUValidation" + "|TestEcho" + "|TestFind'")))) + (home-page "http://gdcm.sourceforge.net/wiki/index.php/Main_Page") + (synopsis "Grassroots DICOM library") + (description + "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.") + (license license:bsd-2)))