Deriving from a vtk image class

Charles Law at
Tue Aug 10 15:39:01 EDT 1999

<x-flowed>At 02:52 PM 8/10/99 +0200, Roland Schwarz wrote:
> >
> >In VTK3.0,  you can set any sources output to NULL,
> >(i.e. reader->SetOutput(NULL)), and continue to use the orphaned
> >output as a source of data in a pipeline.  This will work for graphics
> >or imaging.
> >
>what do you mean by that? I can't find a 'SetOutput' member function
>on a reader class.

Oh yes,  in VTK 2.*, the method was:
  vtkImageSource::SetCache(vtkImageCache *);

I believe the source I smart enough to create another cache if
you set its cache to NULL and update.

>Also if the number of points in a reader source is zero, the pipeline
>constantly complains about this fact, effectively stopping processing.
>I came over this problem when I tried to used an uninitialized reader
>(filename not yet set). I expected it to behave clean in that it should
>draw nothing when fed into the pipeline. This is not the fact however.
>Do you have a suggestion how to handle this?

This "Problem" is high on my list of changes for VTK 3.0.  I have
not yet gone though an removed the vtkErrorMacros and
vtkWarningMacros yet, but it is necessary before streaming will work.

To fix your problem in version 2.*, comment the macros as you run
into them.  If you find any filters that will handle empty input properly
(segmentation faults...) let me know.

Charles Law

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.


More information about the vtkusers mailing list