Skip to content

Commit

Permalink
print out fslselectvols command
Browse files Browse the repository at this point in the history
  • Loading branch information
danielasay committed Jun 25, 2024
1 parent f27c951 commit d363cec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions dwiqc/tasks/prequal.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create_bfiles(self, inputs_dir):

# truncate down the fmap files to include just b0 volumes

truncated_fmaps = truncate_fmaps(fmap_files)
truncated_fmaps = self.truncate_fmaps(fmap_files)

# get the basename of the file and then remove the extension
for fmap in truncated_fmaps:
Expand Down Expand Up @@ -124,21 +124,23 @@ def truncate_fmaps(self, fmap_files):
"""
method that will extract all the b0 volumes from the scans designated as BIDS fieldmaps
"""
get_fsl_sif()
self.get_fsl_sif()

for fmap in fmap_files:
print(fmap)
sys.exit()
fmap_basename = os.path.basename(fmap)
fmap_dir = os.path.dirname(fmap)
print(fmap_dir)
cmd = [
'singularity',
'exec',
'--pwd', preproc_dir,
'--pwd', fmap_dir,
self._fsl_sif,
'/APPS/fsl/bin/fslselectvols',
'-i', 'dwmri.nii.gz',
'-o', 'b0_volume',
'-o', fmap_basename,
'--vols=0'
]
logger.info(f'running {json.dumps(cmd, indent=2)} on {fmap}')


def get_fsl_sif(self):
Expand Down

0 comments on commit d363cec

Please sign in to comment.