|
| 1 | +# TF2.4_IVIM-MRI_CodeCollection |
| 2 | + |
| 3 | +This project is designed to run the `nifti_wrapper` script using a Docker container. Below are the steps to build and run the Docker image. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Docker must be installed on your system. |
| 8 | + |
| 9 | +## Directory Structure |
| 10 | + |
| 11 | +``` |
| 12 | +~/TF2.4_IVIM-MRI_CodeCollection/ |
| 13 | +│ |
| 14 | +├── Docker/ |
| 15 | +│ └── Dockerfile |
| 16 | +│ |
| 17 | +├── WrapImage/ |
| 18 | +│ └── nifti_wrapper.py |
| 19 | +│ |
| 20 | +└── requirements.txt |
| 21 | +``` |
| 22 | + |
| 23 | +## Options |
| 24 | + |
| 25 | +Before running the Docker container, here are the available options for the `Docker image` script: |
| 26 | + |
| 27 | +- `input_file`: Path to the input 4D NIfTI file. |
| 28 | +- `bvec_file`: Path to the b-vector file. |
| 29 | +- `bval_file`: Path to the b-value file. |
| 30 | +- `--affine`: Affine matrix for NIfTI image (optional). |
| 31 | +- `--algorithm`: Select the algorithm to use (default is "OJ_GU_seg"). |
| 32 | +- `algorithm_args`: Additional arguments for the algorithm (optional). |
| 33 | + |
| 34 | +## Building the Docker Image |
| 35 | + |
| 36 | +1. Open a terminal and navigate to the project directory: |
| 37 | + |
| 38 | + ```sh |
| 39 | + cd ~/TF2.4_IVIM-MRI_CodeCollection |
| 40 | + ``` |
| 41 | + |
| 42 | +2. Build the Docker image using the `docker build` command: |
| 43 | + |
| 44 | + ```sh |
| 45 | + sudo docker build -t tf2.4_ivim-mri_codecollection -f Docker/Dockerfile . |
| 46 | + ``` |
| 47 | + |
| 48 | +## Running the Docker Container |
| 49 | + |
| 50 | +1. Once the image is built, you can run the Docker container using the `docker run` command. This command runs the Docker image with the specified input files: |
| 51 | + |
| 52 | + ```sh |
| 53 | + sudo docker run -it --rm --name TF2.4_IVIM-MRI_CodeCollection \ |
| 54 | + -v ~/TF2.4_IVIM-MRI_CodeCollection:/usr/src/app \ |
| 55 | + -v ~/TF2.4_IVIM-MRI_CodeCollection:/usr/app/output \ |
| 56 | + tf2.4_ivim-mri_codecollection brain.nii.gz brain.bvec brain.bval |
| 57 | + ``` |
| 58 | + |
| 59 | + Replace `brain.nii.gz`, `brain.bvec`, and `brain.bval` with the actual file names you want to use. |
| 60 | + |
| 61 | +--- |
0 commit comments