Hello,
I am trying to make a "checkbox button" to remove of the 3D view all object distant by more than 5 mm from the current plane.
I can do it "manually" when I have the 3D viewer by clicking on "Scene" -> "Tools" -> in the submenu "Clipping Plane" I select "Clip both Sides" and I set 5 in "Distance to current plane (mm)".
But many users "can't" do it ... so I made a checkbox button on the interface to do that, but what function should I use in python to do the clip ?
Regards,
command line clip
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: command line clip
Hi,
You can do that this way:
import anatomist.api as ana
a = ana.Anatomist()
w = a.createWindow("3D")
a.execute("WindowConfig", windows=[w], clipping=2, clip_distance=5.)
There is the doc here:
http://brainvisa.info/doc/anatomist/htm ... onfig.html
Denis
You can do that this way:
import anatomist.api as ana
a = ana.Anatomist()
w = a.createWindow("3D")
a.execute("WindowConfig", windows=[w], clipping=2, clip_distance=5.)
There is the doc here:
http://brainvisa.info/doc/anatomist/htm ... onfig.html
Denis
Re: command line clip
Hi,
thanks a lot for the answer.
I tried it and I got this:
prop: clip_distance
prop: clipping
prop: window
Exception in command/history writer: missing semantic attribute windows in WindowConfig / command type: WindowConfig
<anatomist.cpp.RegularCommand object at 0x812a628>
thanks a lot for the answer.
I tried it and I got this:
prop: clip_distance
prop: clipping
prop: window
Exception in command/history writer: missing semantic attribute windows in WindowConfig / command type: WindowConfig
<anatomist.cpp.RegularCommand object at 0x812a628>
Re: command line clip
sorry it works.
sorry it works.
I don't know what I changed, but it works now ...
thanks !
sorry it works.
I don't know what I changed, but it works now ...
thanks !