mobie / mobie-utils-python

Python tools for MoBIE
MIT License
9 stars 5 forks source link

Add View.description #125

Closed tischi closed 7 months ago

tischi commented 7 months ago

@constantinpape I added a new field to View.class: String description with default null. This is useful in order to add more info without making the View name too long. The description is printed when the user selects the view. Could you add this to the python API for creating a new view and also when adding a new image (which has a default view, which could have a description).

constantinpape commented 7 months ago

Hi @tischi, the current situation in python and the spec is the following: we have support for a description field associated with the source (so image, segmentation, spots, but not with the views. The description for sources can already be set from python, e.g. here.

So for supporting description in views we have different options:

I am not sure if we have a use for a description associated with source; if not I would favor option 2 to keep everything simpler and avoid confusion between the two description fields.

What do you think?

tischi commented 7 months ago

Interesting...

I could not find a field for description of a DataSource in the Java code....

I however did find a field for description for Transformation, but with a TODO: "add to spec" (maybe we can open another issue for this?)

Since every source will anyway have a default view attached to it, I would also favour only having a description for View, to keep it simpler.

constantinpape commented 7 months ago

I however did find a field for description for Transformation, but with a TODO: "add to spec" (maybe we can open another issue for this?)

Yep, that sounds like a separate issue.

Since every source will anyway have a default view attached to it, I would also favour only having a description for View, to keep it simpler.

I agree. I will implement this and ping you once it's there.

constantinpape commented 7 months ago

I have implemented it but not fully tested. Just reopen this if you run into issues @tischi.