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 #438 from a3sha2/master
Browse files Browse the repository at this point in the history
update the report
  • Loading branch information
a3sha2 committed Mar 24, 2021
2 parents 7114d84 + a085629 commit 48e0f92
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{
"restructuredtext.confPath": "${workspaceFolder}/docs",}
"restructuredtext.confPath": "${workspaceFolder}/docs",
"python.pythonPath": "/Users/adebimpe/anaconda3/bin/python",
}
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ RUN conda install -y python=3.7.1 \
conda build purge-all; sync && \
conda clean -tipsy && sync

RUN pip install --no-cache-dir nipype nibabel niworkflows nilearn==0.6.0 matplotlib
RUN pip install --no-cache-dir numpy pandas traits scikit-learn
RUN rm -rf ~/.cache/pip/* && sync
RUN apt-get update


ENV FSLDIR="/opt/fsl-5.0.10" \
PATH="/opt/fsl-5.0.10/bin:$PATH"
Expand Down Expand Up @@ -224,6 +221,11 @@ RUN sed -i '$iexport PATH=$PATH:$XCPEDIR' $ND_ENTRYPOINT

RUN echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"

RUN pip install --no-cache-dir nipype nibabel niworkflows==1.1.10 nilearn==0.6.0 matplotlib
RUN pip install --no-cache-dir numpy pandas traits scikit-learn svgutils==0.3.1
RUN rm -rf ~/.cache/pip/* && sync
RUN apt-get update

ADD . /xcpEngine

# template
Expand Down Expand Up @@ -266,5 +268,4 @@ RUN bash -c 'cp /xcpEngine/utils/license.txt /opt/freesurfer/'
RUN bash -c '/xcpEngine/xcpReset'



ENTRYPOINT ["/xcpEngine/xcpEngine"]
18 changes: 9 additions & 9 deletions core/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +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]
#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')
#plot_carpet(img=resid,atlaslabels=seg_data,tr=tr,
#output_file=outdir+'/regress/'+prefix+'_residualized.svg')

residplot='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>'
#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
14 changes: 7 additions & 7 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,13 @@ def compose_view(bg_svgs, fg_svgs, ref=0, out_file='report.svg'):
# any element (used the first here) and the sum of heights
fig = svgt.SVGFigure(width, heights[:nsvgs].sum())

yoffset = 0
for i, r in enumerate(roots):
r.moveto(0, yoffset,scale=scales[i])
if i == (nsvgs - 1):
yoffset = 0
else:
yoffset += heights[i]
#yoffset = 0
#for i, r in enumerate(roots):
#r.moveto(0, yoffset,scale=scales[i])
#if i == (nsvgs - 1):
#yoffset = 0
#else:
#yoffset += heights[i]

# Group background and foreground panels in two groups
if fg_svgs:
Expand Down

0 comments on commit 48e0f92

Please sign in to comment.