Skip to content

Commit

Permalink
earlier PETRIC_SKIP_DATA
Browse files Browse the repository at this point in the history
- fixes #117
  • Loading branch information
casperdcl committed Oct 28, 2024
1 parent ad22c1f commit 67f4532
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions petric.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_image(fname):
'Mediso_NEMA_IQ_lowcounts': {'transverse_slice': 22, 'coronal_slice': 74, 'sagittal_slice': 70},
'GE_DMI4_NEMA_IQ': {'transverse_slice': 27, 'coronal_slice': 109, 'sagittal_slice': 78}}

if SRCDIR.is_dir():
if SRCDIR.is_dir() and not os.getenv("PETRIC_SKIP_DATA", False):
# create list of existing data
# NB: `MetricsWithTimeout` initialises `SaveIters` which creates `outdir`
data_dirs_metrics = [
Expand Down Expand Up @@ -335,7 +335,7 @@ def get_image(fname):
if __name__ != "__main__":
# load up first data-set for people to play with
srcdir, outdir, metrics = data_dirs_metrics[0]
if srcdir is None or os.getenv("PETRIC_SKIP_DATA", False):
if srcdir is None:
data = None
else:
data = get_data(srcdir=srcdir, outdir=outdir)
Expand Down

0 comments on commit 67f4532

Please sign in to comment.