mobie / mobie.github.io

1 stars 3 forks source link

Views with only viewerTransform #19

Closed constantinpape closed 3 years ago

constantinpape commented 3 years ago

I am writing a converter for old to new projects now, and I noticed that we have several bookmarks that only contain a position or a normView. For example here: https://github.com/mobie/platybrowser-datasets/blob/master/data/1.0.1/misc/bookmarks/manuscript_bookmarks.json#L2-L85

To support this in the new spec we would need to make sourceDisplays optional. (I currently have it listed as required for the view).

What do you think @tischi?

constantinpape commented 3 years ago

We also have both a position and a normView in the same bookmark in the examples above. Something I also have excluded from the current spec. We should probably allow this as well, but then the question is what combinations of transformations we allow in the viewerTransform,

We have three different transformations in there: normalizedAffine, affine and position (also timepoint, but that is not relevant here).

tischi commented 3 years ago

normalizedAffine + position is valid

What is this used for? As the normalisedAffine fully specifies the transformation I would not know what to do with the position. Maybe this is just some legacy? Maybe the use case was to highlight the position? But then it is not a transform.

To support this in the new spec we would need to make sourceDisplays optional. (I currently have it listed as required for the view).

This sounds good, because I think we should support views that only specify the viewerTransform.

constantinpape commented 3 years ago

normalizedAffine + position is valid

What is this used for?

I don't really know, I only saw it in the platybrowser bookmarks: https://github.com/mobie/platybrowser-datasets/blob/master/data/1.0.1/misc/bookmarks/manuscript_bookmarks.json#L2-L85 @K-Meech can you remember how we generated this?

As the normalisedAffine fully specifies the transformation I would not know what to do with the position. Maybe this is just some legacy? Maybe the use case was to highlight the position? But then it is not a transform.

Ok, then we should not allow for specifying both and get rid of the position in these cases. Just out of curiosity, could you point me to the code where the "normView" / "view" / "position" read from the bookmark are currently processed in MoBIE?

This sounds good, because I think we should support views that only specify the viewerTransform.

:+1:

tischi commented 3 years ago

Ok, then we should not allow for specifying both and get rid of the position in these cases.

👍

point me to the code

https://github.com/mobie/mobie-viewer-fiji/blob/c9e54121af6c250f7daeaf7a2e5298df8124ee86/src/main/java/de/embl/cba/mobie/bdv/BdvViewChanger.java

K-Meech commented 3 years ago

Yes - I think position + normalizedAffine is a legacy thing. Really it just uses the normalizedAffine!

constantinpape commented 3 years ago

Done.