[Insight-users] Performing operations on masks
Iván Macía
imacia at vicomtech.es
Wed May 18 07:49:03 EDT 2005
Hi again,
Answering to myself I have found a wonderful new
itk::MaskNeighborhoodOperatorImageFilter in the CVS that is 3 days old :)
It seems like this will do the job. I will give it a try.
Cheers
Ivan Macia
-----Mensaje original-----
De: insight-users-bounces+imacia=vicomtech.es at itk.org
[mailto:insight-users-bounces+imacia=vicomtech.es at itk.org] En nombre de Iván
Macía
Enviado el: miércoles, 18 de mayo de 2005 11:20
Para: Insight Users
Asunto: [Insight-users] Performing operations on masks
Dear users,
Is there any easy way to perform operations only on certain pixels of the
image defined by a mask (i.e. the result of a segmentation) ? What I want to
do is to perform some calculations only in the pixels that are part of my
segmentation, for example calculating some statistics of the pixels and
their neighborhood etc.
It occurs to me that the natural way of doing this in itk is taking the
original image and the masked image, use an iterator for each (mask and
image), and calculate the values using the image iterator only for the
pixels whose value are not zero in the mask iterator. I could also perform a
binary AND with the image and the mask and make the calculations on the
non-zero pixels (the problem here is when there are pixels with zero value
among the segmented pixels).
My question here is : is this the best way to do this ? Is there any
automatic way of doing this now in itk ? I guess that this would be
something similar to defining a region for processing by combining an
itk::Region and a mask the same size.
Thanks in advance for your help
Ivan Macia
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 17/05/2005
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 17/05/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 17/05/2005
More information about the Insight-users
mailing list