Skip to content
/ Slicer Public
forked from Slicer/Slicer

Commit

Permalink
ENH: Rename EndoscopyLogic API to interpolate orientation of control …
Browse files Browse the repository at this point in the history
…points

Since the function ensures a smooth transition of orientations along
the control points, this name explicitly mentions the interpolation
of orientations and clarifies that it is associated with control points.

Suggested-by: Lee Newberg <lee.newberg@kitware.com>
  • Loading branch information
jcfr committed Dec 8, 2023
1 parent 9ef20a6 commit 06f0e27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Modules/Scripted/Endoscopy/Endoscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def onSaveOrientationButtonClicked(self):
cameraOrientations = self.logic.saveOrientationAtIndex(resampledCurvePointIndex, self.cameraNode)
self.ignoreInputCurveModified -= 1

self.logic.interpolateOrientations(cameraOrientations)
self.logic.interpolateOrientationsForControlPoints(cameraOrientations)

self.flyTo(resampledCurvePointIndex)

Expand All @@ -450,7 +450,7 @@ def onDeleteOrientationButtonClicked(self):
cameraOrientations = self.logic.removeOrientationAtIndex(resampledCurvePointIndexToDelete)
self.ignoreInputCurveModified -= 1

self.logic.interpolateOrientations(cameraOrientations)
self.logic.interpolateOrientationsForControlPoints(cameraOrientations)

self.flyTo(resampledCurvePointIndexToDelete)

Expand Down Expand Up @@ -639,9 +639,9 @@ def setControlPoints(self, inputCurve: slicer.vtkMRMLMarkupsCurveNode) -> None:

cameraOrientations = EndoscopyLogic.getCameraOrientationsFromInputCurve(inputCurve)

self.interpolateOrientations(cameraOrientations)
self.interpolateOrientationsForControlPoints(cameraOrientations)

def interpolateOrientations(self, cameraOrientations):
def interpolateOrientationsForControlPoints(self, cameraOrientations):

# Configure a vtkQuaternionInterpolator using the user's supplied orientations.
# Note that all distances are as measured along resampledCurve rather than along inputCurve.
Expand Down

0 comments on commit 06f0e27

Please sign in to comment.