[vtkusers] vtkRayCaseVolume mapper in VTK 4.0

Alex Romadinoff alexeyr at netcracker.com
Fri Dec 20 13:49:50 EST 2002


But what's the reason for such limitations?

Alex

-----Original Message-----
From: Amy Henderson [mailto:amy.henderson at kitware.com] 
Sent: Friday, December 20, 2002 9:44 PM
To: Alex Romadinoff; vtkusers at public.kitware.com
Subject: Re: [vtkusers] vtkRayCaseVolume mapper in VTK 4.0

At 09:42 PM 12/20/2002 +0300, Alex Romadinoff wrote:
>Dear all,
>
>I try to render volume data with the following code
>
>// :skipped:
>short* data=new short [1000000];
>
>  for (int i=0; i<1000000; i++){
>      data[i]=120+200*sin(i)*((i+1)%20);
>  }
>
>  vtkImageImport *img=vtkImageImport::New();
>
>  img->SetImportVoidPointer (data);
>  img->SetDataScalarTypeToShort ();
>  img->SetWholeExtent (0, 100, 0, 100, 0, 100);
>  img->SetDataExtentToWholeExtent ();
>// ..skipped..
>vtkVolumeRayCastMapper* volumeMapper=vtkVolumeRayCastMapper::New();
>volumeMapper->SetVolumeRayCastFunction (compositeFunction);
>volumeMapper->SetInput (img->GetOutput());
>// ..skipped
>
>When I use short or double type for data array and do
>SetDataScalarTypeTo{Short|Double} the resultant rendered image is
empty.
>
>When I use unsigned char for data transition, volume is visualized
well.
>
>What's up ?
>Is vtkVolumeRayCastMapper works only for unsigned char data ?

It will handle unsigned char or unsigned short data.
- Amy

>With best wishes,
>Alex
>
>
>
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers






More information about the vtkusers mailing list