Deriving from a vtk image class

Charles Law charles.law at kitware.com
Tue Aug 10 15:39:01 EDT 1999


<x-flowed>At 02:52 PM 8/10/99 +0200, Roland Schwarz wrote:
>Charles,
>
> >
> >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
>simply
>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: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------


</x-flowed>



More information about the vtkusers mailing list