[Insight-users] About voxel counting for Binary image

Stuart Golodetz itk at gxstudios.net
Fri Dec 17 06:36:04 EST 2010


Hi Yang,

Possibly a silly question, but you are calling 
nrOfVoxelsInMask->Update(); *before* the GetSum() right? The strange 
value you're seeing looks like an uninitialized one to me -- bearing in 
mind that 512x512x226 is roughly 0.59e+0008, so that voxel count can't 
possibly be right.

Cheers,
Stu

On 17/12/2010 08:57, Xiaopeng Yang wrote:
> Hi Matt,
>
> It works now. Thank you. But the number of voxels I got is extremely large: 9.85281e+008. The image size is 512*512*226. The images are binary images. Do you know why?
>
> Xiaopeng
>
> -----邮件原件-----
> 发件人: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org] 代表 Matt McCormick
> 发送时间: 2010년 12월 17일 금요일 오후 5:28
> 收件人: insight-users at itk.org
> 主题: Re: [Insight-users] About voxel counting for Binary image
>
> Hi Yang,
>
>>
>> nrOfVoxelsInMask->SetInput(filterBM->GetOutput());
>>
>> std::cout<<"Number of Voxel"<<": "<<  nrOfVoxelsInMask->GetSum()<<std::endl;
>>
> It looks like you forgot to call
>
>    nrOfVoxelsInMask->Update();
>
> here.
>
> Regards,
> Matt
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list