FastSurferCNN: generate_hdf5.py

Full commandline interface of FastSurferCNN/generate_hdf5.py

HDF5-Creation

usage: FastSurferCNN/generate_hdf5.py [-h] [--hdf5_name HDF5_NAME]
                                      [--plane {axial,coronal,sagittal}]
                                      [--data_dir DATA_DIR]
                                      [--thickness THICKNESS]
                                      [--csv_file CSV_FILE]
                                      [--pattern PATTERN]
                                      [--image_name IMAGE_NAME]
                                      [--gt_name GT_NAME] [--gt_nocc GT_NOCC]
                                      [--lut LUT] [--combi COMBI]
                                      [--sag_mask SAG_MASK] [--max_w MAX_W]
                                      [--edge_w EDGE_W] [--hires_w HIRES_W]
                                      [--no_grad] [--gm]
                                      [--processing {aparc,aseg,none}]
                                      [--blank_slice_thresh BLANK_SLICE_THRESH]
                                      [--sizes SIZES [SIZES ...]]

Named Arguments

--hdf5_name

path and name of hdf5-data_loader (default: ../data/hdf5_set/Multires_coronal.hdf5)

Default: '../data/hdf5_set/Multires_coronal.hdf5'

--plane

Possible choices: axial, coronal, sagittal

Which plane to put into file (axial (default), coronal or sagittal)

Default: 'axial'

--data_dir

Directory with images to load

Default: '/data'

--thickness

Number of pre- and succeeding slices (default: 3)

Default: 3

--csv_file

Csv-file listing subjects to include in file

--pattern

Pattern to match files in directory.

--image_name

Default name of original images. FreeSurfer orig.mgz is default (mri/orig.mgz)

Default: 'mri/orig.mgz'

--gt_name

Default name for ground truth segmentations. Default: mri/aparc.DKTatlas+aseg.mgz. If Corpus Callosum segmentation is already removed, do not set gt_nocc. (e.g. for our internal training set mri/aparc.DKTatlas+aseg.filled.mgz exists already and should be used here instead of mri/aparc.DKTatlas+aseg.mgz).

Default: 'mri/aparc.DKTatlas+aseg.mgz'

--gt_nocc

Segmentation without corpus callosum (used to mask this segmentation in ground truth). If the used segmentation was already processed, do not set this argument. For a normal FreeSurfer input, use mri/aseg.auto_noCCseg.mgz.

--lut

FreeSurfer-style Color Lookup Table with labels to use in final prediction. Has to have columns: ID LabelName R G B ADefault: FASTSURFERDIR/FastSurferCNN/config/FastSurfer_ColorLUT.tsv.

Default: /config/FastSurfer_ColorLUT.tsv

--combi

Suffixes of labels names to combine. Default: Left- and Right-.

Default: ['Left-', 'Right-']

--sag_mask

Suffixes of labels names to mask for final sagittal labels. Default: Left- and ctx-rh.

Default: ('Left-', 'ctx-rh')

--max_w

Overall max weight for any voxel in weight mask. Default=5

Default: 5

--edge_w

Weight for edges in weight mask. Default=5

Default: 5

--hires_w

Weight for hires elements (sulci, WM strands, cortex border) in weight mask. Default=None

--no_grad

Turn on to only use median weight frequency (no gradient)

Default: False

--gm

Turn on to add cortex mask for hires-processing.

Default: False

--processing

Possible choices: aparc, aseg, none

Use aseg, aparc or no specific mapping processing

Default: 'aparc'

--blank_slice_thresh

Threshold value for function filter_blank_slices. Slices with number oflabeled voxels below this threshold are discarded. Default: 50.

Default: 50

--sizes

Sizes of images in the dataset. Default: 256

Default: 256