Small library for tag-based MRI series selection, spun out from the lumbar spine MR project.
Do this in order to use the library, without needing to edit it:
pip install git+https://github.com/QTIM-Lab/mr-series-selection.gitIt is recommended to install this in a virtual environment.
This is will clone the code into your current location and then install it in your environment via a link. This means that you can edit the code and re-run without needing to reinstall.
git clone https://github.com/QTIM-Lab/mr-series-selection.git
cd mr_series_selection
pip install -e .It is recommended to install this in a virtual environment.
To run on a study and print out detailed debug information to the console, just specify an input directory containing the files for a single study.
python -m mr_series_selection /path/to/some/study/directoryNote that you can run this from anywhere as long as the virtualenv in which the package is installed is active.
To run on an entire batch of studies, each within a sub-directory of an input
directory, use the -b option, pass the input directory containing the study
directories, and specify a location for the output CSV with -o (default is
series_selection_results.csv in the current working directory).
python -m mr_series_selection -b /path/to/some/directory -o /path/to/output.csvAgain note that you can run this from anywhere as long as the virtualenv in which the package is installed is active.
By default, batch mode will be run with 8 threads to increase throughput. The
number of threads can be controlled with the -t option. Setting to 0 will
use the main thread, which may be useful for debugging purposes.
How far down from the current directory it needs to look to find study directories
can be controlled with the -r option. The default is 1, implying that each
immediate sub-directory of the input directory are assumed to contain a study.
Additionally, which type of classification it should perform can be controlled
with the -c option. Currently, it supports 'lumbar', 'prostate', and 'brain'. The default
option is 'lumbar'.