Socket
Book a DemoInstallSign in
Socket

@abasb75/dicom-pixel-decoder

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abasb75/dicom-pixel-decoder

a powerfull javascript dicom pixel data decoder

latest
Source
npmnpm
Version
0.0.0-test9
Version published
Weekly downloads
2
-71.43%
Maintainers
0
Weekly downloads
 
Created
Source

@abasb75/dicom-pixel-decoder

a javascript powerfull dicom decoder

Demo

demo link

Supported transfer syntax

#Transfer Syntax UID#Transfer Syntax name#support
1.2.840.10008.1.2Implicit VR Endian: Default Transfer Syntax for DICOMYes
1.2.840.10008.1.2.1Explicit VR Little EndianYes
1.2.840.10008.1.2.1.99Deflated Explicit VR Little EndianYes
1.2.840.10008.1.2.2Explicit VR Big EndianYes
1.2.840.10008.1.2.4.50JPEG Baseline (Process 1)Yes
1.2.840.10008.1.2.4.51JPEG Baseline (Processes 2 & 4)Yes
1.2.840.10008.1.2.4.57JPEG Lossless, Nonhierarchical (Processes 14)Yes
1.2.840.10008.1.2.4.70JPEG Lossless, Nonhierarchical, First- Order PredictionYes
1.2.840.10008.1.2.4.80JPEG-LS Lossless Image CompressionYes
1.2.840.10008.1.2.4.81JPEG-LS Lossy (Near- Lossless) Image CompressionYes
1.2.840.10008.1.2.4.90JPEG 2000 Image Compression (Lossless Only)Yes
1.2.840.10008.1.2.4.91JPEG 2000 Image CompressionYes
1.2.840.10008.1.2.4.201High-Throughput JPEG 2000 Image Compression (Lossless Only)Yes
1.2.840.10008.1.2.4.203High-Throughput JPEG 2000 Image CompressionYes
1.2.840.10008.1.2.5RLE LosslessYes
1.2.840.10008.1.2.4.52JPEG Extended (Processes 3 & 5)Yes(Retired)
1.2.840.10008.1.2.4.202High-Throughput JPEG 2000 with RPCL Options Image Compression (Lossless Only)Untested
1.2.840.10008.1.2.4.53JPEG Spectral Selection, Nonhierarchical (Processes 6 & 8)Untested(Retired)
1.2.840.10008.1.2.4.54JPEG Spectral Selection, Nonhierarchical (Processes 7 & 9)Untested(Retired)
1.2.840.10008.1.2.4.55JPEG Full Progression, Nonhierarchical (Processes 10 & 12)Untested(Retired)
1.2.840.10008.1.2.4.56JPEG Full Progression, Nonhierarchical (Processes 11 & 13)Untested(Retired)
1.2.840.10008.1.2.4.58JPEG Lossless, Nonhierarchical (Processes 15) RetiredUntested(Retired)
1.2.840.10008.1.2.4.59JPEG Extended, Hierarchical (Processes 16 & 18)Untested(Retired)
1.2.840.10008.1.2.4.60JPEG Extended, Hierarchical (Processes 17 & 19)Untested
1.2.840.10008.1.2.4.61JPEG Spectral Selection, Hierarchical (Processes 20 & 22)Untested(Retired)
1.2.840.10008.1.2.4.62JPEG Spectral Selection, Hierarchical (Processes 21 & 23)Untested(Retired)
1.2.840.10008.1.2.4.63JPEG Full Progression, Hierarchical (Processes 24 & 26)Untested(Retired)
1.2.840.10008.1.2.4.64JPEG Full Progression, Hierarchical (Processes 25 & 27)Untested(Retired)
1.2.840.10008.1.2.4.65JPEG Lossless, Nonhierarchical (Process 28)Untested(Retired)
1.2.840.10008.1.2.4.66JPEG Lossless, Nonhierarchical (Process 29)Untested(Retired)
1.2.840.10008.1.2.4.92JPEG 2000 Part 2 Multicomponent Image Compression (Lossless Only)Untested
1.2.840.10008.1.2.4.93JPEG 2000 Part 2 Multicomponent Image CompressionUntested
1.2.840.10008.1.2.4.94JPIP ReferencedNo
1.2.840.10008.1.2.4.95JPIP Referenced DeflateNo
1.2.840.10008.1.2.6.1RFC 2557 MIME EncapsulationNo
1.2.840.10008.1.2.4.100MPEG2 Main Profile Main LevelNo
1.2.840.10008.1.2.4.102MPEG-4 AVC/H.264 High Profile / Level 4.1No
1.2.840.10008.1.2.4.103MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1No

Tested Datasets:

  • Many Private datasets.

https://github.com/cornerstonejs/cornerstoneWADOImageLoader/tree/master/testImages

https://github.com/pydicom/pydicom-data

https://www.dicomlibrary.com/

Decode PixelData:

import { parse } from "@abasb75/dicom-parser";
import Dataset from "@abasb75/dicom-parser/Dataset";
import decode from "@abasb75/dicom-pixel-decoder";

...

const dataset = await pare(arrayBuffer);
const { pixelModule, scalingModule, voiLUTModule } = dataset;

const decodedImage = await decode(
    pixelData,
    {
        transferSyntaxUID: dataset.transferSyntaxUID,
        littleEndian: dataset.littleEndian,

        modality:scalingModule.modality,

        windowWidth:voiLUTModule.windowWidth,
        windowCenter:voiLUTModule.windowCenter,

        bitsAllocated:pixelModule.bitsAllocated,
        pixelRepresentation: pixelModule.pixelRepresentation,
        samplesPerPixel: pixelModule.samplesPerPixel,
        rows: pixelModule.rows,
        columns: pixelModule.columns,
        rescaleSlope: pixelModule.rescaleSlope,
        rescaleIntercept: pixelModule.rescaleIntercept,
        planarConfiguration: pixelModule.planarConfiguration,
        photometricInterpretation: pixelModule.photometricInterpretation, 
        bitsStored: pixelModule.bitsStored,

        // must be true if pixel data finded in #7fe00009 or #7fe00008 elements.
        isFloat:dataset.getPixelTypes()===Dataset.Float,
    }
);

console.log(decodedImage);

// image yet need to apply some process like apply windowing, apply color palette map data and ...

...


Keywords

dicom

FAQs

Package last updated on 26 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts