{"id":13629607,"url":"https://github.com/suyashkumar/dicom","last_synced_at":"2025-05-13T18:11:42.202Z","repository":{"id":34882388,"uuid":"153484854","full_name":"suyashkumar/dicom","owner":"suyashkumar","description":"⚡High Performance DICOM Medical Image Parser in Go.","archived":false,"fork":false,"pushed_at":"2025-02-19T04:46:12.000Z","size":31342,"stargazers_count":991,"open_issues_count":102,"forks_count":142,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-04-25T15:48:47.641Z","etag":null,"topics":["dcm","dicom","dicom-files","dicom-images","go","golang","golang-library","golang-package","imaging","medical","medical-image-analysis","medical-imaging","pacs","parser","real-time","streaming"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suyashkumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["suyashkumar"]}},"created_at":"2018-10-17T15:58:48.000Z","updated_at":"2025-04-19T21:02:50.000Z","dependencies_parsed_at":"2023-02-15T14:31:32.356Z","dependency_job_id":"95d76b21-4848-4980-b469-67287b12c0d0","html_url":"https://github.com/suyashkumar/dicom","commit_stats":{"total_commits":268,"total_committers":30,"mean_commits":8.933333333333334,"dds":0.5074626865671642,"last_synced_commit":"9a71c1f3589b0d48f25ab5c55b8e5adcf66f98a8"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyashkumar%2Fdicom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyashkumar%2Fdicom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyashkumar%2Fdicom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suyashkumar%2Fdicom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suyashkumar","download_url":"https://codeload.github.com/suyashkumar/dicom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000855,"owners_count":21997442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dcm","dicom","dicom-files","dicom-images","go","golang","golang-library","golang-package","imaging","medical","medical-image-analysis","medical-imaging","pacs","parser","real-time","streaming"],"created_at":"2024-08-01T22:01:14.748Z","updated_at":"2025-05-13T18:11:42.168Z","avatar_url":"https://github.com/suyashkumar.png","language":"Go","funding_links":["https://github.com/sponsors/suyashkumar"],"categories":["Go","Libraries","DICOM Parsing"],"sub_categories":["Go"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://suyashkumar.com/assets/img/magnetic-resonance.png\" width=\"125px\"/\u003e\n  \u003ch3 align=\"center\"\u003edicom\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eHigh Performance Golang DICOM Medical Image Parser\u003cp\u003e\n  \u003cp align=\"center\"\u003e \n    \u003ca href=\"https://github.com/suyashkumar/dicom/actions\"\u003e\u003cimg src=\"https://github.com/suyashkumar/dicom/workflows/build/badge.svg\" /\u003e\u003c/a\u003e \n    \u003ca href=\"https://godoc.org/github.com/suyashkumar/dicom\"\u003e\u003cimg src=\"https://godoc.org/github.com/suyashkumar/dicom?status.svg\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/suyashkumar/dicom\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/suyashkumar/dicom\" alt=\"\"\u003e\u003c/a\u003e \n  \u003c/p\u003e\n\u003c/p\u003e\n\n:eyes: __v1.0__ just released!\n\nThis is a library and command-line tool to read, write, and generally work with DICOM medical image files in native Go. The goal is to build a full-featured, high-performance, and readable DICOM parser for the Go community.\n\nAfter a fair bit of work, I've just released v1.0 of this library which is essentially rewritten from the ground up to be more canonical go, better tested, has new features, many bugfixes, and more (though there is always more to come on the roadmap).\n\nSome notable features:\n- [x] Parse multi-frame DICOM imagery (both encapsulated and native pixel data)\n- [x] Channel-based streaming of `Frame`s to a client _as they are parsed_ out of the dicom\n- [x] Cleaner Go Element and Dataset representations (in the absence of Go generics)\n- [x] Better support for icon image sets in addition to primary image sets\n- [x] Write and encode Datasets back to DICOM files\n- [x] Enhanced testing and benchmarking support\n- [x] Modern, canonical Go.\n\n## Usage\nTo 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:\n```go \n\ndataset, _ := dicom.ParseFile(\"testdata/1.dcm\", nil) // See also: dicom.Parse which has a generic io.Reader API.\n\n// Dataset will nicely print the DICOM dataset data out of the box.\nfmt.Println(dataset)\n\n// Dataset is also JSON serializable out of the box.\nj, _ := json.Marshal(dataset)\nfmt.Println(j)\n```\nMore details about the package (and additional examples and APIs) can be found in the [godoc](https://godoc.org/github.com/suyashkumar/dicom).\n\n## CLI Tool\nA CLI tool that uses this package to parse imagery and metadata out of DICOMs is provided in the `cmd/dicomutil` package. This tool can take in a DICOM, and dump out all the elements to STDOUT, in addition to writing out any imagery to the current working directory either as PNGs or JPEG (note, it does not perform any automatic color rescaling by default).\n\n### Installation\nYou can download the prebuilt binaries from the [releases tab](https://github.com/suyashkumar/dicom/releases), or use the following to download the binary at the command line using my [getbin tool](https://github.com/suyashkumar/getbin):\n\n```sh\nwget -qO- \"https://getbin.io/suyashkumar/dicom\" | tar xvz\n```\n(This attempts to infer your OS and 301 redirects `wget` to the latest github release asset for your system. Downloads come from GitHub releases).\n\n### Usage\n```\ndicomutil -path myfile.dcm\n```\nNote: 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-\u003eAdjust Color). \n\n\n### Build manually\nTo build manually, ensure you have `make` and `go` installed. Clone (or `go get`) this repo into your `$GOPATH` and then simply run:\n```sh\nmake\n```\nWhich will build the dicomutil binary and include it in a `build/` folder in your current working directory. \n\nYou can also built it using Go directly:\n\n```sh\ngo build -o dicomutil ./cmd/dicomutil\n```\n\n## History\nHere's a little more history on this repository for those who are interested! \n\n### v0\nThe 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\u0026utm_medium=web2x\u0026context=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).\n\nThat represents the __v0__ history of the repository. \n\n### v1\n\nFor __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. \n\n\n## Acknowledgements\n\n* \u003cimg src=\"https://user-images.githubusercontent.com/6299853/90325771-b23f2e80-df34-11ea-9d18-5c33b69c2746.png\" width=\"110px\" align=\"left\"/\u003e [Segmed](https://www.segmed.ai/) for their help with validation and other contributions to the library. \n* Original [go-dicom](https://github.com/gillesdemey/go-dicom)\n* Grailbio [go-dicom](https://github.com/grailbio/go-dicom) -- commits from their fork were applied to ours\n* GradientHealth for supporting work I did on this while there [gradienthealth/dicom](https://github.com/gradienthealth/dicom)\n* Innolitics [DICOM browser](https://dicom.innolitics.com/ciods)\n* [DICOM Specification](https://dicom.nema.org/medical/dicom/current/output/pdf/part05.pdf)\n* \u003cdiv\u003eIcons made by \u003ca href=\"https://www.freepik.com/?__hstc=57440181.48e262e7f01bcb2b41259e2e5a8103b3.1557697512782.1557697512782.1557697512782.1\u0026__hssc=57440181.4.1557697512783\u0026__hsfp=2768524783\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e is licensed by \u003ca href=\"https://creativecommons.org/licenses/by/3.0/\" title=\"Creative Commons BY 3.0\" target=\"_blank\"\u003eCC 3.0 BY\u003c/a\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuyashkumar%2Fdicom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuyashkumar%2Fdicom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuyashkumar%2Fdicom/lists"}