-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add MaskedSource #607
base: develop
Are you sure you want to change the base?
Add MaskedSource #607
Conversation
@@ -64,6 +62,8 @@ public void run() | |||
final SourceAndConverter cropSource = cropSource( maskInterval, maskTransform, sourceAndConverter ); | |||
|
|||
// TODO: can we create a view for this? | |||
final MoBIE moBIE = MoBIE.getInstance( bdvHandle ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@K-Meech Do you have experience here and could help? The point is to somehow create and register a new view
for the cropSource
(actually this is a MaskedSource
, need to change names later, maybe).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you would need to create the relevant SourceTransformer
by getting the min/max of the crop etc from the Source. Then somehow add it to the the currentSourceTransformers
in the ViewManager
. Then, when you save the current settings as a view, it will be made into a view when this function is called: https://github.com/mobie/mobie-viewer-fiji/blob/develop/src/main/java/org/embl/mobie/viewer/view/ViewManager.java#L208
@K-Meech |
@K-Meech I think a method |
I created a PR for working on creating a view from a |
For making a view form a sac, this is kindof what is being done by here and here. At the moment, this is triggered here and below, when new |
I am also not sure... I think we'll simply have to give it a try in this PR Do you want to give it a go or shall I? |
Could you give it a go? I'm fixing up some project creator stuff at the moment. |
ok! |
Made great progress in enabling interactive cropping in MoBIE, even when the viewer is not aligned with the physical axes 🥳
Also seems I found a much better way to implement the crop as a
MaskedSource
(thanks to great help in https://gitter.im/imglib/imglib2)center
feature, which is not yet done in theMaskedSource
CropSourceTransformer
and make it it use the newMaskedSource
, which seems to be much more performant and also easier to understand.@martinschorb Could you please point me to a simple example where we use the crop of a source?