This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
neuroimagen:mri_deface [2020/05/14 08:32] osotolongo created |
neuroimagen:mri_deface [2020/12/03 15:55] (current) osotolongo |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== mri deface ====== | ====== mri deface ====== | ||
+ | |||
+ | ===== Prueba ===== | ||
https:// | https:// | ||
Line 38: | Line 40: | ||
.... | .... | ||
.... | .... | ||
+ | anonymizing volume... | ||
+ | using wm = 107.0, gm = 93.4 | ||
+ | wm covar: | ||
+ | | ||
+ | gm covar: | ||
+ | | ||
+ | ......................... | ||
+ | 1058443 face voxels erased, 250588 ambiguous voxels retained | ||
+ | resampling to original coordinate system... | ||
+ | writing anonymized volume to deface/ | ||
+ | deidentification took 2 minutes and 54 seconds. | ||
+ | </ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== 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) | ||
</ | </ | ||