LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I map a 1D data set (line) into a 2D image (grid)?

Solved!
Go to solution

I am relatively new to LabView still, and would appreciate any advice or guidance.

 

In my measurement system, data is taken as a function of distance only (time also, but I can worry about that later).  The result is an intensity measurement as a function of distance, I(z).  In reality, my 1D line is not straight, it is laid out in the shape of a grid, which I know the specific dimensions of.  I would like to create an image that shows intensity in the shape of this grid, I(x,y).

 

My first effort was starting with a blank image, and assigning rows/columns of pixels a color (temperature) according to the measured value.  But I have had little luck with this so far.

 

Can anyone offer some advice as to how I can create such a 2D image?  How can I map a line into some arbitrary grid shape? 

 

Thanks,

 

Aaron

0 Kudos
Message 1 of 5
(3,925 Views)

How is the 1D array laid out in 2D? Can you attach a typical example.

 

(Sometimes all you need is to reshape the 1D array into 2D, then wire it to an intensity graph. Any other mapping require a bit more code, but probably won't be difficult either).

0 Kudos
Message 2 of 5
(3,896 Views)

I have attached an image to better illustrate my situation.

 

I start with a 2D array of Space and Time.  At any one moment in time, I have a 1D array of Intensity as a function of Distance.  This 1D array I would like to map to some 2D space, a function of (x,y) rather than just length.  This is because, during experiments my 'line' is laid out in some grid pattern.  Suppose I am using a series of temperature sensors attached to a rope, and this rope is laid out into a grid along one plane.  I would like to know the temperature across the plane.

 

I would like to do this at every point in time, to create a map of temperature across the grid as a function of time.

 

In the image, I call out points Zl and Zm to call out that I know how the indices of my 1D space array correlate to actual positions in real space.  I am not sure how to recreate such an image, though, in LabView.

0 Kudos
Message 3 of 5
(3,886 Views)
Solution
Accepted by topic author shotskie

Initialize an 2D array with all zeroes and keep in in a shift register. using "replace array subset", replace elements according to the scaled 2D indices (x,y) with the current temperature (z) value. See how far you get....

0 Kudos
Message 4 of 5
(3,876 Views)

The 2D array worked great!  Thank you for pointing me in the right direction.

0 Kudos
Message 5 of 5
(3,839 Views)