mobie / mobie-viewer-fiji

BSD 2-Clause "Simplified" License
30 stars 12 forks source link

Project Creator: Add segmentations ignores timepoints #1021

Closed martinschorb closed 1 year ago

martinschorb commented 1 year ago

Dear all,

I tried using the Project creator to import a segmentation of labels from a tracking time series. Each timepoint seems to be treated individually and different objects are assigned.

I need the labels to stay consistent across timepoints.

tischi commented 1 year ago

Is that using the Fiji Project Creator?

Since @K-Meech left the team, I wonder whether we have to stop supporting this and only use the python tools....

martinschorb commented 1 year ago

I think the Fiji Project Creator is an extremely important part of MoBIE. Most users that I know totally rely on this to create projects. Are you suggesting to change it such that it throws an error when importing a multi-timepoint dataset?

constantinpape commented 1 year ago

@martinschorb: are you saying that the project creator relabels the segmentation ids across the timepoints? From your description it is not clear if (i) you have the consistent segmentation ids and if these are changed by the project creator, or (ii) if you don't have consistent segmentation ids and expect the project creator to assign consistent ids. For case (i): indeed this sounds like a bug, the segmentation ids should not be changed. For case (ii): this would be the expected behavior and not be a bug.

Overall I agree, we have to keep supporting the Fiji Project creator! For this particular case we can see if we can fix it if it is indeed a bug (this sounds to me like it should be easy to find because it must be some relabeling happening), or if not if we throw an exception or warning for this particular use-case (adding a timeseries with segmentation).

tischi commented 1 year ago

MoBIE project creator maintenance: let's not discuss this here, sorry for broadening the scope of this issue! My mistake!

I agree with @constantinpape that I don't understand the specific issues with the labels.

martinschorb commented 1 year ago

it seems to be a bug in the viewer!

Look at https://github.com/mobie/parallel_CLEM/blob/main/data/MSB30_4/tables/cells/default.tsv

The table is correct. The label_id is consistent and so is the value of the underlying ome.zarr label image. Because there are multiple rows in the table (one for each timepoint) they are assigned different colors when using a random LUT.

image

martinschorb commented 1 year ago

So the issue is: " How to get a random-color LUT for multi-row entries in a table?"

martinschorb commented 1 year ago

What the project creator (or also mobie-python, haven't checked this) should do when adding multi-timepoint segmentations.

constantinpape commented 1 year ago

What the project creator (or also mobie-python, haven't checked this) should do when adding multi-timepoint segmentations.

No, I don't think that this is something that is related to project creation at all.

Rather: it appears that by default the glasbey coloring model we use is taking the combination of labelId;timepoint;imageId to compute the value that goes into the id that is used for computing the random color. Instead, we should not use the timepoint for this.

martinschorb commented 1 year ago

No, I don't think that this is something that is related to project creation at all.

that would be my current workaround. If this can be changed in the viewer for random LUTs, it would be the ideal solution.

tischi commented 1 year ago

I don't fully get it. @martinschorb can we meet in person? See EMBL chat.

martinschorb commented 1 year ago

MoBIE project creator maintenance: let's not discuss this here, sorry for broadening the scope of this issue! My mistake!

I agree with @constantinpape that I don't understand the specific issues with the labels.

let's continue here: https://github.com/mobie/mobie-viewer-fiji/issues/1024