-
Notifications
You must be signed in to change notification settings - Fork 3
Detailed Pipeline
Paul Wright edited this page Jun 21, 2021
·
8 revisions
The processing steps and their order are described below. Some steps are always performed. Optional steps are marked in bold.
- Set-up steps
- Create output directory.
- Copy images (to avoid overwriting originals).
- If images are compressed (
.nii.gz
) then uncompress them. -
Collapse labels
- Combine labels as specified in
opt.labels.part
, described here. - Can be used to select a subset of labels (e.g. if the input label image has voxels 1 = umbra and 2 = penumbra, you may wish to use only label 1 for cost function masking in the segmentation step).
- Can be used to group combinations of labels.
- Combine labels as specified in
-
Erode
- Remove a few of the outer voxels.
-
Reset origin
- Important for CT.
- Also resize voxels if
opt.do.vx
is set.
- Realign to MNI space
-
Reorient
- Reslice so that image data is in world space.
-
Crop
- Crop the images to remove unneccesary data.
-
Coregister
- Set one of the images as reference and coregister the others to it.
-
Denoise
- Denoise the images.
- Only done if not using super-resolution.
- Always followed by another coregistration step.
- The below steps are for creating images of equal size, either by MTV super-resolution2, or by just simply reslicing.
- EITHER super-resolve images
- Always followed by another coregistration step.
- OR reslice
- Make images the same dimensions by reslicing, using a selected image as reference.
- Also resize voxels if
opt.do.vx
is set.
- OR resize voxels
- If neither resetting origin nor applying bounding box
- OR do nothing.
- EITHER super-resolve images
-
SPM BB
- Crop to SPM12 bounding box.
- Use custom dimensions if specified.
- Also resize voxels if
opt.do.vx
is set.
- If
paths
specifies label images, reslice these. -
Segment
- Run SPM12 unified segmentation.
- Combines multi-channel data. All images must be in the same space.
- Can output deformation fields for precise non-linear warp to MNI space.
- Can use cost function masking, e.g. to exclude tumour voxels from the estimation of the warp to MNI space.
-
BF corr
- Apply bias field correction (requires segmentation).
-
Skull strip
- Strip the skull (requires segmentation).
-
Register to template
- If a template is specified, reslice and affinely register images to the template.
-
Write normalised
- Non-linearly warp images and labels to MNI space (requires segmentation).
-
Intensity normalisation
- Normalise image intensities using the range in
opt.int_norm.rng
.
- Normalise image intensities using the range in
- Write 2D version
- Output steps
- Assign created filenames to output variable.
- Save images in native space
- If original images were compressed (
.nii.gz
) then compress the output. -
Write MAT
- Save the orientation matrix as a MATLAB .mat file.