Creating a 3D wave using a 2D data set.

I have been watching all the tutorials about displaying 3D data. It is all nice but none of them tells me how to turn my data into the proper format to perform the task. I have a data set where the first column is the X position, the second column is the Y position the third column is the Z position and finally the forth column is the value of the density(or whatever else) at the position in the volume. I want to create a volumetric plot where I can generate planes and move then around just like the example in the "Slicer" video.

Thanks

Denis
Hello Denis,

The "natural" format for data of the type that you are describing is a 3D IGOR wave that contains ONLY the scalar density "(or whatever else)" values. It is then assumed that the scalars are sampled on a 3D rectangular grid specified via wave scaling.

The best approach to convert your data to this format may vary depending on how your data are sampled and in which format they originate. If your data are sampled on a 3D rectangular grid then all you have to do is take the wave corresponding to the scalar density and using the Redimension operation convert it into a 3D wave. For example, suppose your 1D scalar wave (scalarWave) had 6000 points that were sampled in 10 rows, 20 columns and 30 layers. You'd then execute:

Redimension/N=(10,20,30) myScalarWave

You can now use the SetScale operation to apply the X, Y and Z scaling and your data are ready for display in Gizmo.

If your data were not sampled on a rectangular grid you'd have to resample/interpolate them. This is a bit more complicated but here are the necessary steps:

The first step is to convert your XYZ coordinates into a triplet wave. This can be done as in:

Concatenate {xWave,yWave,zWave}, tripletWave

You can also create another wave that you will need later:

Concatenate {xWave,yWave,zWave,densityWave}, quadWave


In the next step you triangulate the data in 3 dimensions using the command:

Triangulate3D tripletWave

This is actually decomposing the space into tetrahedra which are used in the next step in Interpolate3D. The interpolation command looks like:

Interpolate3D /RNGX={-30,1,80}/RNGY={-40,1,80}/RNGZ={-40,1,80}/DEST=W_Interp triangulationWave=M_3dVertexList,srcWave= quadWave

Here you need to insert your own ranges and sampling densities for RNG(XYZ). The result of the operation is stored in the wave W_Interp which you can then use in Gizmo to display slices etc.

Note that this resampling process is fairly complex and involves an O(N^3) steps which can very quickly get computationally intensive. This suggests that if at all possible you should try to use regularly sampled scalars as opposed to an arbitrary scatter.

I hope this helps,

A.G.
WaveMetrics, Inc.



Thanks, I might be able to get some interesting results with this approach. My data is not acquired in a nice pattern which is why it is hard to display. I will try your suggestions for sure. Thanks again

Denis

P.S. The data was actually acquired in a very specific pattern. It was done in Cylindrical coordinate. Does that make a difference? The steps between radius and angle sizes were very specific.