mobie / mobie-viewer-fiji

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

Label boundary rendering for regions of mixed size #745

Open tischi opened 2 years ago

tischi commented 2 years ago

So I cannot use differently-sized sources in one annotation? I thought we did exactly that with the centrioles.

I don't know ;-) I have to understand my own code for that.... Can you please open an issue for that scenario with an example view?

Originally posted by @tischi in https://github.com/mobie/mobie-viewer-fiji/issues/740#issuecomment-1134540747

tischi commented 2 years ago

Boundary rendering for (quasi) 2D sources is implemented differently than for 3D sources. For annotated regions we can have scenarios were some of the regions are more 3D than some others. Currently the code is taking the union of all regions as a criterion to decide whether the boundary rendering should be done in 2D or 3D mode.

Maybe we should rather (than the union) use the smallest region to take this decision?

martinschorb commented 2 years ago

clem-example-project, branch cropannotations

All views and entire project validate correctly. TBH, I am not sure what behavior to expect for these crop annontations. But this feels odd...

views in croptest:

"regionDisplay": {
            "sources": {
              "0": [
                "em-detail-a1-A_crop"
                ],
              "1": [
                "em-detail-a1-A_cropshift"
              ]
            }
,...

-> shows weird annotation behavior (solid for some boundary thickness values <1 and >=5)

martinschorb commented 2 years ago

one difference between crop and cropshift is a different thickness. That probably explains the solid display. I still don't understand why for thick values it suddenly becomes boundary again.

martinschorb commented 2 years ago

created a view one_annot_same_thickness that has the same thickness.

Now the boundaries are correct for all thickness values.

So we have a solution, but not an explanation for the behavior.

@constantinpape how would you recommend to set up the annotation displays in such a case?

tischi commented 2 years ago

I still don't understand why for thick values it suddenly becomes boundary again.

I think I know why: if it the boundaries become as thick as the height of the largest region, the code switches to 2D boundary rendering mode (s.a.).