-
Notifications
You must be signed in to change notification settings - Fork 8
Define project scope #60
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
Comments
Thanks for opening this @gselzer, I think it's a great idea get this written down somewhere! I'll give some thoughts on how I've been thinking about the project. some (but not all) of this is in the readme, though often not explicitly. In many ways, ndv is a more narrowly scoped spiritual successor to microvis, and I put many motivating thoughts on that in this document. many of them apply here. That project got stuck (largely on what seems to be a trivial topic) and this one quickly became more useful if for no other reason that limiting the initial scope to just the problem of looking at arrays quickly and conveniently. So that was the top priority.
|
Hey, I wanted to interject in this issue to provid my point of view in what I would like ndv to be as a possible user. I am the mantainer of ImSwitch and I'm currently working on another application as well. I'll try to cover the points I'm interested in, although @tlambert03 already covered almost everything I already had in mind pretty well so this is just a reinforcement of some of his statements.
The take home message from my side is: napari is great for me because of the concept of layers, which are basically wrapped around VisPy it'self. Rather than having support built-in, an approach could be to provide APIs similar to the DataWrapper to do so. Or... DataWrapper itself could be a way to add support for different types of layers. But the way to control these layers in order to be able to chose what I want to see or not is key. In the end I don't want to give up on napari because there are tons of plugins out there which in some capacity I would like to be able to support (either natively - which I believe will be hard - or by giving instructions to make plugins compatible), but if someone just wats image viewing capabilities without napari, I would love to support ndv as an alternative choice, provided that the points above can be met somehow. |
EDIT: I just realized that the possibility to enable/disable a channel is already there hidden within the LUT flag... I feel so dumb. Can this be set as default behavior to show the currently active channels? And maybe set a display name? |
This is super useful feedback. Thanks so much for taking the time @jacopoabramo |
Thanks so much @tlambert03 for a thorough response! I largely agree with everything you wrote, and I'll add minimal dependencies/quick startup as a goal.
Hmm...what would be the benefit of this over e.g. a |
my comment wasn't so much about how it would be implemented, just more about the fact that I don't think it's out of scope to provide general I/O utilities as an opt-in feature (rather than forcing all of that to be third party plugin behavior as napari does) An implementation that uses a DataWrapper would absolutely be one possibility. (Basically, it would introduce a new DataWrapper that knows how to parse any string input |
Additionally, thank you @jacopoabramo!
I think that the superposition with channels is already present, yeah? So your main (unfulfilled) desire is to view datasets adjacently? Viewing multiple datasets is also something I tried out on this branch, but it's really tricky. My hope is that our work on
I think that what you're suggesting all falls within the bounds of what I/we want as well (although the ROI bounding issue you describe might be complicated if we introduce some form of tiling...but that doesn't need to be discussed here). The point I'm trying to differentiate is ROI Tooling vs. Segmentation/Painting. The former is tools that help us view a specific region, while the latter is helping us characterize/describe a specific region. I'm still thinking about the difference/description here...
I'd like to note that our plan here is probably for separate widgets for the histogram/line profile - they wouldn't be in the shared canvas. For your purposes, if you don't want the histogram/line profile then you (can/should be able to) leave them unconnected/unused.
I think my main "do not" here is that I don't think ndv should enable the internal creation of new datasets. If you have data (e.g. labels) that you just want to view, that makes total sense for ndv. You said " Or... DataWrapper itself could be a way to add support for different types of layers." and I think that is what I'd want to see, so long as it's possible. |
Yeah I added a "whoopsie" comment immediatly after my original answer because I found out about that like... 5 minutes afterwards and it was kind of embarassing.
Yes precisely.
Wouldn't that fall under adding new layers then?
That seems reasonable. Although it would be useful to have - for at least line profiling - the possibility to draw in the canvas a line which acts as a selecter and what it's selected will be reflectedi |
Yup! I don't think that there's an issue for showing multiple datasets at once, but I agree that it should be possible, if not a priority.
I agree. One thing I'd like to do is turn the rectangular selection tool that already exists into a multi-shape tool, that could have support for (poly)lines - ideally it'd be evented too. I have a PR (#54) for integration into the The words I'm starting to settle on here are "inspective" vs. "generative". ndv should be the former, and not the latter, in my opinion. With respect to ROIs, our tooling should be "inspective" - for ROIs, this means the intent to better understand a specific region of the data. A "generative" ROI would be the result of a segmentation, suggesting the contained region shares some characteristic, and is what I don't think ndv should be involved in. |
I'm not sure I'm following. For me, an ROI is an ROI; it's a region of interest: whether it be a vector-based ROI, or some sort of pixel-based mask. I think ndv should be able to (eventually) show pretty much any way to select a subregion of space, regardless of whether it is the result of some segmentation (we just don't provide built-in segmentation algorithms). In other words, I don't imagine making a distinction between the kinds of ROIs that are in scope and out of scope. are we saying the same thing? |
I've started a branch with a README updated to reflect these discussions. I'm expecting heavy updates to get this to a point where we're all happy with it (we can also file a PR when it's somewhat close to that point). However it has already been useful to me in thinking about what the API for the v2 rewrite should look like. Thanks again for your inputs @tlambert03 @jacopoabramo! |
I think we are saying the same thing? On one hand, ndv should be able to display any data given to it, whether that's an "image", "label"s, etc. But on the other hand, there's the tooling that we provide for interaction with that data, and the potential for generating new data (that could then be used elsewhere). "Inspective" vs. "Generative" is my proposition for how we delineate between "what we want" and "what we don't want", given what you suggested here:
I'm suggesting that any tooling we provide should be oriented towards "inspection" of existing data (which is what histograms, line profiles, statistics, and our ROI tooling would do) and not "generation" of new data. I don't think the latter was ever intended, but framing it this way helps me better understand what e.g. the Does that make sense? |
yeah I think it makes sense... I think one main thing I'm thinking at this point is that this is a very early project. I do think it's helpful for us all to discuss these things, and definitely useful for active developers to have these sorts of conversations, but I'm not sure I'm ready (or that we need) to define strong language about what we will and won't do. I think inspective/generative also falls under the general category of "we're a viewer" (which is pretty generally understood concept). I'd hesitate to lay down much stronger terminology than that at this point, and take it as we go. |
That's true, but napari is also marketed as "we're a viewer", so I want to be clear about the differences. For example, it has many generative aspects that we want to avoid.
Fair enough - like I've mentioned, this discussion has already been very helpful for me! |
what specifically are you thinking about here? the only one I can really think of is painting onto a labels layer, or creating some points or shapes... and these are very close to what we're doing already with ROIs. so I'm not sure it's that useful of a distinction. For me, the primary difference with napari is that we demand to keep loading fast and dependencies minimal. I'm not ready to say "we'll never let you draw on an image" ... simply because that specific action really isn't that "heavy" of a part of what napari does (it just boils down to mapping a point on the canvas to a point in the data source, which we already have and need), and it can be very useful |
The main one that I was thinking of is plugins, actually - the entirety of my napari experience is generating new datasets from existing napari layers 😅
This is a great point in our favor, but I think the biggest draw to me is instead the data model. Thinking about datasets as growing and changing can help us do inspective things like visualization and statistics quickly. I think at this point I'm pretty satisfied as the conversation has helped me realize how to progress my PRs. Let's maybe just leave the README edits as a branch until it seems like we need them? |
ah... yeah I don't count plugins as a part of napari :) they're all in different repos, by different authors, etc... |
napari also has a data model, which is also serializable and restorable. (it's how things like napari-animation work). you might just be more familiar with the ndv data model :) but both the viewer and layers have always been "model based"... the viewermodel itself is a pydantic model, etc. So there too, we're not really that different |
I think my concerns here have been resolved by the documentation added in #93 |
That was a rough sketch. Just something to get up there... I know you had additional thoughts on the structure of this, so I definitely welcome additions and structural changes on that page! (there were multiple things discussed here that didn't make it on to that page) |
As we've been working on the
v2-mvc
branch, I've been searching for guide rails on what this project should and should not be doing. I think it would be wise to add these things to theREADME
so both devs and users are well aware of the strengths and limitations.I'm hoping this issue serves as a place of discussion for some of these items, and that a resolution to this issue would see updates to the
README
.Looking for opinions & edits, especially from @tlambert03, @marktsuchida, @fdrgsp. It's likely you all have more experience here than I. If people like the general direction of this, I'm happy to create a PR where we can collaboratively hammer this out.
What
pyapp-kit/ndv
(should) doView data. This includes:
What
pyapp-kit/ndv
should/does not doAnything else. The following tasks would resemble scope creep, detracting from our goal above:
I'd like opinions here, as a lot of my reasoning is "gut feeling" - I'd like these "should nots" to be solidified with valid reasoning in the eventual README edits. I'd also like answers to the following questions to be reflected in our final version:
Similar projects
Inevitably users will want some of the things that ndv will not provide. We should direct users towards the projects that focus on those things, as likely do them better than ndv could (if we wanted them to):
The text was updated successfully, but these errors were encountered: