[vtkusers] VTK data visualisation from STL file (using PYTHON 3)
Oleksandr Malyushytsky
omalyushytskyvtkuser at gmail.com
Mon Jul 30 15:16:23 EDT 2018
1-2 Interpolation withing the cell can be done by VTK, but at least without
specifying the logic, vtk has no way to know how the data changes between
your arbitrary points.
So,I afraid You need to assign data values to every cell point
(vtkPointData) yourself.
3 Then you can display data using vtkLookupTable, which would present point
data as a color. cell will be colored by interpolating the colors from cell
points.
One of the (not an exactly what you need) example I could find:
https://lorensen.github.io/VTKExamples/site/Cxx/Graphs/ColorVerticesLookupTable/
You need one data value per node. Better example is present in VTK book.
The vtk example web page may contains more suitable for you example, but
for some reason I cant open them right now.
You may have more luck , check https://www.vtk.org/Wiki/VTK/Examples/Cxx
Best regards,
Alex
On Sat, Jul 28, 2018 at 2:26 AM, Adam Turner via vtkusers <
vtkusers at public.kitware.com> wrote:
> Good morning,
>
> I'm new to VTK and trying to use it to create a visualisation on a 3D
> model. I have my model saved as an STL file and successfully been able to
> import that into my Python Script and render it on screen. However, it is
> several steps short of where I need my visualisation to be. Please could
> someone help me achieve the following?
>
> 1. I need to assign colours to specific locations on the Model, which will
> be represent pressure data from sensors on the real object.
>
> 2. I need to then interpolate between these specific locations to display
> a complete visualisation across the model.
>
> 3. Finally I need a colour scale to help the user know what the colours
> represent, namely what the values at min and max are and what colour
> represents those values.
>
> I really hope someone is able to lend their assistance or can point me to
> an existing tutorial! I don't seem to be able to find one.
>
> Thank you for your time in advance,
>
> Adam
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180730/443a5b8c/attachment.html>
More information about the vtkusers
mailing list