All Projects → commontk → Dcmjs

commontk / Dcmjs

Licence: other
dcmjs is a javascript cross-compile of dcmtk (dcmtk.org).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dcmjs

Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (+52.17%)
Mutual labels:  cmake, emscripten, webassembly, wasm, asmjs
TypeScriptXX
🧷 Stay safe! Type-safe scripting for C++ using TypeScriptToLua and CMake with auto-generated declarations.
Stars: ✭ 33 (-64.13%)
Mutual labels:  webassembly, wasm, emscripten, asmjs
Emscripten Docker
Docker image with Emscripten to compile ASM.js and WebAssembly
Stars: ✭ 92 (+0%)
Mutual labels:  emscripten, webassembly, wasm, asmjs
Rustynes
👾 An NES emulator by Rust and WebAssembly
Stars: ✭ 399 (+333.7%)
Mutual labels:  emscripten, webassembly, wasm
Stdweb
A standard library for the client-side Web
Stars: ✭ 3,201 (+3379.35%)
Mutual labels:  emscripten, webassembly, asmjs
Magnum
Lightweight and modular C++11 graphics middleware for games and data visualization
Stars: ✭ 3,728 (+3952.17%)
Mutual labels:  cmake, emscripten, webassembly
Magnum Plugins
Plugins for the Magnum C++11/C++14 graphics engine
Stars: ✭ 66 (-28.26%)
Mutual labels:  cmake, emscripten, webassembly
Camaro
camaro is an utility to transform XML to JSON, using Node.js binding to native XML parser pugixml, one of the fastest XML parser around.
Stars: ✭ 438 (+376.09%)
Mutual labels:  emscripten, webassembly, wasm
Wasmer
🚀 The leading WebAssembly Runtime supporting WASI and Emscripten
Stars: ✭ 11,047 (+11907.61%)
Mutual labels:  emscripten, webassembly, wasm
Asm Dom Boilerplate
A simple boilerplate to start using asm-dom without configuration.
Stars: ✭ 49 (-46.74%)
Mutual labels:  webassembly, wasm, asmjs
Cargo Web
A Cargo subcommand for the client-side Web
Stars: ✭ 1,026 (+1015.22%)
Mutual labels:  emscripten, webassembly, asmjs
Opus Stream Decoder
Instantly decode Ogg Opus audio streams in chunks with JavaScript & WebAssembly (Wasm)
Stars: ✭ 80 (-13.04%)
Mutual labels:  emscripten, webassembly, wasm
Magnum Bootstrap
Bootstrap projects for Magnum C++11/C++14 graphics engine
Stars: ✭ 69 (-25%)
Mutual labels:  cmake, emscripten, webassembly
Wasm Git
GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
Stars: ✭ 261 (+183.7%)
Mutual labels:  emscripten, webassembly, wasm
Wac
WebAssembly interpreter in C
Stars: ✭ 372 (+304.35%)
Mutual labels:  emscripten, webassembly, wasm
koder
QR/bar code scanner for the Browser
Stars: ✭ 73 (-20.65%)
Mutual labels:  webassembly, wasm, emscripten
Securityworker
The best javascript code protection solution ever.
Stars: ✭ 626 (+580.43%)
Mutual labels:  emscripten, webassembly, asmjs
Magnum Examples
Examples for the Magnum C++11/C++14 graphics engine
Stars: ✭ 180 (+95.65%)
Mutual labels:  cmake, emscripten, webassembly
Imguizmo.quat
ImGui GIZMO widget - 3D object manipulator / orientator
Stars: ✭ 187 (+103.26%)
Mutual labels:  cmake, emscripten, webassembly
Cppwasm Book
📚 WebAssembly friendly programming with C/C++ -- Emscripten practice
Stars: ✭ 956 (+939.13%)
Mutual labels:  emscripten, webassembly, wasm

dcmjs

CircleCI

Overview

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.

This package is intended for use in browser environments. For server side use probably you want to call to the corresponding natively compiled dcmtk executables.

To see javascript that uses dcmjs.js see the gh-pages branch of commontk/dcmjs.org repository which is what hosts dcmjs.org.

Usage

The module dcmjs allows to selectively execute a dcmtk application.

  • To list available application:
