<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.18365"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Segoe UI; WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>Thanks Brad, that solved my problem.  I didn't understand that you don't need to include the output type in the parameter list.  It is all working now.</DIV>
<DIV> </DIV>
<DIV>I do have one strange result when I apply this filter to lung regions in a CT scan.  Everything looks fine, I get mean values of -791 and -838 for the two lungs, the min and max look good etc.  The sum is a negative number, though.  I get -2.79352e+007 for one lung and -1.16737e+007 for the other, displayed using</DIV>
<DIV> </DIV>
<DIV>std::cout << "Object" << i << " has sum " << StatLabelObject->GetSum() << std::endl;</DIV>
<DIV> </DIV>
<DIV>I also tried </DIV>
<DIV> </DIV>
<DIV>float sum = StatLabelObject->GetSum(); </DIV>
<DIV> </DIV>
<DIV>and verified that the result was the same, so it's not some conversion issue when sending to cout.</DIV>
<DIV> </DIV>
<DIV>This isn't an issue, I don't care about the sum but it seems odd given that the other stats look accurate.</DIV>
<DIV> </DIV>
<DIV>Thanks for your help.</DIV>
<DIV> </DIV>
<DIV>Kent</DIV>
<DIV> </DIV>
<DIV><BR><BR>>>> Bradley Lowekamp <blowekamp@mail.nih.gov> 3/4/2014 8:54 AM >>><BR>Some times if there is not example look in the tests is a good place to start. Does this test help:</DIV>
<DIV><BR></DIV>
<DIV><A href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx</A></DIV>
<DIV><BR></DIV>
<DIV>Brad</DIV>
<DIV><BR>
<DIV>
<DIV>On Mar 2, 2014, at 5:45 PM, Kent Ogden <<A href="mailto:ogdenk@upstate.edu">ogdenk@upstate.edu</A>> wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<META name=GENERATOR content="MSHTML 11.00.9600.16518">
<DIV style="MARGIN: 4px 4px 1px; FONT: 10pt Segoe UI; WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>Hi ITK experts,</DIV>
<DIV> </DIV>
<DIV>Is there an example of how to use the BinaryImageToStatisticsLabelMapFilter, similar to the example for the BinaryImageToShapeLabelMapFilter?  I'm not sure how to define the type for the output image in the StatisticsLabelMap version, which the ShapeLabelMapFilter doesn't use.</DIV>
<DIV> </DIV>
<DIV>Thanks for any suggestions.</DIV>
<DIV> </DIV>
<DIV>Kent</DIV>
<DIV> </DIV>
<DIV> </DIV></DIV>_____________________________________<BR>Powered by <A href="http://www.kitware.com">www.kitware.com</A><BR><BR>Visit other Kitware open-source projects at<BR><A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR><BR>Kitware offers ITK Training Courses, for more information visit:<BR>http://www.kitware.com/products/protraining.php<BR><BR>Please keep messages on-topic and check the ITK FAQ at:<BR>http://www.itk.org/Wiki/ITK_FAQ<BR><BR>Follow this link to subscribe/unsubscribe:<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>