[Insight-developers] behavior of imagetoimagefilters

Lorensen, William E (Research) lorensen@crd.ge.com
Wed, 10 Apr 2002 23:19:16 -0400


More than likely, some class is doing a Modified() when it should not be. If developers use the
Set/Get macros, modified times will be handled properly. If not, the developer must make sure that
Modified is only called when an ivar changes. As a start, check your filter. 

Bill

-----Original Message-----
From: Damion Shelton [mailto:dmshelto@andrew.cmu.edu]
Sent: Wednesday, April 10, 2002 11:14 PM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] behavior of imagetoimagefilters


Hi,

I've run into an interesting/frustrating problem, and I'm hoping that I'm 
just misunderstanding how the pipeline is supposed to be used.

For background, I've written a program that does the following:

1) Load a meta image file (from Luis's brainweb data)

2) Find core atoms in this data - the code is very similar to the core atom 
test

3) Convert the core atoms to VTK unstructured grid points

4) Display the points, along with the image, in VTK

I'm using FLTK to provide a basic interface to interact with pipeline. 
There are several callbacks linked to Fl_Value_Input boxes to change 
parameters of the itkBloxBoundaryPointToCoreAtomImageFilter object in the 
pipeline, and an update button that calls the Update() method of the above 
filter. As long as I don't hit the update button, everything works as 
expected.

As I understand the pipeline, calls to the various Set() commands in the 
filter cause a modified flag to be set in the filter, ensuring that the 
output is updated when the Update() call propogates through the pipeline. 
Additionally, pipeline members that have not be modified are not 
re-executed.

This doesn't seem to be happening, though. First off, the initial execution 
of the pipeline, including all of the preliminary filtering + core atom 
detection takes approximately 20 seconds. After changing the filter 
parameters slightly (not enough to affect actual execution time), updating 
the filter requires more than a minute - again, if I'm understanding things 
right, the filtering done at the beginning should not be happening again, 
so the execution time, if anything, should be less.

In addition, without modifying any filter parameters, calling Update() on 
the filter seems to be causing the filter to execute (at least, something 
is happening). I'm not sure why this is happening, since intuitively 
"updating" something that hasn't changed shouldn't require any 
re-computation.

Any ideas what's going on? There may be a problem in 
itkBloxBoundaryPointToCoreAtomImageFilter, but I'm at a loss. It works fine 
when executed the first time.... perhaps I'm missing an important step 
though? Has anyone seen behavior like this with other filters?

Thanks,
-Damion-
_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers