I have 3d gridded data ( 384, 384, 384) and I have a coordinate data, X, Y, Z each of length 122987. I want to map the coordinate data to the gridded data. It would be helpful if I get a solution to it.
For which data set I should use RessampleToImage filter.
I tried using it on the gridded data, but there isn’t any satisfactory results
The coordinate data is a array data, X, Y, Z. Then I stored into a single array with each column as X,Y,Z. Then I have stored in a .csv file.
The gridded data, is in .VTK file format
@mwestphal
I have extracted data of HI (neutral hydrogen) maps from a binary file, which is I have converted into a 3D gridded data, whose dim is (384, 384 384). I have successfully created a VTK file of this and was able to create a 3D cube of this HI map. I have attached an image of it.
Now I have a data file of Halos( binary file), from which I have extracted the coordinates of halos( X, Y, Z) and then stored it in a CSV file, which has length 122988 each. I have attached the file of this
Now I want to map the coordinates to the HI map. I am not able to understand how to do it.
I hope the explanation helps you.
You can read in your csv file directly into ParaView. ParaView will initially show it as a table. You can then use the Table To Points filter to convert the table into points located in 3D space. Here is a state file that loads your csv file as described.
I tried the method that you suggested me. But there is a problem in scaling I guess. The VTK data is being displayed too small against the coordinate data rather being displayed together. I have attached both the files for your reference. Please let me know if I am doing anything wrong here.
Yes, this is a problem with scaling. The bounds of the grid data goes from 0 to 127 in each dimension whereas the bounds of the points go from 0 to 50,000.
I’m pretty sure the problem is with the grid data. A uniform structured grid has an origin (the position of the lower left corner) and a spacing (the size of each cell in the grid). The default spacing of a grid like this is usually 1 (for lack of a better value). That is probably wrong in your case.
There are multiple ways to fix the problem, but the best would be to fix your data file. You can do it for your HI_8_128_grid.vtk file by opening it in a text editor and changing the 6th line from