require('dcmjs').run(['list'])
$ node dcmjs-cli list

Output:

dcm2pnm
dcmdump
dcm2xml
dcmftest
  • To execute an application:
require('dcmjs').run(['dcmdump'])
$ node dcmjs-cli dcmdump

Output:

$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
[...]

Prerequisites

docker pull dockcross/web-wasm
docker run dockcross/web-wasm > ~/bin/dockcross-web-wasm
chmod u+x ~/bin/dockcross-web-wasm

For more details, see https://github.com/dockcross/dockcross#readme

Building

The following commands will checkout dcmjs project and build dcmjs.js using dockcross-web-wasm.

git clone git://github.com/commontk/dcmjs
cd dcmjs
dockcross-web-wasm cmake -Bdcmjs-build -H. -GNinja
dockcross-web-wasm ninja -Cdcmjs-build

When done, you will have these files in the dcmjs-build/dcmjs-build/bin folder:

$ ls -1 dcmjs-build/dcmjs-build/bin/
dcmjs-cli
dcmjs.js
dcmjs.js.gz
dcmjs.wasm
dcmjs.wasmt

File IO using node

To support using the javascript module with node, the current folder is mounted as /working. This means that input files must be in in the current directory or a sub-directory.

For example, assuming we have the these files:

/home/awesome/downloads/dcmjs-cli
/home/awesome/downloads/dcmjs.js
/tmp/data/sr.dcm

The following is expected to work:

cd /tmp
node /home/awesome/downloads/dcmjs-cli dsr2xml /working/data/sr.dcm

Add / Remove applications

