CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Reversing slices (https://www.cfd-online.com/Forums/paraview/159997-reversing-slices.html)

ArjanB September 29, 2015 07:02

Reversing slices
 
I am trying to align two datasets, one with scalar data and one with vector data. The only inconsistency, it seems, is that slice 0 in the scalar data corresponds to slice 25 in the vector data and vice versa.

Being rather new to Paraview, I'm hoping that someone can tell me how I perform something like the following in Paraview:
Code:

for i = 0 to 25
  newSlices[i] = slices[25-i]

Or:
Code:

for z = 0 to 25
  newScalar[x][y][z] = scalar[x][y][25-z]

Thanks in advance!

Flowkersma October 18, 2015 19:02

Hi,

Could you explain more closely what you want to do? If you just want to revese an array then you can do it by
Code:

newSlices = list(reversed(slices))
or maybe you could try to interpolate from one dataset to other? This can be done by using ResampleWithDataset filter.

Regards,
Mikko


All times are GMT -4. The time now is 19:48.