Skip to content

Commit

Permalink
update PR#4.
Browse files Browse the repository at this point in the history
  • Loading branch information
AGrigis committed Oct 23, 2023
1 parent af3fbf9 commit 05ba1ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
1 change: 0 additions & 1 deletion dmriprep/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def qc(datadir, regex, outdir, simg_file,
if cmd is None:
cmd = (f"singularity run --bind {datadir} --cleanenv "
f"{simg_file} brainprep dmriprep-qc ")

else:
cmd = f"python3 {cmd} dmriprep-qc "
cmd += (f"--data_regex {regex} "
Expand Down
3 changes: 3 additions & 0 deletions li2mni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ The code is organized in two parts:
- 1 : good quality -> accepted
- 2 : medium quality -> accepted
- 3 : bad -> rejected

* **make_mni_snapshot**: generate MNI image shaphots with overlaid lithium
images for each suject and create a .pdf with all generated images.
22 changes: 16 additions & 6 deletions li2mni/make_mni_snapshot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# -*- coding: utf-8 -*-
##########################################################################
# NSAp - Copyright (C) CEA, 2023
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########################################################################


# Imports
import fire
import os
from nilearn import plotting
Expand All @@ -21,8 +32,7 @@ def overlay_nifti(template_file, overlay_file, output_file,

def cohorte(li2mni_path, output_path, norm=False, site=False,
participants=None, pdf=True, dpi=900):
"""
Launch overlay_nifti on a all cohorte.
""" Launch overlay_nifti on a all cohorte.
Parameters
----------
Expand All @@ -33,14 +43,14 @@ def cohorte(li2mni_path, output_path, norm=False, site=False,
Optionnal
---------
norm: Bool default False
norm: bool default False
take the li2mni output normalized or not.
site: Bool default False
site: bool default False
Reorder the png to a site by site.
participants: Bool default None
path to the participants.tsv file. WARNING this flags is mandatory if
site=True
pdf: Bool
pdf: bool
make a concatenation pdf of site by site png, work only if site=True
dpi: int default=900
dot per inch of the png created.
Expand All @@ -57,7 +67,7 @@ def cohorte(li2mni_path, output_path, norm=False, site=False,
output = os.path.join(output_path, f"{sub}_overlay_mni_norm")

if os.path.isfile(template) and os.path.isfile(overlay)\
and os.path.isfile(output+".png") is False:
and os.path.isfile(output + ".png") is False:
print("la")
print(os.path.isfile(output))
print(output)
Expand Down

0 comments on commit 05ba1ef

Please sign in to comment.