QSMxT#
Author: Ashley Stewart
Original paper: https://doi.org/10.1002/mrm.29048
Setup Neurodesk#
%%capture
import os
import sys
IN_COLAB = 'google.colab' in sys.modules
if IN_COLAB:
os.environ["LD_PRELOAD"] = "";
os.environ["APPTAINER_BINDPATH"] = "/content,/tmp,/cvmfs"
os.environ["MPLCONFIGDIR"] = "/content/matplotlib-mpldir"
os.environ["LMOD_CMD"] = "/usr/share/lmod/lmod/libexec/lmod"
!curl -J -O https://raw.githubusercontent.com/NeuroDesk/neurocommand/main/googlecolab_setup.sh
!chmod +x googlecolab_setup.sh
!./googlecolab_setup.sh
os.environ["MODULEPATH"] = ':'.join(map(str, list(map(lambda x: os.path.join(os.path.abspath('/cvmfs/neurodesk.ardc.edu.au/neurodesk-modules/'), x),os.listdir('/cvmfs/neurodesk.ardc.edu.au/neurodesk-modules/')))))
# Output CPU information:
!cat /proc/cpuinfo | grep 'vendor' | uniq
!cat /proc/cpuinfo | grep 'model name' | uniq
vendor_id : AuthenticAMD
model name : AMD EPYC-Rome Processor
QSMxT Interactive Notebook#
This interactive notebook estimates Quantitative Susceptibility Maps (QSMs) for two gradient-echo (GRE) MRI acquisitions using QSMxT provided by the Neurodesk project.
What is QSM?#
QSM is a form of quantitative MRI (qMRI) that estimates the magnetic susceptibility distribution across an imaged object. Magnetic susceptibility is the degree to which a material becomes magnetised by an external magnetic field. Major contributors to susceptibility include iron, calcium, and myelin, with the susceptibility of water typically approximating a zero-reference, though it is slightly diamagnetic. Read more about QSM here.
What is QSMxT?#
QSMxT is a suite of tools for building and running automated pipelines for QSM that:
is available open-source without any licensing required;
is distributed as a software container making it straightforward to access and install (Neurodesk!)
scales its processing to execute across many acquisitions through jobs parallelisation (using multiple processors or HPCs) provided by Nipype;
automates steps that usually require manual intervention and scripting, including:
DICOM to BIDS conversion;
QSM reconstruction using a range of algorithms;
segmentation using FastSurfer;
group space generation using ANTs;
export of susceptibility statistics by subject and region of interest (ROI) to CSV.
How do I access QSMxT?#
There are a few ways you can access QSMxT:
This notebook: You can access QSMxT in this notebook right now!
If you are running this on a Neurodesk Play instance, you can upload your own data into the sidebar via drag-and-drop.
Neurodesktop: QSMxT is in the applications menu of Neurodesktop.
On Neurodesk Play, upload your own data into the desktop via drag-and-drop.
On a local install of Neurodesk, bring any necessary files into the shared
~/neurodesktop-storage
directory
Local install: QSMxT can also be installed via the Docker container
HPC install: QSMxT can also be installed via the Singularity container for use on HPCs
Download example DICOMs#
Here, we download some example DICOMs from our OSF repository for QSMxT.
These data include GRE and T1-weighted acquisitions for one subject (duplicated to act as two subjects).
!pip install osfclient
!osf -p ru43c clone . > /dev/null 2>&1
!tar xf osfstorage/dicoms-unsorted.tar
!rm -rf osfstorage/
!tree dicoms-unsorted | head
!echo -e "...\nThere are `ls dicoms-unsorted | wc -l` unsorted DICOMs in ./dicoms-unsorted/"
Requirement already satisfied: osfclient in /opt/conda/lib/python3.11/site-packages (0.0.5)
Requirement already satisfied: requests in /opt/conda/lib/python3.11/site-packages (from osfclient) (2.31.0)
Requirement already satisfied: tqdm in /opt/conda/lib/python3.11/site-packages (from osfclient) (4.66.1)
Requirement already satisfied: six in /opt/conda/lib/python3.11/site-packages (from osfclient) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.11/site-packages (from requests->osfclient) (3.3.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.11/site-packages (from requests->osfclient) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.11/site-packages (from requests->osfclient) (2.0.7)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.11/site-packages (from requests->osfclient) (2024.2.2)
dicoms-unsorted
├── MR.1.1.dcm
├── MR.1.10.dcm
├── MR.1.100.dcm
├── MR.1.101.dcm
├── MR.1.102.dcm
├── MR.1.103.dcm
├── MR.1.104.dcm
├── MR.1.105.dcm
├── MR.1.106.dcm
...
There are 1216 unsorted DICOMs in ./dicoms-unsorted/
Load QSMxT#
To load QSMxT inside a notebook, we can use the available module system:
import lmod
await lmod.load('qsmxt/7.2.2')
!qsmxt --version
[INFO]: QSMxT v7.2.2
Data standardisation#
QSMxT requires input data to conform to the Brain Imaging Data Structure (BIDS).
Luckily, QSMxT also provides scripts that can convert unorganised NIfTI or DICOM images to BIDS. If you are using NIfTI images and do not have DICOMs, see nifti-convert.
Sort DICOMs#
Before we can convert DICOMs to BIDS cleanly, we need to sort the DICOMs by subject, session and series.
We can sort the DICOMs using dicom-sort
.
Note that this script relies on accurate DICOM header information. If your data is sorted incorrectly, you may need to manually correct the sorting, or sort the files yourself. Be sure to follow the folder structure shown below.
!dicom-sort dicoms-unsorted dicoms-sorted
[INFO]: Running QSMxT 7.2.2
[INFO]: Command: /opt/miniconda-4.7.12.1/bin/dicom-sort dicoms-unsorted dicoms-sorted
[INFO]: Python interpreter: /opt/miniconda-4.7.12.1/bin/python3.8
[INFO]: Reading file list...
[INFO]: 1216 DICOM files found.
[INFO]: Sorting DICOMs in /home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted...
[INFO]: Identified subject: 1
[INFO]: Identified session: 1 #1 20170705
[INFO]: Identified series: sub-1/ses-20170705/series-6_mp2rage_highRes_0p5iso_slab
[INFO]: Identified session: 2 #1 20170705
[INFO]: Identified series: sub-2/ses-20170705/series-6_mp2rage_highRes_0p5iso_slab
[INFO]: Identified series: sub-1/ses-20170705/series-5_QSM_p2_1mmIso_TE20
[INFO]: Identified series: sub-2/ses-20170705/series-5_QSM_p2_1mmIso_TE20
[INFO]: Identified series: sub-1/ses-20170705/series-6_QSM_p2_1mmIso_TE20
[INFO]: Identified series: sub-2/ses-20170705/series-6_QSM_p2_1mmIso_TE20
[INFO]: Finished
Now we can see clearly that there are two subjects, each with one session, each with three DICOM series:
!tree dicoms-sorted -L 3
dicoms-sorted
├── log_2024-11-15_00-49-26557917.txt
├── references.txt
├── sub-1
│ └── ses-20170705
│ ├── series-5_QSM_p2_1mmIso_TE20
│ ├── series-6_QSM_p2_1mmIso_TE20
│ └── series-6_mp2rage_highRes_0p5iso_slab
└── sub-2
└── ses-20170705
├── series-5_QSM_p2_1mmIso_TE20
├── series-6_QSM_p2_1mmIso_TE20
└── series-6_mp2rage_highRes_0p5iso_slab
10 directories, 2 files
Convert to BIDS#
Now that the DICOMs are sorted, we can convert to BIDS using dicom-convert
.
The DICOM to BIDS conversion must identify which series should be used for QSM reconstruction (T2*-weighted), and which series should be used for segmentation (T1-weighted). Because this information is not stored in the DICOM header, the user must provide it, or QSMxT can make a guess based on the ProtocolName
field. By default, QSMxT assumes series matching any of the patterns in ['*qsm*', '*t2starw*']
are to be used for QSM, and series matching the pattern ['*t1w*']
are to be used for segmentation. If series cannot be identified, the user must do so. At minimum, at least one QSM series must be identified.
If QSMxT is run interactively, the user will be prompted to identify the relevant series’. However, because we are running QSMxT in a notebook, we disable the interactivity using --auto_yes
and provide the missing information using command-line arguments (--t1w_protocol_patterns
and --qsm_protocol_patterns
). In this case, the T1-weighted scan requires identification, so we pass --t1w_protocol_patterns "*mp2rage*"
:
!dicom-convert dicoms-sorted bids \
--t1w_protocol_patterns "*mp2rage*" \
--auto_yes
[INFO]: Running QSMxT 7.2.2
[INFO]: Command: /opt/miniconda-4.7.12.1/bin/dicom-convert dicoms-sorted bids --t1w_protocol_patterns *mp2rage* --auto_yes
[INFO]: Python interpreter: /opt/miniconda-4.7.12.1/bin/python3.8
[INFO]: Found 2 subjects in '/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted'
[INFO]: Converting all DICOMs to NIfTI...
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-1/ses-20170705/series-6_QSM_p2_1mmIso_TE20" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-1/ses-20170705/series-5_QSM_p2_1mmIso_TE20" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-1/ses-20170705/series-6_mp2rage_highRes_0p5iso_slab" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-2/ses-20170705/series-6_QSM_p2_1mmIso_TE20" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-2/ses-20170705/series-5_QSM_p2_1mmIso_TE20" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Running command: 'dcm2niix -z n -o "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data" "/home/jovyan/example-notebooks/books/structural_imaging/dicoms-sorted/sub-2/ses-20170705/series-6_mp2rage_highRes_0p5iso_slab" >> "/home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/dcm2niix_output.txt"'
[INFO]: Loading JSON headers from '/home/jovyan/example-notebooks/books/structural_imaging/bids/.../extra_data' folders...
[INFO]: Checking for GE data requiring correction...
[INFO]: Loading updated JSON headers from '/home/jovyan/example-notebooks/books/structural_imaging/bids/.../extra_data' folders...
[INFO]: Enumerating protocol names and series descriptions from JSON headers...
[INFO]: All protocols identified: dict_keys(['qsm_p2_1mmiso_te20', 'mp2rage_highres_0p5iso_slab'])
[INFO]: Enumerating protocol names with QSM intention using match patterns ['*t2starw*', '*qsm*']...
[INFO]: Identified the following protocols intended for QSM: ['qsm_p2_1mmiso_te20']
[INFO]: Enumerating T1w protocol names using match patterns ['*mp2rage*']...
[INFO]: Identified the following protocols as T1w: ['mp2rage_highres_0p5iso_slab']
[INFO]: Parsing relevant details from JSON headers...
[INFO]: Parsing relevant JSON data from sub-1/ses-20170705...
[INFO]: Parsing relevant JSON data from sub-2/ses-20170705...
Summary of identified files and proposed renames (following BIDS standard):
series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5
-> sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw
series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph
-> sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw
series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6
-> sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w
series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5
-> sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw
series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph
-> sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw
series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6
-> sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w
[INFO]: Renaming files...
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.nii
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/extra_data/series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-5_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_5.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.nii
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-6_QSM_p2_1mmIso_TE20_QSM_p2_1mmIso_TE20_20170705134507_6_ph.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6.json -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.json
[INFO]: Renaming /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/extra_data/series-6_mp2rage_highRes_0p5iso_slab_mp2rage_highRes_0p5iso_slab_20170705150219_6.nii -> /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii
[INFO]: Generating details for BIDS dataset_description.json...
[INFO]: Writing BIDS dataset_description.json...
[INFO]: Writing BIDS .bidsignore file...
[INFO]: Writing BIDS dataset README...
[INFO]: Finished
!tree bids
bids
├── README
├── dataset_description.json
├── log_2024-11-15_00-49-33135828.txt
├── references.txt
├── sub-1
│ └── ses-20170705
│ ├── anat
│ │ ├── sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.json
│ │ ├── sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii
│ │ ├── sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.json
│ │ ├── sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.nii
│ │ ├── sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.json
│ │ └── sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii
│ └── extra_data
│ └── dcm2niix_output.txt
└── sub-2
└── ses-20170705
├── anat
│ ├── sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.json
│ ├── sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii
│ ├── sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.json
│ ├── sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-mag_T2starw.nii
│ ├── sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.json
│ └── sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii
└── extra_data
└── dcm2niix_output.txt
8 directories, 18 files
Inspect input data#
Here we define a function we will use to visualise NIfTI images so we can view some of the input data:
from glob import glob
def show_nii(nii_path, title=None, cmap='gray', **imshow_args):
from matplotlib import pyplot as plt
import numpy as np
import nibabel as nib
import glob
# load data\n",
data_1 = nib.load(nii_path).get_fdata()
# get middle slices\n",
slc_data1 = np.rot90(data_1[np.shape(data_1)[0]//2,:,:])
slc_data2 = np.rot90(data_1[:,np.shape(data_1)[1]//2,:])
slc_data3 = np.rot90(data_1[:,:,np.shape(data_1)[2]//2])
# show slices\n",
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(8,10))
if title: plt.suptitle(title)
axes[0].imshow(slc_data1, cmap=cmap, **imshow_args)
axes[1].imshow(slc_data2, cmap=cmap, **imshow_args)
axes[2].imshow(slc_data3, cmap=cmap, **imshow_args)
axes[0].axis('off')
axes[1].axis('off')
axes[2].axis('off')
fig.tight_layout()
fig.subplots_adjust(top=1.55)
plt.show()
show_nii(glob("bids/sub-*/ses-*/anat/*mag*nii*")[0], title="Magnitude", vmax=500)
show_nii(glob("bids/sub-*/ses-*/anat/*phase*nii*")[0], title="Phase")
show_nii(glob("bids/sub-*/ses-*/anat/*T1w*nii*")[0], title="T1-weighted")
Interactive Display using Niivue
from ipyniivue import AnyNiivue
nv_T1 = AnyNiivue()
nv_T1.load_volumes([{"path": glob("bids/sub-*/ses-*/anat/*T1w*nii*")[0]}])
nv_T1
Run QSMxT#
We are now ready to run QSMxT! We will generate susceptibility maps and segmentations, and export analysis CSVs to file.
The usual way of running QSMxT is to use qsmxt bids_dir
. This will launch an interactive command-line interface (CLI) to setup your desired pipelines. However, since we are running this in a notebook, we need to use command-line arguments to by-pass the interface and execute a pipeline.
But first, let’s consider our pipeline settings. For QSM reconstruction, QSMxT provides a range of sensible defaults fit for different purposes. We can list the premade QSM pipelines using --list_premades
. For the full pipeline details used for each premade pipeline, see qsm_pipelines.json.
!qsmxt --list_premades
=== Premade pipelines ===
default: Default QSMxT settings (GRE; assumes human brain)
gre: Applies suggested settings for 3D-GRE images
epi: Applies suggested settings for 3D-EPI images (assumes human brain)
bet: Applies a traditional BET-masking approach (artefact reduction unavailable; assumes human brain)
fast: Applies a set of fast algorithms
body: Applies suggested settings for non-brain applications
nextqsm: Applies suggested settings for running the NeXtQSM algorithm (assumes human brain)
[INFO]: Finished
For this demonstration, we will go with the fast
pipeline. To export segmentations and analysis results, we will use --do_segmentation
and --do_analysis
. The --auto_yes
option avoid the interactive CLI interface that cannot be used in a notebook:
!qsmxt bids \
--premade fast \
--do_qsm \
--do_segmentation \
--do_analysis \
--auto_yes
[INFO]: QSMxT v7.2.2
[INFO]: Python interpreter: /opt/miniconda-4.7.12.1/bin/python3.8
[INFO]: Command: qsmxt /home/jovyan/example-notebooks/books/structural_imaging/bids --premade 'fast' --do_qsm --do_segmentation --do_analysis --auto_yes
[WARNING]: Pipeline is NOT guidelines compliant (see https://doi.org/10.1002/mrm.30006):; Phase-quality-based masking recommended
[INFO]: Available memory: 108.695 GB
[INFO]: Creating QSMxT workflow for sub-1.ses-20170705.acq-qsmp21mmisote20.run-01...
[INFO]: Creating QSMxT workflow for sub-2.ses-20170705.acq-qsmp21mmisote20.run-01...
[INFO]: Running using MultiProc plugin with n_procs=32
241115-00:49:57,213 nipype.workflow INFO:
Workflow qsmxt-workflow settings: ['check', 'execution', 'logging', 'monitoring']
241115-00:49:57,283 nipype.workflow INFO:
Running in parallel.
241115-00:49:57,295 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 12 jobs ready. Free memory (GB): 113.21/113.21, Free processors: 32/32.
241115-00:49:57,763 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-me" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_read-json-me".
241115-00:49:57,767 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_as-canonical" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_as-canonical".
241115-00:49:57,768 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_read-nii" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_read-nii".
241115-00:49:57,770 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-me" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_read-json-me".
241115-00:49:57,772 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/fastsurfer_segment-t1".
241115-00:49:57,772 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_read-nii" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_read-nii".
241115-00:49:57,780 nipype.workflow INFO:
[Node] Executing "nibabel_read-nii" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,781 nipype.workflow INFO:
[Node] Executing "func_read-json-me" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,782 nipype.workflow INFO:
[Node] Executing "fastsurfer_segment-t1" <qsmxt.interfaces.nipype_interface_fastsurfer.FastSurferInterface>
241115-00:49:57,783 nipype.workflow INFO:
[Node] Executing "nibabel_read-nii" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,787 nipype.workflow INFO:
[Node] Finished "func_read-json-me", elapsed time 0.002151s.
241115-00:49:57,792 nipype.workflow INFO:
[Node] Finished "nibabel_read-nii", elapsed time 0.007361s.
241115-00:49:57,795 nipype.workflow INFO:
[Node] Finished "nibabel_read-nii", elapsed time 0.008006s.
241115-00:49:57,765 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-se" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_read-json-se".
241115-00:49:57,770 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-se" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_read-json-se".
241115-00:49:57,823 nipype.workflow INFO:
[Node] Executing "func_read-json-se" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,772 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/fastsurfer_segment-t1".
241115-00:49:57,774 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/ants_register-t1-to-qsm".
241115-00:49:57,831 nipype.workflow INFO:
[Node] Finished "func_read-json-se", elapsed time 0.002718s.
241115-00:49:57,833 nipype.workflow INFO:
[Node] Executing "fastsurfer_segment-t1" <qsmxt.interfaces.nipype_interface_fastsurfer.FastSurferInterface>
241115-00:49:57,837 nipype.workflow INFO:
[Node] Executing "ants_register-t1-to-qsm" <nipype.interfaces.ants.registration.RegistrationSynQuick>
241115-00:49:57,774 nipype.workflow INFO:
[Node] Executing "nibabel_as-canonical" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,775 nipype.workflow INFO:
[Node] Executing "func_read-json-me" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,831 nipype.workflow INFO:
[Node] Executing "func_read-json-se" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,883 nipype.workflow INFO:
[Node] Finished "func_read-json-me", elapsed time 0.002479s.
241115-00:49:57,890 nipype.workflow INFO:
[Node] Finished "func_read-json-se", elapsed time 0.003504s.
241115-00:49:57,773 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_as-canonical" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_as-canonical".
241115-00:49:57,936 nipype.workflow INFO:
[Node] Executing "nibabel_as-canonical" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:57,986 nipype.workflow INFO:
[Node] Finished "nibabel_as-canonical", elapsed time 0.046112s.
241115-00:49:57,987 nipype.workflow INFO:
[Node] Finished "nibabel_as-canonical", elapsed time 0.107813s.
241115-00:49:59,296 nipype.workflow INFO:
[Job 0] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-me).
241115-00:49:59,302 nipype.workflow INFO:
[Job 1] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-se).
241115-00:49:59,303 nipype.workflow INFO:
[Job 2] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_read-nii).
241115-00:49:59,305 nipype.workflow INFO:
[Job 3] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_as-canonical).
241115-00:49:59,306 nipype.workflow INFO:
[Job 6] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-me).
241115-00:49:59,308 nipype.workflow INFO:
[Job 7] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_read-json-se).
241115-00:49:59,309 nipype.workflow INFO:
[Job 8] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_read-nii).
241115-00:49:59,311 nipype.workflow INFO:
[Job 9] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_as-canonical).
241115-00:49:59,313 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 5 jobs ready. Free memory (GB): 81.21/113.21, Free processors: 10/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:49:59,526 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_getfirst-canonical-magnitude" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_getfirst-canonical-magnitude".
241115-00:49:59,527 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/ants_register-t1-to-qsm".
241115-00:49:59,528 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_getfirst-canonical-magnitude" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/func_getfirst-canonical-magnitude".
241115-00:49:59,535 nipype.workflow INFO:
[Node] Executing "func_getfirst-canonical-magnitude" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:59,540 nipype.workflow INFO:
[Node] Finished "func_getfirst-canonical-magnitude", elapsed time 0.001897s.
241115-00:49:59,540 nipype.workflow INFO:
[Node] Executing "ants_register-t1-to-qsm" <nipype.interfaces.ants.registration.RegistrationSynQuick>
241115-00:49:59,544 nipype.workflow INFO:
[Node] Executing "func_getfirst-canonical-magnitude" <nipype.interfaces.utility.wrappers.Function>
241115-00:49:59,551 nipype.workflow INFO:
[Node] Finished "func_getfirst-canonical-magnitude", elapsed time 0.002375s.
241115-00:49:59,527 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_scale-phase" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_scale-phase".
241115-00:49:59,527 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_scale-phase" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_scale-phase".
241115-00:49:59,589 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_scale-phase" <qsmxt.interfaces.nipype_interface_processphase.ScalePhaseInterface>
241115-00:49:59,593 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_scale-phase" <qsmxt.interfaces.nipype_interface_processphase.ScalePhaseInterface>
241115-00:50:00,146 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_scale-phase", elapsed time 0.553699s.
241115-00:50:00,218 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_scale-phase", elapsed time 0.621612s.
241115-00:50:01,296 nipype.workflow INFO:
[Job 12] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_scale-phase).
241115-00:50:01,298 nipype.workflow INFO:
[Job 13] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_getfirst-canonical-magnitude).
241115-00:50:01,300 nipype.workflow INFO:
[Job 15] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_scale-phase).
241115-00:50:01,301 nipype.workflow INFO:
[Job 16] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.func_getfirst-canonical-magnitude).
241115-00:50:01,304 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 2 jobs ready. Free memory (GB): 73.21/113.21, Free processors: 4/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:50:01,421 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_axial-resampling" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_axial-resampling".
241115-00:50:01,423 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_axial-resampling" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_axial-resampling".
241115-00:50:01,430 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_axial-resampling" <qsmxt.interfaces.nipype_interface_axialsampling.AxialSamplingInterface>
241115-00:50:01,433 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_axial-resampling" <qsmxt.interfaces.nipype_interface_axialsampling.AxialSamplingInterface>
241115-00:50:01,437 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_axial-resampling", elapsed time 0.004852s.
241115-00:50:01,442 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_axial-resampling", elapsed time 0.006382s.
241115-00:50:03,299 nipype.workflow INFO:
[Job 18] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_axial-resampling).
241115-00:50:03,301 nipype.workflow INFO:
[Job 21] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_axial-resampling).
241115-00:50:03,304 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 4 jobs ready. Free memory (GB): 73.21/113.21, Free processors: 4/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:50:03,406 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/mrt_romeo".
241115-00:50:03,407 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/mrt_romeo".
241115-00:50:03,416 nipype.workflow INFO:
[Node] Executing "mrt_romeo" <qsmxt.interfaces.nipype_interface_romeo.RomeoB0Interface>
241115-00:50:03,421 nipype.workflow INFO:
[Node] Executing "mrt_romeo" <qsmxt.interfaces.nipype_interface_romeo.RomeoB0Interface>
241115-00:50:05,301 nipype.workflow INFO:
[MultiProc] Running 6 tasks, and 2 jobs ready. Free memory (GB): 68.53/113.21, Free processors: 2/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:52:50,249 nipype.workflow INFO:
[Node] Finished "ants_register-t1-to-qsm", elapsed time 170.705112s.
241115-00:52:51,466 nipype.workflow INFO:
[Job 11] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm).
241115-00:52:51,470 nipype.workflow INFO:
[MultiProc] Running 5 tasks, and 2 jobs ready. Free memory (GB): 76.53/113.21, Free processors: 8/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:52:51,601 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/mask_workflow/fsl-bet".
241115-00:52:51,613 nipype.workflow INFO:
[Node] Executing "fsl-bet" <qsmxt.interfaces.nipype_interface_bet2.Bet2Interface>
241115-00:52:53,469 nipype.workflow INFO:
[MultiProc] Running 6 tasks, and 1 jobs ready. Free memory (GB): 74.53/113.21, Free processors: 0/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:52:56,947 nipype.workflow INFO:
[Node] Finished "ants_register-t1-to-qsm", elapsed time 179.107196s.
241115-00:52:57,473 nipype.workflow INFO:
[Job 5] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_register-t1-to-qsm).
241115-00:52:57,477 nipype.workflow INFO:
[MultiProc] Running 5 tasks, and 1 jobs ready. Free memory (GB): 82.53/113.21, Free processors: 6/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:53:11,30 nipype.workflow INFO:
[Node] Finished "fsl-bet", elapsed time 19.413455s.
241115-00:53:11,486 nipype.workflow INFO:
[Job 24] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet).
241115-00:53:11,489 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 2 jobs ready. Free memory (GB): 84.53/113.21, Free processors: 14/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:53:11,584 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/mask_workflow/fsl-bet".
241115-00:53:11,585 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.scipy_numpy_nibabel_bet_erode" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/mask_workflow/scipy_numpy_nibabel_bet_erode".
241115-00:53:11,594 nipype.workflow INFO:
[Node] Executing "fsl-bet" <qsmxt.interfaces.nipype_interface_bet2.Bet2Interface>
241115-00:53:11,600 nipype.workflow INFO:
[Node] Executing "scipy_numpy_nibabel_bet_erode" <qsmxt.interfaces.nipype_interface_erode.ErosionInterface>
241115-00:53:12,731 nipype.workflow INFO:
[Node] Finished "scipy_numpy_nibabel_bet_erode", elapsed time 1.128106s.
241115-00:53:13,488 nipype.workflow INFO:
[Job 30] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.scipy_numpy_nibabel_bet_erode).
241115-00:53:13,491 nipype.workflow INFO:
[MultiProc] Running 5 tasks, and 0 jobs ready. Free memory (GB): 82.53/113.21, Free processors: 6/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:53:30,984 nipype.workflow INFO:
[Node] Finished "fsl-bet", elapsed time 19.387207s.
241115-00:53:31,506 nipype.workflow INFO:
[Job 27] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.fsl-bet).
241115-00:53:31,510 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 1 jobs ready. Free memory (GB): 84.53/113.21, Free processors: 14/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:53:31,610 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.scipy_numpy_nibabel_bet_erode" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/mask_workflow/scipy_numpy_nibabel_bet_erode".
241115-00:53:31,618 nipype.workflow INFO:
[Node] Executing "scipy_numpy_nibabel_bet_erode" <qsmxt.interfaces.nipype_interface_erode.ErosionInterface>
241115-00:53:32,610 nipype.workflow INFO:
[Node] Finished "scipy_numpy_nibabel_bet_erode", elapsed time 0.989904s.
241115-00:53:33,509 nipype.workflow INFO:
[Job 32] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.mask_workflow.scipy_numpy_nibabel_bet_erode).
241115-00:53:33,512 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 0 jobs ready. Free memory (GB): 84.53/113.21, Free processors: 14/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:38,538 nipype.workflow INFO:
[Node] Finished "mrt_romeo", elapsed time 455.1193s.
241115-00:57:39,294 nipype.workflow INFO:
[Node] Finished "mrt_romeo", elapsed time 455.870979s.
241115-00:57:39,782 nipype.workflow INFO:
[Job 25] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo).
241115-00:57:39,785 nipype.workflow INFO:
[Job 28] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.mrt_romeo).
241115-00:57:39,788 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 2 jobs ready. Free memory (GB): 89.21/113.21, Free processors: 16/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:39,921 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.nibabel-numpy_normalize-phase" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/nibabel-numpy_normalize-phase".
241115-00:57:39,934 nipype.workflow INFO:
[Node] Executing "nibabel-numpy_normalize-phase" <qsmxt.interfaces.nipype_interface_processphase.PhaseToNormalizedInterface>
241115-00:57:39,921 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.nibabel-numpy_normalize-phase" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/nibabel-numpy_normalize-phase".
241115-00:57:39,985 nipype.workflow INFO:
[Node] Executing "nibabel-numpy_normalize-phase" <qsmxt.interfaces.nipype_interface_processphase.PhaseToNormalizedInterface>
241115-00:57:40,338 nipype.workflow INFO:
[Node] Finished "nibabel-numpy_normalize-phase", elapsed time 0.40138s.
241115-00:57:40,443 nipype.workflow INFO:
[Node] Finished "nibabel-numpy_normalize-phase", elapsed time 0.454097s.
241115-00:57:41,785 nipype.workflow INFO:
[Job 31] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.nibabel-numpy_normalize-phase).
241115-00:57:41,787 nipype.workflow INFO:
[Job 33] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.nibabel-numpy_normalize-phase).
241115-00:57:41,790 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 2 jobs ready. Free memory (GB): 89.21/113.21, Free processors: 16/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:41,917 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_vsharp".
241115-00:57:41,930 nipype.workflow INFO:
[Node] Executing "qsmjl_vsharp" <qsmxt.interfaces.nipype_interface_qsmjl.VsharpInterface>
241115-00:57:41,918 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_vsharp".
241115-00:57:41,982 nipype.workflow INFO:
[Node] Executing "qsmjl_vsharp" <qsmxt.interfaces.nipype_interface_qsmjl.VsharpInterface>
241115-00:57:43,788 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 0 jobs ready. Free memory (GB): 85.21/113.21, Free processors: 12/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:55,281 nipype.workflow INFO:
[Node] Finished "fastsurfer_segment-t1", elapsed time 477.444439s.
241115-00:57:55,800 nipype.workflow INFO:
[Job 10] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1).
241115-00:57:55,804 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 1 jobs ready. Free memory (GB): 97.21/113.21, Free processors: 20/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:55,923 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.numpy_numpy_nibabel_mgz2nii" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/numpy_numpy_nibabel_mgz2nii".
241115-00:57:55,931 nipype.workflow INFO:
[Node] Executing "numpy_numpy_nibabel_mgz2nii" <qsmxt.interfaces.nipype_interface_mgz2nii.Mgz2NiiInterface>
241115-00:57:56,307 nipype.workflow INFO:
[Node] Finished "numpy_numpy_nibabel_mgz2nii", elapsed time 0.372734s.
241115-00:57:57,803 nipype.workflow INFO:
[Job 17] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.numpy_numpy_nibabel_mgz2nii).
241115-00:57:57,807 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 2 jobs ready. Free memory (GB): 97.21/113.21, Free processors: 20/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:57,935 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_t1w-seg-resampled".
241115-00:57:57,937 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_transform-segmentation-to-qsm" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/ants_transform-segmentation-to-qsm".
241115-00:57:57,941 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_t1w-seg-resampled" <qsmxt.interfaces.nipype_interface_resample_like.ResampleLikeInterface>
Resampling /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/fastsurfer_segment-t1/sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w_dseg_nii.nii to /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii with interpolation nearest
Loaded input and reference files
241115-00:57:57,946 nipype.workflow INFO:
[Node] Executing "ants_transform-segmentation-to-qsm" <nipype.interfaces.ants.resampling.ApplyTransforms>
241115-00:57:59,523 nipype.workflow INFO:
[Node] Finished "ants_transform-segmentation-to-qsm", elapsed time 1.5748959999999999s.
241115-00:57:59,804 nipype.workflow INFO:
[Job 23] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_transform-segmentation-to-qsm).
241115-00:57:59,808 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 1 jobs ready. Free memory (GB): 95.21/113.21, Free processors: 19/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:57:59,924 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists2" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/combine_lists2".
241115-00:57:59,933 nipype.workflow INFO:
[Node] Executing "combine_lists2" <nipype.interfaces.utility.wrappers.Function>
241115-00:57:59,936 nipype.workflow INFO:
[Node] Finished "combine_lists2", elapsed time 0.001276s.
241115-00:58:01,808 nipype.workflow INFO:
[Job 29] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists2).
241115-00:58:01,811 nipype.workflow INFO:
[MultiProc] Running 4 tasks, and 0 jobs ready. Free memory (GB): 95.21/113.21, Free processors: 19/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
Resampled the image
Saved resampled image to /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_t1w-seg-resampled/sub-2_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w_dseg_nii_resampled.nii
241115-00:58:05,39 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_t1w-seg-resampled", elapsed time 7.096862s.
241115-00:58:05,811 nipype.workflow INFO:
[Job 22] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled).
241115-00:58:05,815 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 0 jobs ready. Free memory (GB): 97.21/113.21, Free processors: 20/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1
241115-00:58:16,351 nipype.workflow INFO:
[Node] Finished "fastsurfer_segment-t1", elapsed time 498.565617s.
241115-00:58:17,825 nipype.workflow INFO:
[Job 4] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.fastsurfer_segment-t1).
241115-00:58:17,829 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 1 jobs ready. Free memory (GB): 109.21/113.21, Free processors: 28/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:17,953 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.numpy_numpy_nibabel_mgz2nii" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/numpy_numpy_nibabel_mgz2nii".
241115-00:58:17,960 nipype.workflow INFO:
[Node] Executing "numpy_numpy_nibabel_mgz2nii" <qsmxt.interfaces.nipype_interface_mgz2nii.Mgz2NiiInterface>
241115-00:58:18,317 nipype.workflow INFO:
[Node] Finished "numpy_numpy_nibabel_mgz2nii", elapsed time 0.354915s.
241115-00:58:19,827 nipype.workflow INFO:
[Job 14] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.numpy_numpy_nibabel_mgz2nii).
241115-00:58:19,831 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 2 jobs ready. Free memory (GB): 109.21/113.21, Free processors: 28/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:19,955 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_t1w-seg-resampled".
241115-00:58:19,955 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_transform-segmentation-to-qsm" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/ants_transform-segmentation-to-qsm".
241115-00:58:19,963 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_t1w-seg-resampled" <qsmxt.interfaces.nipype_interface_resample_like.ResampleLikeInterface>
Resampling /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/fastsurfer_segment-t1/sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w_dseg_nii.nii to /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w.nii with interpolation nearest
241115-00:58:19,969 nipype.workflow INFO:
[Node] Executing "ants_transform-segmentation-to-qsm" <nipype.interfaces.ants.resampling.ApplyTransforms>
Loaded input and reference files
241115-00:58:20,971 nipype.workflow INFO:
[Node] Finished "ants_transform-segmentation-to-qsm", elapsed time 0.999699s.
241115-00:58:21,829 nipype.workflow INFO:
[Job 20] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.ants_transform-segmentation-to-qsm).
241115-00:58:21,833 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 1 jobs ready. Free memory (GB): 107.21/113.21, Free processors: 27/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:21,953 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists2" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/combine_lists2".
241115-00:58:21,961 nipype.workflow INFO:
[Node] Executing "combine_lists2" <nipype.interfaces.utility.wrappers.Function>
241115-00:58:21,964 nipype.workflow INFO:
[Node] Finished "combine_lists2", elapsed time 0.001161s.
241115-00:58:23,832 nipype.workflow INFO:
[Job 26] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists2).
241115-00:58:23,836 nipype.workflow INFO:
[MultiProc] Running 3 tasks, and 0 jobs ready. Free memory (GB): 107.21/113.21, Free processors: 27/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
Resampled the image
Saved resampled image to /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_t1w-seg-resampled/sub-1_ses-20170705_acq-mp2ragehighres0p5isoslab_run-01_T1w_dseg_nii_resampled.nii
241115-00:58:27,921 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_t1w-seg-resampled", elapsed time 7.9561340000000005s.
241115-00:58:29,838 nipype.workflow INFO:
[Job 19] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_t1w-seg-resampled).
241115-00:58:29,842 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 0 jobs ready. Free memory (GB): 109.21/113.21, Free processors: 28/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:41,571 nipype.workflow INFO:
[Node] Finished "qsmjl_vsharp", elapsed time 59.638551s.
241115-00:58:41,851 nipype.workflow INFO:
[Job 34] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp).
241115-00:58:41,856 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:41,978 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_rts".
241115-00:58:41,984 nipype.workflow INFO:
[Node] Executing "qsmjl_rts" <qsmxt.interfaces.nipype_interface_qsmjl.RtsQsmInterface>
241115-00:58:43,855 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 0 jobs ready. Free memory (GB): 108.80/113.21, Free processors: 28/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp
241115-00:58:46,774 nipype.workflow INFO:
[Node] Finished "qsmjl_vsharp", elapsed time 64.789892s.
241115-00:58:47,858 nipype.workflow INFO:
[Job 35] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_vsharp).
241115-00:58:47,861 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 110.80/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:58:47,985 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_rts".
241115-00:58:47,996 nipype.workflow INFO:
[Node] Executing "qsmjl_rts" <qsmxt.interfaces.nipype_interface_qsmjl.RtsQsmInterface>
241115-00:58:49,862 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 0 jobs ready. Free memory (GB): 108.39/113.21, Free processors: 28/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:59:28,817 nipype.workflow INFO:
[Node] Finished "qsmjl_rts", elapsed time 46.832081s.
241115-00:59:29,906 nipype.workflow INFO:
[Job 36] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts).
241115-00:59:29,911 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 110.80/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:59:30,35 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-average" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_qsm-average".
241115-00:59:30,44 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_qsm-average" <qsmxt.interfaces.nipype_interface_nonzeroaverage.NonzeroAverageInterface>
241115-00:59:30,47 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_qsm-average", elapsed time 0.000346s.
241115-00:59:31,908 nipype.workflow INFO:
[Job 38] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-average).
241115-00:59:31,911 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 110.80/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:59:32,14 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_qsm-resampled" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_qsm-resampled".
241115-00:59:32,23 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_qsm-resampled" <qsmxt.interfaces.nipype_interface_resample_like.ResampleLikeInterface>
Resampling /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_rts/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw_scaled_romeo-unwrapped_normalized_vsharp_rts.nii to /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-1/ses-20170705/anat/sub-1_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii with interpolation continuous
Loaded input and reference files
Input image is already aligned with the reference image
241115-00:59:32,30 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_qsm-resampled", elapsed time 0.004009s.
241115-00:59:33,911 nipype.workflow INFO:
[Job 40] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_qsm-resampled).
241115-00:59:33,915 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 2 jobs ready. Free memory (GB): 110.80/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:59:34,50 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists1" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/combine_lists1".
241115-00:59:34,51 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-referenced" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_qsm-referenced".
241115-00:59:34,58 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_qsm-referenced" <qsmxt.interfaces.nipype_interface_qsm_referencing.ReferenceQSMInterface>
241115-00:59:34,58 nipype.workflow INFO:
[Node] Executing "combine_lists1" <nipype.interfaces.utility.wrappers.Function>
241115-00:59:34,62 nipype.workflow INFO:
[Node] Finished "combine_lists1", elapsed time 0.001454s.
241115-00:59:34,810 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_qsm-referenced", elapsed time 0.750646s.
241115-00:59:35,913 nipype.workflow INFO:
[Job 42] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-referenced).
241115-00:59:35,915 nipype.workflow INFO:
[Job 43] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists1).
241115-00:59:35,917 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 110.80/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts
241115-00:59:36,61 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.create_permutations" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/create_permutations".
241115-00:59:36,70 nipype.workflow INFO:
[Node] Executing "create_permutations" <nipype.interfaces.utility.wrappers.Function>
241115-00:59:36,72 nipype.workflow INFO:
[Node] Finished "create_permutations", elapsed time 0.000955s.
241115-00:59:37,103 nipype.workflow INFO:
[Node] Finished "qsmjl_rts", elapsed time 49.105482s.
241115-00:59:37,916 nipype.workflow INFO:
[Job 37] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.qsm_workflow.qsmjl_rts).
241115-00:59:37,918 nipype.workflow INFO:
[Job 46] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.create_permutations).
241115-00:59:37,923 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 113.21/113.21, Free processors: 32/32.
241115-00:59:38,45 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-average" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_qsm-average".
241115-00:59:38,54 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_qsm-average" <qsmxt.interfaces.nipype_interface_nonzeroaverage.NonzeroAverageInterface>
241115-00:59:38,56 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_qsm-average", elapsed time 0.000363s.
241115-00:59:38,60 nipype.workflow INFO:
[Node] Setting-up "_nibabel_numpy_analyse-qsm0" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_analyse-qsm/mapflow/_nibabel_numpy_analyse-qsm0".
241115-00:59:38,63 nipype.workflow INFO:
[Node] Executing "_nibabel_numpy_analyse-qsm0" <qsmxt.interfaces.nipype_interface_analyse.AnalyseInterface>
241115-00:59:39,918 nipype.workflow INFO:
[Job 39] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-average).
241115-00:59:39,921 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-00:59:40,8 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_qsm-resampled" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_nilearn_qsm-resampled".
241115-00:59:40,16 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_nilearn_qsm-resampled" <qsmxt.interfaces.nipype_interface_resample_like.ResampleLikeInterface>
Resampling /home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/qsm_workflow/qsmjl_rts/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw_scaled_romeo-unwrapped_normalized_vsharp_rts.nii to /home/jovyan/example-notebooks/books/structural_imaging/bids/sub-2/ses-20170705/anat/sub-2_ses-20170705_acq-qsmp21mmisote20_run-01_part-phase_T2starw.nii with interpolation continuous
Loaded input and reference files
Input image is already aligned with the reference image
241115-00:59:40,22 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_nilearn_qsm-resampled", elapsed time 0.004051s.
241115-00:59:41,919 nipype.workflow INFO:
[Job 41] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_nilearn_qsm-resampled).
241115-00:59:41,923 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 2 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-00:59:42,19 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-referenced" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_qsm-referenced".
241115-00:59:42,20 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists1" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/combine_lists1".
241115-00:59:42,26 nipype.workflow INFO:
[Node] Executing "nibabel_numpy_qsm-referenced" <qsmxt.interfaces.nipype_interface_qsm_referencing.ReferenceQSMInterface>
241115-00:59:42,28 nipype.workflow INFO:
[Node] Executing "combine_lists1" <nipype.interfaces.utility.wrappers.Function>
241115-00:59:42,31 nipype.workflow INFO:
[Node] Finished "combine_lists1", elapsed time 0.001169s.
241115-00:59:42,727 nipype.workflow INFO:
[Node] Finished "nibabel_numpy_qsm-referenced", elapsed time 0.69934s.
241115-00:59:43,923 nipype.workflow INFO:
[Job 44] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_qsm-referenced).
241115-00:59:43,925 nipype.workflow INFO:
[Job 45] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.combine_lists1).
241115-00:59:43,928 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-00:59:44,73 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.create_permutations" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/create_permutations".
241115-00:59:44,82 nipype.workflow INFO:
[Node] Executing "create_permutations" <nipype.interfaces.utility.wrappers.Function>
241115-00:59:44,85 nipype.workflow INFO:
[Node] Finished "create_permutations", elapsed time 0.001182s.
241115-00:59:45,924 nipype.workflow INFO:
[Job 47] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.create_permutations).
241115-00:59:45,928 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-00:59:46,60 nipype.workflow INFO:
[Node] Setting-up "_nibabel_numpy_analyse-qsm0" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/nibabel_numpy_analyse-qsm/mapflow/_nibabel_numpy_analyse-qsm0".
241115-00:59:46,65 nipype.workflow INFO:
[Node] Executing "_nibabel_numpy_analyse-qsm0" <qsmxt.interfaces.nipype_interface_analyse.AnalyseInterface>
241115-00:59:47,929 nipype.workflow INFO:
[MultiProc] Running 2 tasks, and 0 jobs ready. Free memory (GB): 109.21/113.21, Free processors: 30/32.
Currently running:
* qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-01:00:35,479 nipype.workflow INFO:
[Node] Finished "_nibabel_numpy_analyse-qsm0", elapsed time 49.412951s.
241115-01:00:35,981 nipype.workflow INFO:
[Job 49] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm).
241115-01:00:35,985 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-01:00:36,117 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.copyfile" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-2/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/copyfile".
241115-01:00:36,132 nipype.workflow INFO:
[Node] Executing "copyfile" <qsmxt.interfaces.nipype_interface_copyfile.DynamicCopyFiles>
241115-01:00:36,521 nipype.workflow INFO:
[Node] Finished "copyfile", elapsed time 0.385544s.
241115-01:00:37,983 nipype.workflow INFO:
[Job 51] Completed (qsmxt-workflow.sub-2.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.copyfile).
241115-01:00:37,987 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 111.21/113.21, Free processors: 31/32.
Currently running:
* qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm
241115-01:00:53,605 nipype.workflow INFO:
[Node] Finished "_nibabel_numpy_analyse-qsm0", elapsed time 75.540312s.
241115-01:00:54,1 nipype.workflow INFO:
[Job 48] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.nibabel_numpy_analyse-qsm).
241115-01:00:54,4 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 113.21/113.21, Free processors: 32/32.
241115-01:00:54,132 nipype.workflow INFO:
[Node] Setting-up "qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.copyfile" in "/home/jovyan/example-notebooks/books/structural_imaging/bids/derivatives/qsmxt-workflow/sub-1/ses-20170705/qsmxt_acq-qsmp21mmisote20_run-01/copyfile".
241115-01:00:54,145 nipype.workflow INFO:
[Node] Executing "copyfile" <qsmxt.interfaces.nipype_interface_copyfile.DynamicCopyFiles>
241115-01:00:54,451 nipype.workflow INFO:
[Node] Finished "copyfile", elapsed time 0.304206s.
241115-01:00:56,3 nipype.workflow INFO:
[Job 50] Completed (qsmxt-workflow.sub-1.ses-20170705.qsmxt_acq-qsmp21mmisote20_run-01.copyfile).
241115-01:00:56,6 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 113.21/113.21, Free processors: 32/32.
[INFO]: Warnings occurred!
[INFO]: Finished
View results#
Let’s have a look at the generated qsm
folder:
!tree bids/derivatives/qsmxt-*-* --dirsfirst
bids/derivatives/qsmxt-2024-11-15-004947
├── sub-1
│ └── ses-20170705
│ ├── anat
│ │ ├── sub-1_ses-20170705_run-01_acq-qsmp21mmisote20_Chimap.nii
│ │ ├── sub-1_ses-20170705_run-01_acq-qsmp21mmisote20_space-orig_dseg.nii
│ │ └── sub-1_ses-20170705_run-01_acq-qsmp21mmisote20_space-qsm_dseg.nii
│ └── extra_data
│ ├── sub-1_ses-20170705_run-01_acq-qsmp21mmisote20_desc-t1w-to-qsm_transform.mat
│ └── sub-1_ses-20170705_run-01_acq-qsmp21mmisote20_qsm-analysis.csv
├── sub-2
│ └── ses-20170705
│ ├── anat
│ │ ├── sub-2_ses-20170705_run-01_acq-qsmp21mmisote20_Chimap.nii
│ │ ├── sub-2_ses-20170705_run-01_acq-qsmp21mmisote20_space-orig_dseg.nii
│ │ └── sub-2_ses-20170705_run-01_acq-qsmp21mmisote20_space-qsm_dseg.nii
│ └── extra_data
│ ├── sub-2_ses-20170705_run-01_acq-qsmp21mmisote20_desc-t1w-to-qsm_transform.mat
│ └── sub-2_ses-20170705_run-01_acq-qsmp21mmisote20_qsm-analysis.csv
├── command.txt
├── pypeline.log
├── qsmxt.log
├── references.txt
└── settings.json
8 directories, 15 files
The references.txt
file contains a list of all the algorithms used and relevant citations:
!cat bids/derivatives/qsmxt-*-*/references.txt
== References ==
- QSMxT: Stewart AW, Robinson SD, O'Brien K, et al. QSMxT: Robust masking and artifact reduction for quantitative susceptibility mapping. Magnetic Resonance in Medicine. 2022;87(3):1289-1300. doi:10.1002/mrm.29048
- QSMxT: Stewart AW, Bollman S, et al. QSMxT/QSMxT. GitHub; 2022. https://github.com/QSMxT/QSMxT
- Python package - Nipype: Gorgolewski K, Burns C, Madison C, et al. Nipype: A Flexible, Lightweight and Extensible Neuroimaging Data Processing Framework in Python. Frontiers in Neuroinformatics. 2011;5. Accessed April 20, 2022. doi:10.3389/fninf.2011.00013
- Brain extraction: Smith SM. Fast robust automated brain extraction. Human Brain Mapping. 2002;17(3):143-155. doi:10.1002/hbm.10062
- Brain extraction: Liangfu Chen. liangfu/bet2 - Standalone Brain Extraction Tool. GitHub; 2015. https://github.com/liangfu/bet2
- Unwrapping algorithm - ROMEO: Dymerska B, Eckstein K, Bachrata B, et al. Phase unwrapping with a rapid opensource minimum spanning tree algorithm (ROMEO). Magnetic Resonance in Medicine. 2021;85(4):2294-2308. doi:10.1002/mrm.28563
- Background field removal - V-SHARP: Wu B, Li W, Guidon A et al. Whole brain susceptibility mapping using compressed sensing. Magnetic resonance in medicine. 2012 Jan;67(1):137-47. doi:10.1002/mrm.23000
- QSM algorithm - RTS: Kames C, Wiggermann V, Rauscher A. Rapid two-step dipole inversion for susceptibility mapping with sparsity priors. Neuroimage. 2018 Feb 15;167:276-83. doi:10.1016/j.neuroimage.2017.11.018
- Julia package - QSM.jl: kamesy. GitHub; 2022. https://github.com/kamesy/QSM.jl
- Julia package - MriResearchTools: Eckstein K. korbinian90/MriResearchTools.jl. GitHub; 2022. https://github.com/korbinian90/MriResearchTools.jl
- Python package - nibabel: Brett M, Markiewicz CJ, Hanke M, et al. nipy/nibabel. GitHub; 2019. https://github.com/nipy/nibabel
- Python package - scipy: Virtanen P, Gommers R, Oliphant TE, et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods. 2020;17(3):261-272. doi:10.1038/s41592-019-0686-2
- Python package - numpy: Harris CR, Millman KJ, van der Walt SJ, et al. Array programming with NumPy. Nature. 2020;585(7825):357-362. doi:10.1038/s41586-020-2649-2
- FastSurfer: Henschel L, Conjeti S, Estrada S, Diers K, Fischl B, Reuter M. FastSurfer - A fast and accurate deep learning based neuroimaging pipeline. NeuroImage. 2020;219:117012. doi:10.1016/j.neuroimage.2020.117012
- ANTs: Avants BB, Tustison NJ, Johnson HJ. Advanced Normalization Tools. GitHub; 2022. https://github.com/ANTsX/ANTs
Let’s view one of the QSM results:
QSM results#
show_nii(glob("bids/derivatives/qsmxt-*-*/sub*/ses*/anat*/*Chimap.nii*")[0], cmap='gray', vmin=-0.15, vmax=+0.15, interpolation='nearest')
nv_QSM = AnyNiivue()
nv_QSM.load_volumes([{"path": glob("bids/derivatives/qsmxt-*-*/sub*/ses*/anat*/*Chimap.nii*")[0],
"cal_min":-0.1,"cal_max":0.1}])
nv_QSM
Segmentations#
Segmentations are generated in both the QSM space and the T1-weighted space. Transformations are also made available.
show_nii(glob("bids/derivatives/qsmxt-2*/sub*/ses*/anat*/*space-qsm*dseg.nii*")[0], cmap='terrain', vmin=0, vmax=96, interpolation='nearest')
volumes = [
{ "path": glob("bids/derivatives/qsmxt-*-*/sub*/ses*/anat*/*Chimap.nii*")[0],
"cal_min": -0.1,
"cal_max": 0.1
},
{
"path": glob("bids/derivatives/qsmxt-2*/sub*/ses*/anat*/*space-qsm*dseg.nii*")[0],
"colormap": "freesurfer",
"visible": True, "opacity": 0.5
},
]
nv_Seg = AnyNiivue(
back_color=(1, 1, 1, 1),
show_3D_crosshair=True,
)
nv_Seg.load_volumes(volumes)
nv_Seg
Analysis CSVs#
CSV files have been exported containing susceptibility values in regions of interest for each subject.
Here we will load the CSVs, inspect the data and generate figures:
!pip install seaborn numpy nibabel pandas matplotlib
Collecting seaborn
Downloading seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Requirement already satisfied: numpy in /opt/conda/lib/python3.11/site-packages (1.26.4)
Requirement already satisfied: nibabel in /opt/conda/lib/python3.11/site-packages (5.2.1)
Collecting pandas
Downloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 kB 3.0 MB/s eta 0:00:00
?25hRequirement already satisfied: matplotlib in /opt/conda/lib/python3.11/site-packages (3.8.4)
Requirement already satisfied: packaging>=17 in /opt/conda/lib/python3.11/site-packages (from nibabel) (23.2)
Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.11/site-packages (from pandas) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.11/site-packages (from pandas) (2023.3)
Collecting tzdata>=2022.7 (from pandas)
Downloading tzdata-2024.2-py2.py3-none-any.whl.metadata (1.4 kB)
Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (4.51.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (1.4.5)
Requirement already satisfied: pillow>=8 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (10.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/conda/lib/python3.11/site-packages (from matplotlib) (3.1.2)
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)
Downloading seaborn-0.13.2-py3-none-any.whl (294 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.9/294.9 kB 1.2 MB/s eta 0:00:00a 0:00:01m
?25hDownloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.1/13.1 MB 22.0 MB/s eta 0:00:0000:010:01m
?25hDownloading tzdata-2024.2-py2.py3-none-any.whl (346 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 346.6/346.6 kB 21.5 MB/s eta 0:00:00
?25hInstalling collected packages: tzdata, pandas, seaborn
Successfully installed pandas-2.2.3 seaborn-0.13.2 tzdata-2024.2
# import modules
import numpy as np
import nibabel as nib
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from glob import glob
The raw CSV files use names from FreeSurfer as exported by FastSurfer. The full list of regions is available here.
pd.read_csv(glob("bids/derivatives/qsmxt-*-*/sub*/ses*/extra*/*.csv")[0])
roi | num_voxels | min | max | median | mean | std | |
---|---|---|---|---|---|---|---|
0 | 3rd-Ventricle | 591 | -0.234913 | 0.125160 | -0.021214 | -0.023565 | 0.034334 |
1 | 4th-Ventricle | 1593 | -0.126038 | 0.032041 | -0.047904 | -0.049593 | 0.027453 |
2 | Brain-Stem | 18539 | -0.279218 | 0.103292 | -0.044450 | -0.040326 | 0.028670 |
3 | CSF | 777 | -1.393660 | 0.945973 | 0.026742 | 0.028636 | 0.147330 |
4 | Left-Accumbens-area | 522 | -0.142032 | 0.128779 | 0.027984 | 0.024042 | 0.029907 |
... | ... | ... | ... | ... | ... | ... | ... |
91 | ctx-rh-superiorfrontal | 29681 | -0.103590 | 0.197891 | -0.003898 | -0.009414 | 0.023874 |
92 | ctx-rh-superiorparietal | 12199 | -0.084345 | 0.259306 | -0.015242 | -0.014504 | 0.021252 |
93 | ctx-rh-superiortemporal | 16300 | -0.110636 | 0.248823 | 0.005964 | 0.012656 | 0.023859 |
94 | ctx-rh-supramarginal | 12189 | -0.056689 | 0.240121 | 0.019806 | 0.020491 | 0.022696 |
95 | ctx-rh-transversetemporal | 1286 | -0.005484 | 0.170922 | 0.034455 | 0.035450 | 0.015979 |
96 rows × 7 columns
We will select a subset of these ROIs and give them more readable names:
# define regions of interest
# see https://github.com/QSMxT/QSMxT/blob/main/qsmxt/aseg_labels.csv for a full list
rois = {
"Thalamus" : [9, 10, 48, 49],
"Pallidum" : [12, 13, 52, 53],
"Caudate" : [11, 50],
"Putamen" : [12, 51],
"Brain stem" : [16],
"CSF" : [24, 122, 257, 701],
"White matter" : [2, 7, 41, 46, 177]
}
roi_names = { value: key for key in rois for value in rois[key] }
roi_ids = [value for roi in rois.values() for value in roi]
# load a reconstruction
qsm = nib.load(glob("bids/derivatives/qsmxt-*-*/sub*/ses*/anat*/*Chimap.nii*")[0]).get_fdata().flatten()
seg = nib.load(glob("bids/derivatives/qsmxt-*-*/sub*/ses*/anat*/*space-qsm*dseg.nii*")[0]).get_fdata().flatten()
# retain only the rois
qsm = qsm[np.isin(seg, roi_ids)]
seg = seg[np.isin(seg, roi_ids)]
# convert to a dataframe for plotting purposes
seg = pd.Series(seg).map(roi_names)
data = pd.DataFrame({ 'qsm' : qsm, 'seg' : seg })
# summarise data by region including the average and standard deviation
data.groupby('seg')['qsm'].agg(['mean', 'std']).sort_values('mean').round(decimals=3)
mean | std | |
---|---|---|
seg | ||
Brain stem | -0.040 | 0.029 |
White matter | -0.002 | 0.027 |
CSF | 0.029 | 0.147 |
Thalamus | 0.030 | 0.034 |
Pallidum | 0.033 | 0.060 |
Putamen | 0.047 | 0.034 |
Caudate | 0.049 | 0.023 |
medians = data.groupby('seg')['qsm'].median().sort_values()
order = medians.index
# plot
fig, ax = plt.subplots()
sns.boxplot(data=data, y='qsm', x='seg', fliersize=0, color='lightblue', order=order, ax=ax)
ax.set_xticks(range(len(ax.get_xticks()))) # Set tick positions explicitly
ax.set_xticklabels(ax.get_xticklabels(), ha='right', rotation=45)
ax.set_ylim(-0.2, 0.3)
ax.axhline(y=0, color='pink', linestyle='-', linewidth=1, zorder=-1)
ax.set_xlabel("Region of interest")
ax.set_ylabel("Susceptibility (ppm)")
ax.set_title("QSM")
plt.show()