Skip to content

Commit dcaefd2

Browse files
authored
Update README.md
1 parent 545e41b commit dcaefd2

File tree

1 file changed

+42
-24
lines changed

1 file changed

+42
-24
lines changed

README.md

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,71 @@
1-
# CaseForge automated pipeline
1+
# An automated pipeline to create subject-specific headcases for fMRI scanning
22

3-
## Requirements
3+
This repository contains an automated pipeline to create subject-specific headcases for fMRI scanning. Headcases reduce subject motion ([Power et al., 2019](https://pubmed.ncbi.nlm.nih.gov/30639840/)), increase subject's comfort, and facilitate consistent head positioning across multiple scanning sessions.
44

5-
Python requirements are listed under `requirements.txt`. You can install them with
5+
The pipeline takes as an input a 3D model of the participant's head and generates STL files of the headcases for 3D printing. This pipeline has been tested only with a [Structure Sensor](https://structure.io/structure-sensor-pro), but we think other sensors may be used.
66

7-
```bash
8-
pip install -r requirements.txt
9-
```
10-
11-
We also provide a conda environment file that you can try to use. The
12-
environment was created on Ubuntu, so it will likely not work on other
13-
operating systems. You can install the environment from the conda environment
14-
file with
7+
Headcases can be generated for the following head coils:
8+
- Siemens 32 channel
9+
- Siemens 64 channel
10+
- Nova 32 channel
1511

16-
```bash
17-
conda env create -f conda-environment.yml --name headcase
18-
```
12+
The pipeline is written in Python and uses [MeshLab](https://www.meshlab.net/) and [Blender](https://www.blender.org/).
1913

20-
In addition, the code requires
21-
22-
- Blender 2.7.9. **Do not use newer versions of Blender. The code will not work.**
23-
- Meshlab (the code works with meshlab 1.3.2 and it has not been tested with other versions)
2414

2515
## Usage
2616

27-
You need to use a structure sensor to generate a head model of the subject. Use the iOS app to send the model over email. Save the `Model.zip` file, then use `make_headcase.py` as
17+
The basic [Structure Scanner iOS app](https://apps.apple.com/us/app/scanner-structure-sdk/id891169722) can be used to scan a 3D model of the participant's head. For recommendations on how to scan the participant's head, see [this document](docs/glab_headcase_pipeline.md). From the Scanner app, the 3D model file (`Model.zip`) will need to be sent to an email address.
18+
19+
The pipeline can then be used to generate a headcase with
2820

2921
```bash
3022
python make_headcase.py Model.zip Headcase.zip --headcoil s32
3123
```
3224

33-
This will generate a headcase model split into four parts and zipped in `Headcase.zip`. It is possible to generate headcases for the Siemens 32ch head-coil (`--headcoil s32`), Siemens 64ch head-coil (`--headcoil s64`), or Nova 32ch head-coil (`--headcoil n32`).
25+
Several options are available, including whether the headcase should be split in two parts (front and back) or in four parts (front-top, front-bottom, back-top, back-bottom). Four parts (the default) can be printed more easily on most 3D printers, but they might require gluing together the top and bottom parts. To see all options, run
26+
27+
```bash
28+
python make_headcases.py --help
29+
```
30+
31+
## Running with Docker
3432

35-
### Running with docker
33+
We recommend running the pipeline with the Dockerfile provided in this repository.
3634

37-
We provide a Dockerfile to generate an image with all dependencies. Create the image with
35+
First, the docker image needs to be built.
3836

3937
```bash
4038
docker build --tag caseforge .
4139
```
4240

43-
then you can run the pipeline as
41+
Then, the pipeline can be run with
4442

4543
```bash
4644
docker run --rm caseforge:latest --help
4745
```
4846

49-
To let docker see the folder with the head model, you will have to bind the folder inside the container. For example, if the head model is in `/tmp/test-headcase/model.zip`, you would run the following command
47+
To let docker see the folder containing the head 3D model, you will have to bind the folder inside the container. For example, if the head model is in `/tmp/test-headcase/model.zip`, the following command should be run
5048

5149
```bash
5250
docker run -v /tmp:/tmp --rm caseforge:latest /tmp/test-headcase/model.zip /tmp/test-headcase/case.zip
5351
```
52+
53+
## Manual installation
54+
55+
Python requirements are listed under `requirements.txt`, and can be installed with
56+
57+
```bash
58+
pip install -r requirements.txt
59+
```
60+
61+
We also provide a conda environment file. The environment was created on Ubuntu, so it might not work on other operating systems.
62+
The environment can be installed with
63+
64+
```bash
65+
conda env create -f conda-environment.yml --name headcase
66+
```
67+
68+
The pipeline also requires
69+
70+
- Blender 2.7.9 (**Do not use newer versions of Blender, or the pipeline won't work.**)
71+
- MeshLab 1.3.2 (**The pipeline has been tested only with this version.**)

0 commit comments

Comments
 (0)