JSPM

  • Created
  • Published
  • Downloads 1538
  • Score
    100M100P100Q128463F
  • License ISC

native addon using DCMTK dicom toolkit

Package Exports

  • dicom-dimse-native

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dicom-dimse-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status GitHub issues FOSSA Status

Greenkeeper badge

dicom-dimse-native

Nodejs native addon for DICOM DIMSE services using the DCMTK DICOM c++ toolkit.

supported DIMSE services

  • C-Echo-scu
  • C-Find-scu
  • C-Move-scu
  • C-Get-scu
  • C-Store-scp

Roadmap:

  • C-Store-scu
  • extended characterSet support

How to install

This package uses prebuild to fetch precompiled binaries, so provided your platform is supported, all you need to do is: npm i -s dicom-native-addon

Otherwise install will try to compile the sources for your platform, you will need:

  • CMake installed and in path
  • a working c++ compiler (vs 2015+ or g++5.3+)

Examples

Store-SCP

const dimse = require('dicom-dimse-native');

dimse.startScp(JSON.stringify(
    {
        "source": {
            "aet": "DCMTK",
            "ip" : "127.0.0.1",
            "port": "9999"
        },
    "storagePath": "./data"
    }
    ), (result) => {
        try {
            console.log(JSON.parse(result));
        }
        catch {
            console.log(result);
        }
});

Move-SCU

dimse.moveScu(JSON.stringify(
    {
        "source": {
            "aet": "DCMTK",
            "ip" : "127.0.0.1",
            "port": "9999"
        },
        "target": {
            "aet": "CONQUESTSRV1",
            "ip" : "127.0.0.1",
            "port": "5678"
        },
        "destination" : "DCMTK",
        "tags" : [
            {
                "key": "0020000D", 
                "value": "1.3.46.670589.11.0.1.1996082307380006",
            },
            {
                "key": "00080052", 
                "value": "STUDY",
            },
        ]
    }
), (result) => {
    try {
        console.log(JSON.parse(result));
    }
    catch {
        console.log(result);
    }
});

Get-SCU

dimse.getScu(JSON.stringify(
    {
        "source": {
            "aet": "DCMTK",
            "ip" : "127.0.0.1",
            "port": "9999"
        },
        "target": {
            "aet": "CONQUESTSRV1",
            "ip" : "127.0.0.1",
            "port": "5678"
        },
        "storagePath": "./data"
        "tags" : [
            {
                "key": "0020000D", 
                "value": "1.3.46.670589.11.0.1.1996082307380006",
            },
            {
                "key": "00080052", 
                "value": "STUDY",
            },
        ]
    }
), (result) => {
    try {
        console.log(JSON.parse(result));
    }
    catch {
        console.log(result);
    }
});

Find-SCU

dimse.findScu(JSON.stringify(
    {
        "source": {
            "aet": "DCMTK",
            "ip" : "127.0.0.1",
            "port": "9999"
        },
        "target": {
            "aet": "CONQUESTSRV1",
            "ip" : "127.0.0.1",
            "port": "5678"
        },
        "tags" : [
            {
                "key": "00100010", 
                "value": "",
            },
            {
                "key": "0020000D", 
                "value": "1.3.46.670589.11.0.1.1996082307380006",
            },
            {
                "key": "00080052", 
                "value": "STUDY",
            },
        ]
    }
), (result) => {
    try {
        console.log(JSON.parse(result));
    }
    catch {
        console.log(result);
    }
});

Result Format:

{
  code: 0 (success) / 1 (pending) / 2 (failure),
  container: null / 'DICOMJSON (only when using c-find)',
  messsage: 'request succeeded' / 'descriptive problem',
  status: 'success' / 'pending' / 'failure'
}

C-FIND results are returned in DICOMJSON format see https://www.dicomstandard.org/dicomweb/dicom-json-format/

License

FOSSA Status