forked from quantombone/LabelMeAnnotationTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPI.txt
73 lines (55 loc) · 2.45 KB
/
API.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
This file gives an overview of the annotation tool code.
+ ./tool.html
This is the entry point for the annotation tool. The main
functionality is to insert all of the javascript code and lay down the
drawing canvases.
+ ./annotationTools/js/
This folder contains all of the javascript code for the annotation
tool functionalities.
+ ./annotationTools/perl/
This folder contains all of the Perl scripts used for communication
with the server back-end.
+ ./annotationTools/css/
This folder contains all of the CSS style definitions.
+ ./annotationTools/html/
This folder contains auxillary HTML files (e.g. for Mechanical Turk
instructions, etc.).
+ ./annotationTools/GoogleIcons/
This folder contains the images used for the bubble popup on the
annotation tool.
*******************************************************************
Description of the javascript code (inside ./annotationTools/js)
At a high-level, there are 4 canvases that are laid out. They
correspond to the: (i) main canvas, (ii) drawing canvas, (iii) query
canvas, (iv) polygon selection canvas. At any moment, one canvas is
at the front and accepts mouse functions. The other canvases are
hidden below and do not accept mouse functions. All canvases are
transparent, meaning that their contents are always visible. The task
of the tool is to switch between these canvases and to refresh their
contents.
The following is a brief description of the javascript files:
+ annotation.js
This contains a structure with all of the annotation data for each object.
+ canvas.js, draw_canvas.js, query_canvas.js, select_canvas.js
These contain the (i) main canvas, (ii) drawing canvas, (iii) query
canvas, and (iv) select canvas.
+ graphics_ie.js, graphics_moz.js
These contain the main drawing routines for IE (VML) and all other
browsers (SVG). The main entry "tool.html" detects the browser type
and inserts the appropriate drawing code.
+ file_info.js
This contains code for parsing the URL and setting the global
variables based on the URL.
+ image.js
This contains a structure for the image and all relevant data.
+ handler.js
This contains the high-level commands for transitioning between the
different annotation tool states. They are: REST, DRAW, SELECTED, QUERY.
+ my_scripts.js
This contains auxillary functions and global variables. This script
needs to be cleaned up.
+ browser.js
This contains code for detecting and dealing with the different
browser types.
+ bubble-popups.js
This code draws the popup bubbles.