예제 #1
0
 def OnTagPoints(self, event):
     from PYME.PSFEst import extractImages
     chnum = self.chChannel.GetSelection()
     rsx, rsy, rsz = [int(s) for s in self.tPSFROI.GetValue().split(',')]
     for xp, yp, zp in self.view.points:
         if ((xp > rsx) and (xp < (self.image.data.shape[0] - rsx)) and
             (yp > rsy) and (yp < (self.image.data.shape[1] - rsy))):
                 
                 dx, dy, dz = extractImages.getIntCenter(self.image.data[(xp-rsx):(xp+rsx + 1),(yp-rsy):(yp+rsy+1), :, chnum])
                 self.PSFLocs.append((xp + dx, yp + dy, dz))
     
     #self.view.psfROIs = self.PSFLocs
     self.view.Refresh()
예제 #2
0
    def OnTagPoints(self, event):
        from PYME.PSFEst import extractImages
        chnum = self.chChannel.GetSelection()
        rsx, rsy, rsz = [int(s) for s in self.tPSFROI.GetValue().split(',')]
        for xp, yp, zp in self.view.points:
            if ((xp > rsx) and (xp < (self.image.data.shape[0] - rsx))
                    and (yp > rsy) and (yp <
                                        (self.image.data.shape[1] - rsy))):

                dx, dy, dz = extractImages.getIntCenter(
                    self.image.data[(xp - rsx):(xp + rsx + 1),
                                    (yp - rsy):(yp + rsy + 1), :, chnum])
                self.PSFLocs.append((xp + dx, yp + dy, dz))

        #self.view.psfROIs = self.PSFLocs
        self.view.Refresh()
예제 #3
0
    def OnTagPSF(self, event):
        from PYME.PSFEst import extractImages
        #if we already have a location there, un-tag it
        for i, p in enumerate(self.PSFLocs):
            if ((numpy.array(p[:2]) - numpy.array((self.do.xp, self.do.yp)))**2).sum() < 100:
                self.PSFLocs.pop(i)

                #self.view.psfROIs = self.PSFLocs
                self.view.Refresh()
                return
                
        #if we have a muilt-colour stack, 
        chnum = self.chChannel.GetSelection()
                
        rsx, rsy, rsz = [int(s) for s in self.tPSFROI.GetValue().split(',')]
        dx, dy, dz = extractImages.getIntCenter(self.image.data[(self.do.xp-rsx):(self.do.xp+rsx + 1),(self.do.yp-rsy):(self.do.yp+rsy+1), :, chnum])
        self.PSFLocs.append((self.do.xp + dx, self.do.yp + dy, dz))
        self.view.psfROIs = self.PSFLocs
        self.view.Refresh()
예제 #4
0
    def OnTagPSF(self, event):
        from PYME.PSFEst import extractImages
        #if we already have a location there, un-tag it
        for i, p in enumerate(self.PSFLocs):
            if ((numpy.array(p[:2]) - numpy.array(
                (self.do.xp, self.do.yp)))**2).sum() < 100:
                self.PSFLocs.pop(i)

                #self.view.psfROIs = self.PSFLocs
                self.view.Refresh()
                return

        #if we have a muilt-colour stack,
        chnum = self.chChannel.GetSelection()

        rsx, rsy, rsz = [int(s) for s in self.tPSFROI.GetValue().split(',')]
        dx, dy, dz = extractImages.getIntCenter(
            self.image.data[(self.do.xp - rsx):(self.do.xp + rsx + 1),
                            (self.do.yp - rsy):(self.do.yp + rsy + 1), :,
                            chnum])
        self.PSFLocs.append((self.do.xp + dx, self.do.yp + dy, dz))
        self.view.psfROIs = self.PSFLocs
        self.view.Refresh()