-
Notifications
You must be signed in to change notification settings - Fork 336
Description
Bug report
Describe the bug
When importing objects an ImageJ TIFF with an overlay, the ROI name is no longer used in QuPath v0.6.0.
It was used to set the annotation name in QuPath v0.5.
To Reproduce
Steps to reproduce the behavior:
- Create a project
- Import the example image from the linked forum post
- Ensure that 'Import objects' is selected
- See that the annotations do not have names set
Expected behavior
The QuPath annotations have names that match the ImageJ Rois.
Screenshots
See forum post.
Desktop (please complete the following information):
- OS: All
- QuPath Version: v0.6.0
Additional context
This is a tricky one because the decision not to use Roi.getName() was intentional - see ebeb854
The reasoning seems to be concerned mostly with ROIs that are passed from QuPath and then retrieved later: we set the name so that it appears in ImageJ, but we don't want to then grab that back into QuPath. If we did, then the simple act of sending a ROI to ImageJ and getting it back again would result in an object having a new name on the QuPath side.
In the specific case of importing objects, we could easily fix things by making a change at
qupath/qupath-core-processing/src/main/java/qupath/imagej/images/servers/ImageJServer.java
Line 323 in 58acb8e
| var roi = IJTools.convertToROI(roiIJ, 0, 0, 1, IJTools.getImagePlane(roiIJ, imp)); |
This doesn't handle the case of importing ROIs from an existing image other ways though, and we need to check what happens when the name is set as part for a serialized .roi file or RoiSet.zip.