{"id":16726147,"url":"https://github.com/ch00k/orthanc-rs","last_synced_at":"2025-06-26T13:36:30.039Z","repository":{"id":41809747,"uuid":"290701727","full_name":"Ch00k/orthanc-rs","owner":"Ch00k","description":"REST API client for Orthanc, an open-source, lightweight DICOM server","archived":false,"fork":false,"pushed_at":"2023-02-01T17:03:03.000Z","size":261,"stargazers_count":3,"open_issues_count":8,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-16T21:18:14.654Z","etag":null,"topics":["api","cli","client","command-line","dicom","medical","medical-imaging","orthanc","rest","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ch00k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-27T07:02:09.000Z","updated_at":"2024-12-10T23:44:13.000Z","dependencies_parsed_at":"2023-02-17T08:30:37.760Z","dependency_job_id":null,"html_url":"https://github.com/Ch00k/orthanc-rs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Ch00k/orthanc-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ch00k%2Forthanc-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ch00k%2Forthanc-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ch00k%2Forthanc-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ch00k%2Forthanc-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ch00k","download_url":"https://codeload.github.com/Ch00k/orthanc-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ch00k%2Forthanc-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262077130,"owners_count":23255123,"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":["api","cli","client","command-line","dicom","medical","medical-imaging","orthanc","rest","rust"],"created_at":"2024-10-12T22:52:18.681Z","updated_at":"2025-06-26T13:36:30.014Z","avatar_url":"https://github.com/Ch00k.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crate](https://img.shields.io/crates/v/orthanc.svg)](https://crates.io/crates/orthanc)\n[![doc](https://docs.rs/orthanc/badge.svg)](https://docs.rs/orthanc)\n[![test](https://github.com/Ch00k/orthanc-rs/workflows/tests/badge.svg)](https://github.com/Ch00k/orthanc-rs/actions)\n[![codecov](https://codecov.io/gh/Ch00k/orthanc-rs/branch/master/graphs/badge.svg)](https://codecov.io/github/Ch00k/orthanc-rs)\n[![license](https://img.shields.io/crates/l/orthanc.svg)](./UNLICENSE)\n\n# orthanc-rs\n\n**orthanc-rs** is a client for the [REST API](https://book.orthanc-server.com/users/rest.html)\nof [Orthanc](https://book.orthanc-server.com/users/rest.html), an open-source, lightweight\nDICOM server.\n\n## Compatibility\n\nSupported Orthanc versions are 1.6.x, 1.7.x, 1.8.x, 1.9.x.\n\n## Installation\n\nTo use the crate, add the dependency to your `Cargo.toml`:\n\n```ini\n[dependencies]\northanc = \"0.8.0\"\n```\n\n## Usage\n\nCreate an API client instance:\n\n```rust\nuse orthanc::Client;\nlet client = Client::new(\"http://localhost:8042\");\n```\n\nIf authentication is enabled on the Orthanc instance:\n\n```rust\nclient.auth(\"username\", \"password\");\n```\n\nList patients:\n\n```rust\nclient.patients();\n```\n\nOr in an expanded format:\n\n```rust\nclient.patients_expanded();\n```\n\nGet all DICOM tags of an instance:\n\n```rust\nlet instance_id = \"0b62ebce-8ab7b938-e5ca1b05-04802ab3-42ee4307\";\nlet tags = client.instance_tags(instance_id);\nprintln!(\"{}\", tags[\"PatientID\"]);\n```\n\nDownload a study:\n\n```rust\nlet study_id = \"9357491d-427a6c94-4080b6c8-1997f4aa-af658240\";\nlet mut file = fs::File::create(\"/tmp/study.zip\").unwrap();\nclient.study_dicom(study_id, \u0026mut file).unwrap();\n```\n\nEven though the operation is not very efficient, Orthanc allows uploading DICOM files over REST API:\n\n```rust\nlet data = fs::read(\"/tmp/instance.dcm\").unwrap();\nclient.upload(\u0026data).unwrap();\n```\n\nSee `tests` directory for more usage examples.\n\n## Tests\n\northanc-rs is covered by unit as well as integration and end-to-end tests.\n\nTo run all tests execute\n\n```\n$ make start_services \u0026\u0026 make test\n```\n\nRunning specific test suits separately is described below.\n\n### Unit\n\nTo run unit tests execute\n\n```\n$ make unit_test\n```\n\n### Integration\n\nTo run unit tests execute\n\n```\n$ make integration_test\n```\n\n### End-to-end\n\nInstall [docker-compose](https://docs.docker.com/compose) and\n[jq](https://stedolan.github.io/jq) and execute\n\n```\n$ make start_services \u0026\u0026 make e2e_test\n```\n\nThis will spin up all the necessary services required for integration tests, and run the tests.\n\nDuring and after the test run Orthanc web UI is available at http://localhost:8028 (username: _orthanc_, password:\n_orthanc_).\n\nContainers started by `start_services` are left running after the test is finished. To stop them execute\n\n```\n$ make stop_services\n```\n\n## TODO\n\n* Instance images (`/instances/\u003cid\u003e/{preview,image-uint8,image-uint16}`)\n* Split/merge studies (`/studies/\u003cid\u003e/{split,merge}`)\n* Tools API (`/tools`)\n* Log API (`/changes`, `/exports`)\n* Asynchronous requests (`/jobs`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fch00k%2Forthanc-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fch00k%2Forthanc-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fch00k%2Forthanc-rs/lists"}