| | 1 | == Command-line reconstruction interface == |
| | 2 | |
| | 3 | |
| | 4 | Apart from GUI, the 3D Brain Atlas Reconstructor comes with command line interface (or shorter: CLI) allowing the user to perform batch reconstructions without configured graphics environment. After invoking the batch interface, following information will appear: |
| | 5 | |
| | 6 | {{{ |
| | 7 | #!sh |
| | 8 | |
| | 9 | $./batchinterface.sh |
| | 10 | |
| | 11 | Usage: ./batchinterface.sh [options] <CAF index> [<structure 1> [<structure 2> ...]] |
| | 12 | 3d Brain Atlas Reconstructor ver.0.1 Batch reconstruction interface |
| | 13 | |
| | 14 | Options: |
| | 15 | -h, --help show this help message and exit |
| | 16 | -g GENERATESUBSTRUCTURES, --generateSubstructures=GENERATESUBSTRUCTURES |
| | 17 | maximum level of substructures (in the structure tree) |
| | 18 | to be generated; default: 0 |
| | 19 | -d VOXELDIMENSIONS, --voxelDimensions=VOXELDIMENSIONS |
| | 20 | voxel size (in units defined in given dataset) in slide plane |
| | 21 | and in plane perpendicular to the slides, consecutively. |
| | 22 | -e EXPORTDIR, --exportDir=EXPORTDIR |
| | 23 | the path to a directory for reconstructions |
| | 24 | -p PIPELINE, --usePipeline=PIPELINE |
| | 25 | the path to a custom pipeline definition |
| | 26 | -v CAMERA, --useViewport=CAMERA |
| | 27 | the direction vector from the center of the scene to |
| | 28 | the camera position |
| | 29 | --exportToWindow, --show |
| | 30 | the reconstruction is displayed to the user |
| | 31 | --composite perform a reconstruction of the structure as a scene |
| | 32 | composed of the reconstructions of the basic |
| | 33 | substructures in the hierarchy tree (up to the maximum |
| | 34 | given level) |
| | 35 | --includeBrainOutline |
| | 36 | Includes additional translucent brain outline to the |
| | 37 | reconstructions. Applies only when exporting to VRML, |
| | 38 | X3D, screenshot or thumbnail. |
| | 39 | |
| | 40 | Output Format Options: |
| | 41 | --exportToX3d exports as X3D scene |
| | 42 | --exportToVRML exports as VRML scene |
| | 43 | --exportToVTKPolydata |
| | 44 | exports as vtkPolyData |
| | 45 | --exportToVolume exports as vtkStructuredPoints |
| | 46 | --exportToNifti exports as NIfTI file |
| | 47 | --exportToNumpy exports as NumPy array |
| | 48 | --exportScreenshot saves screenshot as an PNG image |
| | 49 | --exportThumbnail saves scaled screenshot as an PNG image |
| | 50 | }}} |
| | 51 | |
| | 52 | The `<CAF index>` is a location of the index file of the given CAF dataset while the `[<structure 1> [<structure 2> ...]]` is space-separated list of all structures to reconstruction contained in the CAF dataset. |
| | 53 | |
| | 54 | The simplest usage of the CLI is to generate reconstruction of a single structure from provided CAF dataset using default settings. Assume that our CAF dataset is located in the `~/atlases/mouse/caf/` directory and we would like to reconstruct the *Thalamus* as save a nifti volume with the reconstruction: |
| | 55 | |
| | 56 | {{{ |
| | 57 | $./batchinterface.sh ~/atlases/mouse/caf/index.xml Thalamus --exportToNiftii |
| | 58 | }}} |
| | 59 | |
| | 60 | By default, the reconstructions generated using a predefined pipeline and stored in directory parallel to the CAF dataset directory (in this example it would be `~/atlases/mouse/reconstructions/`). However, this behavior can be customized using various switches. |