Skip to content

A ChRIS app to convert csv generated from 'pl-lld_inference' to JSON

License

Notifications You must be signed in to change notification settings

FNNDSC/pl-csv2json

Repository files navigation

pl-csv2json

https://img.shields.io/docker/v/fnndsc/pl-csv2json?sort=semver https://img.shields.io/github/license/fnndsc/pl-csv2json

An app to convert CSV predition file generated from pl-lld_inference into a more meaningful JSON representation.

csv2json is a ChRIS ds-type application processes an upstream CSV formatted predition file and generates a more friendly JSON representation. This JSON output is used in many downstream plugins and is interpreted to determine where to place drawing and measurement markers on an image.

docker run --rm fnndsc/pl-csv2json csv2json

    [-f| --inputFileFilter <inputFileFilter>]
    [-t|--tagFileFilter <tagFileFilter>]
    [-o| --outputFileStem <outputFileStem>]
    [-a|--addTags <commaSeparatedTags>]
    [-h|--help]
    [--json] [--man] [--meta]
    [--savejson <DIR>]
    [-v|--verbosity <level>]
    [--version]
    <inputDir> <outputDir>
[-f| --inputFileFilter <inputFileFilter>]
A glob pattern string, default is "**/*.csv", representing the input
file pattern to analyze.

[-t|--tagFileFilter <tagFileFilter>]
A glob pattern string, default is "**/*.dcm", representing the input tag
file pattern to analyze.

[-t|--tagFileFilter <tagFileFilter>]
A glob pattern string, default is "**/*.dcm", representing the input
dicom file pattern to analyze.

[-o| --outputFileStem <outputFileStem>]
The name of the output JSON file to be created (without the extension).

[-a|--addTags <commaSeparatedTags>]
A comma separated string conatining the list of tags to add in the info section
of the output JSON. The default included tag is 'PatientID'.

[-h] [--help]
If specified, show help message and exit.

[--json]
If specified, show json representation of app and exit.

[--man]
If specified, print (this) man page and exit.

[--meta]
If specified, print plugin meta data and exit.

[--savejson <DIR>]
If specified, save json representation file to DIR and exit.

[-v <level>] [--verbosity <level>]
Verbosity level for app. Not used currently.

[--version]
If specified, print version number and exit.

Getting inline help is:

docker run --rm fnndsc/pl-csv2json csv2json --man

You need to specify input and output directories using the -v flag to docker run.

docker run --rm -u $(id -u)                             \
    -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
    fnndsc/pl-csv2json csv2json                         \
    /incoming /outgoing

Build the Docker container:

docker build -t local/pl-csv2json .

Run unit tests:

docker run --rm local/pl-csv2json nosetests

Put some examples here!

https://raw.githubusercontent.com/FNNDSC/cookiecutter-chrisapp/master/doc/assets/badge/light.png

About

A ChRIS app to convert csv generated from 'pl-lld_inference' to JSON

Resources

License

Stars

Watchers

Forks

Packages