コード例 #1
0
ファイル: wxmsw.py プロジェクト: badbytes/pymeg
    def plotallpnts(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `plotallpnts' not implemented"
        r = self.postcheck()
        if r == -1: #nothing posted
            return

        print 'plotting ',self.datapdf
        self.p = pdf.read(self.datapdf[0])
        print self.p
        ind=hstack([self.p.hs.index_lpa,self.p.hs.index_rpa,self.p.hs.index_nasion]).reshape(3,3)
        s=sensors.locations(self.datapdf[0])
        plotvtk.display(self.p.hs.hs_point, s.megchlpos, ind)
コード例 #2
0
ファイル: gtkappbuilder.py プロジェクト: badbytes/pymeg
    def plotdata(self,widget):
        print 'trying to plot in vtk'
        colordict = {}
        sizedict = {}
        self.sel2plot = {}
        from meg import plotvtk
        sizes = self.builder.get_object('vbox5').get_children()
        colors = self.builder.get_object('vbox6').get_children();
        counternum = 0

        for i in self.builder.get_object('vbox3').get_children():

            if i.get_active() == True:
                print i
                self.sel2plot[i.get_label()] = self.plotdict[i.get_label()]

        #for i in self.builder.get_object('vbox6').get_children():
            #if i.get_active() == True:
                print colors[counternum].name
                r = colors[counternum].get_color().red_float
                g = colors[counternum].get_color().green_float
                b = colors[counternum].get_color().blue_float
                colordict[counternum] = [r,g,b]


        #for i in self.builder.get_object('vbox5').get_children():
            #if i.get_active() == True:
                sizedict[counternum] = float(sizes[counternum].get_text())
                counternum = counternum + 1

        print 'colors', colordict
        print 'sizes', sizedict
                #var2plot[]
        print self.sel2plot, self.plotdict
        from pdf2py import readwrite
        #readwrite.writedata(self.sel2plot, 'plotdata')
        #readwrite.writedata(colordict, 'colordict')
        #readwrite.writedata(sizedict, 'sizedict')
        plotvtk.display(self.sel2plot, color = colordict, radius = sizedict) #, color=[[255,0,0],[0,255,0]], radius=[[.006],[.006]])
コード例 #3
0
ファイル: grid.py プロジェクト: badbytes/pymeg
 def test_plot(self):
     from meg import plotvtk
     d = {'hs':self.headshape.hs_point,'brain':self.grid}
     plotvtk.display(d,color=[[255,255,0],[0,255,255]],radius=[1.,1.])