예제 #1
0
 def colocalization(self):
     imgR = self.Images[0].npimage
     imgG = self.Images[1].npimage
     self.m_colocalizationHeatmap = colocalizationDetection.coloc(imgR,imgG)
     #Histogram = colocalizationDetection.getAngleHistogram(imgR, imgG, self.m_dims)
     pearsonCoeff = colocalizationDetection.calcPearsonCorrelationCoeff(imgR, imgG)
     MR, MG = colocalizationDetection.calcMandersColocalizationCoeffs(imgR, imgG)
     overlap = colocalizationDetection.calcOverlapCoeff(imgR, imgG)
     self.recalculateResult()    
예제 #2
0
    def colocalization(self):
        self.main_window.statusBar().showMessage('beginning colocalization calculations')
        imgR = self.m_npimages[0]
        imgG = self.m_npimages[1]
        #worker.smooth_image_according_to_heatmatrix(imgG, self.heatmatrix, self.m_factor)

        #Histogram = colocalizationDetection.getAngleHistogram(imgR, imgG, self.m_dims)
        pearsonCoeff = colocalizationDetection.calcPearsonCorrelationCoeff(imgR, imgG)
        MR, MG = colocalizationDetection.calcMandersColocalizationCoeffs(imgR, imgG)
        overlap = colocalizationDetection.calcOverlapCoeff(imgR, imgG)
        message='Pearson = %.3f '%pearsonCoeff+' Manders Green = %.3f '%MG+' Manders Red = %.3f '%MR+' overlap coeff= %.3f '%overlap
        self.main_window.statusBar().showMessage(message)
        #self.m_colocalizationHeatmap = colocalizationDetection.createColocHeatmap(imgR,imgG)
        #a= colocalizationDetection.coordinateBasedColocalization2(imgR,imgG)
        self.m_colocalizationHeatmap.append(colocalizationDetection.CBC(self.m_coords[0], self.m_coords[1], self.m_dims[0], self.m_factor, self.m_dims[0][3]))
        self.m_colocalizationHeatmap.append(colocalizationDetection.CBC(self.m_coords[1], self.m_coords[0], self.m_dims[0], self.m_factor, self.m_dims[0][3]))
        self.toggleColocalizationHeatmap()
        self.recalculateResult()
예제 #3
0
	def colocalization(self):
		self.main_window.statusBar().showMessage('beginning colocalization calculations')
		imgR = self.m_npimages[0]
		imgG = self.m_npimages[1]
		#worker.smooth_image_according_to_heatmatrix(imgG, self.heatmatrix, self.m_factor)
		if self.heatmatrix != []:
			imgG = worker.smooth_image_according_to_heatmatrix_new(imgG, self.heatmatrix, self.m_factor)
		
		
		
		#Histogram = colocalizationDetection.getAngleHistogram(imgR, imgG, self.m_dims)
		pearsonCoeff = colocalizationDetection.calcPearsonCorrelationCoeff(imgR, imgG)
		MR, MG = colocalizationDetection.calcMandersColocalizationCoeffs(imgR, imgG)
		overlap = colocalizationDetection.calcOverlapCoeff(imgR, imgG)
		self.m_colocalizationHeatmap = colocalizationDetection.createColocHeatmap(imgR,imgG)
		self.m_colocalizationHeatmap = colocalizationDetection.coloc(imgR,imgG)
		self.recalculateResult()
		
		print overlap
		message='Pearson = %.3f '%pearsonCoeff+' Manders Green = %.3f '%MG+' Manders Red = %.3f '%MR+' overlap coeff= %.3f '%overlap
		self.main_window.statusBar().showMessage(message)