[vtkusers] How do I convert a vtkExtractVOI to vtkDataset? or using in a vtkProbe
Nico Vermaas
vermaas at astron.nl
Thu Apr 3 08:57:15 EST 2003
Rob,
Brilliant, that was it, thanks a lot...
Nico
====================================================
Nico Vermaas
ASTRON - Westerbork Synthesis Radio Telescope
Schattenberg 1 - 9433 TA Zwiggelte - The Netherlands
tel: +31 593 598710
vermaas at astron.nl
====================================================
>>> "Robert Belleman" <robbel at science.uva.nl> 04/03/03 04:24pm >>>
Nico,
> I have a 'vtkImageData' that I 'clipped' with 'SetVOI' to get a smaller
> datacube. The result is a 'vtkExtractVOI' that I can use in the graphics
> pipeline.
The *class* you use is called vtkExtractVOI.
Its *result* (or "output") is of type vtkImageData.
> I want to use 'vtkProbeFilter' to 'shoot' a line through the dataset and
> draw an XYPlot. It works for my complete dataset (the 'vtkImageData'),
> but not for my clipped dataset (the 'vtkExtractVOI').
>
> My problem is that 'probe->SetSource' requires a 'vtkDataset' and not a
> 'vtkExtractVOI'. I tried this to cast it to 'vtkDataSet', but I get a
> 'segmentation fault' when I run.
You should pass the output of vtkExtractVOI to the probe, not
the class itself. I.e.
probe->SetSource(this->myExtractVOI->GetOutput());
-- Rob
--
[] Robert Belleman X Section Computational Science []
[] robbel at science.uva.nl |X| University of Amsterdam, the Netherlands []
[] tel: (+31) 20 525 7510 X http://www.science.uva.nl/~robbel/ []
More information about the vtkusers
mailing list