Exemplo n.º 1
0
 def _fillClassesFromNodes(self, classes, nodeList):
     """ Create the SetOfClasses2D from the images of each node
     in the dendogram. 
     """
     img = Particle()
     sampling = classes.getSamplingRate()
     
     for node in nodeList:
         if node.path:
             #print "node.path: ", node.path
             class2D = Class2D()
             avg = Particle()
             #avg.copyObjId(class2D)
             avg.setLocation(node.avgCount, self.dendroAverages)
             avg.setSamplingRate(sampling)
             
             class2D.setRepresentative(avg)
             class2D.setSamplingRate(sampling)
             classes.append(class2D)
             #print "class2D.id: ", class2D.getObjId()
             for i in node.imageList:
                 #img.setObjId(i) # FIXME: this is wrong if the id is different from index
                 img.cleanObjId()
                 img.setLocation(int(i), self.dendroImages)
                 class2D.append(img)
             
             classes.update(class2D)
Exemplo n.º 2
0
 def _fillParticlesFromNodes(self, particles, nodeList):
     """ Create the SetOfClasses2D from the images of each node
     in the dendogram. 
     """
     img = Particle()
     
     for node in nodeList:
         if node.path:
             for i in node.imageList:
                 #img.setObjId(i) # FIXME: this is wrong if the id is different from index
                 img.cleanObjId()
                 img.setLocation(int(i), self.dendroImages)
                 particles.append(img)