i have already have a script for creating and saving segments using slicer 4.9, i need a image of the 3D view of the model, so i can get a reference image of the 3D model created by script. anyone here who already did this , please share the code lines…
If you use --no-window then there will be no GUI and you have to create a render window, renderer, actor, mapper, set up display properties, camera, and capture the render window. It is perfectly doable, there are lots of examples for these. You’ll probably see your custom render window appearing for a moment. Depending on your environment, you might be able to create an off-screen render window, which does not show up on your desktop at all.
However, it may be simpler to just keep the main window - you can disable the splash screen and hide the main window as soon as it is created, so you would only see a window appearing for a moment.
yeah, i can see in your examples to create render window setup needs lots of elements,
how can we disable splash screen and main window? its sounds easy way…
Hi @lassoan i have tried to setup all the things i.e. camera, mappper , actor , render window , renederer and set of display properties from one of your example( cameraModel1.py).
So now the thing is i tried to set threeDView window to the new render window it working fine in GUI mode , but as i said i want it in --no-window mode, so i tried to run it and error occurs when we try to get threeDView window; as expected, without that line i can render the window which pops for a sec. and then i capture that windows and it disappears.
now my query is - How can i set my segments as an Actor to that render-window?/ How can i show /render the segment in this renderwindow?