Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SCT and dcm2niix installation instructions #2

Merged
merged 7 commits into from
Aug 16, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,84 @@

Repository containing pipeline for processing spinal cord injury (SCI) patients (both DCM and tSCI) using the [Spinal Cord Toolbox (SCT)](https://github.com/spinalcordtoolbox/spinalcordtoolbox).

Steps:
Pipeline steps:
1. DICOM to nii (BIDS) conversion
2. Processing (spinal cord and lesion segmentation, vertebral labeling)
3. Quality control (QC) + manual compression level labeling
4. Lesion metric computation


## Dependencies

[Spinal Cord Toolbox v6.4](https://github.com/spinalcordtoolbox/spinalcordtoolbox/releases/tag/6.4)
[dcm2niix >= v1.0.20220505](https://github.com/rordenlab/dcm2niix?tab=readme-ov-file#install)

## Installation
valosekj marked this conversation as resolved.
Show resolved Hide resolved

### SCT Installation

1. Open a new terminal:

Press <kbd>command</kbd> + <kbd>space</kbd> and type `Terminal` and press <kbd>return/enter</kbd>.
valosekj marked this conversation as resolved.
Show resolved Hide resolved

2. Run the following commands in the terminal (you can copy-paste the whole block):

> [!NOTE]
> The installation process will take a few minutes.

```bash
# Go to your home directory
cd ~
# Download SCT v6.4
wget https://github.com/spinalcordtoolbox/spinalcordtoolbox/archive/refs/tags/6.4.zip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note: I use wget instead of git clone because Apple Developer Tools are needed for git.

# Unzip the downloaded file --> the unzipped directory will be named spinalcordtoolbox-6.4
unzip 6.4.zip
rm 6.4.zip
# Go to the SCT directory
cd spinalcordtoolbox-6.4
# Install SCT v6.4
./install_sct -iyc
# '-i' Install in-place (i.e., in the current directory)
# '-y' Install without interruption with 'yes' as default answer
# '-c' Disables sct_check_dependencies so we can check it separately
```

> [!NOTE]
> We are not using `git clone` because Apple Developer Tools are needed for `git`.

3. Check that SCT was installed correctly:

Close the terminal and open a new one (press <kbd>command</kbd> + <kbd>space</kbd> and type `Terminal` and press <kbd>return/enter</kbd>.).

```bash
sct_check_dependencies
echo $SCT_DIR
valosekj marked this conversation as resolved.
Show resolved Hide resolved
```

The expected output is `[OK]` for all dependencies.

### dcm2niix Installation

1. Open a new terminal (if you closed the previous one):

Press <kbd>command</kbd> + <kbd>space</kbd> and type `Terminal` and press <kbd>return/enter</kbd>.
valosekj marked this conversation as resolved.
Show resolved Hide resolved

2. Run the following commands in the terminal (you can copy-paste the whole block):

```bash
# Go to the SCT directory
cd $SCT_DIR
# Activate SCT conda environment
source ./python/etc/profile.d/conda.sh
conda activate venv_sct
# Install dcm2niix using pip
pip install dcm2niix
```

3. Check that `dcm2niix` was installed correctly:

```bash
dcm2niix --version
```

The expected output is the version of `dcm2niix`.