Wondering what’s next for npm?Check out our public roadmap! »

    biswebnode

    1.3.0-b1 • Public • Published

    Logo


    BioImage Suite Web -- Node.js Package

    This is package exports much of functionality in BioImage Suite Web as an npm package for use either as a commandline node.js application, or as part of another Node.js tool. For more on BioImage Suite Web see:

    You may also take a look at the examples repository https://github.com/bioimagesuiteweb/examples.

    BioImage Suite Web (bisweb) is a web-based medical image analysis suite primarily geared towards Neuroimaging Analysis. We gratefully acknowledge support from the NIH Brain Initiative under grant R24 MH114805 (Papademetris X. and Scheinost D. PIs).

    Installation

    Simply type:

    npm install biswebnode
    

    This is very similar to the command line distribution of BioImage Suite web available from this download page.

    If you have not installed this via npm then see the file README_js.txt in this directory.


    Using this as a library

    In your code add

    const bisweb=require('biswebnode');
    

    To load, resample, and save an image, for example, do

     let img=new bisweb.BisWebImage();
    
     img.load("someimage.nii.gz").then( () => {
         console.log('Image Loaded = ',img.getDescription());
    
         let mod=bisweb.createModule("resampleImage");
         console.log('Module created=',mod);
     
         mod.execute( { "input" : img   }, { "xsp"  : 2.0, "ysp" : 3.0, "zsp" : 4.0
           }).then( () => {
              let out=mod.getOutputObject("output");
              console.log('OutImage = ',out.getDescription());
              out.save("outputimage.nii.gz");
         });
    

    Using the biswebnode command line tool(s)

    1. Running the modules

    If you install biswebnode as a global package (i.e. npm install -g biswebnode), then there will an executable in your path called biswebnode

    Type:

    biswebnode
    

    This will print the list of all modules.

    Usage:

    cd . biswebnode modulename parameters

    e.g.

    biswebnode smoothImage -i someimage.nii.gz -o output.nii.gz
    

    2. Regression Tests

    Mocha:

    If you would like to run these, first install mocha using:

    sudo npm -g mocha
    

    (Omit sudo on MS-Windows.)

    Regression Tests:

    To run the regression tests type (this will run tests 0 and 1)

    biswebnode regressionTests --last 2 --run 1
    

    For help on running these type:

    biswebnode  regressionTests -h
    

    To run ALL the tests simply type (this will take a while):

    biswebnode regressionTests --run 1
    

    Install

    npm i biswebnode

    DownloadsWeekly Downloads

    54

    Version

    1.3.0-b1

    License

    GPL v2 or Apache

    Unpacked Size

    26.8 MB

    Total Files

    327

    Last publish

    Collaborators

    • avatar