SlicerIGT / SlicerBoneReconstructionPlanner

3D Slicer module for planning mandible reconstruction surgery using fibula flap
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Add 3D views option to select background color, visibility of cube and visibility of axis labels #155

Open mauigna06 opened 1 month ago

mauigna06 commented 1 month ago

background color

color = (0,0,0)
view1 = slicer.app.layoutManager().threeDWidget(0).threeDView()
view2 = slicer.app.layoutManager().threeDWidget(1).threeDView()
view1.mrmlViewNode().SetBackgroundColor(*color)
view2.mrmlViewNode().SetBackgroundColor(*color)

https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#capture-3d-view-into-png-file-with-transparent-background