Skip to content

Commit

Permalink
Delete trailing spaces at end-of-line
Browse files Browse the repository at this point in the history
Also get rid of mixed tabs/spaces in Python script.
  • Loading branch information
DimitriPapadopoulos committed Sep 14, 2023
1 parent 8f1f151 commit 9930df8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<img src="https://suyashkumar.com/assets/img/magnetic-resonance.png" width="125px"/>
<h3 align="center">dicom</h3>
<p align="center">High Performance Golang DICOM Medical Image Parser<p>
<p align="center">
<a href="https://github.com/suyashkumar/dicom/actions"><img src="https://github.com/suyashkumar/dicom/workflows/build/badge.svg" /></a>
<p align="center">
<a href="https://github.com/suyashkumar/dicom/actions"><img src="https://github.com/suyashkumar/dicom/workflows/build/badge.svg" /></a>
<a href="https://godoc.org/github.com/suyashkumar/dicom"><img src="https://godoc.org/github.com/suyashkumar/dicom?status.svg" alt="" /></a>
<a href="https://goreportcard.com/report/github.com/suyashkumar/dicom"><img src="https://goreportcard.com/badge/github.com/suyashkumar/dicom" alt=""></a>
<a href="https://goreportcard.com/report/github.com/suyashkumar/dicom"><img src="https://goreportcard.com/badge/github.com/suyashkumar/dicom" alt=""></a>
</p>
</p>

Expand All @@ -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.

Expand Down Expand Up @@ -54,15 +54,15 @@ 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
To build manually, ensure you have `make` and `go` installed. Clone (or `go get`) this repo into your `$GOPATH` and then simply run:
```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:

Expand All @@ -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

* <img src="https://user-images.githubusercontent.com/6299853/90325771-b23f2e80-df34-11ea-9d18-5c33b69c2746.png" width="110px" align="left"/> [Segmed](https://www.segmed.ai/) for their help with validation and other contributions to the library.
* <img src="https://user-images.githubusercontent.com/6299853/90325771-b23f2e80-df34-11ea-9d18-5c33b69c2746.png" width="110px" align="left"/> [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)
Expand Down
6 changes: 3 additions & 3 deletions pkg/tag/generate_tag_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
18 changes: 9 additions & 9 deletions testdata/data_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
2 changes: 1 addition & 1 deletion testdata/included_licenses.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 9930df8

Please sign in to comment.