<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2876" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=445351015-14082006>Hi all,
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=445351015-14082006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=445351015-14082006>I want to use the
itk::Statistics::MeanCalculator.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=445351015-14082006>The following lines
are a code snippet of mine. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=445351015-14082006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=445351015-14082006>// start code
snippet</SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>MeanCalculatorType::Pointer meanCalculator =
MeanCalculatorType::New();<BR>meanCalculator->SetInputSample( <SPAN
class=445351015-14082006>dataSample</SPAN>
);<BR>meanCalculator->Update();<BR>std::cout << "size of <SPAN
class=445351015-14082006>data sample</SPAN>: " << <SPAN
class=445351015-14082006>dataSample</SPAN>->Size() << std::endl;<SPAN
class=445351015-14082006>
// outputs 3 (which is correct)</SPAN><BR>std::cout << "size of mean: "
<< meanCalculator->GetOutput()->GetSize() << std::endl;<SPAN
class=445351015-14082006> //
outputs 0 (why???)</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>// end code
snippet</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>dataSample is
earlier defined as:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>typedef
itk::VariableLengthVector< double > DataType;</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>typedef
itk::Statistics::ListSample< DataType >
DataSampleType;</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006>DataSampleType::Pointer
dataSample;</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>Why do I get
no output from the MeanCalculator?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>Any help is
appreciated.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=445351015-14082006>Regards,
</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=445351015-14082006>Corinna</SPAN></FONT></FONT></DIV></BODY></HTML>