Valis blocks at "Measuring error" #58
-
|
Hi all, I am running Valis on my MacBook Pro in a conda environment. I do not get any error message, it just runs for hours the measuring error until I terminate the script. Has anyone encountered this before? Thanks M python /Users/marcopisa/Library/CloudStorage/OneDrive-Nexus365/Projects/BAPP/Valis_Script/VALIS_modified.py $DIRECTORY $PREFIX done ==== Converting images 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.56s/it] ==== Processing images 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.90s/it] ==== Normalizing images 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 20.30it/s] ==== Rigid registraration 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 8.81it/s] ======== Detecting features 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 4.85it/s] ======== Matching images 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.49it/s] ======== Sorting images ======== Calculating transformations 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2605.16it/s] ======== Rigid registration complete in 1.199 seconds ==== Non-rigid registraration ======== Preparing images for non-rigid registration 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.69it/s] ======== Non-rigid registration complete in 5.276 seconds ==== Measuring error 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.92it/s] |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
|
Hi @marco1108, Best, |
Beta Was this translation helpful? Give feedback.
-
|
Hi @cdgatenbee, Thanks for you prompt reply. I managed to understand why the script was blocked in "measuring error" stage. The .geojson file I was using contained not only the information on the annotations (that I wish to transpose to consecutive tissue sections thorugh Valis) but also all the positive cell detections. This is why Valis was unable to complete task even after many hours, it was trying to transpose all the cell detections. I have now deleted all the cell detections from the .geojson file, and the script works without errors. The script has generated a new folder that contains all the co-registratio files. From review of these outputs it seems that Valis has done an amazing job in co-registering the consecutive images. However, I cannot find the output that I needed which is a new .geogeson with the adapted annotations, so that I can use them on the consecutive slides Valis has co-registered (or alternatively, a new .svs file with the co-registered image - as I now only have a low resolution .png). This is the new folder created by the script: Here is the script used: from skimage import exposure class PreProcessor(preprocessing.ImageProcesser): from valis import registration, valtils, warp_tools def clip_xy(xy, shape_rc): def _warp_shapely(geom, warp_fxn, warp_kwargs): def warp_shapely_geom_from_to(geom, from_M=None, from_transformation_src_shape_rc=None, def warp_geojson_from_to(geojson_f, annotation_slide, to_slide_obj, src_slide_level=0, src_pt_level=0, if name == "main": Usage: VALIS_modified.py ` |
Beta Was this translation helpful? Give feedback.
-
|
Hi @marco1108, to which should save the updated results in MS317C/MS317C. Please try that out, and if it doesn't work let me know. Best, |
Beta Was this translation helpful? Give feedback.
-
|
Hi Chandler, Amazing, thanks! It works now! I still get these error messages at the beginning of the output: Do I need to do something to fix them? Thanks Marco |
Beta Was this translation helpful? Give feedback.
-
|
Hi @marco1108, Best, |
Beta Was this translation helpful? Give feedback.
-
|
Hi Chandler, |
Beta Was this translation helpful? Give feedback.

Hi @marco1108,
Glad to hear you figured out what was preventing the script from completing, and that the registrations are looking good! Based on the code you've shared, it looks like the warped geojson file would be in the same directory as VALIS_modified.py, or wherever it is that you are launching the script. If you'd like
warped_geojson_annotation_f_fibrinogento be saved in the sample folder, you could changeto
which should save…