Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comments-out the setting of Z-scale, which I find causes various issues (testing with
napari==0.3.5
).Testing with a Z-stack image of
size_Z = 50
, with pixel sizeX: 0.633
andZ: 0.2
microns. Available athttps://downloads.openmicroscopy.org/images/DV/elena/P-TRE/P-TRE_21_R3D_D3D.dv
Without this PR, we set
scale = [1, 3.0161362196625654, 1, 1]
, which causes the Z-slider to report an index of Z-1.See first screenshot:
get_plane()
is correctly loading Z-index of 1 from OMERO.3 / 149
(without changing the Z-index) and Shapes drawn on this layer have coordinates of Z-index: 3. The currentsave_rois()
code for saving ROIs back to OMERO will therefore save these onZ:3
(instead ofZ:1
).If I try a different Z-scaling, manually setting the scale to
[1, 2.0, 1, 1]
(for testing), the initial Z-slider shows a max of49
(correct).When I switch to Shapes layer, I see a max-Z index of
99
.As I increment the Z-slider through the 99 indices, I see an unpredictable mapping between Z-slider and the Z-index of planes loaded from OMERO, with some planes being displayed for 3 Z-indices and some for only 1 (instead of 2 each as you might expect):
So, when saving a Shape back to OMERO, it's hard to map Z-coordinates from napari to a plane in OMERO (without a look-up table as above).