xcp_d.interfaces.execsummary module

Classes for building an executive summary file.

class xcp_d.interfaces.execsummary.ExecutiveSummary(xcpd_path, output_dir, subject_id, session_id=None)[source]

Bases: object

A class to build an executive summary.

Parameters:
  • xcpd_path (str) – Path to the XCP-D derivatives.

  • output_dir (str) – Folder where the executive summary will be written out.

  • subject_id (str) – Subject ID.

  • session_id (None or str, optional) – Session ID.

collect_inputs()[source]

Collect inputs.

generate_report(out_file=None)[source]

Generate the report.

write_html(document, filename)[source]

Write an html document to a filename.

Parameters:
  • document (str) – HTML contents to write to file.

  • filename (str) – Name of HTML file to write.

class xcp_d.interfaces.execsummary.FormatForBrainSwipes(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Reformat figure for Brain Swipes.

From https://github.com/DCAN-Labs/BrainSwipes/blob/cb2ce964bcae93c9a234e4421c07b88bcadf2908/ tools/images/ingest_brainswipes_data.py#L113 Credit to @BarryTik.

Optional Inputs:

in_files (a list of items which are a pathlike object or string representing an existing file) – Figure files. Must be the derivative’s filename, not the file from the working directory.

Outputs:

out_file (a pathlike object or string representing an existing file) – Reformatted png file.

class xcp_d.interfaces.execsummary.PlotSlicesForBrainSprite(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

A class that produces images for BrainSprite mosaics.

Mandatory Inputs:
  • lh_pial (a pathlike object or string representing an existing file) – Left hemisphere pial surface in gifti format.

  • lh_wm (a pathlike object or string representing an existing file) – Left hemisphere wm surface in gifti format.

  • nifti (a pathlike object or string representing an existing file) – 3dVolume aligned to the wm and pial surfaces.

  • rh_pial (a pathlike object or string representing an existing file) – Right hemisphere pial surface in gifti format.

  • rh_wm (a pathlike object or string representing an existing file) – Right hemisphere wm surface in gifti format.

Optional Inputs:

n_procs (an integer) – Number of cpus to use for making figures. (Nipype default value: 1)

Outputs:

out_files (a list of items which are a pathlike object or string representing a file) – Png files.