-
Notifications
You must be signed in to change notification settings - Fork 68
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
Create an all-purpose ImageStack factory #1348
Conversation
fd907c3
to
22d4329
Compare
@@ -41,6 +40,8 @@ def verify_physical_coordinates(stack: ImageStack, | |||
# If zplane provided, test expected_z_coordinates on specific plane. | |||
# Else just test expected_z_coordinates on entire array | |||
if zplane is not None: | |||
assert np.isclose(stack.xarray[Coordinates.Z.value][zplane], expected_z_coordinates) | |||
assert np.isclose( | |||
stack.xarray.sel({Axes.ZPLANE.value: zplane})[Coordinates.Z.value], |
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 don't think you need to do the sel, stack.xarray[Coordinates.Z.value].values should give you the array
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 don't want the array. I want a singular value for the plane.
dfc8d40
to
fcd2051
Compare
1. Create a `LocationAwareFetchedTile` class, which is like `FetchedTile`, but is explicitly aware of its location in 5D space. 2. Create an all_purpose.imagestack_factory method that produces an ImageStack with the provided coordinate ranges. 3. Fix existing tests that did not deal with coordinates properly. 4. Fix `imagestack_test_utils.py::verify_physical_coordinates`, which used zplane as an index rather than a value. In the case of labeled images, this makes a difference. Test plan: `make -j all`
LocationAwareFetchedTile
class, which is likeFetchedTile
, but is explicitly aware of its location in 5D space.imagestack_test_utils.py::verify_physical_coordinates
, which used zplane as an index rather than a value. In the case of labeled images, this makes a difference.Test plan:
make -j all