Im running my module from the terminal using --no-main-window, and I wondering if its possible to show just an external view like that.
The idea is run the module from the terminal with 3dS in the back, in some moment the external view appears (necessary to put a point), then close it and continue with the rest of the process.
I would recommend to use the main window, as it makes everything much simpler (and allows you to switch back to the full Slicer GUI for testing and troubleshooting very easily).
You can hide unnecessary decoration of the window using slicer.util.set...Visible functions:
showFull = False # set it to True to show the full Slicer GUI
slicer.util.setMenuBarsVisible(showFull)
slicer.util.setStatusBarVisible(showFull)
slicer.util.setToolbarsVisible(showFull)
slicer.util.findChild(None, "PanelDockWidget").setVisible(showFull)
I don’t think you can create a main window later, but what you can do is to hide the main window right after it is created. It will just pop up for a fraction of a second. If you don’t want the main window to appear even for a very short time then I think you need to implement a custom application and change the main window initialization.
You can also keep a running Slicer in the background and just send commands to execute using web requests (executed by the WebServer module). This has the advantage that Slicer has to be started only once when the computer starts (or the first time it is needed) and it can stay hidden in the background until it is needed to display something.