Exemple #1
0
 def getPointCloudLocationFromImage(self, imagePixel, imageView, polyData):
     cameraPos, ray = imageView.getWorldPositionAndRay(imagePixel)
     return segmentation.extractPointsAlongClickRay(
         cameraPos,
         ray,
         polyData,
         distanceToLineThreshold=self.pickLineRadius,
         nearestToCamera=self.pickNearestToCamera)
Exemple #2
0
    def onImageViewDoubleClick(self, displayPoint, modifiers, imageView):

        if modifiers != QtCore.Qt.ControlModifier:
            return

        imagePixel = imageView.getImagePixel(displayPoint)
        cameraPos, ray = imageView.getWorldPositionAndRay(imagePixel)

        polyData = self.updatePointcloudSnapshot().polyData
        pickPoint = segmentation.extractPointsAlongClickRay(
            cameraPos, ray, polyData)

        om.removeFromObjectModel(om.findObjectByName('valve'))
        segmentation.segmentValveByBoundingBox(polyData, pickPoint)
        self.findAffordance()
Exemple #3
0
    def onImageViewDoubleClick(self, displayPoint, modifiers, imageView):

        if modifiers != QtCore.Qt.ControlModifier:
            return

        imagePixel = imageView.getImagePixel(displayPoint)
        cameraPos, ray = imageView.getWorldPositionAndRay(imagePixel)

        polyData = self.updatePointcloudSnapshot().polyData
        pickPoint = segmentation.extractPointsAlongClickRay(cameraPos, ray,
                                                            polyData)

        om.removeFromObjectModel(om.findObjectByName('valve'))
        segmentation.segmentValveByBoundingBox(polyData, pickPoint)
        self.findAffordance()
Exemple #4
0
 def getPointCloudLocationFromImage(self, imagePixel, imageView, polyData):
     cameraPos, ray = imageView.getWorldPositionAndRay(imagePixel)
     return segmentation.extractPointsAlongClickRay(cameraPos, ray, polyData, distanceToLineThreshold=self.pickLineRadius, nearestToCamera=self.pickNearestToCamera)