Voxel Counter

Author: Wayne Rasband (wsr at nih.gov)
Source: Voxel_Counter.java
Installation: Download Voxel_Counter.class to the plugins folder and restart ImageJ.
Limitations: Requires an 8-bit stack.
Description: This plugin Counts the thresholded voxels in a stack and displays the count, the average count per slice and the volume fraction (ratio of thresholded voxels to all voxels). If there is an ROI, the voxel counts and volume fraction are based on the substack defined by that ROI. Before running, threshold the stack using Image/Adjust/Threshold. With binary stacks, black voxels are assummed to be thresholded.

The following summary information is provided:

  • Thresholded voxels - count of thresolded voxels inside ROI
  • Average voxels per slice - average number of thresolded voxels per slice
  • Total ROI voxels - count of all voxels within ROI
  • Volume fraction - 100*(Thresolded voxels)/(Total ROI voxels)
  • Voxels in stack - number of voxels in stack. With no ROI, this is the same as "Total ROI voxels".
Additional information is provided if the stack is spatially calibrated:
  • Voxel size - the width, height and depth of a single voxel, as defined in the Image>Properties dialog box
  • Thresholded volume - thresholded voxels * voxel size
  • Average volume per slice - average voxels per slice * voxel size
  • Total ROI volume - total ROI voxels * voxel size
  • Volume of stack - voxels in stack * voxel size
Note that the Analyze>Histogram command also counts thresholded voxels when "Limit to Threshold" is checked in Analyze>Set Measurements.
History: 2002/01/11: First vesion
2002/01/28: Works with binary stacks
2002/08/19: Volume fraction based on ROI
2006/05/11: Measures volume in real-world units (e.g., mm^3)
2010/04/27: Works with stacks larger than 2 gigapixels

|Plugins | Home |