0.0.0-test23 • Published 10 months ago

@abasb75/dicom-parser v0.0.0-test23

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

@abasb75/dicom-parser

npm i @abasb75/dicom-parser pako --save
npm i @types/pako --save-dev

Demo

demo link

Usage

  1. For Download dicom and parse from url:
import { loadAndParseFromUrl } from "@abasb75/dicom-parser";

...
const url = "....dcm";
loadAndParseFromUrl(url)
.then(dataset=>{
  console.log(dataset);
})
.catch(err=>{
  console.log(error);
})
  1. For parse dataset from local files:
import { loadAndParseFromFiles } from "@abasb75/dicom-parser";

...

loadAndParseFromFiles(file)
.then(dataset=>{
  console.log(dataset);
})
.catch(err=>{
  console.log(error);
});
  1. For parsing arrayBuffer:
import { parse } from "@abasb75/dicom-parser";

...

const dataset = parse(arrayBuffer);
  1. Getting value for dicom tag
...

const transferSyntaxUID = dataset.get(0x0002,0x0010);
const transferSyntaxUID = dataset.string(0x0002,0x0010);

...

const framePixelData = dataset.getPixelData(0); // requested frame number

...
  1. get palette color map for PALETTE COLOR photometricInterpretation:
const paletteDataMap = dataset.getPaletteColorData();

if(paletteDataMap){
  // apply palette color to pixels
  ...
}
0.0.0-test23

10 months ago

0.0.0-test22

10 months ago

0.0.0-test21

10 months ago

0.0.0-test20a

10 months ago

0.0.0-test20

10 months ago

0.0.0-test17

10 months ago

0.0.0-test16

10 months ago

0.0.0-test15

10 months ago

0.0.0-test13

10 months ago

0.0.0-test12

10 months ago

0.0.0-test11

10 months ago

0.0.0-test10

10 months ago

0.0.0-test3

10 months ago

0.0.0-test2

10 months ago

0.0.0-test1

10 months ago

0.0.0-test0

10 months ago

0.0.6-test

10 months ago

0.0.5-test

11 months ago

0.0.4-test

11 months ago

0.0.3-test

11 months ago

0.0.2-test

11 months ago

0.0.1-test

11 months ago

0.0.0-test

11 months ago