I am currently working on a project where I am using Kitware’s vtk.js library to visualise my VTP files in a React application. So far, I have been able to successfully load and display the VTP file. However, I am facing some challenges when it comes to visualising the Von Mises stress for my VTP file.
I have attached an image below to give you an idea of what I am currently able to visualise and what I aim to achieve. As you can see, I want to add a colour map to represent the Von Mises stress distribution.
I would greatly appreciate it if anyone could guide me on how to achieve this in React using vtk.js. Any pointers, code snippets, or references to relevant documentation would be extremely helpful.
Thank you in advance for your time and assistance.
Regards,
Godric.
Thank you for your previous response. I checked the example you mentioned and was able to color the array and add a scalarBar to my viewer. However, I am encountering an issue.
When I create a look-up table and add it to my mapper, my model is not visible in the viewer. Conversely, when I don’t add the look-up table in the mapper and add it in the scalar Bar, I don’t see the color range in the viewer. With the below code I am not getting range for the array too. I have attached images of both behaviors for reference. Here is my code
Thank you for the help. After setting the color, the issue was resolved. Also, I loaded my VTP file in the Geometry Example and was able to view my data.