[Insight-developers] pipeline update problem fixed

Luis Ibanez luis.ibanez@kitware.com
Thu, 25 Apr 2002 17:47:15 -0400


Damion,


Your description about the problem with IO is pretty clear.

Brad encounter the same problem when writing Tcl examples
wrapping ITK.  It basically force you to Update() the reader
manually before the pipeline can be Updated() in the natural
way.

Brad identified the problem as the lack of a standard pipeline
method in the IO readers. It is the method that identifies the
size of the output during the negotiation  of regions for streaming.

We are working on adding this method so the readers behave
correctly as a normal filters.   The fix should be there soon....


    Luis


===========================================

Damion Shelton wrote:

> Hi,
>
> I've managed to fix the weird pipeline update problems I was having. A 
> few observations:
>
> 1) Luis's application model (see the ThinPlateSplines example) helps 
> to promote safe pipeline design.
>
> 2) The image IO update weirdness can be a bit confusing. In the 
> application context it presents the following problem:
>
> I have a bunch of ivars, which are pipeline members. I also have 
> function called CreateITKPipeline, which connects the inputs and 
> outputs appropriately but doesn't update the pipeline. Presumably the 
> reader is part of the pipeline.
>
> Because current implementation, discussed earlier this week, requires 
> the following syntax:
>
>  loader->SetFileName(metaImageFileName);
>  loader->Update();
>  input_image  = loader->GetOutput();
>
> ...it's necessary to split the pipeline into two pieces, which are 
> created at different points in the code. If you attempt something like:
>
>  loader->SetFileName(metaImageFileName);
>  fooFilter->SetInput(loader->GetOutput() );
>  etc.
>
> in the CreateITKPipeline() function, updating the end of the pipeline 
> causes a crash.
>
> Consequently, the program has to be designed something like:
>
> 1) Create reader
> 2) Set file name
> 3) Update reader
> 4) Create main ITK pipeline
> 5) Update ITK pipeline
>
> This is not a huge inconvenience, but is a little bit 
> counterintuitive. Other than that, the combination of ITK, VTK, and 
> FLTK is working out quite well.
>
> -Damion-
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>