Skip to content

Commit 22584eb

Browse files
committed
examples/python/Vision_files_preprocess.py: add View offset to remove any rotational shifts between Siemens and STIR Vision reconstructions
1 parent ae0ec6c commit 22584eb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/python/Vision_files_preprocess.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ def process_files(prompts_header_filename,
149149
## the crystal depth of interaction (DOI) from 7mm to 10mm to minimize the differences.
150150
if apply_DOI_adaption: DOI_adaption(prompts_from_e7, 10)
151151

152+
###################### View Offset ADAPTION ############################
153+
154+
view_offset_adaption(prompts_from_e7, 0.0324)
155+
152156
## write to file so you can use it later
153157
prompts_from_e7.write_to_file(os.path.join(STIR_output_folder, prompts_filename_STIR_corr_DOI))
154158

@@ -484,6 +488,15 @@ def DOI_adaption(projdata, DOI_new):
484488
DOI = proj_info.get_scanner().get_average_depth_of_interaction()
485489
print('New Depth of interaction:', DOI)
486490

491+
def view_offset_adaption(projdata, view_offset):
492+
proj_info = projdata.get_proj_data_info()
493+
494+
VO = proj_info.get_scanner().get_intrinsic_azimuthal_tilt()
495+
print('Current view offset (rad):', VO)
496+
proj_info.get_scanner().set_intrinsic_azimuthal_tilt(view_offset)
497+
VO = proj_info.get_scanner().get_average_depth_of_interaction()
498+
print('New Depth of interaction(rad):', VO)
499+
487500
def check_if_compressed(header_filename):
488501
with open(header_filename) as f:
489502
data = f.read()

0 commit comments

Comments
 (0)