Table of Contents
mgz_converter.py
is a ChRIS-based application that takes Brain MRI images present in mgz format from the input diretctory, converts them to png or npy format based on the conversion type and saves output to the output directory.
python mgz_converter.py \
[-v <level>] [--verbosity <level>] \
[--version] \
[--man] \
[--meta] \
[--conversion_type <conversion_type>] \
<inputDir> \
<outputDir> \
[-v <level>] [--verbosity <level>]
Verbosity level for app. Not used currently.
[--version]
If specified, print version number.
[--man]
If specified, print (this) man page.
[--meta]
If specified, print plugin meta data.
[--conversion_type <conversion_type>]
Should be specified,
If the <conversion_type> is 1, converts the input mgz images to png
If the <conversion_type> is 2, converts the input mgz images to npy
This plugin
can be run in two modes: natively as a python package or as a containerized docker image.
To run from PyPI, simply do a
and run with
to get inline help. The app should also understand being called with only two positional arguments
To run using docker
, be sure to assign an "input" directory to /incoming
and an output directory to /outgoing
. Make sure that the $(pwd)/out
directory is world writable!
Now, prefix all calls with
Thus, getting inline help is:
This will convert the *.mgz
images present in the input directory to *.png
format and saves them inside out/png directory
This will convert the *.mgz
images present in the input directory to *.npy
format and saves them inside out/numpy directory