How to use the sdcflows.interfaces.reportlets.FieldmapReportlet function in sdcflows

To help you get started, we’ve selected a few sdcflows examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nipreps / dmriprep / dmriprep / workflows / fmap / base.py View on Github external
pedirs = [m.get("PhaseEncodingDirection", "unknown") for m in metadata]
    if len(set(pedirs) - set(("unknown",))) > 1:
        if "unknown" in pedirs or len(set(pe[0] for pe in set(pedirs))) > 1:
            raise NotImplementedError

        # Get EPI polarities and their metadata
        sdc_estimate_wf = init_pepolar_estimate_wf(debug=debug)
        sdc_estimate_wf.inputs.inputnode.metadata = metadata

        wf.connect([
            (inputnode, sdc_estimate_wf, [("dwi_reference", "inputnode.in_data")]),
        ])
        if generate_report:
            from sdcflows.interfaces.reportlets import FieldmapReportlet
            pepolar_report = pe.Node(FieldmapReportlet(reference_label="SDC'd B0"),
                                     name="pepolar_report")
            ds_report_pepolar = pe.Node(DerivativesDataSink(
                base_directory=str(config.execution.output_dir), datatype="figures",
                suffix="fieldmap", desc="pepolar", dismiss_entities=("acquisition", "dir")),
                name="ds_report_pepolar")
            ds_report_pepolar.inputs.source_file = epi_targets[0]
            wf.connect([
                (sdc_estimate_wf, pepolar_report, [
                    ("outputnode.fieldmap", "fieldmap"),
                    ("outputnode.corrected", "reference"),
                    ("outputnode.corrected_mask", "mask")]),
                (pepolar_report, ds_report_pepolar, [("out_report", "in_file")]),
            ])

    return wf

sdcflows

Susceptibility Distortion Correction (SDC) workflows for EPI MR schemes.

Apache-2.0
Latest version published 5 months ago

Package Health Score

75 / 100
Full package analysis

Similar packages