SEPIA (One-stop QSM processing)

What is SEPIA?

SEPIA is a quantitative susceptibility mapping (QSM) pipeline analysis tool for (but not limited to) neuroimaging application. It provides all the essential functions to compute a susceptibility map from a 3D multi-echo GRE phase data, including phase unwrapping, background field contribution removal and dipole inversion. Incorporating with different toolboxes in SEPIA gives users the advantages of having a variety of options to build a pipeline that works the best for their data. When you use the SEPIA graphical user interface to process the data, a configuration (config) file will be generated that contains all the settings and commands that you’ve specified in the pipeline. This config file will be particularly useful for batch processing.

Structure of the application

This standalone consists of 4 panels:

  • Input/Output(I/O) panel,
  • Total field recovery and phase unwrapping panel,
  • Background field removal panel, and
  • QSM panel.

Description of each panel is given below:

I/O panel

../_images/IO_panel.png

The I/O panel is responsible for data input/output and data processing that is not specific to QSM.

  • Data input

    There are two pathways to specify input in this application:

    ../_images/IO_panel_pathway.png
    1. Specify a directory that contains all essential data.

    The essential data are:

    Data Description
    Phase 3D/4D phase data ([x,y,slice,time]), must contain ‘ph’ in the filename, e.g. phase.nii.gz or ph.nii.gz,
    Magnitude 3D/4D magnitude data ([x,y,slice,time]), must contain ‘mag’ in the filename, e.g. magn.nii.gz or mag.nii.gz;
    Header see SEPIA header for more information, must contain ‘header’ in the filename, e.g. header.mat
    Mask (optional) 3D signal mask, if provided, must contain string ‘mask’ in the filename, e.g. mask.nii.gz

    Warning

    Please make sure the filenames follow the above rules, or the BIDS specification (see Data Input in Data Preparation), and no other files in the directory sharing the same string labels (i.e. ‘ph’, ‘mag’, ‘header’ and ‘mask’).

    1. Specify the required data separately using the GUI buttons.

    Note

    The ‘Weights’ input is an optional input. You can specify a 3D data which will be used as prior information in regularised optimisation in QSM dipole inversion. If the ‘Weights’ input is empty, the weighting map will be automatically computed in subsequent QSM processing.

  • Output prefix

    By default, the output files generated by SEPIA will be stored in a directory named ‘output‘ under the directory of the input files (i.e. ‘_/your/input/directory/output/_’). The prefix of the output filename is ‘Sepia‘. You can change the default output directory and prefix according to your preference. If the output directory does not exist, the application will create the directory.

    Note

    Make sure the ‘Output prefix’ field contains a full path of the output directory and a filename prefix.

  • Brain mask

    You can optionally specify a signal (brain) mask NIfTI file. If this input is empty and no mask is found in the input directory, SEPIA will automatically run the FSL’s brain extraction tool (bet) provided with MEDI toolbox to compute the brain mask.

  • Invert phase data

    Checking this option will invert the contrast of the SEPIA output frequency and QSM maps. Mathematically it inverse the signal phase by computing the signal conjugate. It is useful if you want to have specific colour scheme for QSM (e.g. dark colour for paramagnetic susceptibility).

  • FSL brain extraction (bet)

    Brain mask can be computed using the Matlab implementation of FSL’s BET provided with MEDI toolbox, with options including fractional intensity threshold (-f) and vertical in fractional intensity threshold (-g). More information regarding the options can be found in BET/UserGuide.

Total field recovery and phase unwrapping panel

../_images/tf_panel.png
  • Echo phase combination

    Select a method for temporal phase unwrapping with multi-echo data.

    Note

    If the number of echoes is less than 3. ‘Optimum weights’ method will be automatically used.

    Warning

    The ‘MEDI nonlinear fit (Bipolar, testing)’ method is not fully supported yet.

  • Phase unwrapping

    Select a method for spatial phase unwrapping.

    Warning

    The ‘3D best path’ method might not work in most operating systems.

  • Bipolar readout correction

    Correct the phase inconsistency between odd and even echoes, and a gradient-like magnetic field contributed from eddy current due to bipolar readout. If this option is enabled, the bipolar readout corrected data will be saved in the output directory with the following suffix:

    • phase_eddy-correct.nii.gz
  • Exclude voxels using residual, threshold:

    Exclude voxels that have high relative residual based on a single compartment model fitting. The output data with suffix ‘relative-residual.nii.gz will be used for thresholding. For voxels that have intensity higher than the threshold will be excluded from subsequent processing. Two methods are supported to exclude those voxels:

    1. ‘Weighting map’: the excluded voxels will weight as 0 in the weighting map, which will only affect QSM dipole inversion algorithms that accept a weighting map as part of the regularisation.
    2. ‘Brain mask’: the excluded voxels will be excluded in the signal mask in the subsequent processing. This will affect both background field removal and QSM dipole inversion results.

    Only available for region growing based methods (i.e. ‘3D best path’, ‘Region growing (MEDI)’ and ‘SEGUE’) and ‘Graphcut’ method.

Background field removal panel

../_images/bfr_panel_anno.png
  • Method

    Select a background field removal method. The method parameters will be displayed on the method panel.

  • Remove residual B1 field by

    Option to remove potential field contributions originated from B1 by polynomial fitting or spherical harmonic fit.

  • Erode edge voxel(s)

    Further remove the edge voxels from the brain mask. Useful when the local field is not reliably estimated on the brain edges. This operation is performed prior the ‘Remove potenital B1 residual phase’ operation (if selected).

QSM panel

../_images/qsm_panel_anno.png
  • Method:

    Select a QSM dipole inversion method. The method parameters will be displayed on the method panel.

  • Reference tissue

    Select a tissue for QSM value referencing.

    Warning

    The ‘CSF’ tissue option works only when multi-echo magnitude data is provided.

Others

../_images/start_button_anno.png
  • Load config

    Import the method related settings specified in the SEPIA-generated config file to the SEPIA GUI. NO modification will be made in the I/O panel.

  • Start

    Generate a SEPIA config file that contains all user-defined methods and parameters for QSM processing based on the setting in the GUI. SEPIA will run the config file immediately once it is generated.