Extract the x, y, and z direction coordinates and get each voxel



Hello , all.
I am a novice in ImageJ ,and English is not my mother tongue.
I have a real sand particle under a CT scan, so I would like to extract the x, y, and z direction coordinates that will voxelize each particle and get each voxel, what am I supposed to do , thanks a lot.


Welcome Christopher :slight_smile:

You could try out the 3D Objects Counter plugin: https://imagej.net/3D_Objects_Counter
I believe this is standard available in Fiji, not in ImageJ.

See also here:

Please let us know how you get on.


Hi,@Danielle_Z :grin:

Thanks for your reply.
I’ve been trying to use 3D Objects Counter in Fiji, but it was always stuck when it ran to half(Connecting structures).
My Files are some Imgage sequences,I wonder if there is any other method to help me out.

Thanks again for the help!


You can also try the 3D particle analyzer from BoneJ:



@Bio7 Thanks for your advice .

I relalize where i went wrong now. I tried 1500+ images while using 3D OC,and now I just import 50 images but it still took a long time to connect structures, what am I supposed to do ?


It does indeed take quite some time for the plugin to carry out the analysis (3D Objects Counter). Does it not reach completion?

How are you getting on with BoneJ?


I tried paiticle analyzer and I figured out some problems now .Still , I don’t know how to the x, y, and z direction coordinates and get each voxel of each particle ,because I want and need these coordinates data of particles’ voxels to reconstructe each particle for other software .

So is it possible ? if possible , how ?


You may try a different approach:

  • process the stack such that you eventually have a binary stack (black & white) where your objects of interest are isolated.
  • then Analyze > Tools > Save XY Coordinates (you optionally tick the box for processing all images in the stack at once).
  • you will end up with a text file that contains coordinates of the objects in each slice:
    x y z intensity

You should then be able to extract the voxel data from the text file which contains all coordinates for each slice. This would need some work (in something else than ImageJ / Fiji).
You could extract the coordinates slice per slice, and then have a text file for each slice with x y coordinates (and intensity), and extract the voxels from these.

Not quite straight out-of-the-box, but it could be a way for you to get the required voxel data.

Check section 30.14.1 at https://imagej.nih.gov/ij/docs/guide/146-30.html