dcmjs is a comprehensive JavaScript library for manipulating DICOM (Digital Imaging and Communications in Medicine) objects. It supports both browser and Node.js environments and is currently at version 0.50.1. The project maintains an active release cadence, with frequent bug fixes and feature enhancements, often releasing new minor versions every few weeks. A key differentiator of dcmjs is its strong focus on modern DICOM standards, specifically addressing Enhanced Multiframe Images, Segmentation Objects, Parametric Maps, and Structured Reports. It intentionally avoids legacy DICOM components like DIMSE networking (C-STORE, C-FIND) and physical media handling, instead encouraging integration with specialized companion libraries for such tasks. It also does not include image rendering or 3D rendering capabilities, positioning itself as a core data manipulation tool rather than a full-fledged medical imaging application.
npm install dcmjsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse a minimal DICOM P10 byte array using `DicomMessage.read()` and extract common metadata elements like Patient Name and Transfer Syntax UID. It also shows a basic usage of the `utilities` module for formatting DICOM dates.
Review the 'Parts of DICOM that dcmjs *will not* focus on' section in the documentation. Consider using other specialized libraries or pre-processing steps for legacy DICOM data.
Pin to exact patch versions (`0.x.y`) in production environments and thoroughly test updates before deploying to ensure compatibility.
For DIMSE, consider `dcmjs-dimse`. For image rendering, `dcmjs-imaging` or `vtk.js` are recommended. dcmjs is a data manipulation library, not a full PACS or viewer.
Ensure `npm install dcmjs` is run. If using Node.js ESM, confirm your `package.json` has `"type": "module"` or use `.mjs` extension. If using CommonJS, ensure your build system correctly handles ESM imports or consider older versions if CJS is strictly required (though dcmjs targets modern ES6).
Verify the integrity of the DICOM file/data. Ensure it's a valid DICOM Part 10 file. Check if the input is correctly passed as a `DataView` or `ArrayBuffer`.
Check the DICOM file's contents to confirm the presence of the desired tag. Use a DICOM viewer to inspect the dataset. Ensure the keyword matches the DICOM standard tag name or the correct tag number (e.g., `dicomDict.dict['00100010'].Value`).
No dependency data recorded yet.