[vtkusers] Summing all scalar values in vtkImageData
Martijn de Greef
m.d.greef at gmail.com
Thu Jul 28 08:05:38 EDT 2011
Hi Jothy,
There is a member function SetIgnoreZero(). Maybe this will do (I didn't
test it).
Regards,
Martijn
2011/7/28 Jothy <jothybasu at gmail.com>
> But the problem is my imageData has "0" at some voxels and "1" at some
> other voxels so I need to get only the sum of "1"s.
>
> In this case the average*voxels will not work.
>
> Thanks
>
> Jothy
>
>
> On Thu, Jul 28, 2011 at 12:20 PM, Martijn de Greef <m.d.greef at gmail.com>wrote:
>
>> Hi Jothy,
>>
>> I think you can use vtkImageAccumulate for this. The average and the voxel
>> count give you the sum.
>>
>> Regards,
>>
>> Martijn
>>
>>
>> 2011/7/28 Jothy <jothybasu at gmail.com>
>>
>>> Hi all,
>>>
>>> Is there any class in vtk which can sum all the scalar values in the
>>> vtkImageData?
>>>
>>> Thanks
>>>
>>> Jothy
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110728/d4eed971/attachment.htm>
More information about the vtkusers
mailing list