-
SCIRun experts I'm wrapping up a project that visualizes position data generated by a tiny Inertial Measurement Unit (IMU). I (separately) parse the raw data from the device to produce a text file that has 3 values per line of text. The 3 values are X, Y, Z position, and the lines are recorded at 1 second intervals. I am able to input that text file and render the position data as a series of spheres that represent the path taken and recorded by the IMU. So far so good. I have access to the X, Y, Z velocity values that were recorded at the same time as the position, so I would like to include the velocity at each position point in the visualization, and show the velocity vector as a glyph. So far I have had zero success. Can you tell me how I should format a data file, or files, to include position and velocity, input them to SCIRun and process them to render the velocity vector at each position point as a glyph? Kim |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
There are a few ways to do this. The simplest way may be to save the vectors as a text file, then load that with Readmatrix and use setfielddata to set the vectors onto the pointcloud. ShowFieldGlyphs should work after that. Another way to save the data to load in the vector field and positions at the same time is to save it in matlab format as a structure. The locations should be set in a field called 'node' or 'pts'. The vectors should be saved in a field called 'field'. one way to make sure that you have vector data assigned to the field is to use reportfieldinfo, or to click on a pipe and press the 'i' key, or to cmd(crt) click on an output port. Look for a vector for vector data, vs vector for scalar data. |
Beta Was this translation helpful? Give feedback.
-
The issue has been resolved. See Reply above. |
Beta Was this translation helpful? Give feedback.
There are a few ways to do this. The simplest way may be to save the vectors as a text file, then load that with Readmatrix and use setfielddata to set the vectors onto the pointcloud. ShowFieldGlyphs should work after that.
Another way to save the data to load in the vector field and positions at the same time is to save it in matlab format as a structure. The locations should be set in a field called 'node' or 'pts'. The vectors should be saved in a field called 'field'.
one way to make sure that you have vector data assigned to the field is to use reportfieldinfo, or to click on a pipe and press the 'i' key, or to cmd(crt) click on an output port. Look for a vector for vector data, vs …