-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the gt_pickup_annotation wiki!
Beginning a New Dataset
- Locate and open roi_generation_tutorial_annotation.m and roi_generation_tutorial_writejson.m
- In the command window, run the following:
copyfile GenGridTape.m GridTapeAlign_[your dataset].m
copyfile writeJson_template.m writeJson_[your dataset].m
- In your new GridTapeAlign file, search for TODO, to place the necessary files/paths for:
- Master path (path to dataset on your machine)
- Section mask (to be generated by you based on your dataset)
- Slot mask (can be copied from prev. dataset, preferably 8 vertices)
- Path to image links (usually the same, masterPath/img_links)
- In your new writeJson file, search for TODO and place the necessary files/paths for:
- Master path (path to dataset on your machine)
- Section mask (to be generated by you based on your dataset)
- Slot mask (can be copied from prev. dataset, preferably 8 vertices) ##4. Path to image links (usually the same, masterPath/img_links) ##5. section_mask_ref (a sample of what an annotation file looks like, includes ROI and slot vertices)
- ROI_mask (file with the ROI mask, can just be the section_mask)
Staining image annotations are usually done in one of two ways:
(1) When tissue is visible over the slot, imaging ROIs (masks) are annotated directly in the GUI. The annotated section masks are used directly as imaging ROIs.
(2) When tissue is not visible, section masks are annotated using the edges of the sections or other features like knife marks. In this case the section masks can't be used directly as imaging ROIs.
The script writeJson_template.m is meant for case (2). Vnc1 and aedes_r194 scripts are appropriate for case (1). At some point, I'd like to integrate all of these options into the annotation GUI, just need to find the time.
To specify the imaging ROI, you need to
(1) Pick a reference section (ideally one in which you can see both the edges of the section and the tissue)
(2) Using the GUI(GridTapeAlign) "draw new section mask" tool, draw an imaging ROI. It can be any shape. Save it as something like "ROI_mask_sectXXXX.txt" in the masks folder.
(3) We also need the section mask annotation from the reference section (because the relative location between the ROI and the section mask is what matters). To make sure that this doesn't get overwritten, copy the annotation file (annotations/XXXX.txt) into the masks folder and rename it something like "reference_mask_sectXXXX.txt"
(4) Edit the top portion of the writeJson_template.m with the location of the relevant mask files and section ranges. Make sure to put any sections that don't exist or don't have annotations in the "problems list" to be skipped.
(5) Run the script! It should show you an image of each section with the ROI drawn in (and also save this in the annot_imgs folder). Use these images to sanity check that the ROIs look correct. (note, the purple dot should mark the middle of the mask. If it looks off, probably the slot mask annotation was wrong for that section)