def select(self, source, selection): ms = source.getMicrostructure() image = source.getObject() # OOFImage3D ref_color = image[self.point] self.operator.operate( selection, pixelselectioncourieri.ColorSelection(ms, image, ref_color, self.range))
def select(self, immidge, pointlist, selector): ms = immidge.getMicrostructure() isize = ms.sizeInPixels() psize = primitives.Point(*ms.sizeOfPixels()) pt = ms.pixelFromPoint(pointlist[0]) pic = immidge.getObject() ref_color = pic[pt] selector(pixelselectioncourieri.ColorSelection(ms, pic, ref_color, self.range))
def __call__(self, ms, selection): curselection = selection.getObject() # 'cause my teeth are perly... image = whoville.getClass('Image')[self.image] imageobj = image.getObject() ms = image.getMicrostructure() selection.start() selection.clearAndSelect( pixelselectioncourieri.ColorSelection(ms, imageobj, self.reference, self.range))
def select(self, ms, selection): curselection = selection.getObject() # 'cause my teeth are perly... image = whoville.getClass('Image')[self.image] imageobj = image.getObject() ms = image.getMicrostructure() self.operator.operate( selection, pixelselectioncourieri.ColorSelection(ms, imageobj, self.reference, self.range))
def select(self, immidge, gfxwindow, pointlist, view, selector): ms = immidge.getMicrostructure() if config.dimension() == 2: isize = ms.sizeInPixels() psize = primitives.Point(*ms.sizeOfPixels()) pt = ms.pixelFromPoint(pointlist[0]) else: # 3D cell = gfxwindow.findClickedCell(immidge, pointlist[0], view) if cell is not None: coord = vtkutils.cell2coord(cell) pt = ms.pixelFromPoint(coord) else: return pic = immidge.getObject() pic.update() ref_color = pic[pt] selector(pixelselectioncourieri.ColorSelection(ms, pic, ref_color, self.range))