0.0.0-test23 • Published 10 months ago
@abasb75/dicom-parser v0.0.0-test23
@abasb75/dicom-parser
npm i @abasb75/dicom-parser pako --save
npm i @types/pako --save-devDemo
demo link
Usage
- 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);
})- For parse dataset from local files:
 
import { loadAndParseFromFiles } from "@abasb75/dicom-parser";
...
loadAndParseFromFiles(file)
.then(dataset=>{
  console.log(dataset);
})
.catch(err=>{
  console.log(error);
});- For parsing arrayBuffer:
 
import { parse } from "@abasb75/dicom-parser";
...
const dataset = parse(arrayBuffer);- 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
...- get 
palette colormap forPALETTE COLORphotometricInterpretation: 
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
11 months ago
0.0.0-test20a
11 months ago
0.0.0-test20
11 months ago
0.0.0-test17
11 months ago
0.0.0-test16
11 months ago
0.0.0-test15
11 months ago
0.0.0-test13
11 months ago
0.0.0-test12
11 months ago
0.0.0-test11
11 months ago
0.0.0-test10
11 months ago
0.0.0-test3
11 months ago
0.0.0-test2
11 months ago
0.0.0-test1
11 months ago
0.0.0-test0
11 months ago
0.0.6-test
11 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