Image Analysis in TMAJ

TMAJ has added image analysis support.  A separate program written in Java called Frida has been integrated into TMAJ.  This allows users to get quantitative data on images. Here is how image analysis can be used in TMAJ:

The first step is to log on to TMAJ.   Next, users should open the images manager application.  A list of all the user's projects and associated array-slides and sessions will be displayed.

To create a new image analysis session, the user clicks the new button.  A Create dialog session will pop up, as shown to the right.  Instead of creating a regular data session, create an image analysis session.
This will create a new image analysis session in the projects frame.  Double clicking on this session will bring up the main image analysis window, which is shown below.

The Projects Window, which is displayed when the user first opens the Images Manager application.

The Create Session Dialog

The main image analysis window is shown to the right.  In the image analysis application, different types of "masks" can be created for an image. 


Color Masks

Color masks are also known as pixel threshold masks.  To add a new Color Mask, Right Click in the Masks box and select New.  In the Add Mask bar, name this some sort of descriptive term such as “Brown” or “Blue” and select Color Mask. 

In the color mask, you will simply set an HSB (HSV- Hue, Saturation, Brightness) color range for the mask. To begin identifying the color of interest, click the Open… button to open 1 or more images. Use the Hand Button to select a pixel in the image that you want for that Mask. Every time you select a pixel using the "hand" tool, the range will be expanded to include this pixel and all pixels between it and the previously selected range. All pixels in the range will be highlighted in RED.  A threshold can also be expanded by moving the Min/Max Hue, Sat and Bri slides to include additional space. You cannot change the values by typing new values into the number boxes.

Lasso Masks

Lasso masks are also known as freehand masks.  To add a new Lasso Mask, Right Click in the Masks box and select New.  In the Add Mask bar, name this some sort of descriptive term such as “Glands” or “Removed,” and select Lasso Mask. 

Click a navigation button (one of the arrows) to begin cycling through all of your images.  Drawa lasso around any region of interest.  If you have two or more regions of interest, hold down the shift key.  If you do not hold down the shift key, each new lasso will replace the old lasso. Click the Close Button when you are finished.  The Default if no Lasso Choice controls what is recorded in this mask if the user fails to draw a lasso for a certain image. Setting it to nothing excludes everything on the image if the user doesn't circle a lasso.  Since this step usually takes the longest in the program, you may want to save the project periodically.

Image Tools

Zoom Button: The Zoom button lets you zoom in (left mouse click) or zoom out (right mouse click) on an area of interest. It is a good idea to zoom in on the images to the point that the image appears pixilated to identify individual pixels to select.

Mask Box : This toggles the mask you have created.  Uncheck this box if you wish to see the original image (If this is unchecked, the pixels in the mask won't be highlighted.)  Toggling on/off can be performed for each Mask that has been generated.  The Color of the Mask and the Order relative to other Masks can also be changed by left clicking on the value.

Meta Masks

A Meta Mask is a logic statement that allows for the combination of information in already defined masks.  Meta masks are also called "masks of masks".  To generate a Meta Mask, right click in the Masks box, select New and name the Mask based on what function it will serve and select Meta Mask.  Then right click on the Meta Mask and click Configure.  Press the Add line to generate statements.

Example: Let's say you created a Color Mask called BROWN, and you created a Lasso Mask which you called CIRCLED_CANCER_AREA. You only wanted to see the area that was both BROWN AND in the CIRCLED_CANCER_AREA. And means Logical And.  If you choose "And", the Meta-Mask will identify only regions that are in BOTH of the selected Masks .  If you use Logical Or, the meta-mask will include regions that are in both thetwo selected Masks.  For this example, You would add a Meta Mask that has:
[ -----] [WHAT IS IN] BROWN

If you had accidently selected OR, your meta-mask would include areas that are both in the brown area and in the circled cancer area, as opposed to the area where they both intersect (and). 

Meta Masks can include a number of previously made Color, Lasso or other Meta Masks.  The logic options are AND/OR and what is in/what is NOT in.
Close the Meta Mask window after you are complete. You are then ready to use this mask.

The main Image Analysis Window

Running Analysis

After your have defined your masks, you should press the "Save Masks" button to save your work. 
To actually get results for the masks, you need to press the "Run Analysis" button.  This will take much longer as all images will need to be analyzed.  This will enable you to see your results in the Images Manager Data table, which is shown below. 

Viewing Results

To view the results, you need to associate the Image Analysis session with a regular (data) session.  To do this, create a data session in the Projects window as described above (Above, we created a image-analysis session.  You should choose the other radio-button option to create an regular data session.)
Now that you have a regular data session, you need to tie it to the image analysis session.  To do this, highlight the regular data session and hit the edit button.  When the edit session dialog pops up, choose the image analysis session.  Then click the update button.

Now that you have tied a regular data session to an image analysis session, open the regular data session.  Next, go to the array-slide window (it usually has 400 spots [20x20] on it).  In the menu for the array-slide window, go to tools, then "Show Data Table".  The table will appear below.  You will see both data from the image analysis session and your regular data-scoring session.

The Images Manager Data Table.  Each x and y coordinate is shown with both scoring data and quantative image analysis data.