Skip to content

Commit

Permalink
Merge pull request #80 from SyneRBI/data-path
Browse files Browse the repository at this point in the history
expose data.path
  • Loading branch information
casperdcl authored Jul 31, 2024
2 parents b1dd679 + e72d5ca commit 730325b
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

import numpy as np
Expand Down Expand Up @@ -198,6 +198,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 @@ -235,7 +236,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 730325b

Please sign in to comment.