petpal 0.5.5__py3-none-any.whl → 0.5.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- petpal/cli/cli_pib_processing.py +2 -3
- petpal/cli/cli_preproc.py +119 -93
- petpal/cli/cli_vat_processing.py +3 -2
- petpal/pipelines/pipelines.py +0 -3
- petpal/pipelines/preproc_steps.py +8 -7
- petpal/preproc/__init__.py +2 -0
- petpal/preproc/image_operations_4d.py +13 -177
- petpal/preproc/motion_corr.py +31 -112
- petpal/preproc/motion_target.py +90 -0
- petpal/preproc/regional_tac_extraction.py +3 -3
- petpal/preproc/register.py +4 -11
- petpal/preproc/segmentation_tools.py +5 -5
- petpal/preproc/standard_uptake_value.py +159 -0
- petpal/utils/stats.py +21 -0
- petpal/utils/useful_functions.py +106 -5
- {petpal-0.5.5.dist-info → petpal-0.5.7.dist-info}/METADATA +13 -4
- {petpal-0.5.5.dist-info → petpal-0.5.7.dist-info}/RECORD +20 -18
- {petpal-0.5.5.dist-info → petpal-0.5.7.dist-info}/entry_points.txt +0 -1
- {petpal-0.5.5.dist-info → petpal-0.5.7.dist-info}/WHEEL +0 -0
- {petpal-0.5.5.dist-info → petpal-0.5.7.dist-info}/licenses/LICENSE +0 -0
petpal/cli/cli_pib_processing.py
CHANGED
|
@@ -94,12 +94,11 @@ def main():
|
|
|
94
94
|
|
|
95
95
|
# Configure steps for kinetic modeling container
|
|
96
96
|
suvr_step = ImageToImageStep(name='suvr',
|
|
97
|
-
function=petpal.preproc.
|
|
97
|
+
function=petpal.preproc.standard_uptake_value.suvr,
|
|
98
98
|
input_image_path='',
|
|
99
99
|
output_image_path='',
|
|
100
100
|
ref_region=ref_region_label,
|
|
101
|
-
segmentation_image_path=seg_path
|
|
102
|
-
verbose=False)
|
|
101
|
+
segmentation_image_path=seg_path)
|
|
103
102
|
|
|
104
103
|
# Add steps to kinetic modeling container
|
|
105
104
|
kinetic_modeling_container.add_step(step=suvr_step)
|
petpal/cli/cli_preproc.py
CHANGED
|
@@ -33,7 +33,7 @@ Examples:
|
|
|
33
33
|
|
|
34
34
|
.. code-block:: bash
|
|
35
35
|
|
|
36
|
-
petpal-preproc register-pet -i /path/to/input_img.nii.gz -o petpal_reg.nii.gz --motion-target 0 600 --anatomical /path/to/anat.nii.gz
|
|
36
|
+
petpal-preproc register-pet -i /path/to/input_img.nii.gz -o petpal_reg.nii.gz --motion-target 0 600 --anatomical /path/to/anat.nii.gz
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
* Write regional tacs:
|
|
@@ -54,7 +54,7 @@ Examples:
|
|
|
54
54
|
|
|
55
55
|
.. code-block:: bash
|
|
56
56
|
|
|
57
|
-
petpal-preproc weighted-series-sum -i /path/to/input_img.nii.gz -o petpal_wss.nii.gz --
|
|
57
|
+
petpal-preproc weighted-series-sum -i /path/to/input_img.nii.gz -o petpal_wss.nii.gz --start-time 1800 --end-time 7200
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
* SUVR Image:
|
|
@@ -95,8 +95,11 @@ import argparse
|
|
|
95
95
|
import ants
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
from ..
|
|
99
|
-
|
|
98
|
+
from ..preproc import (image_operations_4d,
|
|
99
|
+
motion_corr,
|
|
100
|
+
register,
|
|
101
|
+
regional_tac_extraction,
|
|
102
|
+
standard_uptake_value)
|
|
100
103
|
|
|
101
104
|
|
|
102
105
|
_PREPROC_EXAMPLES_ = r"""
|
|
@@ -106,13 +109,13 @@ Examples:
|
|
|
106
109
|
- Windowed moco:
|
|
107
110
|
petpal-preproc windowed-motion-corr -i /path/to/input_img.nii.gz -o petpal_moco.nii.gz --window-size 120 --transform-type QuickRigid
|
|
108
111
|
- Register to anatomical:
|
|
109
|
-
petpal-preproc register-pet -i /path/to/input_img.nii.gz -o petpal_reg.nii.gz --motion-target 0 600 --anatomical /path/to/anat.nii.gz
|
|
112
|
+
petpal-preproc register-pet -i /path/to/input_img.nii.gz -o petpal_reg.nii.gz --motion-target 0 600 --anatomical /path/to/anat.nii.gz
|
|
110
113
|
- Write regional tacs:
|
|
111
114
|
petpal-preproc write-tacs -i /path/to/input_img.nii.gz -p sub-001 -o /tmp/petpal_tacs -s /path/to/segmentation.nii.gz -l perlcyno -x
|
|
112
115
|
- Write tacs, deprecated:
|
|
113
116
|
petpal-preproc write-tacs-old -i /path/to/input_img.nii.gz -o /tmp/petpal_tacs --segmentation /path/to/segmentation.nii.gz --label-map-path /path/to/dseg.tsv
|
|
114
117
|
- Half life weighted sum of series:
|
|
115
|
-
petpal-preproc weighted-series-sum -i /path/to/input_img.nii.gz -o petpal_wss.nii.gz --
|
|
118
|
+
petpal-preproc weighted-series-sum -i /path/to/input_img.nii.gz -o petpal_wss.nii.gz --start-time 1800 --end-time 7200
|
|
116
119
|
- SUVR:
|
|
117
120
|
petpal-preproc suvr -i /path/to/input_img.nii.gz -o petpal_suvr.nii.gz --segmentation /path/to/segmentation.nii.gz --ref-region 1
|
|
118
121
|
- Gauss blur:
|
|
@@ -121,6 +124,8 @@ Examples:
|
|
|
121
124
|
petpal-preproc rescale-image -i /path/to/input_img.nii.gz -o petpal_rescale.nii.gz --scale-factor 1000
|
|
122
125
|
- Warp to atlas:
|
|
123
126
|
petpal-preproc warp-pet-atlas -i /path/to/input_img.nii.gz -o petpal_reg-atlas.nii.gz --anatomical /path/to/anat.nii.gz --reference-atlas /path/to/atlas.nii.gz
|
|
127
|
+
- SUV:
|
|
128
|
+
petpal-preproc suv -i /path/to/input_img.nii.gz -o petpal_suv.nii.gz --weight 75 --dose 250 --start-time 1200 --end-time 3600
|
|
124
129
|
"""
|
|
125
130
|
|
|
126
131
|
|
|
@@ -159,7 +164,7 @@ def _add_common_args(parser: argparse.ArgumentParser) -> None:
|
|
|
159
164
|
"""
|
|
160
165
|
parser.add_argument('-o',
|
|
161
166
|
'--out-img',
|
|
162
|
-
default='
|
|
167
|
+
default='petpal_preproc_output.nii.gz',
|
|
163
168
|
help='Output image filename')
|
|
164
169
|
parser.add_argument('-i', '--input-img',required=True,help='Path to input image.',type=str)
|
|
165
170
|
|
|
@@ -183,10 +188,6 @@ def _generate_args() -> argparse.ArgumentParser:
|
|
|
183
188
|
parser_wss = subparsers.add_parser('weighted-series-sum',
|
|
184
189
|
help='Half-life weighted sum of 4D PET series.')
|
|
185
190
|
_add_common_args(parser_wss)
|
|
186
|
-
parser_wss.add_argument('--half-life',
|
|
187
|
-
required=True,
|
|
188
|
-
help='Half life of radioisotope in seconds.',
|
|
189
|
-
type=float)
|
|
190
191
|
parser_wss.add_argument('--start-time',
|
|
191
192
|
required=False,
|
|
192
193
|
help='Start time of sum in seconds.',
|
|
@@ -215,9 +216,6 @@ def _generate_args() -> argparse.ArgumentParser:
|
|
|
215
216
|
required=True)
|
|
216
217
|
parser_moco.add_argument('--transform-type', required=False,default='Rigid',
|
|
217
218
|
help='Transformation type (Rigid or Affine).',type=str)
|
|
218
|
-
parser_moco.add_argument('--half-life', required=False,
|
|
219
|
-
help='Half life of radioisotope in seconds.'
|
|
220
|
-
'Required for some motion targets.',type=float)
|
|
221
219
|
|
|
222
220
|
parser_tac = subparsers.add_parser('write-tacs',
|
|
223
221
|
help='Write ROI TACs from 4D PET using segmentation masks.')
|
|
@@ -279,9 +277,19 @@ def _generate_args() -> argparse.ArgumentParser:
|
|
|
279
277
|
help='Path to segmentation image in anatomical space.')
|
|
280
278
|
parser_suvr.add_argument('-r',
|
|
281
279
|
'--ref-region',
|
|
282
|
-
help='Reference region to normalize SUVR to.'
|
|
280
|
+
help='Reference region to normalize SUVR to. List multiple regions to '
|
|
281
|
+
'combine as one reference.',
|
|
283
282
|
required=True,
|
|
284
|
-
type=int
|
|
283
|
+
type=int,
|
|
284
|
+
nargs='+')
|
|
285
|
+
parser_suvr.add_argument('--start-time',
|
|
286
|
+
required=True,
|
|
287
|
+
help='Start time for SUVR calculation in seconds from scan start',
|
|
288
|
+
type=float)
|
|
289
|
+
parser_suvr.add_argument('--end-time',
|
|
290
|
+
required=True,
|
|
291
|
+
help='End time for SUVR calculation in seconds from scan start',
|
|
292
|
+
type=float)
|
|
285
293
|
|
|
286
294
|
parser_blur = subparsers.add_parser('gauss-blur',help='Perform 3D gaussian blurring.')
|
|
287
295
|
_add_common_args(parser_blur)
|
|
@@ -328,9 +336,27 @@ def _generate_args() -> argparse.ArgumentParser:
|
|
|
328
336
|
help="Motion target option. Can be an image path, "
|
|
329
337
|
"'weighted_series_sum' or a tuple (i.e. '-t 0 600' for first "
|
|
330
338
|
"ten minutes).")
|
|
331
|
-
parser_reg.add_argument('-l', '--half-life', help='Half life of radioisotope in seconds.',
|
|
332
|
-
type=float)
|
|
333
339
|
|
|
340
|
+
parser_suv = subparsers.add_parser('suv',help='Standard Uptake Value (SUV) calculation')
|
|
341
|
+
_add_common_args(parser_suv)
|
|
342
|
+
parser_suv.add_argument('-w',
|
|
343
|
+
'--weight',
|
|
344
|
+
required=True,
|
|
345
|
+
help='Weight of the participant in kg',
|
|
346
|
+
type=float)
|
|
347
|
+
parser_suv.add_argument('-d',
|
|
348
|
+
'--dose',
|
|
349
|
+
required=True,
|
|
350
|
+
help='Dose of radiotracer injected in MBq',
|
|
351
|
+
type=float)
|
|
352
|
+
parser_suv.add_argument('--start-time',
|
|
353
|
+
required=True,
|
|
354
|
+
help='Start time for SUV calculation in seconds from scan start',
|
|
355
|
+
type=float)
|
|
356
|
+
parser_suv.add_argument('--end-time',
|
|
357
|
+
required=True,
|
|
358
|
+
help='End time for SUV calculation in seconds from scan start',
|
|
359
|
+
type=float)
|
|
334
360
|
return parser
|
|
335
361
|
|
|
336
362
|
|
|
@@ -345,89 +371,89 @@ def main():
|
|
|
345
371
|
preproc_parser.print_help()
|
|
346
372
|
raise SystemExit('Exiting without command')
|
|
347
373
|
|
|
348
|
-
if
|
|
349
|
-
|
|
374
|
+
if 'motion_target' in dir(args):
|
|
375
|
+
if len(args.motion_target)==1:
|
|
376
|
+
motion_target = args.motion_target[0]
|
|
377
|
+
else:
|
|
378
|
+
motion_target = args.motion_target
|
|
350
379
|
else:
|
|
351
|
-
motion_target =
|
|
380
|
+
motion_target = None
|
|
352
381
|
|
|
353
382
|
command = str(args.command).replace('-','_')
|
|
354
383
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
384
|
+
match command:
|
|
385
|
+
case 'weighted_series_sum':
|
|
386
|
+
standard_uptake_value.weighted_sum_for_suv(input_image_path=args.input_img,
|
|
387
|
+
output_image_path=args.out_img,
|
|
388
|
+
start_time=args.start_time,
|
|
389
|
+
end_time=args.end_time)
|
|
390
|
+
case 'auto_crop':
|
|
391
|
+
image_operations_4d.SimpleAutoImageCropper(input_image_path=args.input_img,
|
|
392
|
+
out_image_path=args.out_img,
|
|
393
|
+
thresh_val=args.thresh_val,
|
|
394
|
+
verbose=True)
|
|
395
|
+
case 'motion_correction':
|
|
396
|
+
motion_corr.motion_corr(input_image_path=args.input_img,
|
|
397
|
+
out_image_path=args.out_img,
|
|
398
|
+
motion_target_option=motion_target,
|
|
399
|
+
verbose=True,
|
|
400
|
+
type_of_transform=args.transform_type)
|
|
401
|
+
case 'register_pet':
|
|
402
|
+
register.register_pet(input_reg_image_path=args.input_img,
|
|
371
403
|
out_image_path=args.out_img,
|
|
404
|
+
reference_image_path=args.anatomical,
|
|
372
405
|
motion_target_option=motion_target,
|
|
373
|
-
verbose=True,
|
|
374
|
-
type_of_transform=args.transform_type,
|
|
375
|
-
half_life=args.half_life)
|
|
376
|
-
if command=='register_pet':
|
|
377
|
-
register.register_pet(input_reg_image_path=args.input_img,
|
|
378
|
-
out_image_path=args.out_img,
|
|
379
|
-
reference_image_path=args.anatomical,
|
|
380
|
-
motion_target_option=motion_target,
|
|
381
|
-
verbose=True,
|
|
382
|
-
half_life=args.half_life)
|
|
383
|
-
|
|
384
|
-
if command=='write_tacs_old':
|
|
385
|
-
regional_tac_extraction.write_tacs(input_image_path=args.input_img,
|
|
386
|
-
out_tac_dir=args.out_tac_dir,
|
|
387
|
-
segmentation_image_path=args.segmentation,
|
|
388
|
-
label_map_path=args.label_map_path,
|
|
389
|
-
verbose=True)
|
|
390
|
-
|
|
391
|
-
if command=='write_tacs':
|
|
392
|
-
tac_obj = regional_tac_extraction.WriteRegionalTacs(input_image_path=args.input_img,
|
|
393
|
-
segmentation_path=args.segmentation,
|
|
394
|
-
label_map=args.label_map)
|
|
395
|
-
tac_obj(out_tac_prefix=args.patid,
|
|
396
|
-
out_tac_dir=args.out_tac_dir,
|
|
397
|
-
one_tsv_per_region=not args.excel)
|
|
398
|
-
|
|
399
|
-
if command=='warp_pet_atlas':
|
|
400
|
-
register.warp_pet_atlas(input_image_path=args.input_img,
|
|
401
|
-
anat_image_path=args.anatomical,
|
|
402
|
-
atlas_image_path=args.reference_atlas,
|
|
403
|
-
out_image_path=args.out_img,
|
|
404
406
|
verbose=True)
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
case 'write_tacs_old':
|
|
408
|
+
regional_tac_extraction.write_tacs(input_image_path=args.input_img,
|
|
409
|
+
out_tac_dir=args.out_tac_dir,
|
|
410
|
+
segmentation_image_path=args.segmentation,
|
|
411
|
+
label_map_path=args.label_map_path,
|
|
412
|
+
verbose=True)
|
|
413
|
+
case 'write_tacs':
|
|
414
|
+
tac_obj = regional_tac_extraction.WriteRegionalTacs(input_image_path=args.input_img,
|
|
415
|
+
segmentation_path=args.segmentation,
|
|
416
|
+
label_map=args.label_map)
|
|
417
|
+
tac_obj(out_tac_prefix=args.patid,
|
|
418
|
+
out_tac_dir=args.out_tac_dir,
|
|
419
|
+
one_tsv_per_region=not args.excel)
|
|
420
|
+
case 'warp_pet_atlas':
|
|
421
|
+
register.warp_pet_to_atlas(input_image_path=args.input_img,
|
|
422
|
+
anat_image_path=args.anatomical,
|
|
423
|
+
atlas_image_path=args.reference_atlas,
|
|
409
424
|
out_image_path=args.out_img,
|
|
410
|
-
verbose=True
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
425
|
+
verbose=True)
|
|
426
|
+
case 'gauss_blur':
|
|
427
|
+
image_operations_4d.gauss_blur(input_image_path=args.input_img,
|
|
428
|
+
blur_size_mm=args.blur_size_mm,
|
|
429
|
+
out_image_path=args.out_img,
|
|
430
|
+
verbose=True,
|
|
431
|
+
use_fwhm=True)
|
|
432
|
+
case 'suvr':
|
|
433
|
+
standard_uptake_value.suvr(input_image_path=args.input_img,
|
|
434
|
+
output_image_path=args.out_img,
|
|
435
|
+
segmentation_image_path=args.segmentation,
|
|
436
|
+
ref_region=args.ref_region,
|
|
437
|
+
start_time=args.start_time,
|
|
438
|
+
end_time=args.end_time)
|
|
439
|
+
case 'windowed_motion_corr':
|
|
440
|
+
motion_corr.windowed_motion_corr_to_target(input_image_path=args.input_img,
|
|
441
|
+
out_image_path=args.out_img,
|
|
442
|
+
motion_target_option=motion_target,
|
|
443
|
+
w_size=args.window_size,
|
|
444
|
+
type_of_transform=args.transform_type)
|
|
445
|
+
case 'rescale_image':
|
|
446
|
+
input_img = ants.image_read(filename=args.input_img)
|
|
447
|
+
out_img = image_operations_4d.rescale_image(input_image=input_img,
|
|
448
|
+
rescale_constant=args.scale_factor)
|
|
449
|
+
ants.image_write(image=out_img, filename=args.out_img)
|
|
450
|
+
case 'suv':
|
|
451
|
+
standard_uptake_value.suv(input_image_path=args.input_img,
|
|
452
|
+
output_image_path=args.out_img,
|
|
453
|
+
start_time=args.start_time,
|
|
454
|
+
end_time=args.end_time,
|
|
455
|
+
weight=args.weight,
|
|
456
|
+
dose=args.dose)
|
|
431
457
|
|
|
432
458
|
if __name__ == "__main__":
|
|
433
459
|
main()
|
petpal/cli/cli_vat_processing.py
CHANGED
|
@@ -7,6 +7,7 @@ from petpal.kinetic_modeling import graphical_analysis,rtm_analysis
|
|
|
7
7
|
from petpal.preproc import image_operations_4d, motion_corr, register, segmentation_tools
|
|
8
8
|
from petpal.preproc import symmetric_geometric_transfer_matrix as sgtm
|
|
9
9
|
import petpal.preproc.regional_tac_extraction
|
|
10
|
+
import petpal.preproc.standard_uptake_value
|
|
10
11
|
from petpal.utils.bids_utils import gen_bids_like_dir_path, gen_bids_like_filename, gen_bids_like_filepath
|
|
11
12
|
from petpal.utils.image_io import km_regional_fits_to_tsv
|
|
12
13
|
from petpal.utils import useful_functions
|
|
@@ -199,13 +200,13 @@ def vat_protocol(subjstring: str,
|
|
|
199
200
|
wss_file_path = vat_bids_filepath(suffix='pet',folder='pet',space='mpr',desc='WSS')
|
|
200
201
|
suvr_file_path = vat_bids_filepath(suffix='pet',folder='pet',space='mpr',desc='SUVR')
|
|
201
202
|
if 'suvr' not in skip:
|
|
202
|
-
useful_functions.weighted_series_sum(
|
|
203
|
+
useful_functions.weighted_series_sum(input_image_path=pet_reg_anat_file,
|
|
203
204
|
half_life=half_life,
|
|
204
205
|
verbose=True,
|
|
205
206
|
start_time=suvr_start,
|
|
206
207
|
end_time=suvr_end,
|
|
207
208
|
out_image_path=wss_file_path)
|
|
208
|
-
|
|
209
|
+
petpal.preproc.standard_uptake_value.suvr(input_image_path=wss_file_path,
|
|
209
210
|
out_image_path=suvr_file_path,
|
|
210
211
|
segmentation_image_path=vat_wm_ref_segmentation_file,
|
|
211
212
|
ref_region=1,
|
petpal/pipelines/pipelines.py
CHANGED
|
@@ -4,7 +4,6 @@ import copy
|
|
|
4
4
|
from typing import Union
|
|
5
5
|
from .steps_base import *
|
|
6
6
|
from .steps_containers import StepsContainer, StepsPipeline
|
|
7
|
-
from ..utils.image_io import get_half_life_from_nifti
|
|
8
7
|
from ..utils.bids_utils import gen_bids_like_dir_path, gen_bids_like_filepath
|
|
9
8
|
|
|
10
9
|
|
|
@@ -805,9 +804,7 @@ class BIDS_Pipeline(BIDSyPathsForPipelines, StepsPipeline):
|
|
|
805
804
|
containers = obj.step_containers
|
|
806
805
|
|
|
807
806
|
containers["preproc"][0].input_image_path = obj.pet_path
|
|
808
|
-
containers["preproc"][1].kwargs['half_life'] = get_half_life_from_nifti(obj.pet_path)
|
|
809
807
|
containers["preproc"][2].kwargs['reference_image_path'] = obj.anat_path
|
|
810
|
-
containers["preproc"][2].kwargs['half_life'] = get_half_life_from_nifti(obj.pet_path)
|
|
811
808
|
containers["preproc"][3].segmentation_label_map_path = obj.seg_table
|
|
812
809
|
containers["preproc"][3].segmentation_image_path = obj.seg_img
|
|
813
810
|
containers["preproc"][4].raw_blood_tac_path = obj.blood_path
|
|
@@ -612,9 +612,12 @@ class ImageToImageStep(FunctionBasedStep):
|
|
|
612
612
|
Returns:
|
|
613
613
|
ImageToImageStep: A new instance for motion correction frames above mean value.
|
|
614
614
|
"""
|
|
615
|
-
defaults = dict(name=name,
|
|
616
|
-
|
|
617
|
-
|
|
615
|
+
defaults = dict(name=name,
|
|
616
|
+
function=motion_corr_frames_above_mean_value,
|
|
617
|
+
input_image_path='',
|
|
618
|
+
output_image_path='',
|
|
619
|
+
motion_target_option='mean_image',
|
|
620
|
+
verbose=verbose)
|
|
618
621
|
override_dict = defaults | overrides
|
|
619
622
|
try:
|
|
620
623
|
return cls(**override_dict)
|
|
@@ -649,7 +652,7 @@ class ImageToImageStep(FunctionBasedStep):
|
|
|
649
652
|
return cls(**defaults)
|
|
650
653
|
|
|
651
654
|
@classmethod
|
|
652
|
-
def default_register_pet_to_t1(cls, name:str = 'register_pet_to_t1', reference_image_path='',
|
|
655
|
+
def default_register_pet_to_t1(cls, name:str = 'register_pet_to_t1', reference_image_path='', verbose=False, **overrides):
|
|
653
656
|
"""
|
|
654
657
|
Creates a default instance for registering PET to T1 image using :func:`register_pet<petpal.preproc.register.register_pet>`.
|
|
655
658
|
All paths are empty-strings.
|
|
@@ -657,8 +660,6 @@ class ImageToImageStep(FunctionBasedStep):
|
|
|
657
660
|
Args:
|
|
658
661
|
name (str): Name of the step. Defaults to 'register_pet_to_t1'
|
|
659
662
|
reference_image_path (str): Path to the reference image.
|
|
660
|
-
half_life (float): Half-life value, in seconds, for the radiotracer. Used to
|
|
661
|
-
generate a weighted_series_sum image.
|
|
662
663
|
verbose (bool): Whether to run in verbose mode.
|
|
663
664
|
**overrides: Override default parameters.
|
|
664
665
|
|
|
@@ -668,7 +669,7 @@ class ImageToImageStep(FunctionBasedStep):
|
|
|
668
669
|
"""
|
|
669
670
|
defaults = dict(name=name, function=register_pet, input_image_path='', output_image_path='',
|
|
670
671
|
reference_image_path=reference_image_path, motion_target_option='weighted_series_sum',
|
|
671
|
-
verbose=verbose
|
|
672
|
+
verbose=verbose)
|
|
672
673
|
override_dict = defaults | overrides
|
|
673
674
|
try:
|
|
674
675
|
return cls(**override_dict)
|
petpal/preproc/__init__.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Tools for preparing PET data for kinetic modeling and visualization"""
|
|
2
|
+
from . import motion_target
|
|
2
3
|
from . import image_operations_4d
|
|
3
4
|
from . import motion_corr
|
|
4
5
|
from . import partial_volume_corrections
|
|
5
6
|
from . import register
|
|
7
|
+
from . import standard_uptake_value
|
|
6
8
|
from . import symmetric_geometric_transfer_matrix
|
|
7
9
|
from . import segmentation_tools
|
|
8
10
|
from . import decay_correction
|