[Insight-users] Help with DisconnectPipeline()

Renaud Isabelle renauisa at yahoo.fr
Fri Aug 5 10:04:39 EDT 2005


Hi Luis, 
 
I thought I understood how to use DisconnectPipeline() to grab a filter's output but it seems not to be the case. Could you put light on it please?
 
I just wanna offer the possibility to user to apply an histogram equalization on the displayed image and then return to the older image if desired. So, one way to do it, would be to keep the old image before any histogram equalization, thanks to DisconnectPipeline(), and then reuse it after histogram equalization. Here is what I did:
 
OnButton_HistogramEqualization() 
{

  if(HistEqBtn.GetCheck()) //back to the old image
  {
          rescaleFilter->SetInput(oldImage);
  }
  else // activate histogram equalization
  {
 
          //save the old image to return later to it
          WorkImageType::Pointer oldImage = rescaleFilter->GetOutput();
          oldImage->DisconnectPipeline();

          histeqFilter->SetInput(oldImage);
          histeqFilter->Update();
          rescaleFilter->SetInput(histeqFilter->GetOutput());
  }
  
  rescaleFilter->Update();
}
 
 
But this doesn't work: my image is still the same before an d after button clicked.  Yet, this code seems to be simple and I can't see what I miss. 
 
Btw, could you tell me if: 
 
 histeqFilter->GetOutput()->ReleaseDataFlagOn();
 rescaleFilter->GetOutput()->ReleaseDataFlagOn();
 
could interfere with rescaleFilter->GetOutput()->DisconnectPipeline()?
 
I really need your help,
 
Thanks in advance,
Isabelle

		
---------------------------------
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici !  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050805/2b2edc4b/attachment.html


More information about the Insight-users mailing list