I have been trying to sort out if it is possible to add lines, spheres, and meshes in general to a 4D rendering of volumetric data in a frame specific manner. Below is a simplified example of what I was expecting would add a sphere to a different position for each time point in a time series (I used the mitosis sample dataset to for playing around). Instead of my expectations, I got all of the spheres rendered in the first frame only, rather than one per frame. Moving to other frames shows only the volume, not the meshes.
#@ ImagePlus imp # Import 3D Viewer components... import ij3d.Image3DUniverse as Image3DUniverse import org.scijava.vecmath.Point3f as Point3f import org.scijava.vecmath.Color3f as Color3f # Create a universe, add the data, and show it... univ = Image3DUniverse(); univ.show(); univ.addVoltex(imp); # Add a sphere at different spots at each time point... timeline = univ.getTimeline() timeline.first() pos = [0,0,0] step = [imp.getCalibration().pixelWidth, imp.getCalibration().pixelHeight, imp.getCalibration().pixelDepth] for f in range(timeline.size()): univ.addIcospheres([Point3f(pos, pos, pos)], Color3f(255,0,255), 5, 1, "End-points-%s" % pos) timeline.next() pos += step pos += step pos += step
Is it possible to do this? I searched around to see if content could be added to a specific time point, but I did not find anything. SciView seems to be currently favored over 3D Viewer as the modern/future rendering tool and appears to support my goal, but I have not read up on it beyond a couple of tutorial plugins. If necessary, I will try to move over to SciView. I appreciate any advice!