Пример #1
0
	def display(self, fileName):
		if fileName is None:
			print "Please give a full file name to display";
			return;
		else:
			dataset = self.loadDataset(fileName)
				
		if self.panel:
			RCPPlotter.imagePlot(self.panel, dataset);
		else:
			print "No panel set to display"
			raise Exception("No panel_name set in %s. Set this or set %s.setAlive(False)" % (self.name,self.name));
Пример #2
0
	def display(self, dataset=None):
		if dataset is None:
			if self.dataset is None:
				print "No dataset to display";
				return;
			else:
				dataset = self.dataset;
				
		if self.panel:
			RCPPlotter.imagePlot(self.panel, dataset);
		else:
			print "No panel set to display"
			raise Exception("No panel_name set in %s. Set this or set %s.setAlive(False)" % (self.name,self.name));
Пример #3
0
	def display(self,dataset=None):
		if dataset is None:
			if self.dataset is None:
				print "No dataset to display";
				return;
			else:
				dataset = self.dataset;

		if self.panel:
			RCPPlotter.imagePlot(self.panel, dataset);
		else:
			print "No panel set to display"
			raise Exception("No panel_name set in %s. Set this or set %s.setAlive(False)" % (self.name,self.name));
Пример #4
0
	def display(self,file=None):
		if file==None:
			file = self.getFullFileName()

		fileLoader = UViewDetectorClass.ImageFileLoaders[os.path.splitext(file)[-1].split('.')[-1].upper()];

		self.data.load( fileLoader(file) );

		dataset = self.data.getAxis(0);

		if self.panel:
			if self.logScale:
				RCPPlotter.imagePlot(self.panel, DatasetUtils.lognorm(dataset)); #For RCP GUI
			else:
				RCPPlotter.imagePlot(self.panel, dataset); #For RCP GUI
		else:
			print "No panel set to display"
			raise Exception("No panel_name set in %s. Set this or set %s.setAlive(False)" % (self.name,self.name));
Пример #5
0
    def display(self, file=None):
        if file == None:
            file = self.getFullFileName()
#		self.data.loadPilatusData(file)
        self.data.load(PilatusTiffLoader(file))
        dataset = self.data.getAxis(0)

        if self.panel:
            if self.logScale:
                RCPPlotter.imagePlot(self.panel, DatasetMaths.lognorm(dataset))
                #For RCP GUI
            else:
                RCPPlotter.imagePlot(self.panel, dataset)
                #For RCP GUI
        else:
            print "No panel set to display"
            raise Exception(
                "No panel_name set in %s. Set this or set %s.setAlive(False)" %
                (self.name, self.name))
Пример #6
0
from uk.ac.diamond.scisoft.analysis.plotserver import GuiParameters
from org.eclipse.dawnsci.analysis.dataset.roi import RectangularROI, RectangularROIList
from org.eclipse.january.dataset import DatasetFactory

pp = RCPPlotter()
pp.plot("Area Detector", DatasetFactory.createFromObject(range(100)))

#This is used to plot on the PlotView
#d = DataSet.arange(10000)
#d.shape = [100,100]

d = DatasetFactory.createRange(10000)
d.shape = [100, 100]
# or, d = DataSet.arange(10000).reshape((100,100)) in GDA v8.12

pp.imagePlot("Area Detector", d)

#This is used to plot on the ImageExploreView
pp.plotImageToGrid("Image Explorer", DatasetFactory.ones([20, 30]))
pp.plotImageToGrid("Image Explorer", "/home/xr56/temp/p100kImage26455.tif")

#RCPPlotter().plotImageToGrid("Image Explorer","/home/xr56/temp/pilatus100K/p686905.tif")
RCPPlotter().scanForImages("Image Explorer",
                           "/dls/i06/data/2010/cm1895-1/demoImages")

#ROI
#Get ROI info

gbean = pp.getGuiBean("Area Detector")

gbean