MathOnco / valis

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

Docker usage generates nonsensical image #158

Closed Justin-Krieg closed 2 months ago

Justin-Krieg commented 2 months ago

Hi Chandler, I hope you’ve been doing well. I’ve got two problems, which I will put in separate issues.

Here I have tried to move from my local install of VALIS to using the docker version. Unfortunately that has made CZI files (version 3.7) that have previously registered well to output a non-sensical RGB output. It seems to be injecting signal at the upper max limit, which I suspect is causing the registration to fail (Note this is occuring on all channels) Screenshot 2024-09-17 162752

Weirdly, zooming in to the highest level reveals the registration has occured well, i'm not sure if its an issue with the way the pyramidal file is being written out. Here is the code i'm using to perform the registration:

img_list = df.columns.tolist()
img_list_path = [os.path.join(slide_src_dir, ls) for ls in img_list]
name_list_Stitched = os.path.join(slide_src_dir, f"{name_list}.ome.tiff")
results_dir = os.path.join (slide_src_dir,"output", name_list, "")

# Run Valis
registrar = registration.Valis(slide_src_dir,  results_dir, img_list = img_list_path, crop="overlap", imgs_ordered=True, series=0, max_image_dim_px=2000, max_processed_image_dim_px=2000, max_non_rigid_registration_dim_px=2000)
rigid_registrar, non_rigid_registrar, error_df = registrar.register()
registrar.register_micro()
registrar.warp_and_merge_slides(name_list_Stitched, channel_name_dict=channel_name_dict_defined, drop_duplicates=True, compression="lzw", Q=85)

Note the variables are just read from a csv file. Futhermore this code has worked previously. I've also attempted removing the max image pixel parameters just in case that was an issue. Similarly i've tried removing the compression entirely just in case it was that. Screenshot 2024-09-17 163937

I am using version 1.0.4 with docker as the dockerfile 1.1.0 is still not working as per github error #139 and have uploaded example images on google drive here.

Thank you in advance, Justin

Justin-Krieg commented 2 months ago

Hi @cdgatenbee As an update, i pulled the new dockerfile pertaining to issue #139 so i could run version 1.1.0 and this version functions correctly. As such i'm not sure this issue is worth pursuing further given that its an older version. However it would be good to update the dockerfile so we can use version 1.1.0 with ease.

Thanks, Justin