Cell Module

class Cell.Cell(movie, name, begin, end)
compute_ref(pol, refsize)
delete()

Function called to delete the cell

dist(pt1, pt2, rad)
export_as_csv(path, channel)

Function exports the cell as a tiff series

Think about managing the number of channels

export_as_tiff(path, channel)

Function exports the cell as a tiff series WARNING: This function returns an iterator, each call to the .next() function will return an image that will be saved. Think about managing the number of channels

generate_ref()
get_bounds()

This function returns two integers

get_cell(i, channel, show_ref=False, show_cel=False)
get_features()
get_name()
get_save_dict()
init_ref(refsize)

Function that initialize a reference at a given distance of the polygon

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)
load_save_dict(dic)
point_on_handle(tup, t, center_type, timetr)

Internal function returning the selected edge of the polygon (if any), the center or None This function was coded with my feet, it is a total mess

reset_polygon(pol, t)
set_begin(i)
set_end(i)
set_name(n)
update_ref(i, refsize)
class Cell.GtkCell(cells, delete_f, export_f, state)[source]

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

add_point(tup)[source]
begend_evt(evt, slider, begend)[source]

Receives signals from the “Set begin frame” and “Set end frame” buttons and forward them to : 1. The slider 2. The cell object

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

delete()[source]
delete_cell_evt(evt)[source]

Function calling a forwarded function from Cells.gtk

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)

init_ref(refsize)[source]
move(tup)[source]

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

move_refwcell_evt(evt)[source]
new_cell(name=None)[source]

Function that initialize an empty cell .. warning : You should immediately add a polygon to the cell as it doesn’t like empty timetracks much...

quant_evt(w)[source]

Binding called when clicking on the “Export quantification” button

rb_toggled(active)[source]
refsize_sb_evt(evt)[source]

Function called when the value of the spinbutton “Set reference size” is changed

reset_polygon()[source]
reset_ref_evt(evt)[source]
set_cell(cell)[source]

Set the cell (no gtk) when loading a savefile

set_r_panel(panel)[source]
set_selected(sel)[source]
show_evt(evt)[source]
slider_changed_evt(w, features_gtk)[source]
tiff_evt(w)[source]

Binding called when clicking on the “Export as TIFF series” button Many parameters exist, but they cannot be tuned for the moment This is used as a way to experiment for the quantification export

This function should call a function displaying a progress bar, and call a cell object returning an iterator on the number of frames, such as in: http://stackoverflow.com/questions/496814/progress-bar-not-updating-during-operation or: http://faq.pygtk.org/index.py?req=show&file=faq23.020.htp

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