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
Aggregate points and surfaces in 4D #4
Comments
Hi Johannes @jo-mueller , yes, the time slicer at the moment only supports See also this related issue: Best, |
Hm...how would you identify points/surface data by array shapes? A points data layer would have to be identified by being a 2D array with the second dimension being 4: elif len(value.shape) == 2 and value.shape[-1] == 4:
layer = _get_layer_from_data(viewer, value)
new_value = value[value[:, 0] == current_timepoint, 1:]
# I'm not sure whether breaking points down to 2D would make sense :)
arguments[i] = new_value
layer.metadata[CURRENT_TIME_FRAME_DATA] = new_value A surface layer would have to be identified by being a tuple of length 2 or 3 with the above constraints for points: elif isinstance(value, tuple) * len(value) in [2, 3] * value[0].shape[-1] == 4 Would it be an option to allow |
To get back this issue - I think a solution may be to fuse the functionalities of This part of the function: for f in range(max_time):
print("Processing frame", f)
# go to a specific time point
_set_timepoint(viewer, f) does essentially the same as |
Hi @haesleinhuepf , I added a function It looks like the workflow manager is confused about having a 4D object as an endpoint to a workflow that handles 3D data when the time slider is dragged. |
Hi Robert @haesleinhuepf ,
I am seeing some issues with using the timeslicer on 4D points/surface data in napari. For instance, using the
label_to_surface()
function from napari-process-points-and-surfaces throws an error:which comes from the marching_cubes function under the hood. Here is a small example script to reproduce the error:
When introspecting the call to
marching_cubes
within thetime_slicer
function it is also evident that the image is somehow still a 4D image.The text was updated successfully, but these errors were encountered: