What does uiService.show() do?

imglib2
scijava
imagej
java
uiservice

#1

Hello,

[Comment] I posted a similar question here: Wrap ImagePlus VirtualStack into imglib2, but I thought it is better to start a new thread

Does someone know what below command is currently exactly doing?

uiService.show( imgPlus )

I tried to dig into it using the debugger but I got a bit lost :slight_smile:

In my use-case I have a 3.3GB stack with 3488 z-slices (as an imgPlus). Each z-slice has one RealTransform attached to it, due to an image registration that happened before.

To execute above command takes 510 seconds with very little CPU usage during this time (5%).
To display the same dataset using the BigDataViewer takes around 2 seconds.
To display the same dataset using ImageJFunctions.show() also takes around 2 seconds.

It would be great to understand what exactly happens there in order to maybe improve the performance somewhat.


#2

Dear @Christian_Tischer,

That depends on the context / the active UI. If you are running the legacy UI, imagej-legacy will basically create an ImagePlus that is backed by the ImgPlus to be shown. Did you check if the modern UI shows similar delays to the legacy UI?

Best,
Stefan