def on_dectectJointsButton_released(self): #boneBinaryImage = age_determination.extract_Bones( self.mOrignialXRayImage ) QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) aClass = AgeDetermination() aClass.setVerbosity( True ) self.mDetectedJoints=aClass.detect_joints_of_interest( self.mOrignialXRayImage ) #self.display_image( joint_marked_image ) QApplication.restoreOverrideCursor() self.rateJointsButton.enabledChange(True)
def on_dectectJointsButton_released(self): #boneBinaryImage = age_determination.extract_Bones( self.mOrignialXRayImage ) QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) aClass = AgeDetermination() aClass.setVerbosity(True) self.mDetectedJoints = aClass.detect_joints_of_interest( self.mOrignialXRayImage) #self.display_image( joint_marked_image ) QApplication.restoreOverrideCursor() self.rateJointsButton.enabledChange(True)
def on_rateJointsButton_released(self): QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) if (self.mDetectedJoints!=None): scoreTable = np.loadtxt('scores/scores.txt') aClass = AgeDetermination() aClass.setVerbosity( True ) #[rateSum, okRatings]=aClass.rate_joints(self.mDetectedJoints,scoreTable) #print "----- FINAL Score is " + str(rateSum) +" with " + str(okRatings)+" found ratings! ------" print "Final prediction: " + str(aClass.rate_joints(self.mDetectedJoints,scoreTable)) else: print "Detect joints first!" QApplication.restoreOverrideCursor()
def on_rateJointsButton_released(self): QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) if (self.mDetectedJoints != None): scoreTable = np.loadtxt('scores/scores.txt') aClass = AgeDetermination() aClass.setVerbosity(True) #[rateSum, okRatings]=aClass.rate_joints(self.mDetectedJoints,scoreTable) #print "----- FINAL Score is " + str(rateSum) +" with " + str(okRatings)+" found ratings! ------" print "Final prediction: " + str( aClass.rate_joints(self.mDetectedJoints, scoreTable)) else: print "Detect joints first!" QApplication.restoreOverrideCursor()