brainglobe / brainrender

a python based software for visualization of neuroanatomical and morphological data.
https://brainglobe.info/documentation/brainrender/index.html
BSD 3-Clause "New" or "Revised" License
538 stars 75 forks source link

[BUG] Brainrender GUI not displaying meshes correctly #286

Closed IgorTatarnikov closed 9 months ago

IgorTatarnikov commented 9 months ago

Describe the bug After running brainrender-gui the GUI opens up, but the root mesh doesn't show at all. See below:

Screenshot 2023-11-30 102045

To Reproduce Run brainrender-gui in the terminal.

Expected behaviour The GUI should open, with the root mesh visible.

Computer used (please complete the following information):

Additional context This can be partly fixed by editing these lines From:

        frame = QFrame()
        self.vtkWidget = QVTKRenderWindowInteractor(frame)

To:

        self.frame = QFrame()
        self.vtkWidget = QVTKRenderWindowInteractor(self.frame)

With this change, the plotter widget now shows up in the GUI.

Screenshot 2023-11-30 103218

To get the root to render, we either have to set immediate_rendering to True in brainrender/settings.py or insert a self.scene.plotter.window.Render() somewhere in brainrender/gui/app.py. I'm not happy with these results because the rendering looks off, and doesn't behave as expected when toggling the visibility of meshes.

https://github.com/brainglobe/brainrender/assets/61896994/b0d8c2eb-41b5-4070-b3c4-5e09d5ee7189

I think this can be solved by finding the correct place to call the Render() method, or by clearing the plotter completly after each update.

adamltyson commented 9 months ago

@brainglobe/active-devs we've discussed this before, but shall we finally remove the GUI and focus on maintaining the Python API and developing brainrender-napari?

alessandrofelder commented 9 months ago

Fine by me. I'd suggest

I will prioritise these feature in brainrender-napari once I've closed https://github.com/brainglobe/brainrender-napari/issues/21

(We'll rely on napari to edit the actor properties)

adamltyson commented 9 months ago

release when brainrender-napari has replacements for

Add cells Add from file

@alessandrofelder considering the GUI is broken, we should be able to release a version without the GUI anytime no? Or do you just want to announce it all together?

alessandrofelder commented 9 months ago

Some parts of the GUI seem to be working in the video above? Do we have an idea whether people are using the GUI? Those are the people I would have wanted to warn with a deprecation warning... I don't have a strong opinion on this though, and if we feel it not worth the overhead, I am happy to remove in one step 🤷

I don't necessarily think the two need to be annouced together... we've already announced we'll deprecate the GUI in the blog.

adamltyson commented 9 months ago

Some parts of the GUI seem to be working in the video above?

I think that's only after @IgorTatarnikov's fiddling. It doesn't work for me out of the box.

Do we have an idea whether people are using the GUI?

I doubt it, considering it's been broken for a long time.