mgdm_segmentation

nighres.brain.mgdm_segmentation(contrast_image1, contrast_type1, contrast_image2=None, contrast_type2=None, contrast_image3=None, contrast_type3=None, contrast_image4=None, contrast_type4=None, n_steps=5, max_iterations=800, topology='wcs', atlas_file=None, topology_lut_dir=None, adjust_intensity_priors=False, normalize_qmaps=True, compute_posterior=False, posterior_scale=5.0, diffuse_probabilities=False, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]

MGDM segmentation

Estimates brain structures from an atlas for MRI data using a Multiple Object Geometric Deformable Model (MGDM)

Parameters:
  • contrast_image1 (niimg) – First input image to perform segmentation on
  • contrast_type1 (str) – Contrast type of first input image, must be listed as a prior in used atlas(specified in atlas_file). Possible inputs by default are DWIFA3T, DWIMD3T, T1map9T, Mp2rage9T, T1map7T, Mp2rage7T, PV, Filters, T1pv, Mprage3T, T1map3T, Mp2rage3T, HCPT1w, HCPT2w, NormMPRAGE.
  • contrast_image2 (niimg, optional) – Additional input image to inform segmentation, must be in the same space as constrast_image1, requires contrast_type2
  • contrast_type2 (str, optional) – Contrast type of second input image, must be listed as a prior in used atlas (specified in atlas_file). Possible inputs by default are the same as with parameter contrast_type1 (see above).
  • contrast_image3 (niimg, optional) – Additional input image to inform segmentation, must be in the same space as constrast_image1, requires contrast_type3
  • contrast_type3 (str, optional) – Contrast type of third input image, must be listed as a prior in used atlas (specified in atlas_file). Possible inputs by default are the same as with parameter contrast_type1 (see above).
  • contrast_image4 (niimg, optional) – Additional input image to inform segmentation, must be in the same space as constrast_image1, requires contrast_type4
  • contrast_type4 (str, optional) – Contrast type of fourth input image, must be listed as a prior in used atlas (specified in atlas_file). Possible inputs by default are the same as with parameter contrast_type1 (see above).
  • n_steps (int, optional) – Number of steps for MGDM (default is 5, set to 0 for quick testing of registration of priors, which does not perform true segmentation)
  • max_iterations (int, optional) – Maximum number of iterations per step for MGDM (default is 800, set to 1 for quick testing of registration of priors, which does not perform true segmentation)
  • topology ({'wcs', 'no'}, optional) – Topology setting, choose ‘wcs’ (well-composed surfaces) for strongest topology constraint, ‘no’ for no topology constraint (default is ‘wcs’)
  • atlas_file (str, optional) – Path to plain text atlas file (default is stored in DEFAULT_MGDM_ATLAS) or atlas name to be searched in MGDM_ATLAS_DIR
  • topology_lut_dir (str, optional) – Path to directory in which topology files are stored (default is stored in TOPOLOGY_LUT_DIR)
  • normalize_qmaps (bool) – Normalize quantitative maps into [0,1] (default is True)
  • adjust_intensity_priors (bool) – Adjust intensity priors based on dataset (default is False)
  • normalize_qmaps – Normalize quantitative maps in [0,1] (default in True, change this if using one of the -quant atlas text files in MGDM_ATLAS_DIR)
  • compute_posterior (bool) – Compute posterior probabilities for segmented structures (default is False)
  • posterior_scale (float) – Posterior distance scale from segmented structures to compute posteriors (default is 5.0 mm)
  • diffuse_probabilities (bool) – Regularize probability distribution with a non-linear diffusion scheme (default is False)
  • save_data (bool) – Save output data to file (default is False)
  • overwrite (bool) – Overwrite existing results (default is False)
  • output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
  • file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)
Returns:

Dictionary collecting outputs under the following keys (suffix of output files in brackets)

  • segmentation (niimg): Hard brain segmentation with topological constraints (if chosen) (_mgdm_seg)
  • labels (niimg): Maximum tissue probability labels (_mgdm_lbls)
  • memberships (niimg): Maximum tissue probability values, 4D image where the first dimension shows each voxel’s highest probability to belong to a specific tissue, the second dimension shows the second highest probability to belong to another tissue etc. (_mgdm_mems)
  • distance (niimg): Minimum distance to a segmentation boundary (_mgdm_dist)

Return type:

dict

Notes

Original Java module by Pierre-Louis Bazin. Algorithm details can be found in [1] and [2]

References

[1]Bazin et al. (2014). A computational framework for ultra-high resolution cortical segmentation at 7 Tesla. doi: 10.1016/j.neuroimage.2013.03.077
[2]Bogovic et al. (2013). A multiple object geometric deformable model for image segmentation. doi:10.1016/j.cviu.2012.10.006.A

Examples using nighres.brain.mgdm_segmentation