ImageDisplay can't retrieve the current position of an Axis
See original GitHub issueSteps to reproduce :
- Open Mitosis sample
- Change the position of the different dimensions
- Launch this script
# @ImageDisplay img
from net.imagej.axis import Axes
print(img.getLongPosition(Axes.Z))
print(img.getLongPosition(Axes.X))
print(img.getLongPosition(Axes.Y))
print(img.getLongPosition(Axes.TIME))
print(img.getLongPosition(Axes.CHANNEL))
It should print 0
for all the dimensions.
I guess it’s an issue with IJ1 <-> IJ2 synchronization. Should we except such methods to work or it is a limitation of running IJ2 under the IJ1 interface ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
how to determine what image pixels are currently displayed in ...
I am trying to scale to the side of an image display that will show the height of a displayed image (Y axis)....
Read more >E-STUDIO: ImageDisplay Object [22704]
Sets the alignment of the y-axis of the defined frame area in relation to the anchor position (X and Y property settings). Stretch...
Read more >Android: Animation Position Resets After Complete
your View will'not reset to original position, but if you have some buttons or something else in your view , their position will...
Read more >ImageView - Android Developers
Returns the current ScaleType that is used to scale the bounds of an image to the bounds of the ImageView. boolean, hasOverlappingRendering().
Read more >How can I get the ptz - zoom current position?
I'm using mobileSDK (2019). From axis vapix I can get the information from /axis-cgi/com/ptz.cgi?query=position. Is there something ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
One year later…
So, the goal is to make that option completely obsolete. We have lazy syncing now which is always enabled. We never want to perform expensive up-front syncing. And really, we want to always wrap/unwrap data structures back and forth, rather than ever copying pixels. This can be done in the majority of cases thanks to the ImageJ1
VirtualStack
class.Definitely not, no. It is—to use the common parlance in my part of the world—extremely half-assed. That’s not to say a lot of work didn’t go into it already—it did—but it has gone through some hurried iterations since the initial implementation, by multiple different programmers, and no one has taken the time to thoroughly update and test it since we fully switched to ImageJ Legacy as the active-by-default UI of ImageJ2. I apologize for that, and unfortunately I will probably not be able to work on it much in 2017, either. But we’ll get there some day.
After some tests I found that
PositionHarmonizer.updateLegacyImage()
is only called once when an image is open in IJ1. But then it’s never called so I guess this is why the positions are not synced betweenImageDisplay
andImagePlus
.I wasn’t able to find how the whole sync process works. So it’s pretty hard for me to debug it. Here is some stuff that I noticed :
LegacyService.syncActiveImage()
does not do any harmonization.LegacyCommand
seems to be the only class that do harmonization but the code is called only when an IJ1 command is run.Should not harmonization be run each time something happen on an
ImageDisplay
or/andImagePlus
? I guess this way of doing it is very CPU consuming so you may disabled this behaviour.