[Insight-users] About voxel counting for Binary image

Xiaopeng Yang yxp233 at postech.ac.kr
Fri Dec 17 03:19:27 EST 2010


Hello Users,

 

I applied ITKStatisticsImageFilter to count the number of voxels for a
series of Binary image. But I always get zero. Here is my code:

 

typedef itk::StatisticsImageFilter<OutputImageType>
StatisticsImageFilterType;

StatisticsImageFilterType::Pointer nrOfVoxelsInMask =
StatisticsImageFilterType::New();

  

nrOfVoxelsInMask->SetInput(filterBM->GetOutput());

 

std::cout<<"Number of Voxel"<<": " << nrOfVoxelsInMask->GetSum()<<std::endl;

 

 

"fiterBM" is the output (Binary images) of segmentation algorithm. 

 

Could you please give me any ideas?

 

Thanks,

Yang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101217/e4d95e7a/attachment.htm>


More information about the Insight-users mailing list