Skip to content

Commit

Permalink
raise exception if no atropos prob images found
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed Feb 26, 2024
1 parent c8b8039 commit 00f69e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ants/segmentation/atropos.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ def atropos(a, x, i='Kmeans[3]', m='[0.2,1x1]', c='[5,0]',
warnings.warn('ERROR: Non-zero exit status!')

probsout = glob.glob(os.path.join(tdir,'*'+searchpattern))

if len(probsout) == 0:
raise Exception('No atropos output probability images found.')

probsout.sort()
probimgs = [iio2.image_read(probsout[0])]
for idx in range(1, len(probsout)):
Expand Down

0 comments on commit 00f69e9

Please sign in to comment.