Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

IntensityGraph (millions points ) + vertical cursor (smooth movement)

Hello,

 

I have an IntensityGraph with millions of points and I want to move a vertical cursor smoothly (controlled by a slider) over the displayed data. However, the movement of the cursor is not smooth. I think this is due to the redrawing of the entire dataset for every change of the cursor position.

 

The slider only updates the values which get used at the next update cycle of the graph, which is every 80 ms.

 

Is it possible to just redraw the cursor at the new cursor position and leave the other parts of the graph unchanged?


What solutions are possible?

 

0 Kudos
Message 1 of 4
(1,584 Views)

Can you show us how you are doing things?

 

(I assume this is NOT LabVIEW, right?)

0 Kudos
Message 2 of 4
(1,559 Views)

I hope i captured the relevant things in a simplified form:

 

Language C#:

 

myIntensityGraph = new IntensityGraph()

myIntensityGraph as child of WindowsFormsHost in WPF:

 <WindowsFormsHost>

 </WindowsFormsHost>

 

myIntensityGraph.ImmediateUpdates = false

myPlot = new IntensityPlot()

myIntensityGraph.Plots.Add(myPlot)

 

myCursor = new IntensityCursor()

myIntensityGraph.Cursors.Add(myCursor)

 

myImageData = new double[10000, 1500];

myPlot.Plot(myImageData,….)

 

until here everything works, but the following update is too slow and blocks the UI thread too long (the slider on the GUI which supplies the newValueX begins to jump around):

 

UpdateCursor()

{ //runs every 80ms

myCursor.XPosition = newValueX;

}

 

0 Kudos
Message 3 of 4
(1,515 Views)

Does anyone have tips and tricks on how to handle cursor updates efficiently?

0 Kudos
Message 4 of 4
(1,479 Views)