[Insight-users] MeanCalculator

Buerger, Corinna (ext) corinna.buerger.ext at siemens.com
Mon Aug 14 11:19:33 EDT 2006


Hi all, 
 
I want to use the itk::Statistics::MeanCalculator.
The following lines are a code snippet of mine. 
 
// start code snippet
MeanCalculatorType::Pointer meanCalculator = MeanCalculatorType::New();
meanCalculator->SetInputSample( dataSample );
meanCalculator->Update();
std::cout << "size of data sample: " << dataSample->Size() << std::endl;
// outputs 3 (which is correct)
std::cout << "size of mean: " << meanCalculator->GetOutput()->GetSize()
<< std::endl;                // outputs 0 (why???)
// end code snippet
 
dataSample is earlier defined as:
typedef itk::VariableLengthVector< double > DataType;
typedef itk::Statistics::ListSample< DataType > DataSampleType;
DataSampleType::Pointer dataSample;
 
Why do I get no output from the MeanCalculator?
Any help is appreciated.
 
Regards, 
 
Corinna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060814/8d0cec73/attachment.html


More information about the Insight-users mailing list