Read, select, transform, write and exchange imaging data with an expressive JavaScript API. Process incoming data through a streaming parser, then produce the result your application needs.
Browser + Node.js Read a study from a DICOMweb URL and work with its instance objects.
Replace this example with your complete WADO-RS study URL. Configure archive authentication and allow your browser origin through the archive’s CORS settings. Explore pipeline sources ↗
read-dicom-bytes.mjsJavaScript
import EASI from '@xinonix/easi-js';const result = await EASI.pipelineBuilder() .fromByteStream() .ofDicomData() .toInstances() .build() .process({ source: dicomBytes });const instances = result.toArray();console.log(instances);
01SourceDICOM bytes
→
02ParseDICOM
→
03OutputInstances
Browser + Node.js Turn native DICOM bytes into objects your application can inspect.
Browser + Node.js Map DICOMweb study metadata to a FHIR R4 ImagingStudy resource.
metadataUrl is a complete WADO-RS study metadata URL. patientReference identifies an existing, resolved Patient. The resource is created in memory. Explore FHIR mapping ↗
retrieve-with-dimse.mjsJavaScript
import EASI from '@xinonix/easi-js';import * as DIMSE from '@xinonix/easi-js/dimse/node';const transport = new DIMSE.NodeDimseQueryRetrieveSourceTransport();const pipeline = EASI.pipelineBuilder() .fromDimseAssociation(peer, transport) .ofDicomData() .toInstances() .build();const result = await pipeline.process({ sourceOptions: { operation: 'c-get', performFind: false, queryRetrieveModel: 'study-root', queryRetrieveLevel: 'STUDY', keys: { StudyInstanceUID: studyUid }, operationTimeoutMs: 60000 }});const status = pipeline.reader.lastMetadata.dimse.finalResponse;console.log(result.count, status);
01SourceDICOM peer
→
02ParseDICOM
→
03OutputInstances
Node.js only Retrieve a known study from a DICOM peer through the same pipeline API.
Configure peer with host, port, and called/calling AE titles; supply an existing studyUid. The peer must allow C-GET. Inspect final status for warnings or partial results. Configure your DIMSE peer ↗
ONE COMMAND TO BEGINCore DICOM capabilities. In your application.
npm install @xinonix/easi-js
COMPOSE THE WORK. CHOOSE THE RESULT.
Read. Shape. Deliver. Keep the workflow clear.
Keep the source, input format and output strategy separate. Reuse the same building blocks as your application moves from a file to a network response or an imaging archive.
01
Read while bytes arrive.
Parse native DICOM, DICOM JSON or Native DICOM Model XML. Feed a file or HTTP response into a pipeline without first reading the whole source into an application buffer.
Build a DICOM object model, select a few attributes, or apply a custom mapping. Create FHIR R4 ImagingStudy resources with the patient references and context your application supplies.
Serialize DICOM data into bytes, send output to a destination, or consume writer chunks with backpressure. Compose reading and writing into your application’s workflow.
Process DICOM and metadata returned by HTTP and DICOMweb endpoints through the same source, parser and output model. Your application controls requests, credentials and archive access.
Verify peers and send or receive stored instances with Node.js transports. Use supported Study Root query/retrieve clients for C-FIND, C-GET or a configured C-MOVE route.
Read image attributes and decode supported pixel formats to build previews, image processing or your own viewer. Add optional codec backends where your transfer syntaxes need them.
The reader parses incoming chunks; the output you choose determines what stays in memory. DIMSE transports retain complete datasets before pipeline processing. Plan pixel retention, output collection and retrieval limits for your workload.
This replay supplies a generated byte stream. DICOMweb, uploads, and files can feed the same parser.
YOUR APPLICATION, ALREADY WORKING0 / 3
·
Instance 1Waiting for DICOM data
01
·
Instance 2Waiting for DICOM data
02
·
Instance 3Waiting for DICOM data
03
Waiting for the first instance
Synthetic DICOM stream · Real EASI JS parsing · Runs in your browser. Delivery is paced to make the stream visible.
FROM PIPELINE TO PIXELS
A DICOM image. Just a browser.
Build the foundation of a zero-footprint viewer. EASI JS reads the file, parses DICOM, and decodes its pixels. Your application puts them on screen.
Your file stays in your browser.
Choose a sample or your own file● IN YOUR BROWSER
A real DICOM image, rendered here.
Choose a sample or open a local DICOM file.
Choose an image to see the pipeline turn DICOM into pixels.
01 Read a file stream
02 Parse DICOM
03 Decode a frame
04 Draw on canvas
See the pipeline behind the image +
A browser File + a canvas
import EASI from '@xinonix/easi-js';
import { Image } from '@xinonix/easi-js/dicom';
// A native little-endian monochrome DICOM File; rendering retains pixel bytes.
async function viewDicom(file, canvas) {
const result = await EASI.pipelineBuilder()
.fromFileStream()
.ofDicomData()
.withBulkDataPolicy({ mode: 'materialize', hardSafetyCap: 64 * 1024 * 1024 })
.toInstances()
.build()
.process({ source: file, sourceOptions: { contentType: 'application/dicom' } });
const image = new Image(result.first().dataSet);
const { rows, columns } = image.imagePixelModule;
const pixels = new Uint8Array(rows * columns * 4);
const frameIndex = 0; // Zero-based: choose any supported frame.
if (!image.decodeFrame(pixels, null, frameIndex)) throw new Error('Unsupported image pixels.');
canvas.width = columns;
canvas.height = rows;
canvas.getContext('2d').putImageData(
new ImageData(new Uint8ClampedArray(pixels), columns, rows), 0, 0
);
}
The viewer retains pixel data for decoding. The stream replay above shows the alternative when only metadata is needed.
Small viewer demonstration, built on EASI JS 1.0.1. Supports common native little-endian and baseline JPEG images; other encodings show a clear message. This is a foundation for an application viewer, not a diagnostic tool.
MR, CT, and X-ray samples are derived from the provided anonymized collection with identifying metadata omitted; the X-ray is reduced for faster loading. US is a generated ultrasound-style cine demonstration. Local files are never uploaded. Sample details
A SMALL EXAMPLE. A REAL PIPELINE.
Same bytes. Different possibilities.
Choose a synthetic sample and an output. EASI JS runs here in your browser, so you can see the transformation for yourself.
Tiny generated datasets with fictional identifiers. No patient files are loaded or uploaded.
Inspect the generated input metadata +
Preparing the synthetic sample…
YOUR PIPELINE
Loading the example…
THE RESULT
Choose an output and run the pipeline.
This demonstrates metadata processing using small synthetic DICOM datasets. It is not a clinical viewer or a diagnostic tool.
BEYOND THE FIRST FILE
Imaging doesn’t live in isolation. Your workflows shouldn’t either.
EASI JS is a library for imaging workflows. Your application supplies its UI, identity, storage, and deployment. Some pixel formats need optional codec backends.
Use the library on its own, or choose an independent EASI product that puts the pipeline to work. Each has its own package, documentation and release cycle.
Source-available under the EASI JS Community License. Free use is available to eligible individuals, qualifying research institutions and nonprofits, and organization groups with annual gross revenue strictly below US$5 million.
Larger organization groups need written commercial terms unless a stated exception applies. Proprietary applications and distribution follow the full license.