This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
neuroimagen:mri_deface [2020/08/04 10:58] 127.0.0.1 external edit |
neuroimagen:mri_deface [2020/12/03 15:55] (current) osotolongo |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== mri deface ====== | ====== mri deface ====== | ||
+ | |||
+ | ===== Prueba ===== | ||
https:// | https:// | ||
Line 52: | Line 54: | ||
{{ : | {{ : | ||
+ | |||
+ | ===== en paralelo ===== | ||
+ | |||
+ | <code python deface.py> | ||
+ | # | ||
+ | |||
+ | import subprocess | ||
+ | import re | ||
+ | import os | ||
+ | from slurm import send_sbatch | ||
+ | |||
+ | defacer = '/ | ||
+ | def_dir = '/ | ||
+ | tal_gca = def_dir+' | ||
+ | face_gca = def_dir+' | ||
+ | finder = 'find / | ||
+ | outdir = '/ | ||
+ | time = ' | ||
+ | cpus = 4 | ||
+ | wdir = os.environ.get(' | ||
+ | |||
+ | if not os.path.isdir(outdir): | ||
+ | ifiles = subprocess.check_output(' | ||
+ | for ifile in ifiles: | ||
+ | if os.path.exists(ifile): | ||
+ | cdata = {' | ||
+ | ofile = re.sub(' | ||
+ | dst_dir = os.path.dirname(ofile) | ||
+ | if not os.path.isdir(dst_dir): | ||
+ | order1 = defacer+' | ||
+ | jfile = re.sub(' | ||
+ | ojfile = re.sub(' | ||
+ | order2 = 'cp ' | ||
+ | name = os.path.basename(ifile).split(' | ||
+ | cdata[' | ||
+ | cdata[' | ||
+ | cdata[' | ||
+ | send_sbatch(cdata) | ||
+ | mdata = {' | ||
+ | send_sbatch(mdata) | ||
+ | </ | ||
+ |