Skip to content

Commit

Permalink
Support lh. and rh. prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennings Zhang authored and Jennings Zhang committed May 3, 2023
1 parent 32d1cf8 commit 12c3f8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ep_surface_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from chris_plugin import chris_plugin, PathMapper
from loguru import logger

__version__ = '0.5.0'
__version__ = '0.5.1'


DISPLAY_TITLE = r"""
Expand Down Expand Up @@ -133,7 +133,12 @@ def run_surface_fit(grid: Path, output_surf: Path, params: list[str]) -> bool:


def locate_surface_for(mask: Path) -> Optional[Path]:
glob = mask.parent.glob('*.obj')
if any(mask.name.startswith(p) for p in ('lh.', 'rh.')):
prefix = mask.name[:3]
else:
prefix = ''

glob = mask.parent.glob(f'{prefix}*.obj')
first = next(glob, None)
second = next(glob, None)
if second is not None:
Expand Down

0 comments on commit 12c3f8d

Please sign in to comment.