Skip to content
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

Add images from .qpproj file always import annotations even if option is not selected #1259

Open
Rdornier opened this issue Apr 6, 2023 · 2 comments
Labels

Comments

@Rdornier
Copy link

Rdornier commented Apr 6, 2023

Bug report

Describe the bug
We try to add a qpproj file in another one to import all images. The checkbox "Import objects" was unchecked but all objects have been imported.

To Reproduce

  1. Open a new QuPath project
  2. Click on Add Images
  3. Drag-drop another QuPath project (.qpproj file) containing annotations on images
  4. Uncheck the "Import Objects" checkbox
  5. Click on Import
  6. After importation, if you open a image coming from the imported project, then you should see annotations.

Expected behavior
If the checkbox is unticked, no annotations should be imported.

Desktop

  • OS: Windows 11
  • QuPath Version: 0.4.3
@Rdornier Rdornier added the bug label Apr 6, 2023
@petebankhead
Copy link
Member

petebankhead commented Apr 6, 2023

Very good point, I hadn't ever really considered those two things together.

In my mind, 'Import objects' was always associated with trying to read objects that are somehow associated with the source image (e.g. ROIs stored as an overlay for ImageJ TIFF, objects from an OMERO image).

The ability to add images from another project, on the other hand, was developed separately and intended to always import all the data from that project. This means the entire image data, including stain vectors etc. The object hierarchy comes along with that.

I imagined that, if anyone wanted to add the images without objects, they would just add the images in the 'normal way' and not via a project. But I suppose that assumes that projects don't contain very many images scattered across different disks, or accessed via OMERO or elsewhere.

In any case, I agree that the current behavior is confusing in the case you describe, and should probably be changed. But I'm not sure if it should be a change of behavior, or a change of documentation + the addition of a new command?

Some ideas:

  1. Don't import any specific ImageData from a project when the "Import objects" checkbox is unselected. This would exclude objects and everything else. Potentially also including custom metadata, channel names, stain vectors etc.
    • In this case, it would probably be best to rename the checkbox and document this behavior
  2. Keep the behavior as it is, but document it better. A user can always run a one-line script to delete all the objects later.
  3. Add an entirely separate command to import images from another project and/or prompt the users when importing from a project. This would give more control over what exactly should be import, but it's another menu item in already quite crowded menus.

Keen to know what you and any interested others think.

@Rdornier
Copy link
Author

Hello,

Thanks for your explanations and suggestions.

Don't import any specific ImageData from a project when the "Import objects" checkbox is unselected. This would exclude objects and everything else. Potentially also including custom metadata, channel names, stain vectors etc.

This is a suitable option to import only raw image files and I think it should work. But it may be a bit restrictive regarding metadata and stain vectors.

In this case, it would probably be best to rename the checkbox and document this behavior

Yes

Add an entirely separate command to import images from another project and/or prompt the users when importing from a project. This would give more control over what exactly should be import, but it's another menu item in already quite crowded menus.

I like this option but it's also true that added a new menu is not optimal. One way to do could be to add a popup menu only if a project will be imported. The import window will remain the same, with the "import object" option. If this option is unticked, then no objects are imported, regardless of the what will be imported (same behavior as the first option). If it is ticked, then it checks if there is a project to import and in case, a popup menu appears to select what ImageData should be imported.

Keep the behavior as it is, but document it better. A user can always run a one-line script to delete all the objects later.

For me, it will still be a bit confusing ; I really prefer the two other options but this is only my point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants