Metadata-Version: 2.4
Name: fsl-pipe-gui
Version: 0.2.0
Summary: Terminal-based GUI for fsl-pipe.
Project-URL: Homepage, https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui
Project-URL: Documentation, https://open.win.ox.ac.uk/pages/fsl/fsl-pipe
Project-URL: Repository, https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui
Project-URL: Issues, https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui/-/issues
Author-email: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
License: MIT License
        
        Copyright (c) 2023 Michiel Cottaar, University of Oxford
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: GUI,neuroimage,pipeline,textual
Requires-Python: >=3.10
Requires-Dist: file-tree>=1.5.1
Requires-Dist: fsl-pipe>=0.7
Requires-Dist: textual>=0.29
Description-Content-Type: text/markdown

[![PyPI - Downloads](https://img.shields.io/pypi/dm/fsl-pipe-gui)](https://pypi.org/project/fsl-pipe-gui/)
[![Documentation](https://img.shields.io/badge/Documentation-fsl--pipe-blue)](https://open.win.ox.ac.uk/pages/ndcn0236/fsl-pipe)
[![Pipeline status](https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui/badges/main/pipeline.svg)](https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui/-/pipelines/latest)

Terminal-based GUI for fsl-pipe.
It allows interactively choosing which subset of potential output files you want an fsl-pipe pipeline to produce.

# Installation
```shell
pip install fsl-pipe-gui
```

Any bug reports and feature requests are very welcome (see [issue tracker](https://git.fmrib.ox.ac.uk/ndcn0236/fsl-pipe-gui/-/issues)).

# Usage
For any pipelines using the standard command line interface, the GUI will be available using the `-g/--gui` flag.
Some pipelines might have customised this flag. Please check their documentation.

When starting the GUI from your own custom python code, you will need:
- a `file_tree` describing the paths of the input and output files (see [file-tree](https://open.win.ox.ac.uk/pages/ndcn0236/file-tree)).
- a `pipeline` containing the recipes to produce the output from the input files (see [fsl-pipe](https://open.win.ox.ac.uk/pages/ndcn0236/fsl-pipe)).
The GUI can then be started using
```python
pipeline.gui(file_tree)
```

This GUI consists of 3 parts, which will be presented to the user in sequence:
1. An interactive table, where the default values for placeholders (e.g., subject or session id) can be overwritten.
2. A visualisation of the `file_tree` on the left. For the template selected on the left, the matching filenames are shown on the right. If you want the pipeline to produce a specific file, simply click on the row to mark the checkbox. Files without a checkbox cannot be produced by this pipeline. If the checkbox has been replaced by an "M" then the file cannot be produced due to a missing input file. Filenames in blue already exist (but can be produced by the pipeline anyway if it has a checkbox).
3. A summary of which files are requested and which jobs will actually be run. If the user confirms this summary then the pipeline will actually run.
