ipyvolume icon indicating copy to clipboard operation
ipyvolume copied to clipboard

transform volshow input to scatter plot input

Open nathalie29856 opened this issue 3 years ago • 3 comments

Hi @maartenbreddels ,

I'm using ipyvolume to visualise 4D datasets with the shape (x,y,z,time). With volshow I can open the dataset as (x,y,z,0) and include the time component with a slider. Now I would like to visualise the dataset as a scatter plot. How can I transform my 4D dataset so that it can be used as input for the scatter plot? For this, x must be a 2D array (time, x) and y and z must be 1D arrays, right?

Thanks! Nathalie

nathalie29856 avatar Jun 29 '21 10:06 nathalie29856

Hi,

I'm not sure how you want to visualize the 4d as scatter plot. But scatter takes 1d arrays as input if it contains no time component, otherwise 2d.

Regards,

Maarten

maartenbreddels avatar Jun 30 '21 08:06 maartenbreddels

Hi @maartenbreddels ,

thanks for the quick answer! My dataset shows algae that have autofluorescence of their chloroplasts swimming around in 3D. I thought I could also make them visible as a scatter plot by putting a dot where the algae is (i.e. boolean) and then using animation control to see how the algae moves. Is there a way to do this?

Regards, Nathalie

nathalie29856 avatar Jun 30 '21 12:06 nathalie29856

I guess what you would have to do is to determine the location of all algae in your volume data and list those locations. In subsequent frames you would have to identify the algae determined there with the algae detemined in the previous frame (e.g. by proximity, if the density is low and the frame rate is high). The number of spots would not be allowed to change...

But this is not part of this library, I guess.

chrisgee avatar Jul 29 '21 13:07 chrisgee