pymialsrtk.workflows.preproc_stage module

Module for the preprocessing stage of the super-resolution reconstruction pipeline.

pymialsrtk.workflows.preproc_stage.create_preproc_stage(p_skip_preprocessing=False, p_do_nlm_denoising=False, p_do_reconstruct_labels=False, p_verbose=False, name='preproc_stage')[source]

Create a SR preprocessing workflow.

Parameters
  • p_do_nlm_denoising (boolean) – Whether to proceed to non-local mean denoising (default: False)

  • p_do_reconstruct_labels (boolean) – Whether we are also reconstruction label maps. (default: False)

  • p_verbose (boolean) – Whether verbosity should be enabled (default False)

  • name (string) – name of workflow (default: “preproc_stage”)

Inputs
  • input_images (list of items which are a pathlike object or string representing a file) – Input T2w images

  • input_masks (list of items which are a pathlike object or string representing a file) – Input mask images

Outputs
  • output_images (list of items which are a pathlike object or string representing a file) – Processed images

  • output_masks (list of items which are a pathlike object or string representing a file) – Processed images

  • output_images_nlm (list of items which are a pathlike object or string representing a file) – Processed images with NLM denoising, required if p_do_nlm_denoising = True

Example

>>> from pymialsrtk.pipelines.workflows import preproc_stage as preproc
>>> preproc_stage = preproc.create_preproc_stage(p_do_nlm_denoising=False)
>>> preproc_stage.inputs.inputnode.input_images =
        ['sub-01_run-1_T2w.nii.gz',
         'sub-01_run-2_T2w.nii.gz']
>>> preproc_stage.inputs.inputnode.input_masks =
        ['sub-01_run-1_T2w_mask.nii.gz',
         'sub-01_run-2_T2w_mask.nii.gz']
>>> preproc_stage.inputs.inputnode.p_do_nlm_denoising = 'mask.nii'
>>> preproc_stage.run()