SectorAnalysisToolbox Documentation: Difference between revisions

From BanghamLab
Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:
Then click “smooth pts”, all the edge points will be smoothed around the 2 fixed primaries (these will not move). It is important that the edges are consistent from one image to another as they will be used to calculate the mean shape and the warping of the sectors.
Then click “smooth pts”, all the edge points will be smoothed around the 2 fixed primaries (these will not move). It is important that the edges are consistent from one image to another as they will be used to calculate the mean shape and the warping of the sectors.
When the edge points are judged to capture the petal outline satisfactorily, the same button (now named ‘Save New Edge’) should be clicked to save the edited outline under edge_xy.may. The primary points are saved under primary_landmarks.mat.
When the edge points are judged to capture the petal outline satisfactorily, the same button (now named ‘Save New Edge’) should be clicked to save the edited outline under edge_xy.may. The primary points are saved under primary_landmarks.mat.
The rest of the tools can be used to edit the sectors. The superimposed blue sectors should be found in the same places as the red sectors on the petal image. If there is no blue sector where there is a red sector, the sector can be drawn in by clicking ‘Add Sector’, then clicking around a polygon (double click to finish) of the correct shape and size where you want the sector to be. If there is a blue sector where there is no red sector, the erroneous sector can be removed by clicking ‘Clear Region’, then drawing a box around sectors to be removed (double click to finish). If two or more blue sectors are found across the area of one red sector, the sectors can be joined by clicking ‘Merge Sectors’. This makes the image window into a black and white image of the sectors (white) against a black background. Click once in each sector and then press ‘Enter’ to fill in the gaps between the sectors so they appear as one sector. Any changes that have been made to the sectors should be saved by clicking ‘Save Changes’. Clicking ‘Undo’ will revert to the previous saved sector pattern.
To move onto another image, either click the >> or << arrows below the image window to go one forward in the list or one back in the list, or click the downward arrow beside the list to select any image from the ‘Staged’ folder.


<gallery caption=SectorEditor" widths="600px" heights="400px" perrow="8" border="0">
<gallery caption=SectorEditor" widths="600px" heights="400px" perrow="8" border="0">

Revision as of 17:15, 9 March 2012

Go back to software

The models shown in these tutorials illustrate features of the SectorAnalysisToolbox software. Viewing these pages. Some versions of Firefox and Explorer do not create satisfactory prints even though you can view the pages with no problems. Chrome does appear to produce good printouts.

Using the Sector Analysis Toolbox (SAT) to analyse the shapes of cell clones in antirrhinum petals

How to use the tutorial. First download and install the SectorAnalysisToolbox . Then, from Matlab, change directory into the project and launch the SectorAnalysisToolbox.

1 Creating a new project

To create a new project, click the New Project button and name your project when prompted. The toolbox automatically gives each project the prefix ‘SAP_’ (Sector Analysis Project). The project directory structure will be saved to disk and contains the folders Original, Processed and Staged. Copy the sample antirrhinum images (P9F17P1I.JPG, P9F17P2I.JPG, P10F17P1I.JPG) into the Staged dir.

Once a project has been created, you can return to that project either by selecting that project in the ‘Current Directory’ line at the top of the Matlab window, or by opening the toolbox and using the Browse button to select your project.

2 Segmenting the petal and clones

We have created a new project and populated it with some sample antirrhinum petal images. We would now like to automatically segment out the antirrhinum petal and the purple sectors.

Click the button Segment Images. A dialog box will ask the user to select a segmentation algorithm. Select amelia_petal_sectors.m from the drop down box as this segmentation algorithm is specifically designed to work with our data. The SAT will look in the Staged directory for the *.jpg imaged to segment. A dialog box will ask the user which images to segment - in this case we will use the Select All button. A task bar indicates segmentation progress. When an image has been segmented, the image file in the ‘Staged’ folder is replaced by a folder with containing a matlab file called ‘edge_xy’ (the organ outline coordinates), a .jpg snapshot of the original image, a .tif black and white (binary) image with the suffix ‘_organ’ (corresponding to the petal/leaf outline), and a .tif binary image with the suffix ‘_sectors’ (corresponding to the sectors).

3 Editing the Segmented clones and organ edges

Click Sector Editor to open the Sector Editor Tool (see image to the right). The first image from the ‘Staged’ folder should be displayed in this window. The outline of the petal section is marked by 50 edge points joined by a red line. Edge information are provided by the edge_xy.mat file and filename_organ.tif. The latter shows the organ shape as a binary (black and white) image. If this shape is not accurate due to, e.g. an air bubble, the egde points will not follow the organ shape exactly. If you find that most points are too far off consider using a differnt segmentation algorithm. The file filename_sectors.tif is openend (the segemented out sectors) to superimpose the sectors on the image in blue. The boxes Show Sectors and Show Edge can be ticked or made blank to show or hide the edge outline and the sector pattern found by the computer. Again, if sectors are not recignised properly, change the segementation algorithm. The tools at the top of the window can be used to zoom into, pan around and rotate the image (standard symbols are used for each function). Edges can be moved using the ‘Move Edge Points’ button. To smooth the edges, click on “Def. primary points” and select at least 2 primaries (for example tip and base: these must correspond to the same number and the same morphological feature for each image). Then click “smooth pts”, all the edge points will be smoothed around the 2 fixed primaries (these will not move). It is important that the edges are consistent from one image to another as they will be used to calculate the mean shape and the warping of the sectors. When the edge points are judged to capture the petal outline satisfactorily, the same button (now named ‘Save New Edge’) should be clicked to save the edited outline under edge_xy.may. The primary points are saved under primary_landmarks.mat.

The rest of the tools can be used to edit the sectors. The superimposed blue sectors should be found in the same places as the red sectors on the petal image. If there is no blue sector where there is a red sector, the sector can be drawn in by clicking ‘Add Sector’, then clicking around a polygon (double click to finish) of the correct shape and size where you want the sector to be. If there is a blue sector where there is no red sector, the erroneous sector can be removed by clicking ‘Clear Region’, then drawing a box around sectors to be removed (double click to finish). If two or more blue sectors are found across the area of one red sector, the sectors can be joined by clicking ‘Merge Sectors’. This makes the image window into a black and white image of the sectors (white) against a black background. Click once in each sector and then press ‘Enter’ to fill in the gaps between the sectors so they appear as one sector. Any changes that have been made to the sectors should be saved by clicking ‘Save Changes’. Clicking ‘Undo’ will revert to the previous saved sector pattern.

To move onto another image, either click the >> or << arrows below the image window to go one forward in the list or one back in the list, or click the downward arrow beside the list to select any image from the ‘Staged’ folder.

4 Sector and Organ warping

5 Viewing Results and generating useful Statistics