{"id":14981172,"url":"https://github.com/fnndsc/ami","last_synced_at":"2025-05-15T15:03:34.493Z","repository":{"id":26886994,"uuid":"30347891","full_name":"FNNDSC/ami","owner":"FNNDSC","description":"AMI Medical Imaging (AMI) JS ToolKit","archived":false,"fork":false,"pushed_at":"2022-12-10T01:30:36.000Z","size":166481,"stargazers_count":729,"open_issues_count":143,"forks_count":213,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-05-03T19:02:04.087Z","etag":null,"topics":["ami","dicom","dicom-images","fs","javascript","medical","nifti","nifti-format","nrrd","stl","threejs","trk","volume-rendering","vtk","webgl","xtk"],"latest_commit_sha":null,"homepage":"https://fnndsc.github.io/ami/#viewers_upload","language":"JavaScript","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/FNNDSC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-05T09:37:09.000Z","updated_at":"2025-04-22T07:16:07.000Z","dependencies_parsed_at":"2022-08-20T18:21:00.800Z","dependency_job_id":null,"html_url":"https://github.com/FNNDSC/ami","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2Fami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2Fami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2Fami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2Fami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FNNDSC","download_url":"https://codeload.github.com/FNNDSC/ami/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190396,"owners_count":22029632,"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":["ami","dicom","dicom-images","fs","javascript","medical","nifti","nifti-format","nrrd","stl","threejs","trk","volume-rendering","vtk","webgl","xtk"],"created_at":"2024-09-24T14:03:04.333Z","updated_at":"2025-05-15T15:03:34.448Z","avatar_url":"https://github.com/FNNDSC.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/214063/46479857-4cd66e80-c7f0-11e8-9585-5748409c9490.png\" width=\"60%\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/FNNDSC/ami\"\u003e\n        \u003cimg src=\"https://travis-ci.org/FNNDSC/ami.svg?branch=master\"\n             alt=\"Build Status\"\u003e\n    \u003c/a\u003e\n     \u003ca href=\"https://cdnjs.com/libraries/ami.js\"\u003e\n        \u003cimg src=\"https://img.shields.io/cdnjs/v/ami.js.svg\"\n             alt=\"CDNJS Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/ami.js\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/ami.js/next.svg\"\n             alt=\"NPM Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://join.slack.com/t/amijs/shared_invite/enQtNDU5MTQ1OTMzMDYxLWE5NTBlMWM2ZjhlYjVkNzZmZDg3YTdjYzQxYWI3NTY4NmIyZGY5MmQyYjE4NmQyOGZkY2NlYzY1MTk5ZDFmNWY\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/slack-join-blue.svg\"\n             alt=\"Slack\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n----------\n\n### Content\n\n1. [Hello AMI](#hello-ami)\n2. [Features](#features)\n3. [Usage](#yarn)\n4. [Developer corner](#developer-corner)\n5. [Change log](#change-log)\n6. [Credits](#credits)\n7. [Citations](#citations)\n\n## Hello AMI\n\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003c!-- Lesson 00 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/00' target=_blank\u003e\n      \u003cimg src=\"https://unpkg.com/ami.js@next/lessons/00/assets/thumbnail-128x128.jpg\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/00'\u003e\n      \u003cb\u003eLesson 00: Load\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Load DICOM Data and get a nice Series/Stack/Frame structure.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\n  \u003c!-- Lesson 01 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/01' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/14734707/8963a142-086c-11e6-99e2-35125f5ebb83.gif\" style=\"width:128x, height:128px\" alt=\"lesson01\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/01'\u003e\n      \u003cb\u003eLesson 01: Visualize 3D\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Look at the data we loaded in 3D.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n  \u003c!-- Lesson 02 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/02' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/14734782/1aa3006c-086d-11e6-9f56-6476e5ac6188.gif\" style=\"width:128x, height:128px\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/02'\u003e\n      \u003cb\u003eLesson 02: Mesh\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Add a mesh to the scene.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\n  \u003c!-- Lesson 03 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/03' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/14734860/99882c22-086d-11e6-99ae-16b7e5371f40.gif\" style=\"width:128x, height:128px\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/03'\u003e\n      \u003cb\u003eLesson 03: Visualize 2D\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Look at the data in 2D.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003c!-- Lesson 04 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/04' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/16259390/b04a7d96-3862-11e6-8937-3019b913a21f.gif\" style=\"width:128x, height:128px\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/04' target=_blank\u003e\n      \u003cb\u003eLesson 04: Labelmap\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Overlays on top of you data.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\n  \u003c!-- Lesson 05 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003c!--\u003ca href='http://jsfiddle.net/gh/get/library/pure/fnndsc/ami/tree/master/lessons/02#run' target=_blank\u003e--\u003e\n    \u003c!--  \u003cimg src=\"https://cdn.rawgit.com/fnndsc/ami/master/lessons/02/thumbnail-128x128.jpg\" alt=\"lesson00\" title=\"Click me!\"\u003e--\u003e\n    \u003c!--  \u003cimg src=\"http://xtk.github.com/fiddlelogo_small2.png\"\u003e--\u003e\n    \u003c!--\u003c/a\u003e--\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003c!--\u003ca href='http://jsfiddle.net/gh/get/library/pure/fnndsc/ami/tree/master/lessons/02#run'\u003e--\u003e\n      \u003cb\u003eLesson 05: TRK\u003c/b\u003e\n    \u003c!--\u003c/a\u003e--\u003e\n    \u003cdiv\u003e\n      TRK - coming soon.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003c!-- Lesson 06 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/06' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/20212355/fdf512b2-a802-11e6-884d-bfafd0a1ec7d.gif\" style=\"width:128x, height:128px\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/06'\u003e\n      \u003cb\u003eLesson 06: Volume Rendering\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Volume Rendering.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\n  \u003c!-- Lesson 07 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003c!--\u003ca href='http://jsfiddle.net/gh/get/library/pure/fnndsc/ami/tree/master/lessons/02#run' target=_blank\u003e--\u003e\n    \u003c!--  \u003cimg src=\"https://cdn.rawgit.com/fnndsc/ami/master/lessons/02/thumbnail-128x128.jpg\" alt=\"lesson00\" title=\"Click me!\"\u003e--\u003e\n    \u003c!--  \u003cimg src=\"http://xtk.github.com/fiddlelogo_small2.png\"\u003e--\u003e\n    \u003c!--\u003c/a\u003e--\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003c!--\u003ca href='http://jsfiddle.net/gh/get/library/pure/fnndsc/ami/tree/master/lessons/02#run'\u003e--\u003e\n      \u003cb\u003eLesson 07: Lookup tables\u003c/b\u003e\n    \u003c!--\u003c/a\u003e--\u003e\n    \u003cdiv\u003e\n      Lookup Tables - coming soon.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003c!-- Lesson 08 --\u003e\n  \u003ctd valign=\"middle\" width=\"100\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/08' target=_blank\u003e\n      \u003cimg src=\"https://cloud.githubusercontent.com/assets/214063/20597899/9b7ec102-b246-11e6-804b-be8ac6dc9a68.gif\" style=\"width:128x, height:128px\" alt=\"lesson00\" title=\"Click me!\"\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd valign=\"top\" width=\"326\"\u003e\n    \u003ca href='https://codesandbox.io/s/github/FNNDSC/ami/tree/master/lessons/08'\u003e\n      \u003cb\u003eLesson 08: Custom progress bar\u003c/b\u003e\n    \u003c/a\u003e\n    \u003cdiv\u003e\n      Custom progress bars.\n    \u003c/div\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### (more) Advanced demos\n\nVolume rendering, 2D viewer, arbitrary reslicing and more examples and advanced demos [there](https://fnndsc.github.io/ami)!\n\n## Features\n\n\u003e ✅  READY\n\u003e 🔶 IN PROGRESS OR LIMITED SUPPORT\n\u003e ❌ ON ROADMAP\n\n| Capabilities       | Volumes     | Meshes            | Widgets                |\n|--------------------|--------------|------------------|------------------------|\n| ✅ 2D Visulization  | ✅ Dicom     | ✅ VTK (THREEJS) | 🔶 Handle (2D/3D)       |\n| ✅ 3D Visualization | ✅ NRRD      | ✅ STL (THREEJS) | 🔶 Probe (2D/3D)        |\n| ✅ Volume Rendering | ✅ Nifti     | ✅  TRK           | 🔶 Ruler (2D/3D)        |\n| ✅ Lookup Tables    | ✅  MHD/(Z)RAW   | ✅  FSM           | 🔶 Orientation (2D/3D)  |\n| ✅ Label Maps       | ✅  MGH/MGZ   | ❌ CURV          | 🔶 Angle (2D/3D)        |\n|                    | ❌ JPEG      |                  |                         |\n\n## Usage\n\n### Pre-requisites\n\n- ES2015 promises support. (consider using polyfills if needed)\n- Load THREEJS your index.html **BEFORE** AMI.\n\n```hmtl\n\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/three.js/r81/three.js\"\u003e\u003c/script\u003e\n\n```\n\n### Yarn\n\n```bash\n\n$\u003e yarn add ami.js\n\n```\n\n*Note*: you might need to include [babel](https://github.com/babel/babel) transforms in you build process.\n\n```javascript\n\n// app.js\nimport * as AMI form 'ami.js';\nwindow.console.log('Ready to rock!!');\n\n```\n\n### ami.js\n\nCheck-out the [lessons](#lessons) to get started quickly.\n\n\n**New:** Use the new factory not to have to include `three` in index.html.\n```javascript\nimport * as THREE from 'three';\nimport {stackHelperFactory} from 'ami.js';\n\nconst StackHelper = stackHelperFactory(THREE);\nconst stackHelper = new StackHelper();\n```\n\nAdd AMI in your index.html **after** THREEJS.\n```html\n\n\u003c!-- index.html --\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/three.js/r81/three.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/ami.js/0.0.12/ami.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"app.js\"\u003e\u003c/script\u003e\n\n#app.js\nconst AMI = AMI;\nwindow.console.log('Ready to rock!!');\n\n```\n\n## Developer corner\n\nGet the source code and related packages.\n\n```bash\n\n$\u003e git clone https://github.com/FNNDSC/ami.git\n$\u003e cd ami\n$\u003e yarn install\n\n```\n\nTo run examples (browserify/babelify/serve the example)\n\n```bash\n\n$\u003e yarn example \u003cexamples name\u003e\n\n#run the geometries_slice example\n$\u003e yarn example geometries_slice\n\n```\n\nBuild standalone library to `lib/`\n\n```bash\n\n$\u003e yarn build:ami\n\n```\n\nBuild minified standalone version run\n\n```bash\n\n$\u003e yarn build:ami:prod\n\n```\n\nTests\n\n```bash\n\n$\u003e yarn test\n\n```\n\nDocumentation\n\n```bash\n\n$\u003e yarn doc\n\n```\n\nBuild and deploy dist/ to gh-pages\n\n```bash\n\n$\u003e yarn deploy\n\n```\n\nFind out more about the [API](https://fnndsc.github.io/ami/doc).\n\n# [Change log](https://github.com/FNNDSC/ami/releases)\n\n# Credits\n\nAMI would not exist without them:\n\n##### [THREEJS](https://github.com/mrdoob/three.js/)\n\n- Base components such as Vectors, Matrices and Objects3D.\n- HTML template for example page.\n- Author(s): [mrdoob](https://github.com/mrdoob)\n\n##### [DicomParser](https://github.com/chafey/dicomParser)\n\n- DICOM parsing relies on it.\n- Author(s): [chafey](https://github.com/chafey)\n\n##### [CornerstoneWADOImageLoader](https://github.com/chafey/cornerstoneWADOImageLoader)\n\n- Was used to figure out how to use the dicom parser properly.\n- Author(s): [chafey](https://github.com/chafey)\n\n##### [NIFTI-Reader-JS](https://github.com/rii-mango/NIFTI-Reader-JS)\n\n- Nifti parsing relies on it.\n- Author(s): [rii-mango](https://github.com/rii-mango)\n\n##### [NRRD-JS](https://github.com/scijs/nrrd-js)\n\n- NRRD parsing relies on it.\n- Author(s): [jaspervdg](https://github.com/jaspervdg) \n\n##### [JPEGLosslessDecoderJS](https://github.com/rii-mango/JPEGLosslessDecoderJS)\n\n- JPEG Lossless Decoder for DICOM images\n- Author(s): [rii-mango](https://github.com/rii-mango)\n\n##### [Image-JPEG2000](https://github.com/OHIF/image-JPEG2000)\n\n- JPEG 2000 Decoder for DICOM images\n- Author(s): [jpambrun](https://github.com/jpambrun), [mozilla](https://github.com/mozilla/pdf.js/)\n\n##### [Pako](https://github.com/nodeca/pako)\n\n- GZ file decompression\n- Author(s): [nodeca](https://github.com/nodeca)\n\n# Citations\n### 2017\n- [From brain imaging to weather imaging - McCaie - informaticslab, Met Office (blog post)](http://www.informaticslab.co.uk/side-projects/weather/3d/visualisations/2017/04/04/from-brain-imaging-to-weather-imaging.html)\n- [Medical imaging in the browser with the A* Medical Imaging (AMI) toolkit. - Rannou et al. - ESMRMB 2017 (poster)](http://epostersonline.com/esmrmb2017/node/3443)\n- [Reusable Client-Side JavaScript Modules for Immersive Web-Based Real-Time Collaborative Neuroimage Visualization - Bernal-Rusiel et al. - Frontiers in Neuroinformatics 2017 (article)](http://journal.frontiersin.org/article/10.3389/fninf.2017.00032/full)\n### 2016\n- [Volume Visualization Tools for Medical Applications in Ubiquitous Platforms - Arbelaiz et al. - LNICST 2016 (article)](https://link.springer.com/chapter/10.1007/978-3-319-49655-9_54)\n- [Interoperable communication of quantitative image analysis results using DICOM standard (DICOM4QI) - Fedorov et al. - RSNA 2016 (poster)](https://docs.google.com/presentation/d/16mZbPiXqU7tKTRAcB7bnP1RGybBLqF-O0319raUWYHo/edit#slide=id.p)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnndsc%2Fami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fami/lists"}