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

mappings file not updating for consecutive directories #14

Open
vprudente opened this issue Nov 28, 2023 · 1 comment
Open

mappings file not updating for consecutive directories #14

vprudente opened this issue Nov 28, 2023 · 1 comment

Comments

@vprudente
Copy link
Contributor

The mapping file doesn't update once you change the working directory.

To reproduce:

  1. Have two directories, each with its own mapping.csv, images, and masks.
  2. Select the 1st directory and observe that it works as expected (rate 1 image).
  3. Select the 2nd directory (without closing slicer or reloading the extension). Observe that the counter gets reset, but the extension still uses the mapping.csv from the 1st directory (loading back the 1st image from 1st directory).

Additional information:

  • The new (for the 2nd dir) annotation.csv and log files get created into the new (2nd) directory, suggesting that the self.directory gets updated once we change directories (but perhaps not in the correct order).

My best guess would be either:

  1. due to self.directory, self.mappings, or self.with_mapper_flag not being reset at the onAtlasDirectoryChanged.
  2. or, alternatively, it also might be an issue with the order of the commands involving the function _restore_index. Maybe the unchecked_files get rechecked with the old mapping.csv against the new annotations.csv.
@zapaishchykova
Copy link
Owner

Nice catch! I'll work on this, should be a quick fix. Meanwhile, you can reload the extension when changing folders as a temporary "bugfix"

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

No branches or pull requests

2 participants