The software has a brief white screen when recovering from minimization

When I open the histogram display, the program will show a white screen when it recovers from the minimized state.
When I turned off the real-time update of the histogram in the source code, it didn’t work.
May I ask how this problem can be solved?

Thanks for reporting. I could reproduce this behavior on my computer, too.

When you restore the window from minimized state then the histogram is recomputed (in qSlicerScalarVolumeDisplayWidget::showEvent(...)). This may take a little time and maybe it also invalidates some screen buffers, which makes the operating system show a blank window during the window restore animation.

The histogram is recomputed when the widget gets shown because the histogram updates are blocked when when the histogram widget is not visible (otherwise there would be a lot of unnecessary computations when images are continuously streamed into Slicer at a high framerate). So, this histogram recomputation cannot be simply removed, but the logic could be more sophisticated: we could compare the last update time of the histogram and and the last update time of the input image data and if we find that the histogram is more recent than the image then the update could be skipped.

This is a very small cosmetic issue, and a fix is not likely to be needed for any of the funded projects, so I’m not sure if any Slicer developers would work on this right away. However, you can submit a feature request to keep track of it and wait for it to be fixed; or if it’s more urgent then you can provide development resources (e.g., implement it yourself and send a pull request, or fund some developers to work on it).

1 Like

Thank you for your advice, Mr Lasso.

Present, we temporarily commented on the code " this->updateHIstogram()"

It works well!

By removing the update, the histogram may show the previously selected volume’s histogram. I would recommend to implement the logic that checks if you need to update the histogram and only skip the update if it is safe to do so.