How to divide the coordinates / scale down the coordinates of vti file in paraview.

Dear All,

I have a .vti file extension which contains around 6 million datapoints. The coordinates has dimensions of 241 in x-direction, 168 in y-direction and 144 in z-direction.

  1. I need to scale down this dimension by 10 times. How can I do that in paraview.?

  2. My procedure was to export the dataset to csv file, then scale down 10 times and load the csv file again. Is this the only way? Can we do internally inside paraview itself. I tried using calculator but I could not get proper result.

Please let me know how to proceed with this.

Thanks and Regards,

Sunag R A.

Have you tried the Transform filter?

Dear Tobias,

I just tried with the transform filter and it works fine. But it is consuming a lot of memory for either scaling up or scaling down. It might be because of the amount of datapoints. Once I use transform filter, rendering takes a lot of time and after render also, It consumes a lot of time for each movement in paraview screen. My original .vti file takes a memory of 5.7MB, while after transform it takes around 1.4e2 MB.

  1. I have one more different vtk file which has around 0.5M datapoints with a memory of 7MB. But for this, after transform it takes the same memory size.
  2. Is there any possible way to get away with the memory issues for the 6M datapoints.?

Thanks and Regards,
Sunag R A.

Hi Sunag,

I don’t know how to avoid the additional memory consumption. Two thoughts:

  1. Check if you need to load all data. Maybe some fields are enough.
  2. Make the data scaling before using PV, as you already wrote. This can be done with a script.

Dear Tobias,

Thank you very much for the reply.

  1. I need all the coordinate datapoints which cannot be avoided as of now.
  2. I actually tried externally by exporting to csv and scaling it by using python. But the problem is I am getting coordinate value error while exporting to csv file. I will get the coordinate datapoints of all rows but it is not correctly aligned. I can change it manually by some code. But everytime, it is not possible for manual check. I have also posted regarding this in the below forum separately.
  3. I have also posted the csv dataset link in that.

Export_to_csv_paraview

I have also attached below the vti file for reference.

vti file

Thanks and Regards,

Sunag R A.

Here are a couple more things you can try.

First, you can turn on the advanced properties in the Properties panel and find the Transform controls under the Display parameters. You can use this to scale the rendering of your data much like the Transform filter but without the consequence of changing the actual data.

You can also try opening the vti file in a simple text editor. (You will need one that will not try to re-encode the binary parts. vi or emacs should work fine.) Look for the XML tag that specifies the spacing and edit that to make the spacing smaller.

Finally, you could use the Programmable Filter to copy your image data and change the spacing parameter of the output data. That takes a little bit of Python programming, though.