5050 $ ( "#nrtodo" ) . text ( counts . registration [ "-1" ] )
5151 }
5252
53- function qc_update ( subj_id , stage , value ) {
54- subjs [ subj_id - 1 ] [ stage ] = parseInt ( value )
53+ function qc_update ( run_id , stage , value ) {
54+ subjs [ run_id ] [ stage ] = parseInt ( value )
5555 updateCounts ( ) ;
5656 }
5757
@@ -124,30 +124,46 @@ <h1>afni_proc.py: group report</h1>
124124{% for config in configs %}
125125< div class ="subject mt-3 mb-3 pt-3 pb-3 ">
126126 < script type ="text/javascript ">
127- var subj_qc = { id :{ { config [ 'subj_id' ] } } , motion :null , registration :null }
127+ { % if config [ 'session_label' ] % }
128+ var subj_qc = { id :{ { config [ 'report_num' ] } } , subject : "{{ config['subj_id'] }}" , session : "{{ config['session_label'] }}" , task :"{{ config['task_label'] }}" , motion :null , registration :null }
129+ { % else % }
130+ var subj_qc = { id :{ { config [ 'report_num' ] } } , subject : "{{ config['subj_id'] }}" , session : null , task :"{{ config['task_label'] }}" , motion :null , registration :null }
131+ { % endif % }
128132 </ script >
129-
130- < h2 > Subject {{ config['subj_id'] }} Summary</ h2 >
133+ {% if config['session_label'] %}
134+ < h2 > Subject {{ config['subj_id'] }}, Session {{ config['session_label'] }}, {{ config['task_label'] }} Summary</ h2 >
135+ {% else %}
136+ < h2 > Subject {{ config['subj_id'] }}, {{ config['task_label'] }} Summary</ h2 >
137+ {% endif %}
131138 < ul class ="simple ">
132139 < li > Subject ID: {{ config['subj_id'] }}.</ li >
140+ {% if config['session_label'] %}
141+ < li > Session: {{ config['session_label'] }}</ li >
142+ {% endif %}
143+ < li > Task: {{ config['task_label'] }}</ li >
144+ < li > Number of runs: {{ config['num_runs'] }}</ li >
133145 < li > Blocks run: {{ config['blocks'] }}.</ li >
134146
135147 {% if config['warnings'] %}
136148 < li > Warnings:
137149 < ul class ="sub-simple ">
138150 {% for warn_name, warn_text in config['warnings'].items() %}
139- < li > {{ warn_name }}: {{ warn_text }}</ li >
151+ < li > {{ warn_name }}:
152+ {% for line in warn_text %}
153+ {{ line }}< br />
154+ {% endfor %}
155+ </ li >
140156 {% endfor %}
141157 </ ul >
142158 </ li >
143159 {% endif %}
144160 </ ul >
145161
146162 {% if config['motion_report'] %}
147- < h3 class ="muted "> Subject {{ config['subj_id'] }} Motion Report</ h3 >
163+ < h3 class ="muted "> Motion Report</ h3 >
148164 < div class ="radio ">
149- < label > < input type ="radio " name ="inlineRadio " id ="inlineRating1 " value ="1 " onclick ="qc_update({{ config['subj_id '] }}, 'motion', this.value) "> Good </ label >
150- < label > < input type ="radio " name ="inlineRadio " id ="inlineRating0 " value ="0 " onclick ="qc_update({{ config['subj_id '] }}, 'motion', this.value) "> Bad</ label >
165+ < label > < input type ="radio " name ="inlineRadio " id ="inlineRating1 " value ="1 " onclick ="qc_update({{ config['report_num '] }}, 'motion', this.value) "> Good </ label >
166+ < label > < input type ="radio " name ="inlineRadio " id ="inlineRating0 " value ="0 " onclick ="qc_update({{ config['report_num '] }}, 'motion', this.value) "> Bad</ label >
151167 </ div >
152168 < div class ="embeded-report ">
153169 {{ config['motion_report'] }}
@@ -158,15 +174,15 @@ <h3 class="muted">Subject {{ config['subj_id'] }} Motion Report</h3>
158174 {% endif %}
159175
160176 {% if config['volreg_report_anat'] %}
161- < h3 > Subject {{ config['subj_id'] }} Registration</ h3 >
177+ < h3 > Registration</ h3 >
162178 < div class ="radio ">
163- < label > < input type ="radio " name ="inlineRadio " id ="inlineRating1 " value ="1 " onclick ="qc_update({{ config['subj_id '] }}, 'registration', this.value) "> Good </ label >
164- < label > < input type ="radio " name ="inlineRadio " id ="inlineRating0 " value ="0 " onclick ="qc_update({{ config['subj_id '] }}, 'registration', this.value) "> Bad</ label >
179+ < label > < input type ="radio " name ="inlineRadio " id ="inlineRating1 " value ="1 " onclick ="qc_update({{ config['report_num '] }}, 'registration', this.value) "> Good </ label >
180+ < label > < input type ="radio " name ="inlineRadio " id ="inlineRating0 " value ="0 " onclick ="qc_update({{ config['report_num '] }}, 'registration', this.value) "> Bad</ label >
165181 </ div >
166182 < div class ="embeded-report ">
167183 < div >
168- < canvas id ="3Dviewer_{{ config['subj_id '] }} ", onclick ="change_{{ config['subj_id '] }}(); " resize >
169- < img id ="spriteImg_{{ config['subj_id '] }} " class ="hidden " src ="data:image/jpeg;base64,{{ config['volreg_report_anat'] }} ">
184+ < canvas id ="3Dviewer_{{ config['report_num '] }} ", onclick ="change_{{ config['report_num '] }}(); " resize >
185+ < img id ="spriteImg_{{ config['report_num '] }} " class ="hidden " src ="data:image/jpeg;base64,{{ config['volreg_report_anat'] }} ">
170186 </ div >
171187 </ div >
172188 < script type ="text/javascript ">
@@ -182,29 +198,29 @@ <h3>Subject {{ config['subj_id'] }} Registration</h3>
182198
183199 < script type ="text/javascript ">
184200
185- var image_tracker_ { { config [ 'subj_id ' ] } } = 'anat' ;
186- var anat_src_ { { config [ 'subj_id ' ] } } = null
201+ var image_tracker_ { { config [ 'report_num ' ] } } = 'anat' ;
202+ var anat_src_ { { config [ 'report_num ' ] } } = null
187203
188- function change_ { { config [ 'subj_id ' ] } } ( ) {
189- var image = document . getElementById ( "spriteImg_{{ config['subj_id '] }}" ) ;
204+ function change_ { { config [ 'report_num ' ] } } ( ) {
205+ var image = document . getElementById ( "spriteImg_{{ config['report_num '] }}" ) ;
190206
191- if ( image_tracker_ { { config [ 'subj_id ' ] } } = = 'anat' ) {
192- if ( anat_src_ { { config [ 'subj_id ' ] } } ) {
207+ if ( image_tracker_ { { config [ 'report_num ' ] } } = = 'anat' ) {
208+ if ( anat_src_ { { config [ 'report_num ' ] } } ) {
193209 } else {
194- anat_src_ { { config [ 'subj_id ' ] } } = image . src
210+ anat_src_ { { config [ 'report_num ' ] } } = image . src
195211 }
196212 image . src = "data:image/jpeg;base64,{{ config['volreg_report_func'] }}" ;
197- image_tracker_ { { config [ 'subj_id ' ] } } = 'func' ;
213+ image_tracker_ { { config [ 'report_num ' ] } } = 'func' ;
198214 } else {
199- image . src = anat_src_ { { config [ 'subj_id ' ] } } ;
200- image_tracker_ { { config [ 'subj_id ' ] } } = 'anat' ;
215+ image . src = anat_src_ { { config [ 'report_num ' ] } } ;
216+ image_tracker_ { { config [ 'report_num ' ] } } = 'anat' ;
201217 }
202218 }
203219
204220 $ ( window ) . load ( function ( ) {
205221 var brain = brainsprite ( {
206- canvas : "3Dviewer_{{ config['subj_id '] }}" ,
207- sprite : "spriteImg_{{ config['subj_id '] }}" ,
222+ canvas : "3Dviewer_{{ config['report_num '] }}" ,
223+ sprite : "spriteImg_{{ config['report_num '] }}" ,
208224 nbSlice : { 'Y' :{ { config [ 'anat_ap_ext' ] } } , 'Z' :{ { config [ 'anat_is_ext' ] } } }
209225 } ) ;
210226 } ) ;
0 commit comments