Skip to content

Commit

Permalink
expose data.path
Browse files Browse the repository at this point in the history
- fixes #77
  • Loading branch information
casperdcl committed Jul 31, 2024
1 parent e6adc67 commit e72d5ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions petric.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import logging
import os
from dataclasses import dataclass
from pathlib import Path
from pathlib import Path, PurePath
from time import time
from traceback import print_exc

Expand Down Expand Up @@ -199,6 +199,7 @@ class Dataset:
whole_object_mask: STIR.ImageData | None
background_mask: STIR.ImageData | None
voi_masks: dict[str, STIR.ImageData]
path: PurePath


def get_data(srcdir=".", outdir=OUTDIR, sirf_verbosity=0):
Expand Down Expand Up @@ -236,7 +237,7 @@ def get_image(fname):
for voi in (srcdir / 'PETRIC').glob("VOI_*.hv") if voi.stem[4:] not in ('background', 'whole_object')}

return Dataset(acquired_data, additive_term, mult_factors, OSEM_image, prior, kappa, reference_image,
whole_object_mask, background_mask, voi_masks)
whole_object_mask, background_mask, voi_masks, srcdir.resolve())


if SRCDIR.is_dir():
Expand Down

0 comments on commit e72d5ca

Please sign in to comment.