dcmjs is a javascript cross-compilation of dcmtk (dcmtk.org) for use in a javascript environment. Uses emscripten.
See http://dcmjs.org
See License.txt for information on using and contributing.
To see javascript that uses dcmjs.js see the
gh-pages branch of
commontk/dcmjs.org repository
which is what hosts dcmjs.org. |
The module dcmjs.js
allows to selectively execute a dcmtk application.
- To list available application:
$ nodejs ./dcmjs-build/bin/dcmjs.js list
dcm2pnm
dcmdump
dcm2xml
dcmftest
- To execute an application:
$ nodejs ./dcmjs-build/bin/dcmjs.js dcmdump
$dcmtk: dcmdump v3.6.1 DEV $
dcmdump: Dump DICOM file and data set
usage: dcmdump [options] dcmfile-in...
parameters:
dcmfile-in DICOM input file or directory to be dumped
[...]
- Note that node executables do not have access to the local file system. To use dcmjs on a browser see the demos in the gh-pages branch.
-
Install emscripten: http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
-
Install CMake: http://www.cmake.org
-
Install Git: http://git-scm.com/downloads
-
On mac you may need to workaround missing python2 (see commontk#10)
The following commands will checkout dcmjs project and build dcmjs.js
.
Note that you need to change EMSCRIPTEN_ROOT_PATH
with the path containing emcc
/ em++
:
It may be something like .../emscripten/emsdk_portable/emscripten/1.30.0
git clone git://github.com/commontk/dcmjs
mkdir dcmjs-build
cd dcmjs-build
cmake -DEMSCRIPTEN_ROOT_PATH:PATH=/path/to/emscripten -DCMAKE_BUILD_TYPE:STRING=Release ../dcmjs
make -j5
When done, you will have the files dcmjs.js
and dcmjs.js.gz
in the dcmjs-build/src
folder:
$ ls dcmjs-build/bin/
dcmjs.js dcmjs.js.gz
The DCMTK build may find your system headers, so it's best not to have DCMTK installed on your build machine. See commontk#8.
Re-configuring the project setting any of these options allows to customize the
list of applications bundled in the dcmjs.js
module:
- dcmdspfn:
-DCMTK_APP_DCMDSPFN:BOOL=[ON|OFF]
- dconvlum:
-DCMTK_APP_DCONVLUM:BOOL=[ON|OFF]
- dcod2lum:
-DCMTK_APP_DCOD2LUM:BOOL=[ON|OFF]
- dcmj2pnm:
-DCMTK_APP_DCMJ2PNM:BOOL=[ON|OFF]
- dcmmkdir:
-DCMTK_APP_DCMMKDIR:BOOL=[ON|OFF]
- dcmdjpeg:
-DCMTK_APP_DCMDJPEG:BOOL=[ON|OFF]
- dcmcjpeg:
-DCMTK_APP_DCMCJPEG:BOOL=[ON|OFF]
- storescp:
-DCMTK_APP_STORESCP:BOOL=[ON|OFF]
- dcmrecv:
-DCMTK_APP_DCMRECV:BOOL=[ON|OFF]
- termscu:
-DCMTK_APP_TERMSCU:BOOL=[ON|OFF]
- getscu:
-DCMTK_APP_GETSCU:BOOL=[ON|OFF]
- findscu:
-DCMTK_APP_FINDSCU:BOOL=[ON|OFF]
- dcmsend:
-DCMTK_APP_DCMSEND:BOOL=[ON|OFF]
- echoscu:
-DCMTK_APP_ECHOSCU:BOOL=[ON|OFF]
- storescu:
-DCMTK_APP_STORESCU:BOOL=[ON|OFF]
- movescu:
-DCMTK_APP_MOVESCU:BOOL=[ON|OFF]
- dcm2pnm:
-DCMTK_APP_DCM2PNM:BOOL=[ON|OFF]
- dcmquant:
-DCMTK_APP_DCMQUANT:BOOL=[ON|OFF]
- dcmscale:
-DCMTK_APP_DCMSCALE:BOOL=[ON|OFF]
- dcmsign:
-DCMTK_APP_DCMSIGN:BOOL=[ON|OFF]
- drtdump:
-DCMTK_APP_DRTDUMP:BOOL=[ON|OFF]
- dcmdjpls:
-DCMTK_APP_DCMDJPLS:BOOL=[ON|OFF]
- dcmcjpls:
-DCMTK_APP_DCMCJPLS:BOOL=[ON|OFF]
- dcml2pnm:
-DCMTK_APP_DCML2PNM:BOOL=[ON|OFF]
- readoviw:
-DCMTK_APP_READOVIW:BOOL=[ON|OFF]
- writwlst:
-DCMTK_APP_WRITWLST:BOOL=[ON|OFF]
- readwlst:
-DCMTK_APP_READWLST:BOOL=[ON|OFF]
- preplock:
-DCMTK_APP_PREPLOCK:BOOL=[ON|OFF]
- wlmscpfs:
-DCMTK_APP_WLMSCPFS:BOOL=[ON|OFF]
- wlcefs:
-D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]
- dcmprscu:
-DCMTK_APP_DCMPRSCU:BOOL=[ON|OFF]
- dcmqridx:
-DCMTK_APP_DCMQRIDX:BOOL=[ON|OFF]
- dcmqrti:
-DCMTK_APP_DCMQRTI:BOOL=[ON|OFF]
- dcmqrscp:
-DCMTK_APP_DCMQRSCP:BOOL=[ON|OFF]
- dsrdump:
-DCMTK_APP_DSRDUMP:BOOL=[ON|OFF]
- xml2dsr:
-DCMTK_APP_XML2DSR:BOOL=[ON|OFF]
- dsr2xml:
-DCMTK_APP_DSR2XML:BOOL=[ON|OFF]
- dsr2html:
-DCMTK_APP_DSR2HTML:BOOL=[ON|OFF]
The list above has been generated using:
cd DCMTK
for file in `find -wholename *apps/*.cc`; do
appname=$( basename ${file%.*} );
echo -e "* [${appname}](http://support.dcmtk.org/docs/${appname}.html): \`-DCMTK_APP_${appname^^}:BOOL=[ON|OFF]\`";
done