Пример #1
0
	def load_image(self, filename):
		self.filename = filename
		self.data=BigImageCache.get_object(filename).get_image(use_alternate=True)
		self.window.set_data(self.data, filename)
		self.window.force_display_update()
		#self.window.optimally_resize()
		self.load_database()
		self.win_xsize = self.window.data.get_xsize()
		self.win_ysize = self.window.data.get_ysize()
Пример #2
0
	def get_image(self,image_name,box_size,norm=None):
		if self.image == None or self.image.get_xsize() != box_size or self.image.get_ysize() != box_size:
			global BigImageCache
			data=BigImageCache.get_object(image_name).get_image(use_alternate=True) # use alternate is a red herring
			r = Region(self.x-box_size/2,self.y-box_size/2,box_size,box_size)
			self.image = data.get_clip(r)
			if norm != None:
				self.image.process_inplace(norm)
				
			self.image.set_attr("ptcl_source_coord",[self.x,self.y])
			self.image.set_attr("ptcl_source_image",image_name)
			
		return self.image