Cell_gtk Module

class Cell_gtk.GtkCell(cells, state)[source]

A generic class for handling cell creation (get polygon as successive clicks)

add_point(tup)[source]
click(tup)[source]

Function that receive a click from the viewer. This function returns True if the click lies inside the cell (core or reference polygon) In theory, the coordinates already have been converted

close()[source]

Function that close the polygon and create a new cell instance instead

dist(p1, p2)[source]
draw_polygon(im)[source]

Draw the polygon on the image :param im: the image to draw on. :param type: a numpy matrix (x*y*3) :returns: numpy matrix – the output image

get_name()[source]

Return the name of the cell

get_panel(rb, rb_none)[source]

Return the panel to manage a cell rb is the radiobutton instance determining which cell is selected

get_selected()[source]
get_type()[source]

Return the cell type (‘pol’ for instance)

move(tup)[source]

Function called when the cell is selected and the user tries to drag’n’drop it

rb_toggled(active)[source]
reset_polygon()[source]
set_r_panel(panel)[source]
set_selected(sel)[source]
show_evt(evt)[source]
unclick()[source]

Function called when the user click is released

class Cell_gtk.GtkRect(cells, state)[source]

Bases: Cell_gtk.GtkCell

A generic class to handle polygons as untilted rectangles

class Cell_gtk.GtkRect_ct(cells, state)[source]

Bases: Cell_gtk.GtkRect

class Cell_gtk.GtkRect_tp(cells, state)[source]

Bases: Cell_gtk.GtkRect

Previous topic

Cell Module

Next topic

Cells Module

This Page