LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

polar plot of a data matrix....help is needed

Hello,
 
I'm working on an Ultrasound project, the data coming from the device is transmitted through a USB driver to the PC. I made a VI, that open a connection with the USB device and recieve the data. The coming data are recognized by the LabVIEW as stream of strings, so, i converted the data into a bytes using "string to byte array" function, then I used the function "reshape array" to reshape the data bytes into a 512x64 matrix which represents the no. of samples per ultrasound line times the no. of ultrasound lines.
 
I plotted the data on an intensity graph function and it worked, but the problem is that the data or the matrix must be plotted as a polar plot, not as a cartesian plot.
 
The problem is that I want to convert each single pixel (byte) of the (512x64) matrix from having (x,y) coordinate into a pixel that has (r, angle) coordinate.
 
can you help me plot these data in a polar plot. If any body has any suggestions please help.
 
best regards,
Underzero.
0 Kudos
Message 1 of 12
(6,743 Views)
Rectangular to polar coordinate conversion should be very easy. You can check this link:


http://www.teacherschoice.com.au/Maths_Library/Coordinates/polar_-_rectangular_conversion.htm


Message Edited by RSibagatullin on 07-02-2008 05:13 PM
0 Kudos
Message 2 of 12
(6,734 Views)
You can use the "RE/IM to polar" from the "numeric...complex palette".
0 Kudos
Message 3 of 12
(6,730 Views)
Also, once you have your data using the above function you can use the Polar Plot VI to generate a polar plot. You will find this VI in the Graphics & Sound -> Picture Plots functions palette.



There is an example that ships with LabVIEW to show you how to do polar plots. Run the Example Finder (Help -> Find Examples), and search for "polar".


Message Edited by smercurio_fc on 07-02-2008 05:36 PM

Message Edited by smercurio_fc on 07-02-2008 05:36 PM
0 Kudos
Message 4 of 12
(6,728 Views)
The "polar plot" is a line plot and the OP seens to want a picture.
 
Most likely you can loop over the pixels of the 2D intensity graph and map into your data array with transformed indices.
 
Do you have a typical dataset that you could attach?
0 Kudos
Message 5 of 12
(6,723 Views)

Thanks all of you.....

First, I've searched the LabVIEW help and the examples, but all of it didn't work, and I guess the proper solution is to map the matrix according to the polar coordinates like this: ( r cosq, r sinqð  ( x, y )

The angle q extends from 0 degree to 90 degree ==> the intensity graph plot area.

Now, I've to write down a formula to move about every single pixel in the intensity graph area and apply the above operation to obtain the new coordinates of every pixel.

I think I've to make a loop, I'll try.

Your help is appreciated.

 

Thanks alot RSibagatu…, altenbach, and smercurio…

Best regards,

Underzero.

 

 

 

0 Kudos
Message 6 of 12
(6,702 Views)

@altenbach wrote:
The "polar plot" is a line plot and the OP seens to want a picture.

I didn't get that impression, but you may be right. Not sure.
0 Kudos
Message 7 of 12
(6,685 Views)
Here's a random ultrasound picture from the internet with some annotations added.
Typically, the scan lines are displayed radially as shown, but I would think the raw data is probably square with y=R and x=theta.
 
Just a wild guess. 🙂
 
All we need is a simple remapping in 2D, but we would need to know the x and y axis scaling.
 


Message Edited by altenbach on 07-03-2008 07:43 AM
Message 8 of 12
(6,679 Views)

Hi 

 

I need your help to Plot the data (512bytes) which is coming from PSOC through USB.

now i am able to read the data(512bytes) in labVIEW as a Bulk data but i want to plot the data(512bytes) as like analog waveforms (X and Y graph) in LabVIEW.

 

I am Using LabVIEW14.0. 

 

 

Thanks 

Phani

0 Kudos
Message 9 of 12
(3,835 Views)

Instead of adding to a 7 year old unrelated thread, you should start a new thread instead.

 

Please explain (maybe with an example) what you mean by "bulk data". How is the data arrannged? What is X and what is Y?

0 Kudos
Message 10 of 12
(3,804 Views)