[vtkusers] scalar visualization in 3D

Sylvain Jaume sylvain.jaume at kitware.com
Thu Nov 3 15:48:37 EST 2005


Hi Kiran,

Try this if you have data for every point:
polyData->GetPointData()->SetScalars( myScalars );

Or this if you have data for every cell:
polyData->GetCellData()->SetScalars( myScalars );

Best,
Sylvain

kshivann at engineering.uiowa.edu wrote:

> hi,
>  do you know how to access setscalars function in vtkpolydata.
>
> thanks
>
> kiran
>
> Quoting Sylvain Jaume <sylvain.jaume at kitware.com>:
>
>> Hi Kiran,
>>
>> Did you try vtkPointLocator ?
>> You could input surface 1 to vtkPointLocator, and go through every 
>> point in surface 2 to compute the closest point to surface 1. Record 
>> the distance values in a vtkDoubleArray and set it to surface 2 as 
>> Scalars. Note that this computes point to point distances.
>>
>> Best,
>> Sylvain
>>
>> kshivann at engineering.uiowa.edu wrote:
>>
>>> hi all,
>>>   i have two vtkPolyData objects from two STL files that i have read 
>>> in. i want
>>> to calculate the closest distance between the two surfaces at 
>>> various locations
>>> and plot the distance as color coded surface. does anyone know the 
>>> classes that
>>> i should  use to generate the color coded surface.
>>>
>>> thanks
>>>
>>> kiran
>>>
>>> _______________________________________________
>>> This is the private VTK discussion list. Please keep messages 
>>> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>
>
>
>
>



More information about the vtkusers mailing list