[vtkusers] [vtkusers]: convert vtkDataSetReader type to vtkImageData
Paul McGuinness
mcguinpg at maths.tcd.ie
Wed Jul 2 11:44:56 EDT 2003
Hi All,
Does anyone know how to convert vtkDataSetReader type to vtkImageData?
vtkDataSetReader *sr;
sr = vtkDataSetReader::New();
sr->SetFileName("../data/skull.vtk");
because I would like to do the following:
vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New();
volumeMapper->SetVolumeRayCastFunction(compositeFunction);
volumeMapper->SetInput(sr->GetOutput());
I need sr to be in a vtkImageData type, I get this error:
/home/cs/pmcguinn/visual/project/mummy.cxx: In function `int main (int, char **)':
/home/cs/pmcguinn/visual/project/mummy.cxx:60: no matching function for call to
`vtkVolumeRayCastMapper::SetInput (vtkDataSet *)'/usr/local/include/vtk/vtkVolumeMapper.h:59: candidates are: void vtkVolumeMapper::SetInput(vtkImageData *)
Thanks,
Paul.
p.s.
Doing
vtkImageReader *sr;
sr = vtkImageReader::New();
sr->SetFileName("../data/skull.vtk");
won't work.
More information about the vtkusers
mailing list