当前位置: 首页>>代码示例>>Python>>正文


Python Logging.info方法代码示例

本文整理汇总了Python中Logging.info方法的典型用法代码示例。如果您正苦于以下问题:Python Logging.info方法的具体用法?Python Logging.info怎么用?Python Logging.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logging的用法示例。


在下文中一共展示了Logging.info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onSelectionChanged

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def onSelectionChanged(self, event = None):
		"""
		A event handler called when user selects an item.
		"""
		if self.ignore:
			event.Skip()
			return
		item = event.GetItem()
		self.lastSelection = item
		if not item.IsOk():
			return
		
		if item not in self.tree.GetSelections(): # Make selection work on 64-bit Win7
			self.tree.SelectItem(item)
		
		obj = self.tree.GetPyData(item)
		if obj == "1":
			return
		self.item = item
		if obj and type(obj) != types.StringType:
			if self.lastobj != obj:
				Logging.info("Switching to ", obj)
				lib.messenger.send(None, "clear_cache_dataunits")
				lib.messenger.send(None, "tree_selection_changed", obj)
				self.markGreen([item])
				self.lastobj = obj
		self.multiSelect = 0
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:29,代码来源:TreeWidget.py

示例2: paintFreeMode

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def paintFreeMode(self, redfunc, greenfunc, bluefunc, alphafunc, maximumValue = -1):
		"""
		Paints the graph of the function specified as a list of all values of the function		   
		"""
		self.dc = wx.MemoryDC()
		self.dc.SelectObject(self.buffer)

		d = self.maxx / float(maximumValue)
		if d < 1:d = 1
		if not self.background:
			Logging.info("Constructing background from minval = %d, maxval = %d" % (self.minval, self.maxval))
			self.background = self.drawBackground(self.minval, self.maxval)
		self.dc.BeginDrawing()
		self.dc.DrawBitmap(self.background, 0, 0)
		coeff = float(self.maxx) / maximumValue

		redline = [(int(x * coeff), self.maxy - y) for x, y in enumerate(redfunc)]
		greenline = [(int(x * coeff), self.maxy - y) for x, y in enumerate(greenfunc)]
		blueline = [(int(x * coeff), self.maxy - y) for x, y in enumerate(bluefunc)]
		alphaline = [(int(x * coeff), self.maxy - y) for x, y in enumerate(alphafunc)]
		
		self.dc.SetPen(wx.Pen(wx.Colour(255, 0, 0), 1))
		self.dc.DrawLines(redline, self.xoffset, self.yoffset)
		self.dc.SetPen(wx.Pen(wx.Colour(0, 255, 0), 1))
		self.dc.DrawLines(greenline, self.xoffset, self.yoffset)
		self.dc.SetPen(wx.Pen(wx.Colour(0, 0, 255), 1))
		self.dc.DrawLines(blueline, self.xoffset, self.yoffset)
		self.dc.SetPen(wx.Pen(wx.Colour(255, 255, 255), 1))
		self.dc.DrawLines(alphaline, self.xoffset, self.yoffset)
		
		self.dc.SelectObject(wx.NullBitmap)
		self.dc = None		  
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:34,代码来源:ColorTransferEditor.py

示例3: onFreeMode

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def onFreeMode(self, event):
		"""
		Toggle free mode on / off
		"""
		was = 0
		if self.freeMode:was = 1
		if not was and event.GetIsDown():
			self.updateCTFFromPoints()
			self.updateGraph()
			self.freeMode = 1
			self.setFromColorTransferFunction(self.ctf, self.otf)
			
		if was:
			self.updateCTFFromPoints()
			
		self.freeMode = event.GetIsDown()
		if not self.freeMode and was and self.hasPainted:
			Logging.info("Analyzing free mode for points", kw = "ctf")
			
			self.getPointsFromFree()
			n = len(self.points)
			tot = 0
			for i, pts in enumerate(self.points):
				tot += len(pts)
			
			maxpts = self.maxNodes.GetValue()
			if maxpts < tot:
				self.onSetMaxNodes(None)
		self.updateGraph()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:31,代码来源:ColorTransferEditor.py

示例4: addInput

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
    def addInput(self, dataunit, data):
        """
		Adds an input for the color merging filter
		"""
        settings = dataunit.getSettings()
        if not settings.get("PreviewChannel"):
            Logging.info("Not including ", dataunit, "in merging", kw="processing")
            return

        Module.addInput(self, dataunit, data)

        self.n += 1

        ctf = settings.get("ColorTransferFunction")

        # 		Logging.info("ctf=",ctf,kw="processing")

        self.ctfs.append(ctf)

        self.alphaTF = settings.get("AlphaTransferFunction")
        self.alphaMode = settings.get("AlphaMode")
        # print "n=",self.n,"self.settings=",self.settings
        # itf=self.settings.getCounted("IntensityTransferFunction",self.n)

        itf = settings.get("IntensityTransferFunction")

        if not itf:
            Logging.info("Didn't get iTF", kw="processing")
        self.intensityTransferFunctions.append(itf)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:31,代码来源:Merging.py

