Drawing a sphere in a stack of images

I’m very new to imageJ so apologies if this is a simple question.
I have a stack of 27 944x844 .png images representing a 3D tomogram.
For context: The 3D tomogram is that of a cell infected with malaria. The malarial parasites can be seen, and I wish to draw in some artificial nuclei into these parasites.

I would like to draw, within this image stack, multiple different ellipsoids of varying radii and center locations. Is there a way to draw over the existing image in order to add these ellipsoids in? I’d also need to be able to specify (preferably in number of pixels) the center location, and the semi-principle axes lengths. I have tried the 3D image J suite but so far have not successfully managed to draw spheres on top of the stacks that I have. The built in “Make sphere” command in Plugins>Stacks also does not allow me to specify any parameters of the sphere I want to make. Any guidance would be very much appreciated.

Thank you!

Hi @hex,

You have several options here :

  1. You can use the 3D draw shape from the 3D suite, just select overwrite to draw the sphere inside your stack. http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_tools:start
  2. Draw sphere in 3D viewer should work also.
  3. Have a look to PhantomaJ http://imagejdocu.tudor.lu/doku.php?id=plugin:3d:phantomaj:start



1 Like

Thanks for the reply! I tried 1. but I got an error message whenever I tried to put in a sphere
(ImageJ 1.51j8; Java 1.8.0_112 [64-bit]; Windows 7 6.1; 169MB of 6100MB (2%)

at mcib3d.geom.ObjectCreator3D.ComputeEllipsoidAxesUnit(ObjectCreator3D.java:559)
at mcib3d.geom.ObjectCreator3D.createEllipsoidAxesUnit(ObjectCreator3D.java:462)
at mcib_plugins.Shape3D_.run(Shape3D_.java:255)
at ij.IJ.runUserPlugIn(IJ.java:217)
at ij.IJ.runPlugIn(IJ.java:181)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)

I tried 2 but the sphere options are only name, center, and radius. But I don’t know which units imageJ wants either the radius or center in. The center would be given in an x,y,z format but I dont’ know how I would input, for example, a sphere of radius 4 pixels that stretches over 4 slices in the stack centered at the origin.

Is there a way to understand what the coordinates for different points are with the 3D viewer? I’m just having trouble understanding the input formats I suppose.

Thank you again!

Hi @hex,

For 1 did you install imagescience ? Else it should work fine,

For 2 , it seems you cannot really export the sphere in a volume, it is just to view into 3D viewer, and generally I assume the coordinates in pixel, just check with your data with two different sets of calibration (Image/ properties).



Still trying 1, I think everything is installed correctly, all of the other tools seem to be running without issues. Whenever I do draw shape with a new stack, it works just fine and I get a new stack with my sphere. But I cannot overwrite the current tomogram, this gives me the error I quoted.