Re: [Insight-users] Filtering in a loop structure

Tomáš Kazmar Tomash.Kazmar at seznam.cz
Mon Oct 1 04:16:47 EDT 2007


Hi Dario,

  you did not specify what error it gives you, but I would suggest you to
add call to imageFiltered->DisconnectPipeline() at the end of the loop
and to ensure that your filter is actually calling GenerateData() at all if
not then there maybe missing a call to filter->Modified().

I am just making this up, more insight would be usefull.


Regards,
Tomas


# ------------ Původní zpráva ------------
# Od: Dário Oliveira <dariodisk at gmail.com>
# Předmět: [Insight-users] Filtering in a loop structure
# Datum: 28.9.2007 02:06:53
# ----------------------------------------
#  *Hi friends,*
# **
# *I have this quick question. How can I perform a filtering inside a loop
# structure? I suppose that the error is related to the pipeline that is only
# updated when the filter is called again, making a (might) non-sense case
# where the input is actually the output of the filter. Is there any way to
# perform this correctly?*
# **
# *I'm sending the code in which I'm facing the problem ( I got an empty
# image in the end of the loop, and the filtering would never generate it ).*
# **
# *for* (*int* i =0; i<=2; ++i)
# 
# {
# 
# filter->SetInput(imageFiltered);
# 
# filter->*Update*();
# 
# imageFiltered=filter->GetOutput();
# 
# }
# *Thanks in advance!*
# 
# -- 
# Dário Oliveira
# 
# 
# 


More information about the Insight-users mailing list