<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Bradley,<div><br></div><div>thanks for your reply!! One thing is still not really clear to me though: when you say that the Sum is meant to be the sum of all pixels, what does it mean exactly? The images I am considering have the same sizes, so they should have the number of pixels as well, correct? Why is c (color?) multiplied by the image I? I will have a look at <span style="font-size: 12pt;">LabelStatisticsImageFilter anyway!! </span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Thank you very much,</span></div><div><span style="font-size: 12pt;">Mirco</span></div><div><div><br><div><hr id="stopSpelling">Subject: Re: [ITK-users] Bug in StatisticsImageFilter?<br>From: blowekamp@mail.nih.gov<br>Date: Tue, 13 May 2014 08:53:16 -0400<br>CC: insight-users@itk.org<br>To: mirco9091@hotmail.it<br><br>Hello,<div><br></div><div>This is not a bug. I think the confusion comes from the concept of a binary image. This StatisticsImageFilter is does not consider you image to be binary.</div><div><br></div><div>In the StatisticsImageFilter, the Sum is the sum of all the pixels. It's is expected that the Sum( c*I ) = c*Sum( I ), where I is the image.</div><div><br></div><div>It seems that the LabelStatisticsImageFilter[1] may be more what you are looking for it has a GetCount[2] method which counts the number of pixels for a give label.</div><div><br></div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html</a></div><div>[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html#a971efb0a2d7dbd0f327bfec3f483d6ba" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html#a971efb0a2d7dbd0f327bfec3f483d6ba</a></div><div><br></div><div><br></div><div><br></div><div><div><div>On May 13, 2014, at 6:37 AM, Mirco Serra <<a href="mailto:mirco9091@hotmail.it">mirco9091@hotmail.it</a>> wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div dir="ltr">Hi all,<div><br></div><div>I was trying to use the itkStatisticsImageFilter to count the number of voxels of a binary image as results of segmentation. However, the function GetSum() seems to be multiplying the number of voxels by the integer value that I'm using for the segmentation. As an example, if I decide to give a value of 2 to the voxels which are part of the segmentation, then the voxels count will be the double of what it should really be, if I give a value of 3 it will the triple and so forth...Is this normal? Is there a way to fix it (apart from dividing by the value the voxels count)?</div><div><br></div><div>Thank you very much,</div><div>MIrco</div></div>_____________________________________<br>Powered by<span class="ecxApple-converted-space"> </span><a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></div></blockquote></div><br></div></div></div></div> </div></body>
</html>