[Insight-users] simple question

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue Aug 9 17:19:39 EDT 2005



Renaud Isabelle wrote:

> Hi,
>  
> Is it possible to retrieve the input of a filter to make it the input 
> of another filter. Here is what I have:
>  
> *rescaleFilter->SetInput( filterA->GetOutput() );*
> or
> *rescaleFilter->SetInput( filterB->GetOutput() ), *
>  
> filterA and B are histogram equalization filter or log filter 
> depending on the choice of the user.

That's possible as long as filterA and filterB give similar the same 
outputtype that rescaleFilter is templated over .

>  
> After having applied a filter to enhance my image, now, I would like 
> to smooth ny enhanced image. So, I would like to have:
>  
> with filter A or B,
>       *smoothingFilter->SetInput( rescaleFilter->GetInput() ), *
>                             //filterA->GetOutput() or 
> filterB->GetOutput()
>       *rescaleFilter->SetInput( smoothingFilter->GetOutput() )*

Is this pipeline going around in circles ?

If you need to re-use the output of  a filter as an input, you will need 
to disconnect the pipeline.

For instance,

smoothingFilter->SetInput( rescaleFilter->GetOutput() );
smoothingFilter->Update();

smoothingFilter->GetOutput()->DisconnectPipeline();
rescaleFilter->SetInput( smoothingFilter->GetOutput() );
rescaleFilter->Update();

>  
> But it seems not to be possible because of converting SmartPointer to 
> ConstPointer. Is there a trick?
>  
> Isabelle
>  
>
> ------------------------------------------------------------------------
> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo! 
> Messenger
> Téléchargez le ici ! 
> <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com> 
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>


More information about the Insight-users mailing list