ImageJ 3D Viewer Add Mesh for Specific TimePoint

@bene.schmid @albertcardona @iarganda @ctrueden

Do you know the syntax for adding a mesh to a specific timepoint?

final Content content = universe.addCustomMesh( mesh, "name" );

The content has getter methods for which timepoints it covers but I could not figure out how to set those.

Yes, I do, but only because I asked Benjamin Schmid relatively recently. Have a look at the function withIcospheres from

In the loop

instants = {} # time instant (int) vs ContentInstant

for row in rows:
    meshes = ... # many meshes per time point, but one would do
    ci = ContentInstant(str(row[0) # ContentInstant takes a string for title
    ci.display(CustomMultiMesh(meshes)) # each mesh has its color
    ci.setLocked(True) # To prevent accidentally manually moving the mesh in 3D when attempting to rotate the view
    instants.put(int(row[0]), ci)
univ.addContent(Content("deltaF/F", instants, False))
univ.updateStartAndEndTime(0, len(instants) -1)   # show timepoint slider, for 4D

Thanks! That helps a lot!