[vtkusers] vtkRayCaseVolume mapper in VTK 4.0
Alex Romadinoff
alexeyr at netcracker.com
Mon Dec 23 04:39:30 EST 2002
Bill,
Thank you for answer.
It seams to be very reasonable. In fact if other types are permitted,
mapper should implement improper function of data filtering, i.e.
negative data to something meaningful translation. So this translation
should be performed in color transfer function, but such solution breaks
vtkPiecewiseFunction usage for opacity idiom, so present solution is
very rational.
But the problem is that the solution isn't documented :(
Alex
-----Original Message-----
From: Bill Lorensen [mailto:wlorens1 at nycap.rr.com]
Sent: Saturday, December 21, 2002 12:39 AM
To: Alex Romadinoff; 'Amy Henderson'; vtkusers at public.kitware.com
Subject: RE: [vtkusers] vtkRayCaseVolume mapper in VTK 4.0
Alex,
There is really not a good justification for the limitation. I believe
the concern is that the transfer functions cannot handle negative
independent variables, but this, in my opinion, is an implementation
flaw.
Although I'm not a volume rendering guy, one of these days, I'll remove
this limitation...
Bill
At 09:49 PM 12/20/02 +0300, Alex Romadinoff wrote:
>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
>
>
>
>_______________________________________________
>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