@@ -61,7 +61,7 @@ def generate_3d_renders(defaced_img, render_outdir):
6161 for idx , rot in enumerate (rotations ):
6262 yaw , pitch , roll = rot [0 ], rot [1 ], rot [2 ]
6363 outfile = render_outdir .joinpath ('defaced_render_' + str (idx ) + '.png' )
64- fsleyes_render_cmd = f"fsleyes render --scene 3d -rot { yaw } { pitch } { roll } --outfile { outfile } { defaced_img } -dr 20 250 -in spline -bf 0.3 -r 100 -ns 500"
64+ fsleyes_render_cmd = f"export TMP_DISPLAY=`echo $DISPLAY`; unset DISPLAY; module unload fsl; fsleyes render --scene 3d -rot { yaw } { pitch } { roll } --outfile { outfile } { defaced_img } -dr 20 250 -in spline -bf 0.3 -r 100 -ns 500; export DISPLAY=`echo $TMP_DISPLAY` "
6565 print (fsleyes_render_cmd )
6666 run_command (fsleyes_render_cmd )
6767 print (f"Has the render been created? { outfile .exists ()} " )
@@ -135,7 +135,7 @@ def main():
135135 f .write ('\n ' .join (afni_refacer_failures )) # TODO Not very useful when running the pipeline in parallel
136136
137137 # unload fsl module and use fsleyes installed on conda env
138- run_command ( f"export TMP_DISPLAY=`echo $DISPLAY`; unset DISPLAY; module unload fsl" )
138+ # os.environ[' TMP_DISPLAY'] =
139139
140140 # prep for visual inspection using visualqc deface
141141 print (f"Preparing for QC by visual inspection...\n " )
@@ -144,7 +144,6 @@ def main():
144144 print (f"Run the following command to start a VisualQC Deface session:\n \t { vqcdeface_cmd } \n " )
145145 with open (output / 'QC_prep' / 'defacing_qc_cmd' , 'w' ) as f :
146146 f .write (vqcdeface_cmd + '\n ' )
147- run_command (f"export DISPLAY=`echo $TMP_DISPLAY`" )
148147
149148
150149if __name__ == "__main__" :
0 commit comments