Skip to content

Introduction Of Preset Labels (Annotation Labels) On Camicroscope

nanli-emory edited this page Aug 21, 2020 · 1 revision

Data Structure for configuration collection in mongodb

Collection Name: configuration – a collection stores all system configurations.

  1. Fields in configuration collection:
    config_name (String): unique name to retrieve the content of a specific configuration.
    configuration (String, object, array): the content or data for the current type of configuration.

  2. Example of a document in configuration collection:

{
    config_name:"xxx",
    configuration:XXX
}

Notes: Currently, there is only one preset label’ document in configuration collection, which is for preset label (picking list) and has that config_name is equal to preset_label.

The data structure for preset label configuration:

The preset label is a list structure menu.

Example of configuration document for preset label:

{
    config_name: "preset_label",
    configuration: [node, node, node ]
}

Preset_label’s configuration fields consist of label nodes as a list. The data structures of label node is below:

The form of label node:

{
    id:        "uid",            // the unique identifier fo a label
    type:      "label-name",     // the name of a label
    color:     "#RRGGBB",        // the color of a label when drawing annotation
    mode:      "shape",          // the shape of a label when drawing annotation 
    size:      500,              // [optional] only if `mode` is `grid`, the size of grid in piexl
    key:       "k"               // [optional] shortcut to call this label (ctrl + key)
}
Property Data Type Description
id String the unique identifier of a label
type String/Number the content of an annotation note
color String) the color of the drawer which should be in a form of Hex color
mode String) the value of mode should be in point, free, square, rect, and grid
size Interger [optional] the size of a grid in pixel (only use when the mode is grid)
key A Character [optional] the shortcut key of a label (ctrl + key). The key property should be number or alphabet('a' to 'z', 0 to 9)

Example of a document for preset labels (picking list) on mongodb:

{
	"configuration" : [
		{
			"id" : "001",
			"color" : "#ff6296",
			"mode" : "grid",
			"type" : "Lymph-Positive",
			"size" : 100
		}, {
			"id" : "002",
			"color" : "#ff6296",
			"mode" : "point",
			"type" : "Lymph-Positive"
		}, {
			"id" : "003",			
			"color" : "#62ffcb",
			"mode" : "grid",
			"type" : "Lymph-Negative",
			"size" : 100
		}, {
			"id" : "004",
			"color" : "#62ffcb",
			"mode" : "point",
			"type" : "Lymph-Negative"
		}, {
			"id" : "005",
			"color" : "#ffcb62",
			"mode" : "grid",
			"type" : "Neutrophil-Positive",
			"size" : 50
		}, {
			"color" : "#6296ff",
			"mode" : "grid",
			"type" : "Neutrophil-Negative",
			"size" : 50,
			"id" : "006"
		}, {
			"color" : "#ff00d9",
			"mode" : "grid",
			"type" : "Necrosis-Positive",
			"size" : 100,
			"id" : "007"
		}, {
			"color" : "#ff00d9",
			"mode" : "grid",
			"type" : "Necrosis-Positive",
			"size" : 500,
			"id" : "008"
		}, {
			"color" : "#00ff26",
			"mode" : "grid",
			"type" : "Necrosis-Negative",
			"size" : 100,
			"id" : "009"
		}, {
			"color" : "#00ff26",
			"mode" : "grid",
			"type" : "Necrosis-Negative",
			"size" : 500,
			"id" : "010"

		}, {
			"color" : "#790cff",
			"mode" : "grid",
			"type" : "Tumor-Positive",
			"size" : 100,
			"id" : "011"
		}, {
			"color" : "#790cff",
			"mode" : "grid",
			"type" : "Tumor-Positive",
			"size" : 300,
			"id" : "012"
		}, {
			"color" : "#790cff",
			"mode" : "grid",
			"type" : "Tumor-Positive",
			"size" : 1000,
			"id" : "013"
		}, {
			"color" : "#790cff",
			"mode" : "grid",
			"type" : "Tumor-Positive",
			"size" : 2000,
			"id" : "014"
		},
		{
			"color" : "#92ff0c",
			"mode" : "grid",
			"type" : "Tumor-Negative",
			"size" : 100,
			"id" : "015"	
		}, {
			"color" : "#92ff0c",
			"mode" : "grid",
			"type" : "Tumor-Negative",
			"size" : 300,
			"id" : "016"
		}, {
			"color" : "#92ff0c",
			"mode" : "grid",
			"type" : "Tumor-Negative",
			"size" : 1000,
			"id" : "017"	
		}, {
			"color" : "#92ff0c",
			"mode" : "grid",
			"type" : "Tumor-Negative",
			"size" : 2000,
			"id" : "018"			
		}, {
			"color" : "#8dd3c7",
			"mode" : "free",
			"type" : "Prostate-Benign",
			"id" : "019"
		}, {
			"color" : "#ffffb3",
			"mode" : "free",
			"type" : "Prostate-Gleason3",
			"id" : "020"
		}, {
			"color" : "#bebada",
			"mode" : "free",
			"type" : "Prostate-Gleason4",
			"id" : "021"	
		}, {
			"color" : "#fb8072",
			"mode" : "free",
			"type" : "Prostate-Gleason5",
			"id" : "022"
		}, {
			"color" : "#80b1d3",
			"mode" : "free",
			"type" : "Prostate-CancerNOS",
			"id" : "023"
		}, {
			"color" : "#fdb462",
			"mode" : "free",
			"type" : "NSCLC-Benign",
			"id" : "024"
		}, {
			"color" : "#b3de69",
			"mode" : "free",
			"type" : "NSCLC-SquamousCA",
			"id" : "025"
		}, {
			"color" : "#fccde5",
			"mode" : "free",
			"type" : "NSCLC-AdenoCA(all)",
			"id" : "026"
		}, {
			"color" : "#d9d9d9",
			"mode" : "free",
			"type" : "NSCLC-Acinar",
			"id" : "027"
		}, {
			"color" : "#bc80bd",
			"mode" : "free",
			"type" : "NSCLC-Lapidic",
			"id" : "028"
		}, {
			"color" : "#ccebc5",
			"mode" : "free",
			"type" : "NSCLC-Solid",
			"id" : "029"
		}, {
			"color" : "#ffed6f",
			"mode" : "free",
			"type" : "NSCLC-Papillary",
			"id" : "030"
		}, {
			"color" : "#6a3d9a",
			"mode" : "free",
			"type" : "NSCLC-Micropapillary",
			"id" : "031"
		}
	],
	"config_name" : "preset_label"
}