[vtkusers] about vtkImageAccumulate

David Gobbi david.gobbi at gmail.com
Thu Jul 22 22:50:30 EDT 2010


If the image is already a binary image, then you can count the white
pixels by multiplying the Mean by the VoxelCount.  If it is a
segmented image, but not a binary image, then you can probably use
vtkImageThreshold to generate a binary image, and then feed the binary
image into vtkImageAccumulate.

  David


2010/7/22 Prathamesh Kulkarni <prathameshmkulkarni at gmail.com>:
> I apologize, I meant GetVoxelCount(). In order to get a count of pixels
> inside an ROI, initialize it as a stencil and use SetStencil() of
> vtkImageAccumulate
>
> Prathamesh
>
> On Thu, Jul 22, 2010 at 9:03 PM, myaqua1982 <myaqua1982 at 163.com> wrote:
>>
>> Hello Prathamesh:
>> Thanks for your writing! I have checked the vtkImageAccumulate
>> vtkImageStencil ,but I did not find the function that called
>> GetNumberOfVoxels(). And I want compute the voxels on an arbitrary portion
>> of the imput data. The result of GetVoxelCount() is the total number of the
>> pixels of the whole pic. Could you please give me some specific advice?
>> Thank you very much!
>>
>> JHT
>> 2010-07-23
>> ________________________________
>> myaqua1982
>> ________________________________
>> 发件人: Prathamesh Kulkarni
>> 发送时间: 2010-07-22  22:43:38
>> 收件人: myaqua1982
>> 抄送: VTK Mailing List
>> 主题: Re: [vtkusers] about vtkImageAccumulate
>> Hello,
>>
>> You can use vtkImageAccumulate with vtkImageStencil for achieving this.
>> For counting the number of pixels, there is
>> image_accumulate->GetNumberOfVoxels().
>>
>> Prathamesh
>>
>>
>> Message: 24
>> Date: Thu, 22 Jul 2010 11:42:52 +0800
>> From: "myaqua1982" <myaqua1982 at 163.com>
>> Subject: [vtkusers] about vtkImageAccumulate
>> To: "vtkusers" <vtkusers at vtk.org>
>> Message-ID: <201007221142511561726 at 163.com
>> >
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Hi all:
>> I want to count the number of pixels of a BMP pic. Is vtkImageAccumulate
>> will do? And how can I use this function. And the pic has been segmented
>> already, I want to count the pixels of ROI .Please give me some advice.
>> Thank you very much!!!
>>
>> 2010-07-22
>>
>>
>>
>> myaqua1982
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> <http://www.vtk.org/pipermail/vtkusers/attachments/20100722/a8aa5c68/attachment-0001.htm>
>
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list