[Insight-developers] Shortly solved Problem?

Martin Waitzbauer mazzok at gmx.at
Thu Oct 28 15:53:34 EDT 2010


Hello all!

Im new to ITK, and i hope to find help here with a problem that should really be an easy issue for the Knowing!..

Ive written a maskfilter, that adds a Gaussian Mask to an input image, and takes the Variance as only input parameter to execute
so what i did was this-> feed mask_f with 2 different Sigma values, and save them to pictures:
The problem im facing is, that GenerateData() seems not to be called twice
calling the PrintFunction after thevariance has been changed shows that the variance was changed, however GenerateData() wasa not triggered
The Result is that 1.bmp & 2.bmp look the same

Hope you can help me on this!
Thanks for your time
Bye
M

 
  MaskFilterType::Pointer mask_f = MaskFilterType::New();
  InputImageType::Pointer input =InputImageType::New();
  ReaderType::Pointer reader = ReaderType::New();
  WriterType::Pointer writer = WriterType::New();
  WriterType::Pointer writer2 = WriterType::New();  

  reader->SetFileName("lena.bmp" );


    reader->Update();
    input = reader->GetOutput(); 

   
  /*Gaussian Filtering, write gaussians in maskimage*/
     mask_f->SetInput(input);
     mask_f->setVariance(100);   

     writer->SetInput(mask_f->GetOutput() );
     writer ->SetFileName( "1.bmp");

     mask_f->setVariance(200);   

     writer2->SetInput(mask_f->GetOutput() );
     writer2 ->SetFileName( "2.bmp");
-- 
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl


More information about the Insight-developers mailing list