File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -515,10 +515,19 @@ def change_overlay(self: TileServer) -> str:
515515 overlay_path = request .form ["overlay_path" ]
516516 overlay_path = self .decode_safe_name (overlay_path )
517517
518+ # Get other session id
519+ session_ids = list (self .layers .keys ())
520+ if session_id in session_ids :
521+ session_ids .remove (session_id )
522+
523+ # Get the first remaining session_id (if any exist)
524+ other_session_id = session_ids [0 ] if session_ids else None
525+
518526 if overlay_path .suffix in [".npy" , ".mha" ]:
519527 # loading a registration transformation
520528 self .layers [session_id ]["slide" ] = TransformedWSIReader (
521529 self .layers [session_id ]["slide" ].info .file_path ,
530+ target_img = self .layers [other_session_id ]["slide" ].info .file_path ,
522531 transform = overlay_path ,
523532 )
524533 self .pyramids [session_id ]["slide" ] = ZoomifyGenerator (
You can’t perform that action at this time.
0 commit comments