示例5: setScatterplot

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def setScatterplot(self, plot):
		"""
		Sets the scatterplot as vtkImageData
		"""
		self.scatterplot = plot
		x0, x1 = self.scatterplot.GetScalarRange()
		Logging.info("Scalar range of scatterplot=", x0, x1, kw = "processing")
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:9,代码来源:Scatterplot.py

示例6: setDataUnit

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def setDataUnit(self, dataUnit, selectedItem = -1):
		"""
		Set the dataunit used for preview. Should be a combined 
					 data unit, the source units of which we can get and read 
					 as ImageData
		"""
		Logging.info("Setting dataunit of PreviewFrame to %s"%str(dataUnit), kw="preview")

		if not dataUnit:
			self.dataUnit = None
			self.z = 0
			self.slice = None
			self.updatePreview()
			self.Refresh()
			return
		
		self.dataUnit = dataUnit
		self.settings = dataUnit.getSettings()
		self.updateColor()
		InteractivePanel.setDataUnit(self, self.dataUnit)
		
		try:
			count = dataUnit.getNumberOfTimepoints()
			x, y, z = dataUnit.getDimensions()
		except Logging.GUIError, ex:
			ex.show()
			return
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:29,代码来源:PreviewFrame.py

示例7: setZoomFactor

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def setZoomFactor(self, newFactor):
		"""
		Sets the factor by which the image should be zoomed
		"""
		self.zoomToFitFlag = False
		Logging.info("Setting zoom factor to ", newFactor, kw = "preview")
		x, y = [a*newFactor for a in (self.dataDimX, self.dataDimY)]
		if scripting.resampleToFit:
			optimize.set_target_size(x, y)
			newFactor = 1
		px, py = self.paintSize
		
		x = max(px, x)
		y = max(py, y)
		Logging.info("New dims for buffer=",x,y,kw="preview")
		self.buffer = wx.EmptyBitmap(x, y)
		self.setScrollbars(x, y)
		if newFactor < self.zoomFactor:
			# black the preview
			slice = self.slice
			self.slice = None
			self.paintPreview()
			self.slice = slice
		self.zoomFactor = newFactor
		scripting.zoomFactor = newFactor
		self.updateAnnotations()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:28,代码来源:PreviewFrame.py

示例8: getSpacing

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def getSpacing(self):
		
		if not self.spacing:
			a, b, c = self.reader.GetVoxelSizes()
			Logging.info("Voxel sizes = ", a, b, c, kw = "lsmreader")
			self.spacing = [1, b / a, c / a]
		return self.spacing
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:9,代码来源:LSMDataSource.py

示例9: remove_connection_inloop

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def remove_connection_inloop(self, conn):
		self._loop.assert_thread()
		Logging.info('TcpServer::remove_connection [%s] - [%s]' % (self._name, conn.name()))
		del self._connections[conn.name()]

		loop = conn.get_loop()
		loop.run_in_loop(conn.connection_destroyed)
开发者ID:carlchen0928,项目名称:SusieSocks,代码行数:9,代码来源:TcpServer.py

示例10: updateSettings

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def updateSettings(self, force = 0):
		"""
		A method used to set the GUI widgets to their proper values
					 based on the selected channel, the settings of which are 
					 stored in the instance variable self.configSetting
		"""
		if self.dataUnit and self.settings:
			ctf = self.settings.get("ColorTransferFunction")
			if ctf and self.colorBtn:
				Logging.info("Setting ctf of color button", kw = "ctf")
				self.colorBtn.setColorTransferFunction(ctf)
				self.colorBtn.Refresh()
	
			#Logging.info("settings=",self.settings,kw="task")
			tf = self.settings.get("IntensityTransferFunction")
			self.intensityTransferEditor.setIntensityTransferFunction(tf)
			try:
				mode = self.settings.get("AlphaMode")
				if types.StringType == type(mode):
					mode = eval(mode)
				self.alphaModeBox.SetSelection(mode[0])
				if mode[0] == 1:
					self.averageEdit.Enable(1)
				else:
					self.averageEdit.Enable(0)
				self.averageEdit.SetValue(str(mode[1]))
			except:
				pass
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:30,代码来源:MergingPanel.py

示例11: restoreFromCache

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def restoreFromCache(self, cachedSettings = None):
		"""
		Restore settings for the dataunit and source dataunits from a cache entry
		"""
		# Load the cached settings
		if not cachedSettings:
			if self.cacheKey:
				cachedSettings, cacheParser = scripting.getSettingsFromCache(self.cacheKey)
			
		if not cachedSettings:
			Logging.info("No settings found in cache", kw = "caching")
			return
		Logging.info("Restoring settings with key %s from cache" % (str(self.cacheKey)), kw = "caching")
		combined = cachedSettings[0]
		self.dataUnit.setSettings(combined)
		sources = self.dataUnit.getSourceDataUnits()
		for i, setting in enumerate(cachedSettings[1:]):
			#print "Setting settings of source %d"%i
			#DataUnitSetting.DataUnitSettings.initialize(setting,sources[i],len(sources),sources[i].getNumberOfTimepoints())
			sources[i].setSettings(setting)
			#tf=setting.get("IntensityTransferFunction")
			#print setting,tf
			#print "\n\nSetting itf ",i,"= itf with 0=",tf.GetValue(0),"and 255=",tf.GetValue(255)
		self.settings = sources[self.settingsIndex].getSettings()
		self.cacheParser = cacheParser
		self.updateSettings(force = True)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:28,代码来源:TaskPanel.py

