pymialsrtk.workflows.output_stage module

Workflow for the management of super-resolution reconstruction pipeline outputs.

pymialsrtk.workflows.output_stage.create_preproc_output_stage(p_sub_ses, p_sr_id, p_run_type, p_use_manual_masks, p_do_nlm_denoising=False, p_skip_stacks_ordering=False, p_do_registration=False, name='preproc_output_stage')[source]

Create an output management workflow for the preprocessing only pipeline.

Parameters
  • p_sub_ses (string) – String containing subject-session information for output formatting

  • p_sr_id (integer) – ID of the current run

  • p_run_type (“preprocessing” or “super resolution”) – Type of run

  • p_use_manual_masks (boolean) – Whether manual masks were used in the pipeline

  • p_do_nlm_denoising (boolean) – Enable non-local means denoising (default: False)

  • p_skip_stacks_ordering (boolean) – Skip stacks ordering (default: False) If disabled, report_image and motion_tsv are not generated

  • p_do_registration (boolean) – Whether registration is performed in the preprocessing pipeline

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

Inputs
  • sub_ses (string) – String containing subject-session information for output formatting

  • sr_id (integer) – ID of the current run

  • stacks_order (list of integer) – Order of stacks in the registration (list of integer)

  • final_res_dir (pathlike object or string representing a file) – Output directory

  • run_type (“preprocessing” or “super resolution”) – Type of run

  • input_masks (list of items which are a pathlike object or string representing a file) – Input mask images from the low-resolution T2w images

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

  • input_sdi (pathlike object or string representing a file) – Interpolated high resolution volume, obtained after slice-to-volume registration (SVR) Optional - only if p_do_registration = True

  • input_transforms (list of items which are a pathlike object or string representing a file) – Transforms obtained after SVR Optional - only if p_do_registration = True

  • report_image (pathlike object or string representing a file) – Report image obtained from the StacksOrdering module Optional - only if p_skip_stacks_ordering = False

  • motion_tsv (pathlike object or string representing a file) – Motion index obtained from the StacksOrdering module Optional - only if p_skip_stacks_ordering = False

  • input_images_nlm (list of items which are a pathlike object or string representing a file) – Input low-resolution denoised T2w images, Optional - only if p_do_nlm_denoising = True

pymialsrtk.workflows.output_stage.create_srr_output_stage(p_sub_ses, p_sr_id, p_run_type, p_keep_all_outputs=False, p_use_manual_masks=False, p_do_nlm_denoising=False, p_do_reconstruct_labels=False, p_do_srr_assessment=False, p_skip_stacks_ordering=False, p_do_multi_parameters=False, p_subject=None, p_session=None, p_stacks=None, p_output_dir=None, p_run_start_time=None, p_run_elapsed_time=None, p_skip_svr=None, p_do_anat_orientation=None, p_do_refine_hr_mask=None, p_masks_derivatives_dir=None, p_openmp_number_of_cores=None, p_nipype_number_of_cores=None, name='srr_output_stage')[source]

Create a output management workflow for the super-resolution reconstruction pipeline.

Parameters
  • p_sub_ses – String containing subject-session information for output formatting

  • p_sr_id – ID of the current run

  • p_run_type – Type of run (preprocessing/super resolution/ …)

  • p_keep_all_outputs – Whether intermediate outputs must be issues

  • p_use_manual_masks – Whether manual masks were used in the pipeline

  • p_do_nlm_denoising (bool) – Enable non-local means denoising (default: False)

  • p_do_reconstruct_labels (bool) – Enable the reconstruction of labelmaps

  • p_do_srr_assessment (bool) – Enables output of srr assessment stage

  • p_skip_stacks_ordering (bool) – Skip stacks ordering (default: False) If disabled, report_image and motion_tsv are not generated

  • p_do_multi_parameters (bool) – Whether recon_stage was performed in a multi-TV mode

  • name (str) – name of workflow (default: “srr_output_stage”)

Inputs
  • stacks_order (list of integer) – Order of stacks in the registration (list of integer)

  • use_manual_masks (bool) – Whether manual masks were used in the pipeline

  • final_res_dir (pathlike object or string representing a file) – Output directory

  • input_masks (list of items which are a pathlike object or string representing a file) – Input mask images from the low-resolution T2w images

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

  • input_transforms (list of items which are a pathlike object or string representing a file) – Transforms obtained after SVR

  • input_sdi (pathlike object or string representing a file) – Interpolated high resolution volume, obtained after slice-to-volume registration (SVR)

  • input_sr (pathlike object or string representing a file) – High resolution volume, obtained after the super- resolution (SR) reconstruction from the SDI volume.

  • input_hr_mask (pathlike object or string representing a file) – Brain mask from the high-resolution reconstructed volume.

  • input_json_path (pathlike object or string representing a file) – Path to the JSON file describing the parameters used in the SR reconstruction.

  • input_sr_png (pathlike object or string representing a file) – PNG image summarizing the SR reconstruction.

  • report_image (pathlike object or string representing a file) – Report image obtained from the StacksOrdering module Optional - only if p_skip_stacks_ordering = False

  • motion_tsv (pathlike object or string representing a file) – Motion index obtained from the StacksOrdering module Optional - only if p_skip_stacks_ordering = False

  • input_images_nlm (pathlike object or string representing a file) – Input low-resolution denoised T2w images Optional - only if p_do_nlm_denoising = True