[vtkusers] how to convert data type?

Patrick de Koning pjhdekoning at lumc.nl
Mon Feb 12 04:32:35 EST 2001


bo wang wrote:
> 
> Hi,
> 
> I am trying to use filter vtkShepardMethod to resample the points set
> to a structured points set and try to volume render the dataset. The
> code for this pipeline is :
> 
> vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New();
>   volumeMapper->SetInput(shepard->GetOutput());
>   volumeMapper->SetVolumeRayCastFunction(compositeFunction);
> Here is the error information i get:
> 
> ERROR: In d:\nightly\vtk\graphics\vtkVolumeRayCastMapper.cxx, line 912
> vtkVolumeRayCastMapper (0x00307180): The scalar data type: 10 is not
> supported when volume rendering. Please convert the  data to unsigned
> char or unsigned short.
> 
> Does vtkVolumeRayCast only support the data type of unsigned char or
> unsigned short? If yes, how to convert the data set this two types?
> 
Yes it does. Try using vtkImageCast.

> Thanks!
> 
> Bo
> 
> 

-- 
--------------------------------------------------------------------
Ir. P.J.H. de Koning                    Leiden University Medical Center
Department of Radiology, C2S            Division of Image Processing
P.O. Box 9600                           2300 RC  LEIDEN
the Netherlands                         Tel. +31-71-5266206  
Fax +31-71-5266801                      Email patrick at lkeb.azl.nl




More information about the vtkusers mailing list