We have updated the Endoscopy module – the oldest Python ScriptedModule for 3D Slicer – for functionality, interface, and underneath. You can fly through your path while you watch your progress in the adjacent pane.
First-person view | Third-person view |
---|---|
Now, camera orientations through a flythrough are modifiable, so you can pitch, roll, and yaw the camera to how you want it instead of being stuck with the previous default behavior. At any points in the flythrough, you adjust the camera in the 3d-viewing pane as desired and then hit the “Save keyframe orientation” button in the Flythrough section of the interface; see below. Camera orientations for all remaining frames will automatically be interpolated between the supplied orientations using quaternion slerp to give smooth transitions. Navigation buttons (First, Back, Next, and Last) allow you to quickly find your supplied orientations whenever you want to check, modify, or delete them. The set of supplied camera orientations will be saved to disk with the input curve and can be read and edited at a later time.
Old interface | New Interface |
---|---|
We show a typical example in the video below. We segment an airway, create a path through it, and fly through it. There’s a point where the flythrough isn’t looking where we want, so we first choose good frames before and after that point with the “Save Keyframe Orientation” button. Then we go to the peak frame of the excursion to correct it, and save that with a press of the button. 3D Slicer automatically interpolates the orientations between the supplied keyframes.
Additionally, the interface for the functionality for creating a model to export has been moved to an Advanced section rather than doing it every time a curve is selected for a flythrough.
Behind the scenes, flythroughs now take advantage of the more advanced features of 3D Slicer’s vtkMRMLMarkupsCurveNode
and vtkMRMLMarkupsClosedCurveNode
, rather than only on the simpler vtkMRMLMarkupsFiducialNode
. Furthermore, the 3D Slicer scripted Endoscopy module is upgraded to support multiple display nodes per widget and to replace homegrown mathematical implementations with those from 3D Slicer, VTK, and the Python numpy package.
These changes are now available in the preview build of 3D Slicer.