-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inset feature #549
Inset feature #549
Conversation
Tested on https://merge-ci.openmicroscopy.org/web/figure/file/5875/ - lgtm actually. The only (slight) question is the copying of the zoomed in viewports -> might be a bit confusing that all the "daughter" viewports are linked to the parent viewport and only the panning is going to make a change and sync -> but I do not have any better suggestion, and indeed, this is in line with the iviewer behaviour and also behaviour in figure itself (selection does not cause change, but change inside selection does) |
Thinking about discussion at #578, using a panel border to indicate which inset panel is from which rectangle. cc @Rdornier I'm not sure whether this is really needed since most real figures only have 1 or two insets and even with 2 or 3 insets it's usually clear where each has come from. A panel border could help, but again, in most real figures the inset panels don't have borders, so I wouldn't really want to add one by default to inset panels. And when you select the parent panel, you see e.g. NB: any panel border needs a bit of work to avoid shifting the panel (right and down) and changing the size of the internal viewport area. I'm not convinced that this is really needed / worth the effort. However, I think we do need to make it easier to pick the colour for the newly created Inset rectangles: currently they are created with the current ROI colour for that panel, but if there are no ROIs on the panel then you can't change this colour, and if there ARE other ROIs on the panel, changing the colour will also change the ROIs colour. |
Hello,
Ok, that's fair enough. We can forget about having a default panel color border there. It's better to make it a separate feature.
For me, having the possibility to identify the inset remains important. Panel color border wasn't maybe the good idea but maybe labeling insets would probably make more sense (i.e. A/B/C or 1/2/3). This would imply to also add a label to the corresponding ROI but I think this feature is not yet implemented (see #457).
Ok |
Hi @will-moore I've tested it and it works pretty well ! It's a super nice improvement and I'm sure users will strongly appreciate. I noticed a weird behavior of the inset line width drop-down
I don't know if it was intended but I noticed that if you delete an inset, the corresponding ROI is not deleted from the parent image (and vice-versa). Do you plan to delete both parts of the link (inset and ROI) ? Regarding the big images, if I create an inset on that image, without any zoom, it works correctly but a zoom was already set on the parent image, the inset panel is not representing the correct part of the parent image. This is maybe linked to #580 Last point, which is more a suggestion : it could be great to label both ROI and inset with the same letter/number. Rémy. |
@Tom-TBT Do you want to have a look please ? |
This PR is amazing. I tried to break it, without success:
I find the creation of an inset intuitive (for sure easier than before). Also, panning in the inset or changing the rectangle in the ROI edit menu gives the same expected results. It works really well. Ah! Finally, I found a bug: when creating the inset from a rotated image, both the inset and the ROI have a rotation (only the new inset should inherit rotation, not the ROI on the source image). Right after panning in the inset, the ROI is updated to what it should be (or the other way around by changing the rectangle in ROI edit, the inset is updated correctly). |
Thanks @Tom-TBT - good catch! I fixed that now, along with tiny bit of code cleanup. |
76c1888
to
d5abf96
Compare
Hi @will-moore It works nicely. However,
This is not fixed with the more recent code
What about this point ?
and this one ? |
@Rdornier Thanks for that.
|
Build failing with...
|
The image is 46622 x 63895 pixels, not rotated. If I pan the viewport or if I update the ROI, the mismatch persists.
Ok
Well, I see... maybe we can first work on ROI label support and, when it is ready, include it for insets creation, in another release, depending when you planned to release the inset feature. |
On my side everything looks fine, I tried with large images too and neither can I reproduce Remy's issue. |
Ok, that's weird. Maybe it is coming from my side only. I'll check
Yes, sure. You can find it on zenodo : https://zenodo.org/records/10629087 |
@will-moore This failure is probably just a blip. Please see that the tests are passing on my fork where I have just forked, checked out your branch and pushed to my fork with no changes.. I would suggest you simply rerun the tests (I do not seem to have the perms to do that). |
Where did you get that error? local build? |
@Rdornier Thanks for the zenodo link. |
Thanks for checking ! |
@Rdornier - with that last commit, when you delete the Inset Panel, the corresponding ROI will also get deleted. |
Perfect, thank you ! I've just tested It and it works as expected.
Ok, that's fair. This way is not as important and as obvious as the other one. We can keep it like this. Regarding the bug on the big image, I re-build my entire docker-compose, which now have the latest image of omero-web, figure..., and I cannot reproduce the error neither. I don't know exactly what was going wrong but, now it works ! |
Thanks for all the testing. Merging... |
Fixes #319
This replaces the tricky "create Inset" workflow (copy Rectangle and paste as Crop region or vice versa) with a single button click, and the Inset panel and Rectangle should stay in sync when either are updated.
To test:
ROIs
, click the "Create Inset" button