ct_Cells Module

class ct_Cells.Cell(movie, nb_im, label, use_gtk)

Polygon and its basic properties

add_polygon(poly, frame)
ch_color()
create_frame(im)

Function that inserts a frame by copying the previous one That function doesn’t check if the frame already exists it MUST have been checked before !

draw_center(image, i)

Draws the center of a rectangle

draw_label(image, i)
draw_lines(image, i, draw_reference=False)

Draws a line, or a polygon, depending on the closed argument

draw_points(image, i)

Function that draws all points on the screen Should be called after drawing the lines

draw_polygon(image, i, cv, debug=False)

Functions that put all together

export_frame(i, paths, rect=None)
get_cell(i, channel=None, depth=8, col_channels=1, fmt='cv', rect=None)

Function that returns the current cell image, as a tuple The image with the surrounding rectangle as a copy of the original image A mask representing the cell A mask representing the reference All in OpenCV format

get_index(im)

Returns the index in the list for the right image, or False if the index doesn’t exists or if it is out of the lifespan of the poly

get_label()
get_poly(im)

Function that returns the polygon corresponding to the image

get_rect(im, force_regenerate=False, with_reference=False)

Returns the rectangle associated with the frame

get_save_dict()
interpolate(next_idx, t)

Function that returns the linearily interpolated polygon

intersection(point, i)

Sees if the click is in the polygon

is_all_in_screen(im)

Returns ‘True’ if the cell is totally contained in the image

Returns:Returns ‘True’ if the cell (and its reference) is totally contained in the image
Return type:bool
is_selected()
point_in_poly(tup, i, with_reference=False)
select(f)

f=1 selects the polygon OR simply change the selection state ?

set_frame(i)

Saves the given index as the index of the current frame.

Warning

At that time, no verification is performed, and you must check that the input index is a valid index

Parameters:i (int) – The index of the frame
set_label(l)
set_save_dict(dic)
set_selected(state)
class ct_Cells.Cells(movie, use_gtk=True)

Class that manages polygons

add_polygon(poly)
clear_cells_list(poly_type=None)
delete_poly(i)

Set the deleted flag on apolygon, given its index in the poly_list

draw_all(image, im, cv, debug=False)
get_cell_wrappers_dict()
get_cells_list()
get_save_dict()
init()

Second initiation

new_polygon(wrapper_name, gtk=False)

Function that returns a Polygon object this polygon is not integrated in the polygons_list. Run add_polygon to do so

set_save_dict(dic)

Previous topic

.

Next topic

ct_Cells_GTK Module

This Page