I am trying to implement an interactive registration by building on the BigDataViewer.
- load an image volume (3D) in BDV
- load an additional image section (2D section-image) in BDV
- keep the section-image fixed, while moving throught the image volume.
- align the currently visible section of the image volume to the section-image by triggering with a keyboard shortcut or maybe an with a button on an additional dialog
- get the final section of the image volume and it’s transform on the section-image
Additionally, I though it might be useful to create an additonal panel, showing a projection of the volume with the current section/plane to help the user navigate.
To keep the section image fix, I added a dimension to it using.
RandomAccessibleInterval rai = ... RandomAccessibleInterval secImg = Views.addDimension(rai, 0, zmax)
This replicates the section along the 3rd dimension to match the image volume. While it does the trick for one given 2D perspective, it looks confusing when switching the rotation axis. Ideally I would be able to fix the roation axis. Is there a way to do that?
Registering an additonal key-event was easy with
BdvHandlePanel().getKeybindings().addInputMap() and the corresponding action with
But even after reading throug BDV publication, I could need some pointers to navigate the BDV code to find answers for:
- How to extract the currently visible section of the volume as
- How to get the current plane in the global coordinate system?
- How to apply a transform to the image volume?