Skip to content

Commit

Permalink
5ttgen freesurfer: Fix testing VTK file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Lestropie committed Mar 28, 2022
1 parent 2f4e2b3 commit eeab681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mrtrix3/_5ttgen/freesurfer.py
Expand Up @@ -68,7 +68,7 @@ def get_inputs(): #pylint: disable=unused-variable
if len(candidate_files) > 1:
raise MRtrixError('Multiple candidate VTK files for structure "' + first_sgm + '" in directory "' + first_path + '"')
vtk_filelist.append(candidate_files[0])
if not all(os.path.basename(vtk_file.split('-')[0]) == os.path.basename(vtk_filelist[0]).split('-')[0] for vtk_file in vtk_filelist[1:]):
if not all(os.path.basename(vtk_file).split('-')[0] == os.path.basename(vtk_filelist[0]).split('-')[0] for vtk_file in vtk_filelist[1:]):
raise MRtrixError('VTK files in FIRST directory "' + first_path + '" do not all possess same prefix')
# TODO Also need a template image in order to convert the VTKs
firstseg_image = glob.glob(os.path.join(first_path, '*_all_*_firstseg.nii*'))
Expand Down

0 comments on commit eeab681

Please sign in to comment.