<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Mensaje</TITLE>
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>Dear
users,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=910490209-18052005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>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.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=910490209-18052005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>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).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=910490209-18052005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>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. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=910490209-18052005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>Thanks in advance
for your help</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=910490209-18052005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=910490209-18052005>Ivan
Macia</SPAN></FONT></DIV></BODY></HTML>
<BR>
<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Anti-Virus.<BR>
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 17/05/2005<BR>
</FONT> </P>