示例12: getIntensityScaledData

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def getIntensityScaledData(self, data):
		"""
		Return the data shifted and scaled to appropriate intensity range
		"""
		if not self.explicitScale:
			return data
		
		if self.intensityScale == -1:
			return data
		
		if not self.shift:
			self.shift = vtk.vtkImageShiftScale()
			self.shift.SetOutputScalarTypeToUnsignedChar()
			self.shift.SetClampOverflow(1)
		
		self.shift.SetInputConnection(data.GetProducerPort())
		# Need to call this or it will remember the whole extent it got from resampling
		self.shift.UpdateWholeExtent()

		if self.intensityScale:
			self.shift.SetScale(self.intensityScale)
			currScale = self.intensityScale
		else:
			minval, maxval = self.originalScalarRange
			scale = 255.0 / maxval
			self.shift.SetScale(scale)
			currScale = scale
		
		self.shift.SetShift(self.intensityShift)
		
		Logging.info("Intensity shift = %d, scale = %f"%(self.intensityShift, currScale), kw="datasource")
		
		return self.shift.GetOutput()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:35,代码来源:DataSource.py

示例13: setResampleDimensions

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def setResampleDimensions(self, dims):
		"""
		Set the resample dimensions
		"""
		Logging.info("Setting dimensions of resampled image to ",dims,kw="datasource")
		self.resampleDims = [int(dimension) for dimension in dims]
		lib.messenger.send(None, "set_resample_dims", dims, self.originalDimensions)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:9,代码来源:DataSource.py

示例14: loadBXDLutFromString

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
def loadBXDLutFromString(lut, ctf):
    """
	Load a BXD format lut from a given string
	"""
    lut = lut[6:]
    start, end = struct.unpack("ff", lut[0:8])
    lut = lut[8:]
    Logging.info("The palette is in range %d-%d" % (start, end), kw="ctf")
    j = 0

    # start = int(start)
    # end = int(end)

    handle = vtkbxd.vtkHandleColorTransferFunction()
    handle.SetInputString(lut, len(lut))
    handle.LoadColorTransferFunctionFromString(ctf, start, end)

    # k = ( len(lut) / 3 ) - 1
    # reds = lut[0: k + 1]
    # greens = lut[k + 1: 2 * k + 2]
    # blues = lut[(2 * k) + 2: 3 * k + 3]

    # j = 0
    # for i in range(start, end + 1):
    # 	red = ord(reds[j])
    # 	green = ord(greens[j])
    # 	blue = ord(blues[j])

    # 	red /= 255.0
    # 	green /= 255.0
    # 	blue /= 255.0
    # 	ctf.AddRGBPoint(i, red, green, blue)
    # 	j += 1

    return
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:37,代码来源:ImageOperations.py

示例15: activate

# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import info [as 别名]
	def activate(self, sidebarwin):
		"""
		Set the mode of visualization
		"""
		self.sidebarWin = sidebarwin
		Logging.info("Disabling tasks in menu", kw = "visualizer")
		self.menuManager.mainToolbar.EnableTool(MenuManager.ID_ADJUST, 0)
		self.menuManager.mainToolbar.EnableTool(MenuManager.ID_RESTORE, 0)
		self.menuManager.mainToolbar.EnableTool(MenuManager.ID_COLOCALIZATION, 0)
		self.menuManager.mainToolbar.EnableTool(MenuManager.ID_COLORMERGING, 0)
		self.visualizer.sliderPanel.Show(0)
		self.origSliderWinSize = self.visualizer.sliderWin.GetSize()
		self.visualizer.sliderWin.SetDefaultSize((-1, 64))
		
		if not self.urmaswin:
			self.urmaswin = GUI.Urmas.UrmasWindow.UrmasWindow(self.parent, \
																self.visualizer.menuManager, \
																self.visualizer.mainwin.taskWin, \
																self.visualizer)
			
		else:
			print "Restoring",self.urmaswin
			self.urmaswin.Show(1)
			self.parent.Show(1)
			self.urmaswin.enableRendering(1)
			self.urmaswin.controlpanel.Show(1)
			self.urmaswin.createMenu(self.visualizer.menuManager)
			wx.CallAfter(self.urmaswin.updateRenderWindow)
			
		return self.urmaswin
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:32,代码来源:Animator.py


注:本文中的Logging.info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。