Overview
ui2.py is a powerful GUI-based browser written in Python. ui2.py allows you to rapidly scroll through large movies and overlay the results from whisker tracking. ui2.py can also be used to manually correct the results from automated whisker tracking.
Contents
Command line reference
Usage
ui2.py [options] moviefile [dataprefix]
Parameters
Options |
Description |
---|---|
|
show this help message and exit |
|
transpose images (default: |
|
Start browsing at the |
|
Specify location of the face in the image (left, right, top, bottom) |
|
Initial cursor radius in pixels (default: 10 px) |
|
Show cursor's center coordinates (default: |
|
Adjust odd-scanline bias (default: |
|
Prevent adjust odd-scanline bias (default: |
|
Display rendering speed (default: |
Examples
python ui2.py S0.tif python ui2.py S0.tif S0 python ui2.py S0.tif S0.whisker S0.measurements S0.bar
If no dataprefix
is given, a default set will be created. The prefix will be used to load/save the appropriate files. Ordering of the filenames isn't important. Filetype is detected according to the file extension.
Keyboard Controls
key |
function |
---|---|
|
Jump to the beginning of the movie |
|
Jump to the end of the movie |
|
Jump to next gap in current trajectory |
|
Jump to previous gap in current trajectory |
|
Jump to next gap in any trajectory |
|
Jump to previous gap in any trajectory |
|
Increment current whisker id |
|
Decrement current whisker id |
|
Rewind one frame |
|
Advance one frame |
|
( Modifies arrow keys ) speed up 10x |
|
( Modifies arrow keys ) speed up 10x |
|
( Modifies arrow keys ) speed up 10x |
|
Delete whisker in currently displayed frame |
|
Turn auto mode on and off |
|
Change draw mode |
|
Enter debug console |
|
Save |
|
Save and Quit |
|
Increment search radius |
|
Decrement search radius |
|
Scroll through face hints to indicate which side of the image the face is on. See #Notes. |
Mouse Controls
Action |
function |
---|---|
Right click |
Mark seed for whisker tracking. Attempt backbone tracing. Draw traced whisker backbone. Advance 1 frame. |
Left click |
Add nearest segment within cursor to current whisker. If no segment found in cursor, clear any segments in that frame assigned to the whisker. Advance 1 frame. |
Mouse wheel up |
Advance 1 frame |
Mouse wheel down |
Rewind 1 frame |
Notes
If filenames are not completely specified, default names will be guessed.
If an existing data file is found, the whisker data will be loaded.
Normally the left and right arrow keys advance or rewind by one frame. Holding down shift, ctrl, and/or alt keys will increase the step size by 10x each. Hence, holding shift and ctrl (or ctrl and alt, etc...) results in a 100 frame step. Holding shift ctrl and alt and pressing left or right, jumps 1000 frames.
The face hint is used when saving to a .measurements
file. The .measurements
file contains measures of follicle features and the identity of segments. Some of these measurements require approximate knowledge of the center of the whisker pad, which is indicated by the face hint. Currently, the hint only takes values of left
,right
,top
or bottom
that indicate the side of the movie the face is on. These options work for a specific class of data where the image is cropped so the mouse's face is on one side.