Sluggish graph performance when displaying single layers of 3D data

In my image profile tool ( ) I notice really slow performance when working with layers of 3D data. Here, a single layer of the data is displayed as an image at a time. In particular, dragging around live lines (ModifyGraph quickdrag()) takes its time until everything updates. I initially thought this is due to the computation of profiles from the 3D data. But while trying to optimize my code I realized this is solely due to the graphs performance. Simply replacing the image with one extracted layer (i.e., 2D data) makes everything snappy again. I would guess the lag is half a second or so when displaying data of size 300, 1000, 20 on my PC. Increasing the number of layers to 50 makes this a second or more. I would think everything other than the currently displayed layer is ignored, but apparently not. Is there some option to tweak this or is my only option to extract and display single layers manually here? I am using Igor 9 on Windows 10.

I am also using the ModifyImage ... plane=N method for stacks in Image Tools. I have yet to see a performance lag, but I am not doing anything needing dynamic input (e.g. analyzing with a moveable line profile) ... yet.

So I am also curious what the best approach might be.

Thanks for your reply. This could be a Windows-specific issue. I noticed that drawing of a graph window containing the stack itself has already a noticeable lag when for example adjusting the window size with the mouse. It seems that the image update function scales very much with total data size, regardless of what fraction is actually displayed. I tried to play around with different Graph Tech modes and graph settings. Nothing helped much, but I got the feeling that switching off image interpolation (ModifyImage ''#0 interpolate=0) helped a tiny bit. Interestingly, this seems not to be a problem for traces. If I display just one trace from the same big 3D data, graph performance is unaffected. It seems to me more and more that there is some kind of bottleneck in the image drawing code of Igor. I tired to push this to the extreme. Try for example displaying a stack from a wave sized 3000, 1000, 100 (which is over 1 GB), then drag the edge of the graph. On my PC it takes about 4-5 seconds until the graph finishes redrawing.

In case it is any help, I did tests profiling an image (sin(p/r)*cos(q/r)*(255-r)) in Spectra Tools on my MBP 16in Intel processor system. The first image was a (3000,1000,100) /B/U image stack. The second was the same as an fp64 image. I see no noticeable lag in either case.

Thanks for testing this. I wrote the support for now. I let you know what they have to say.

Meanwhile, Adam from WM has replied already and solved the issue for me. I quote him here for reference:

By default, an image that uses a color table with autoscaling will autoscale considering the entire image, not just the layer that is visible. Most of the time is spent determining the minimum and maximum values of the wave with 250 million points. You can limit the autoscale calculation to only the visible layer with:

ModifyImage test ctabAutoscale=2

After applying this change, the performance is back to single-image levels.