Replies: 7 comments 18 replies
-
Fully agree with the assessment here. I think allowing plugins to declare for support was probably an ill-conceived attempt to "leave things flexible", mostly for your scenario number 2. But it's probably almost never used, and if it was, leaves a tremendous amount of responsibility to the plugin to do things correctly. And it also becomes very hard to determine which plugin should be used (unlike when we have a file extension). Additionally, plugins who do want to support some sort of project archive could simply consume/create zip files and then change the extension. So there's definitely a workaround. I'm +1 |
Beta Was this translation helpful? Give feedback.
-
I actually love directory readers, and have used them frequently, mostly in scenario-2-like situations. While I agree that you could just zip the files/use a "header" file to point you to the rest of the needed data, I do think being able to drag in a directory is a very natural interaction. Would this remove our built-in "read directory as a stack" behavior? I would definitely not be down for that. Also, how would this affect The other issue is that while it's easy for plugin developers to take a zip or a "header file" and read around it, it may be less obvious to users that they should zip up their directory/add extra metadata for it to be readable - when before they didn't have to. Of course this can be addressed with documentation, but it might be a tough argument. Having said that, I'm in full agreement on how tricky they are to associate e.g. for the reader preference dialog, we don't even save an association for directories, because it's just so hard to associate anything besides the choice for that individual directory. And I've tried to think of more sensible associations but haven't really come up with any. I guess I'm not voicing strong dissent here, except for the "directory as a stack" behavior which I absolutely think we should try to keep. |
Beta Was this translation helpful? Give feedback.
-
agree completely. though that could essentially be handled on the napari side, not the plugin side. Where, if a user opens a directory as a stack, napari passes the files to plugins using the existing list of strings API (as opposed to passing the directory itself to plugins and saying "do something interesting with this")
yep, agree here too. it's perhaps worth pointing out that one of my original use cases for the
that |
Beta Was this translation helpful? Give feedback.
-
I also liked drag and drop folder and get all files loaded and "concatenated", so just 1 layer instead of 100 layers for 100 images. If we can preserve the behavior that we like then I'm open to changing things to simplify things overall |
Beta Was this translation helpful? Give feedback.
-
The general problem is that if we follow approach with |
Beta Was this translation helpful? Give feedback.
-
I still haven't seen someone explain how zarr folders will work if we remove support for directories? |
Beta Was this translation helpful? Give feedback.
-
I wanted to add my use case to the list (call it "case 3"). I usually have volume images and particle definitions (points and orientations, which I display as points and vectors). Due to the quirks of tomography processing, these are usually spread out in different directories and their naming scheme (and extensions) may differ significantly between use cases. What's more, I need an ensemble view, cause sometimes one file contains metadata (such as pixel size) that will be needed to correctly display data from a different file. Zipping all of this would be prohibitive. This is currently pretty much impossible (I need multiple directories and/or lists of files to be passed at once, since I need to know all of the data that's getting passed). If I had to suggest a direction here, I would rather support a system where a plugin can accept even more than one directory at once. However, I realixe that this complicates things even more :p Currently (and for the foreseeable future) I'm resorting to wrapping napari, rather than using the plugin system. Bonus point: I generate a "dataset" object that allows interacting on the whole dataset, which I currently have no way to expose to the user through the plugin system. |
Beta Was this translation helpful? Give feedback.
-
During today's plugin working group meeting, I ask a question if the possibility of defining directory reader should be kept.
The idea of a directory reader is for one of two scenarios:
My main doubt is if it will be easy to debug why the output of such a reader is different than we expect.
For the first option, the equivalent will be a plugin that gets a list of files. The situation where the user needs to mark all files in a directory give him a possibility to check if there are no additional or missed file but may introduce some problem if there are multiple files with the same name but different extensions.
For the second option, the user could simply point to some starting files and the plugin could check if other needed files are present in the same directory. I suggest this solution if such a "project" has some main file with a description.
Both alternatives force the user to more explicit point what he expects to load so may simplify understanding where is the problem, but removing the option to define directory reader may introduce some inconveniences to end-users.
Beta Was this translation helpful? Give feedback.
All reactions