Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #436 from a3sha2/master
Browse files Browse the repository at this point in the history
update regress report
  • Loading branch information
a3sha2 committed Mar 22, 2021
2 parents 6c27d1f + b8c5000 commit 757e6af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions core/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,19 @@ def ulify(elements):

#html_report=html_report + '<h1> prestats module </h1> <h3> Co-registration </h3> <p> Functional registration to Structural .</p> <object type="image/svg+xml" data="'+ fmreg+ '" alt="Segmentation" width="2000"height="800"></object>'

#elif i == 'regress':
elif i == 'regress':
#not using it now but will be needed later i hope
# segm=outdir+'/prestats/'+prefix+'_segmentation.nii.gz'
#seg_data=load_img(segm).get_data()
#resid=outdir+'regress/'+prefix+'_residualised.nii.gz'
#tr=nib.load(resid).header['pixdim'][4]
#plot_carpet(img=resid,atlaslabels=seg_data,tr=tr,output_file=outdir+'/regress/'+prefix+'_residualized.svg')
#residplot='regress/'+prefix+'_residualized.svg'
#html_report=html_report + '<h1> regress module </h1> <h3> Residualized BOLD data </h3> <object type="image/svg+xml" data="'+ residplot +'" alt="Segmentation" width="1000"height="800"></object>'
segm=outdir+'/prestats/'+prefix+'_segmentation.nii.gz'
seg_data=load_img(segm).get_data()
resid=outdir+'regress/'+prefix+'_residualised.nii.gz'
tr=nib.load(resid).header['pixdim'][4]

plot_carpet(img=resid,atlaslabels=seg_data,tr=tr,
output_file=outdir+'/regress/'+prefix+'_residualized.svg')

residplot='regress/'+prefix+'_residualized.svg'

html_report=html_report + '<h1> regress module </h1> <h3> Residualized BOLD data </h3> <object type="image/svg+xml" data="'+ residplot +'" alt="Segmentation" width="1000"height="800"></object>'
elif i == 'fcon':
filejson = outdir+'/'+prefix+'_atlas/'+prefix+'_atlas.json'
with open(filejson, 'r') as atlasfile:
Expand Down
2 changes: 1 addition & 1 deletion core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def compose_view(bg_svgs, fg_svgs, ref=0, out_file='report.svg'):

yoffset = 0
for i, r in enumerate(roots):
r.moveto(0, yoffset)
r.moveto(0, yoffset,scale=scales[i])
if i == (nsvgs - 1):
yoffset = 0
else:
Expand Down
2 changes: 1 addition & 1 deletion xcpEngine
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ echo "generating report"
for sub in ${!cohort[@]}
do
mkdir -p ${out[sub]}/figures
mv $(ls -f ${out[sub]}/regress/*svg) ${out[sub]}/figures/ 2>/dev/null
#mv $(ls -f ${out[sub]}/regress/*svg) ${out[sub]}/figures/ 2>/dev/null
echo $standard >> ${out[sub]}/template.txt
##########################################################
# remove previous html
Expand Down

0 comments on commit 757e6af

Please sign in to comment.