Re-configuring the project setting any of these options allows to customize the list of applications bundled in the dcmjs.js module:

  • cda2dcm: -DBUILD_cda2dcm_APP:BOOL=[ON|OFF]
  • dcm2json: -DBUILD_dcm2json_APP:BOOL=[ON|OFF]
  • dcm2pdf: -DBUILD_dcm2pdf_APP:BOOL=[ON|OFF]
  • dcm2pnm: -DBUILD_dcm2pnm_APP:BOOL=[ON|OFF]
  • dcm2xml: -DBUILD_dcm2xml_APP:BOOL=[ON|OFF]
  • dcmcjpeg: -DBUILD_dcmcjpeg_APP:BOOL=[ON|OFF]
  • dcmcjpls: -DBUILD_dcmcjpls_APP:BOOL=[ON|OFF]
  • dcmconv: -DBUILD_dcmconv_APP:BOOL=[ON|OFF]
  • dcmcrle: -DBUILD_dcmcrle_APP:BOOL=[ON|OFF]
  • dcmdjpeg: -DBUILD_dcmdjpeg_APP:BOOL=[ON|OFF]
  • dcmdjpls: -DBUILD_dcmdjpls_APP:BOOL=[ON|OFF]
  • dcmdrle: -DBUILD_dcmdrle_APP:BOOL=[ON|OFF]
  • dcmdspfn: -DBUILD_dcmdspfn_APP:BOOL=[ON|OFF]
  • dcmdump: -DBUILD_dcmdump_APP:BOOL=[ON|OFF]
  • dcmftest: -DBUILD_dcmftest_APP:BOOL=[ON|OFF]
  • dcmgpdir: -DBUILD_dcmgpdir_APP:BOOL=[ON|OFF]
  • dcmicmp: -DBUILD_dcmicmp_APP:BOOL=[ON|OFF]
  • dcmj2pnm: -DBUILD_dcmj2pnm_APP:BOOL=[ON|OFF]
  • dcml2pnm: -DBUILD_dcml2pnm_APP:BOOL=[ON|OFF]
  • dcmmkcrv: -DBUILD_dcmmkcrv_APP:BOOL=[ON|OFF]
  • dcmmkdir: -DBUILD_dcmmkdir_APP:BOOL=[ON|OFF]
  • dcmmklut: -DBUILD_dcmmklut_APP:BOOL=[ON|OFF]
  • dcmodify: -DBUILD_dcmodify_APP:BOOL=[ON|OFF]
  • dcmp2pgm: -DBUILD_dcmp2pgm_APP:BOOL=[ON|OFF]
  • dcmprscp: -DBUILD_dcmprscp_APP:BOOL=[ON|OFF]
  • dcmprscu: -DBUILD_dcmprscu_APP:BOOL=[ON|OFF]
  • dcmpschk: -DBUILD_dcmpschk_APP:BOOL=[ON|OFF]
  • dcmpsmk: -DBUILD_dcmpsmk_APP:BOOL=[ON|OFF]
  • dcmpsprt: -DBUILD_dcmpsprt_APP:BOOL=[ON|OFF]
  • dcmpsrcv: -DBUILD_dcmpsrcv_APP:BOOL=[ON|OFF]
  • dcmpssnd: -DBUILD_dcmpssnd_APP:BOOL=[ON|OFF]
  • dcmqridx: -DBUILD_dcmqridx_APP:BOOL=[ON|OFF]
  • dcmqrscp: -DBUILD_dcmqrscp_APP:BOOL=[ON|OFF]
  • dcmqrti: -DBUILD_dcmqrti_APP:BOOL=[ON|OFF]
  • dcmquant: -DBUILD_dcmquant_APP:BOOL=[ON|OFF]
  • dcmrecv: -DBUILD_dcmrecv_APP:BOOL=[ON|OFF]
  • dcmscale: -DBUILD_dcmscale_APP:BOOL=[ON|OFF]
  • dcmsend: -DBUILD_dcmsend_APP:BOOL=[ON|OFF]
  • dcmsign: -DBUILD_dcmsign_APP:BOOL=[ON|OFF]
  • dcod2lum: -DBUILD_dcod2lum_APP:BOOL=[ON|OFF]
  • dconvlum: -DBUILD_dconvlum_APP:BOOL=[ON|OFF]
  • drtdump: -DBUILD_drtdump_APP:BOOL=[ON|OFF]
  • dsr2html: -DBUILD_dsr2html_APP:BOOL=[ON|OFF]
  • dsr2xml: -DBUILD_dsr2xml_APP:BOOL=[ON|OFF]
  • dsrdump: -DBUILD_dsrdump_APP:BOOL=[ON|OFF]
  • dump2dcm: -DBUILD_dump2dcm_APP:BOOL=[ON|OFF]
  • echoscu: -DBUILD_echoscu_APP:BOOL=[ON|OFF]
  • findscu: -DBUILD_findscu_APP:BOOL=[ON|OFF]
  • getscu: -DBUILD_getscu_APP:BOOL=[ON|OFF]
  • img2dcm: -DBUILD_img2dcm_APP:BOOL=[ON|OFF]
  • mdfconen: -DBUILD_mdfconen_APP:BOOL=[ON|OFF]
  • mdfdsman: -DBUILD_mdfdsman_APP:BOOL=[ON|OFF]
  • movescu: -DBUILD_movescu_APP:BOOL=[ON|OFF]
  • pdf2dcm: -DBUILD_pdf2dcm_APP:BOOL=[ON|OFF]
  • stl2dcm: -DBUILD_stl2dcm_APP:BOOL=[ON|OFF]
  • storescp: -DBUILD_storescp_APP:BOOL=[ON|OFF]
  • storescu: -DBUILD_storescu_APP:BOOL=[ON|OFF]
  • termscu: -DBUILD_termscu_APP:BOOL=[ON|OFF]
  • wlcefs: -DBUILD_wlcefs_APP:BOOL=[ON|OFF]
  • wlmscpfs: -DBUILD_wlmscpfs_APP:BOOL=[ON|OFF]
  • xml2dcm: -DBUILD_xml2dcm_APP:BOOL=[ON|OFF]
  • xml2dsr: -DBUILD_xml2dsr_APP: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): \`-DBUILD_${appname}_APP:BOOL=[ON|OFF]\`";
done | sort

List of options found in CMake/Externals/External_DCMTK.cmake can be generated using:

cd DCMTK
for file in `find -wholename *apps/*.cc`; do
  appname=$( basename ${file%.*} );
  echo -e "dcmtk_build_app_option(BUILD_${appname}_APP OFF)";
done | sort | column -t

Creating a release

  1. Choose a release name (e.g dcmjs-3.6.1)
release=<name-of-release>
  1. Fetch and tag repository
git fetch
git tag -s -m "${release}" ${release} origin/master
  1. Publish tag
git push origin ${release}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].