[Insight-users] Mean image

Yankam Njiwa Josiane Adrienne njiwa at biomed.ee.ethz.ch
Mon May 26 11:01:33 EDT 2008


 

Dear all,

I would like to compute the mean between 3 images. I used the code bollow but the line in red seems to be false and i don't understand why. Could somebody help me please?

Regards,

Josiane.

 

 

typedef itk::AddImageFilter< 

ImageType, 

ImageType, 

ImageType > AdditionFilterType;

AdditionFilterType::Pointer addition1 = AdditionFilterType::New();

AdditionFilterType::Pointer addition2 = AdditionFilterType::New();

addition1->SetInput1( reader1->GetOutput() );

addition1->SetInput2( reader2->GetOutput() );

addition2->SetInput1( reader3->GetOutput() );

addition2->SetInput2( addition1->GetOutput() );

ImageType::Pointer Image = addition2->GetOutput();

ImageType::Pointer Image1 =Image/3.0;

writer->SetFileName( argv[4] );

writer->SetInput( Image1 );

writer->Update();



More information about the Insight-users mailing list