From 9930df894b813c5da3d43447cc92bb51ba6bddba Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 24 Dec 2022 00:54:28 +0100 Subject: [PATCH] Delete trailing spaces at end-of-line Also get rid of mixed tabs/spaces in Python script. --- README.md | 20 ++++++++++---------- pkg/tag/generate_tag_definitions.py | 6 +++--- testdata/data_details.md | 18 +++++++++--------- testdata/included_licenses.md | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 70bebd94..1fa9a761 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@

dicom

High Performance Golang DICOM Medical Image Parser

-

- +

+ - +

@@ -26,7 +26,7 @@ Some notable features: ## Usage To use this in your golang project, import `github.com/suyashkumar/dicom`. This repository supports Go modules, and regularly tags releases using semantic versioning. Typical usage is straightforward: -```go +```go dataset, _ := dicom.ParseFile("testdata/1.dcm", nil) // See also: dicom.Parse which has a generic io.Reader API. @@ -54,7 +54,7 @@ wget -qO- "https://getbin.io/suyashkumar/dicom" | tar xvz ``` dicomutil -path myfile.dcm ``` -Note: for some DICOMs (with native pixel data) no automatic intensity scaling is applied yet (this is coming). You can apply this in your image viewer if needed (in Preview on mac, go to Tools->Adjust Color). +Note: for some DICOMs (with native pixel data) no automatic intensity scaling is applied yet (this is coming). You can apply this in your image viewer if needed (in Preview on mac, go to Tools->Adjust Color). ### Build manually @@ -62,7 +62,7 @@ To build manually, ensure you have `make` and `go` installed. Clone (or `go get` ```sh make ``` -Which will build the dicomutil binary and include it in a `build/` folder in your current working directory. +Which will build the dicomutil binary and include it in a `build/` folder in your current working directory. You can also built it using Go directly: @@ -71,21 +71,21 @@ go build -o dicomutil ./cmd/dicomutil ``` ## History -Here's a little more history on this repository for those who are interested! +Here's a little more history on this repository for those who are interested! ### v0 The v0 [suyashkumar/dicom](https://github.com/suyashkumar/dicom) started off as a hard fork of [go-dicom](https://github.com/gillesdemey/go-dicom) which was not being maintained actively anymore (with the [original author being supportive of my fork](https://www.reddit.com/r/golang/comments/bnu47l/high_performance_dicom_medical_image_parser_in/en9hp6h?utm_source=share&utm_medium=web2x&context=3)--thank you!). I worked on adding several new capabilities, bug fixes, and general maintainability refactors (like multiframe support, streaming parsing, updated APIs, low-level parsing bug fixes, and more). -That represents the __v0__ history of the repository. +That represents the __v0__ history of the repository. ### v1 -For __v1__ I rewrote and redesigned the core library essentially from scratch, and added several new features and bug fixes that only live in __v1__. The architecture and APIs are completely different, as is some of the underlying parser logic (to be more efficient and correct). Most of the core rewrite work happened at the [`s/1.0-rewrite`](https://github.com/suyashkumar/dicom/tree/s/1.0-rewrite) branch. +For __v1__ I rewrote and redesigned the core library essentially from scratch, and added several new features and bug fixes that only live in __v1__. The architecture and APIs are completely different, as is some of the underlying parser logic (to be more efficient and correct). Most of the core rewrite work happened at the [`s/1.0-rewrite`](https://github.com/suyashkumar/dicom/tree/s/1.0-rewrite) branch. ## Acknowledgements -* [Segmed](https://www.segmed.ai/) for their help with validation and other contributions to the library. +* [Segmed](https://www.segmed.ai/) for their help with validation and other contributions to the library. * Original [go-dicom](https://github.com/gillesdemey/go-dicom) * Grailbio [go-dicom](https://github.com/grailbio/go-dicom) -- commits from their fork were applied to ours * GradientHealth for supporting work I did on this while there [gradienthealth/dicom](https://github.com/gradienthealth/dicom) diff --git a/pkg/tag/generate_tag_definitions.py b/pkg/tag/generate_tag_definitions.py index b84b6d76..9cd834f9 100755 --- a/pkg/tag/generate_tag_definitions.py +++ b/pkg/tag/generate_tag_definitions.py @@ -31,11 +31,11 @@ def list_tags() -> List[Tag]: if vr == "XS": # Its generally safe to treat XS as unsigned. See # https://github.com/dgobbi/vtk-dicom/issues/38 for - # some discussions. + # some discussions. vr = "US" elif vr == "OX": - # TODO(saito) I'm less sure about the OX rule. Where is - # this crap defined in the standard?? + # TODO(saito) I'm less sure about the OX rule. Where is + # this crap defined in the standard?? vr = "OW" tag = Tag(group=m.group(1), diff --git a/testdata/data_details.md b/testdata/data_details.md index 40c37d48..5c803fa1 100644 --- a/testdata/data_details.md +++ b/testdata/data_details.md @@ -2,9 +2,9 @@ This document contains citations and further details for the test DICOMs used here. Eventually I would like to store a way more expansive set of test DICOMs -in a cloud bucket that we can pull down for testing (this would allow for more -DICOMs and larger files). This would, however add some complexity to testing -this repository. +in a cloud bucket that we can pull down for testing (this would allow for more +DICOMs and larger files). This would, however add some complexity to testing +this repository. ## Files from The Cancer Imaging Archive @@ -13,16 +13,16 @@ The sub-bullets mention potentially interesting characteristics of the test file Some of the interesting characteristics may apply to more than one file, but may only be mentioned in one of them for brevity. -* [1.dcm](1.dcm) (from [#77](https://github.com/suyashkumar/dicom/issues/77)) - * Modality: PET +* [1.dcm](1.dcm) (from [#77](https://github.com/suyashkumar/dicom/issues/77)) + * Modality: PET * Native Pixel Data * Doubly Nested Sequences - * Icon pixel data in addition to typical pixel data + * Icon pixel data in addition to typical pixel data * [2.dcm](2.dcm) (from [#77](https://github.com/suyashkumar/dicom/issues/77)) * Modality: PET * Other items similar to 1.dcm * [3.dcm](3.dcm) - * Modality: MRI + * Modality: MRI * Native pixel data * [4.dcm](4.dcm) * Modality: X-Ray @@ -38,7 +38,7 @@ be mentioned in one of them for brevity. Kinahan, Paul; Muzi, Mark; Bialecki, Brian; Coombs, Laura. (2017). Data from ACRIN-FLT-Breast. The Cancer Imaging Archive. https://doi.org/10.7937/K9/TCIA.2017.ol20zmxg ##### Publication Citation -Kostakoglu L , Duan F , Idowu MO , Jolles PR , Bear HD , Muzi M , Cormack J , Muzi JP , Pryma DA , Specht JM , Hovanessian-Larsen L , Miliziano J , Mallett S , Shields AF , Mankoff DA ; ACRIN 668 Investigative Team . A Phase II Study of 3'-Deoxy-3'-18F-Fluorothymidine PET in the Assessment of Early Response of Breast Cancer to Neoadjuvant Chemotherapy: Results from ACRIN 6688. J Nucl Med. 2015 Nov;56(11):1681-9. doi: 10.2967/jnumed.115.160663. Epub 2015 Sep 10. +Kostakoglu L , Duan F , Idowu MO , Jolles PR , Bear HD , Muzi M , Cormack J , Muzi JP , Pryma DA , Specht JM , Hovanessian-Larsen L , Miliziano J , Mallett S , Shields AF , Mankoff DA ; ACRIN 668 Investigative Team . A Phase II Study of 3'-Deoxy-3'-18F-Fluorothymidine PET in the Assessment of Early Response of Breast Cancer to Neoadjuvant Chemotherapy: Results from ACRIN 6688. J Nucl Med. 2015 Nov;56(11):1681-9. doi: 10.2967/jnumed.115.160663. Epub 2015 Sep 10. #### For file 3.dcm @@ -59,5 +59,5 @@ Desai, S., Baghal, A., Wongsurawat, T., Al-Shukri, S., Gates, K., Farmer, P., Ru Clark K, Vendt B, Smith K, Freymann J, Kirby J, Koppel P, Moore S, Phillips S, Maffitt D, Pringle M, Tarbox L, Prior F. The Cancer Imaging Archive (TCIA): Maintaining and Operating a Public Information Repository, Journal of Digital Imaging, Volume 26, Number 6, December, 2013, pp 1045-1057. DOI: 10.1007/s10278-013-9622-7 #### File 5.dcm -This file was sourced from [cornerstone](https://github.com/cornerstonejs/dicomParser/blob/master/testImages/encapsulated/multi-frame/CT0012.explicit_little_endian.dcm) +This file was sourced from [cornerstone](https://github.com/cornerstonejs/dicomParser/blob/master/testImages/encapsulated/multi-frame/CT0012.explicit_little_endian.dcm) (which is MIT licensed, see the license reproduced in included_licenses.md) diff --git a/testdata/included_licenses.md b/testdata/included_licenses.md index 0002f139..2a246ddb 100644 --- a/testdata/included_licenses.md +++ b/testdata/included_licenses.md @@ -1,6 +1,6 @@ # Included Licenses -This is where licenses related to some of the test files are included as per the +This is where licenses related to some of the test files are included as per the clause in some licenses that require them to be reproduced in redistributions of portions of the software