Esempio n. 1
0
    def __init__(self, Aponeurosises, fiber):
        """
		Constructor
		
		:param Aponeurosises: The position of the extremities of the aponeurosises
		:type Aponeurosises: list of 2 tuple containing 2 QPoints each
		:param fiber: The position of the extremities of a muscle fascicle
		:type fiber: tuple containing 2 QPoints
		"""
        left0 = numpy.argsort(
            numpy.asarray([Aponeurosises[0][0].x(),
                           Aponeurosises[0][1].x()]))[0]
        left1 = numpy.argsort(
            numpy.asarray([Aponeurosises[1][0].x(),
                           Aponeurosises[1][1].x()]))[0]
        upperAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[0]
        lowerAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[1]
        self.treatmentsList = []
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[upperAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[lowerAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.MuscleTracker2(lines=[
                Aponeurosises[upperAponeurosis],
                Aponeurosises[lowerAponeurosis]
            ],
                                          fiber=fiber))
Esempio n. 2
0
    def __init__(self, Aponeurosises):
        """
		Constructor
		
		:param Aponeurosises: The position of the extremities of the aponeurosises
		:type Aponeurosises: list of 2 tuple containing 2 QPoints each
		"""
        left0 = numpy.argsort(
            numpy.asarray([Aponeurosises[0][0].x(),
                           Aponeurosises[0][1].x()]))[0]
        left1 = numpy.argsort(
            numpy.asarray([Aponeurosises[1][0].x(),
                           Aponeurosises[1][1].x()]))[0]
        upperAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[0]
        lowerAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[1]

        self.treatmentsList = []
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[upperAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[lowerAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.blobDetectionTreatment(lines=Aponeurosises))
Esempio n. 3
0
    def __init__(self, Aponeurosises, manySamples=False):
        """
		Constructor
		
		:param Aponeurosises: The position of the extremities of the aponeurosises
		:type Aponeurosises: list of 2 tuple containing 2 QPoints each
		:param manySamples: if True, use 3 samples instead of one but is three times slower
		:type manySamples: bool
		"""
        left0 = numpy.argsort(
            numpy.asarray([Aponeurosises[0][0].x(),
                           Aponeurosises[0][1].x()]))[0]
        left1 = numpy.argsort(
            numpy.asarray([Aponeurosises[1][0].x(),
                           Aponeurosises[1][1].x()]))[0]
        upperAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[0]
        lowerAponeurosis = numpy.argsort(
            numpy.asarray(
                [Aponeurosises[0][left0].y(), Aponeurosises[1][left1].y()]))[1]
        self.treatmentsList = []
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[upperAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.AponeurosisTracker(
                line=Aponeurosises[lowerAponeurosis]))
        self.treatmentsList.append(
            MainTreatments.testRadon(lines=Aponeurosises,
                                     manyCircles=manySamples))