[Insight-users] How to refresh a filter? filter->Update() doesen't refresh it!

charfeddine amir charfeddine_amir at yahoo.fr
Thu Mar 16 02:12:23 EST 2006


Hi Kevin,
 thx for reply
 i tried the filter->Modified too but it doesen't refresh it.
 I'm using a pipeline of filter:
 
     m_Hx   = GaussianFilterType::New();
     m_Hy   = GaussianFilterType::New();
     
     m_Hx->SetDirection( 0 );
     m_Hy->SetDirection( 1 );
     
     m_H1x  = GaussianFilterType::New();
         
     m_H1x->SetDirection( 0 );
         
     m_H1x->SetOrder( GaussianFilterType::FirstOrder );
         
     m_H1xy = GaussianFilterType::New();
     m_H1xy->SetDirection( 1 );
     m_H1xy->SetOrder( GaussianFilterType::FirstOrder );
     
     m_H2x  = GaussianFilterType::New();
     m_H2y  = GaussianFilterType::New();
     
     m_H2x->SetDirection( 0 );
     m_H2y->SetDirection( 1 );
     
     m_H2x->SetOrder( GaussianFilterType::SecondOrder );
     m_H2y->SetOrder( GaussianFilterType::SecondOrder );
     
     m_Hx->SetInputImage( m_DiasstoledImage );
     m_Hy->SetInputImage( m_DiasstoledImage );
     
     m_H1x->SetInputImage( m_Hy->GetOutput() );
         
     m_H2x->SetInputImage( m_Hy->GetOutput() );
     m_H2y->SetInputImage( m_Hx->GetOutput() );
     
     m_H1xy->SetInputImage( m_H1x->GetOutput() );
     
     m_Eigen = EigenFilterType::New();
     
     m_Eigen->SetInput1( m_H2x->GetOutput() );
     m_Eigen->SetInput2( m_H1xy->GetOutput() );
     m_Eigen->SetInput3( m_H2y->GetOutput() );
     SetSigma();
 
 and this is where i apply the Eigen Filter (On volume):
 
 void
 MyAppBase 
 ::RunGaussian()
 {
 SetSigma();
 this->ShowStatus("Application du filtre Gaussien...");
 
 for(k=0; k<m_inputimagesize[2]; k++)
 {
     pixelIndex[2]=k;
                         
     for(j=0; j<m_inputimagesize[1]; j++)
     {    m_diasstoledimageindex[1]=j;
         pixelIndex[1]=j;
         
         for(i=0; i<m_inputimagesize[0]; i++)
         {
             m_diasstoledimageindex[0]=i;
             pixelIndex[0]=i;
             pixelValue = m_ImageReader->GetOutput()->GetPixel( pixelIndex );//à partir de l'image originale
             //pixelValue = m_OutputImage->GetPixel( pixelIndex );//à partir de l'image segmentée
             m_DiasstoledImage->SetPixel(m_diasstoledimageindex,pixelValue);
         }
     }
 
     m_Eigen->Update();
     m_Eigen->Modified();
     m_outputvolumeindex[2]=k;
 
     for(j=0; j<m_inputimagesize[1]; j++)
     {    
         m_diasstoledimageindex[1]=j;
         m_outputvolumeindex[1]=j;
         for(i=0; i<m_inputimagesize[0]; i++)
         {    
             m_diasstoledimageindex[0]=i;
             m_outputvolumeindex[0]=i;
             pixelValue = m_Eigen->GetOutput()->GetPixel( m_diasstoledimageindex);//à partir de l'image en diasstole filtrée
             m_FiltredVolume->SetPixel(m_outputvolumeindex,pixelValue);
         
         }
     }
 
 }
 
     this->ShowStatus("Application du filtre terminée");
 }
 
 when i visualize the volume, all slices are the same, the first slice isuued from the EigenFilter, so i think the Eigen Filter is not refreshing!
 could any one help me ?
 thx for your time,
 Regards.
 
"Kevin H. Hobbs" <kevin.hobbs.1 at ohiou.edu> a écrit : On Wed, 2006-03-15 at 18:12 +0100, charfeddine amir wrote:
> Hi all
> plz tell me how to refresh a filter?
> i try the Update() method , but it refresh only the first time, and
> keep the same data after,
> thx for reply,
> Regards.
> 
> 
filter->Modified();


		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060316/ff06ec3e/attachment.htm


More information about the Insight-users mailing list