MathOnco / valis

Virtual Alignment of pathoLogy Image Series
https://valis.readthedocs.io/en/latest/
MIT License
119 stars 29 forks source link

UnboundLocalError: cannot access local variable 'slide_dimensions' where it is not associated with a value #146

Closed SinaSOX closed 2 months ago

SinaSOX commented 2 months ago

this is my code:

from valis import registration slide_src_dir = "./slides" results_dst_dir = "./res" registered_slide_dst_dir = "./out" reference_slide = "0_HE_train.tif"

Create a Valis object and use it to register the slides in slide_src_dir

registrar = registration.Valis(slide_src_dir, results_dst_dir, reference_img_f=reference_slide) rigid_registrar, non_rigid_registrar, error_df = registrar.register()

registration.kill_jvm()

However, I encountered this error:

UnboundLocalError: cannot access local variable 'slide_dimensions' where it is not associated with a value

If you have any ideas on how to resolve this issue, I would be happy to hear them.

SinaSOX commented 2 months ago

I realized that this issue is occurring only in your Python package (valis-wsi), while the code in your GitHub repository (valis folder in the main branch) is functioning correctly.