long message - double support, notifications, user feedback
ken.martin at kitware.com
Tue Apr 25 09:22:52 EDT 2000
1) Double ...
I've always thought the graphics filters should be templated like the
imaging filters are. For many filters the execute method could call a
templated execute function and it would probably only need to be templated
over one or two parameters. Filters like ElevationFilter, ShrinkFilter, etc
should be easy to do.
2) Notifications ...
Your idea looks good here but there are a couple issues. You really would
need to support a list of functions and arguments because typically there
will be more than one object interested in notifications. For example if
you use Tcl we automatically setup a DeleteCallback notification. So right
off the bat every object has a notification set. You need to provide
AddNotification(fcn,arg) and a RemoveNotification(fcn,arg) structure. Also
I would change the API to be
void fcn(void *theThisPointer, void *theUserPassedArg)
So that the "this" pointer is always a default argument in addition to the
user provided argument.
3) Strings in progress methods...
That one has been mentioned before and is easy to add. If we add a
ProgressMessage ivar to vtkProcessObject then execute methods can set it
and progress methods can query it.
At 12:06 PM 4/25/00 +0100, John Biddiscombe wrote:
> >A thought on point #1: can't you use MakeObject() ? This method (a
> >"virtual" constructor creates another object as the same type as the
> >calling object, like so:
>Quite right. Sorry, I contradicted myself - on the one hand I said ignore
>multiple inputs, on the other I gave my solution!. For single input filters
>this will be fine.
>The real trouble is that
>float *pt1 = inPts->GetPoint(i,pt1);
>is used in the vast majority of filters, and needs to be replaced (template
>type approach?), with something that'll handle double as well.
More information about the vtk-developers