[vtkusers] How do I convert a vtkExtractVOI to vtkDataset? or using in a vtkProbe
Robert Belleman
robbel at science.uva.nl
Thu Apr 3 09:24:57 EST 2003
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