Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

make a dimse back end #18

Open
pieper opened this issue Aug 28, 2019 · 6 comments
Open

make a dimse back end #18

pieper opened this issue Aug 28, 2019 · 6 comments
Labels
enhancement New feature or request future work not on anyone's current agenda but maybe someday

Comments

@pieper
Copy link
Contributor

pieper commented Aug 28, 2019

From time to time people ask about using viewers like OHIF with a traditional (non-DICOMweb) PACS. It would be conceivable to implement this in dicomweb-server if someone had enough motivation.

One possible implementation could be to build a bridge to dcmtk or other native toolkit (e.g. like https://github.com/jmhmd/dcmtk-node) or to use the pure javascript code (https://github.com/OHIF/dicom-dimse).

@pieper pieper added enhancement New feature or request future work not on anyone's current agenda but maybe someday labels Aug 28, 2019
@lam0620
Copy link

lam0620 commented Oct 21, 2019

I'm looking forward this!

@MichaelLeeHobbs
Copy link

@pieper Not entirely sure what you are looking for. We have a few items that we have built the may be useful.

For starters, I have a node:12.8.0-alpine container that has dcmtk-3.6-4 built inside. https://github.com/MichaelLeeHobbs/nodejs-dcmtk

Additionally, I have the beginnings of a node dcmtk library. So far it really only has what we needed. If you are interested I will check that I can release it into open source.

For example

const {exec} = require('child_process')
const {DICOM_EVENTS} = require('./dicomEvents')

async function dcmsend({dcmtkPath, ip, port, file, timeOut = 30, aec, aet}) {
    return new Promise((resolve, reject) => {
        let command = `${dcmtkPath}/dcmsend -v --no-uid-checks -pdu 131072 --max-send-pdu 131072 +sd +r +rd ${aec ? `-aec ${aec}` : ''} ${aet ? `-aet ${aet}` : ''} -to ${timeOut} -nh ${ip} ${port} "${file}"`
        exec(command, (err, stdout, stderr) => (err) ?
            reject({event: DICOM_EVENTS.DICOM_SEND_FAILED, err, stdout, stderr, message: 'dcmsend failed'}) :
            resolve({event: DICOM_EVENTS.DICOM_SEND_SUCCESS, stdout, stderr, message: 'dcmsend success'}))
    })
}

module.exports = dcmsend

The code thus far is very solid but it does need some refactoring for hard code values. The event symbols need a refactor as well to fix a lack of consistency.

@pieper
Copy link
Contributor Author

pieper commented Jan 27, 2020

Thanks @MichaelLeeHobbs - this does look useful.

@emelalkim has been working on this branch and the basics are working but there is definitely more to do.

@knopkem
Copy link

knopkem commented Apr 3, 2020

This might be what you want: https://www.npmjs.com/package/dicomweb-proxy
The backend is using nan native plugin: https://www.npmjs.com/package/dicom-dimse-native
using Imebra (hence the GPL license) but I'm changing it to use dcmtk and switch to MIT license.

@pieper
Copy link
Contributor Author

pieper commented Apr 3, 2020

Looks excellent @knopkem 👍

@knopkem
Copy link

knopkem commented Apr 6, 2020

It's done. Have fun.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request future work not on anyone's current agenda but maybe someday
Projects
None yet
Development

No branches or pull requests

4 participants