Skip to content

Commit

Permalink
added optional masking for voi native processing
Browse files Browse the repository at this point in the history
  • Loading branch information
pjmark committed Nov 3, 2023
1 parent 6bc2442 commit 9edc650
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions amypet/ur_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def preproc_ur(pet_path, frames=None, outpath=None, fname=None, com_correction=T
# ========================================================================================


def voi_process(petpth, lblpth, t1wpth, voi_dct=None, ref_voi=None, frames=None, fname=None,
def voi_process(petpth, lblpth, t1wpth, voi_dct=None, ref_voi=None, voi_mask=None, frames=None, fname=None,

Check failure on line 169 in amypet/ur_tools.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] amypet/ur_tools.py#L169

E501 line too long (107 > 99 characters)
Raw output
amypet/ur_tools.py:169:100: E501 line too long (107 > 99 characters)
t1_bias_corr=True, outpath=None, output_masks=True, save_voi_masks=False,
qc_plot=True, reg_fwhm_pet=0, reg_fwhm_mri=0, reg_costfun='nmi', reg_fresh=True,
com_correction=True):
Expand All @@ -180,7 +180,9 @@ def voi_process(petpth, lblpth, t1wpth, voi_dct=None, ref_voi=None, frames=None,
- t1wpth: path to the T1w MRI NIfTI image for registration
- voi_dct: dictionary of VOI definitions
- ref_voi: if given and in `voi_dct` it is used as reference region
for calculating UR
for calculating UR;
- voi_mask: an additional mask on top of VOIs, e.g., to refine the GM
or to get rid of lesions;
- frames: select the frames if multi-frame image given;
by default selects all frames
- fname: the core file name for resulting images
Expand Down Expand Up @@ -296,8 +298,9 @@ def voi_process(petpth, lblpth, t1wpth, voi_dct=None, ref_voi=None, frames=None,
mask_dir = trmdir / 'masks'
else:
mask_dir = None
voival = extract_vois(trmout['im'], plbl_dct, voi_dct, outpath=mask_dir,
output_masks=output_masks)
voival = extract_vois(trmout['im'], plbl_dct, voi_dct,
atlas_mask=voi_mask,

Check failure on line 302 in amypet/ur_tools.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] amypet/ur_tools.py#L302

E128 continuation line under-indented for visual indent
Raw output
amypet/ur_tools.py:302:17: E128 continuation line under-indented for visual indent
outpath=mask_dir, output_masks=output_masks)

Check failure on line 303 in amypet/ur_tools.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] amypet/ur_tools.py#L303

E128 continuation line under-indented for visual indent
Raw output
amypet/ur_tools.py:303:17: E128 continuation line under-indented for visual indent

# > calculate UR if reference regions is given
urtxt = None
Expand Down

0 comments on commit 9edc650

Please sign in to comment.