Skip to content

Commit

Permalink
added eddy qc to report
Browse files Browse the repository at this point in the history
  • Loading branch information
GalKepler committed Aug 5, 2024
1 parent a0d7f4f commit 972a5f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 200 deletions.
199 changes: 0 additions & 199 deletions src/keprep/data/quality_assurance/templates/reports-spec copy.yml

This file was deleted.

3 changes: 3 additions & 0 deletions src/keprep/data/quality_assurance/templates/reports-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ sections:
caption: b=0 to anatomical reference registration
subtitle: Coregistration of the DWI to the anatomical T1w image using FSL's <code>FLIRT</code>.
static: false
- bids: {datatype: figures, desc: eddyqc, suffix: dwi}
caption: EDDY Quality Control
subtitle: QC for head motion correction as conducted by FSL's <code>EDDY</code>.


- name: About
Expand Down
2 changes: 1 addition & 1 deletion src/keprep/workflows/dwi/stages/post_eddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def init_post_eddy_wf(name: str = "post_eddy_wf") -> pe.Workflow:
),
name="plot_eddy_qc",
)
plot_eddy_qc_node.inputs.out_file = "eddy_qc_plot.png"
plot_eddy_qc_node.inputs.out_file = "eddy_qc_plot.svg"
workflow.connect(
[
(
Expand Down
2 changes: 2 additions & 0 deletions src/keprep/workflows/dwi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def plot_eddy_qc(
dpi : int, optional
dpi of the plot (default: 300)
"""
import os
from pathlib import Path

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -149,6 +150,7 @@ def plot_eddy_qc(
plt.tight_layout()

# save the plot with transparent background
out_file = os.getcwd() + "/" + out_file
plt.savefig(out_file, dpi=dpi, bbox_inches="tight", transparent=True)
plt.close()

Expand Down

0 comments on commit 972a5f2

Please sign in to comment.