03-24-2020 01:44 PM
My VI is receiving about 5k - 10k rows from a database table with the following information:
X(mm) Y(mm) occurrence(#)
0000.00 0000.00 002
0002.00 0000.00 052
0005.00 0000.00 071
....... ....... ...
9999.00 0578.00 300
I would like to take the data and quickly generate an image that I can overlay drawing elements (circles) that will highlight areas of interest.
Is there any way I can improve this vi to
Solved! Go to Solution.
03-24-2020 01:50 PM
Instead of drawing by points couldn't you just convert your data to a pixel array and use Draw Unflattened Pixmap? I think by default your points will be pixels but you could fuzz each one to include neighbor pixels as well, right?
(I don't use much picture stuff, sorry).
03-24-2020 01:51 PM
Just use an intensity graph and quantize the x and y values to a reasonable grid. You can easily do a 2D histogram as described here.
Initialize a 2D I32 array, place in shift register, autoindex on data and use the IPE to increment values at scaled X,Y to array indices. Use a nice color ramp for the z scale.
03-24-2020 02:09 PM - edited 03-24-2020 02:16 PM
@altenbach wrote:
Just use an intensity graph and quantize the x and y values to a reasonable grid. You can easily do a 2D histogram ...
Here's what I had in mind...
(you can hide the x and y scales or remap them to actual values using x0/dx if the scaling is different)
03-24-2020 02:24 PM
@altenbach wrote:
Here's what I had in mind...
(you can hide the x and y scales or remap them to actual values using x0/dx if the scaling is different)
I like the intensity graph, but how would I draw the user's regions of interest on the graph? (eg, a circle r 30 at XY=0,0)
03-24-2020 02:34 PM
03-24-2020 03:04 PM - edited 03-24-2020 03:13 PM
@JScherer wrote:
I like the intensity graph, but how would I draw the user's regions of interest on the graph? (eg, a circle r 30 at XY=0,0)
"Plot images" property.
(example to draw a line, but any 2D image tools are of course allowed)
Here's an old example drawing circles on an intensity graph.
03-24-2020 03:26 PM - edited 03-24-2020 03:43 PM
Simplified example:
(To do: Size graph area such that pixels are square, ensure execution order (draw circles only after axes have autoscaled), Do axis mapping such that data and axes can go from -100 ..+100, etc.)