|
| 1 | +% |
| 2 | +% Read a JSON object, a JSON file, or a directory containing a json file |
| 3 | +% and run dtiInit inside of a docker container (scitran-apps/dtiinit). |
| 4 | +% |
| 5 | +% |
| 6 | +% INPUTS: |
| 7 | +% json - a JSON string, a JSON file, or a directory containing a json |
| 8 | +% file, in the following format (Note that 'input_dir' and |
| 9 | +% 'output_dir' are the only REQUIRED inputs) |
| 10 | +% |
| 11 | +% OUTPUTS: |
| 12 | +% A docker run produces a zip file containing all of the outputs |
| 13 | +% from the algorithm. The name of the output zip file is: |
| 14 | +% 'dtiInit[date-time].zip' |
| 15 | +% |
| 16 | +% |
| 17 | +% JSON SCHEMA: |
| 18 | +% Below is an example JSON file with the defaults show for 'params'. |
| 19 | +% See dtiInitParams.m for more info regarding params. Note that |
| 20 | +% "input_dir" and "output_dir" are required and must be in the |
| 21 | +% context of the container. |
| 22 | +% |
| 23 | +% { |
| 24 | +% "input_dir": "/input", |
| 25 | +% "output_dir": "/output", |
| 26 | +% "dwi_file": "", |
| 27 | +% "bvec_file": "", |
| 28 | +% "bval_file": "", |
| 29 | +% "t1_file": "", |
| 30 | +% "params": |
| 31 | +% { |
| 32 | +% "bvalue": "", |
| 33 | +% "gradDirsCode": "", |
| 34 | +% "clobber": 0, |
| 35 | +% "dt6BaseName": "", |
| 36 | +% "flipLrApFlag": 0, |
| 37 | +% "numBootStrapSamples": 500, |
| 38 | +% "fitMethod": "ls", |
| 39 | +% "nStep": 50, |
| 40 | +% "eddyCorrect": 1, |
| 41 | +% "excludeVols": "", |
| 42 | +% "bsplineInterpFlag": 0, |
| 43 | +% "phaseEncodeDir": "", |
| 44 | +% "dwOutMm": [2, 2, 2], |
| 45 | +% "rotateBvecsWithRx": 0, |
| 46 | +% "rotateBvecsWithCanXform": 0, |
| 47 | +% "bvecsFile": "", |
| 48 | +% "bvalsFile": "", |
| 49 | +% "noiseCalcMethod": "b0", |
| 50 | +% "outDir": "/output/" |
| 51 | +% } |
| 52 | +% } |
| 53 | +% |
| 54 | +% |
| 55 | +% REQUIRED INPUTS: |
| 56 | +% 'input_dir' and 'output_dir' are the only required inputs. |
| 57 | +% |
| 58 | +% |
| 59 | +% HELP: |
| 60 | +% If 'help', '-h', '--help', or nothing (nargin==0), is passed in |
| 61 | +% this help will be displayed. |
| 62 | +% |
| 63 | +% |
| 64 | +% USAGE: |
| 65 | +% Pass in a JSON file, a JSON text string, or a path to a directory |
| 66 | +% containing a JSON file to the docker container to initiate a |
| 67 | +% dtiInit processing run (see INPUT section for JSON schema): |
| 68 | +% |
| 69 | +% % Using a JSON file |
| 70 | +% docker run --rm -ti -v `pwd`/input:/input -v `pwd`/output:/output scitran-apps/dtiinit /input/<JSON_filename>.json |
| 71 | +% |
| 72 | +% % Using a JSON string |
| 73 | +% docker run --rm -ti -v `pwd`/input:/input -v `pwd`/output:/output scitran-apps/dtiinit '{"input_dir":"/input", "output_dir": "/output"}' |
| 74 | +% |
| 75 | +% % Using a directory (in the container), containing a JSON (.json) |
| 76 | +% docker run --rm -ti -v `pwd`/input:/input -v `pwd`/output:/output scitran-apps/dtiinit /input/ |
| 77 | +% |
| 78 | +% |
| 79 | +% |
0 commit comments