The mentioned test is counting segmented voxels with
vtkImageAccumulate.GetVoxelCount(), which gives the TOTAL voxel count.
This test should count SEGMENTED voxels with something like:
GetOutput().GetPointData().GetScalars().GetTuple1(1)
I.e. the second bin in the histogram, which should contain all 1-valued
voxels. To be sure, threshold everything to 0 and 1 unsigned chars, then
use the second bin.
Original issue reported on code.google.com by cpbotha on 17 Mar 2008 at 12:21
Original issue reported on code.google.com by
cpbotha
on 17 Mar 2008 at 12:21