Cell Module

class Cell.Cell(movie, name, begin, end)
dist(pt1, pt2, rad)
generate_ref()
get_name()
is_point_in_cell(pt, t)
is_point_in_ref(pt, t)
is_point_on_cell_handle(pt, t)

Tests if the point lies within a given distance of a handle (an edge, and maybe a center

is_point_on_ref_handle(pt, t)
point_on_handle(pol, tup, center_type)

Internal function returning the selected edge of the polygon (if any), the center or None

reset_polygon(pol, t)
set_name(n)
class Cell.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.GtkRect(cells, state)[source]

Bases: Cell.GtkCell

A generic class to handle polygons as untilted rectangles

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

Bases: Cell.GtkRect

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

Bases: Cell.GtkRect

Previous topic

Cells

Next topic

Cell_gtk Module

This Page