def static_build(self): fssubjdir = self.fs with local.tempdir() as tmpdir, BRAINSTools.env( self.BRAINSTools_hash): tmpoutdir = tmpdir / 'fsindwi' dwi = tmpdir / 'dwi.nrrd' dwimask = tmpdir / 'dwimask.nrrd' fs = tmpdir / 'fs' t2 = tmpdir / 't2.nrrd' t1 = tmpdir / 't1.nrrd' t1mask = tmpdir / 't1mask.nrrd' t2mask = tmpdir / 't2mask.nrrd' fssubjdir.copy(fs) dwiconvert_py('-i', self.dwi, '-o', dwi) convertImage(self.dwimask, dwimask, self.BRAINSTools_hash) convertImage(self.t2, t2, self.BRAINSTools_hash) convertImage(self.t1, t1, self.BRAINSTools_hash) convertImage(self.t2mask, t2mask, self.BRAINSTools_hash) convertImage(self.t1mask, t1mask, self.BRAINSTools_hash) script = local['pnlscripts/old/fs2dwi_T2.sh'] script['--fsdir', fs, '--dwi', dwi, '--dwimask', dwimask, '--t2', t2, '--t2mask', t2mask, '--t1', t1, '--t1mask', t1mask, '-o', tmpoutdir] & FG convertImage(tmpoutdir / 'wmparc-in-bse.nrrd', self.output(), self.BRAINSTools_hash)
def static_build(self): fssubjdir = self.fs with local.tempdir() as tmpdir, BRAINSTools.env(self.BRAINSTools_hash): tmpoutdir = tmpdir / 'fsindwi' tmpdwi = tmpdir / 'dwi.nrrd' tmpdwimask = tmpdir / 'dwimask.nrrd' dwiconvert_py('-i', self.dwi, '-o', tmpdwi) convertImage(self.dwimask, tmpdwimask, self.BRAINSTools_hash) fs2dwi_py['-f', fssubjdir, '-t', tmpdwi, '-m', tmpdwimask, '-o', tmpoutdir, 'direct'] & FG local.path(tmpoutdir / 'wmparcInDwi1mm.nii.gz').copy(self.output())
def static_build(self): with BRAINSTools.env(self.BRAINSTools_hash), local.tempdir() as tmpdir: tmpdir = local.path(tmpdir) tmpdwi = tmpdir / 'dwi.nrrd' tmpdwimask = tmpdir / 'dwimask.nrrd' dwiconvert_py('-i', self.dwi, '-o', tmpdwi) convertImage(self.dwimask, tmpdwimask, self.BRAINSTools_hash) params = ['--dwiFile', tmpdwi, '--maskFile', tmpdwimask, '--seedsFile', tmpdwimask, '--recordTensors', '--tracts', self.output()] + list(self.ukfparams) ukfpath = soft.UKFTractography.get_path(self.UKFTractography_hash) log.info(' Found UKF at {}'.format(ukfpath)) ukfbin = local[ukfpath] # ukfbin(*params) ukfbin.bound_command(*params) & FG