cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Image Analyzer
JohnPonte
Staff (Retired)

Previously, I wrote a JSL script that would generate a data table from an image, called ImageToDatatable JSL Since then I have heard requests for the ability to select rows in the data table and have the selection reflected in the image. With this script, you can open an image and it will be displayed in a window as well as create a data table from the image. From the data table you can perform your analysis, such as a Distribution of the intensity values. You can then select in the Distribution (or other visualization), in the data table or in the image and all three will be updated to show the selection. Selection in the image is shown by using transparency on the non-selected pixels so that the selected pixels appear highlighted. You can apply a background color to the image window so that transparent pixels do not show as white, but rather they will show as the background color you choose.

7982_ImageAnalyzer.jpg

Selecting the highest intensity values in the Distribution identifies the highest concentration of fibrin in blood cells.

Update (Sep 8, 2015): This was originally released as a script but is now being packaged as an Add-in so that it can appear in the Add-Ins Menu. It has also been updated to detect when a gray scale image is opened. In that case it will not create RGB and HLS columns, since there is no color in the image. You will only see an intensity value column along with the x,y location columns.

Issue (Oct. 26, 2015): A customer reported an issue where they got an Alert window when trying to select pixels in the image. After some testing we were able to determine that it was an issue with version 11.0.0 only. Upgrading to 11.1.0 (or later) will fix the problem.

Update (July 15, 2016): I added some new functionality to the Image Analyzer. The most notable is the ability to handle multiple-frame images. If you have an animated GIF or a TIFF with multiple frames the Image Analyzer will read in all the frames and create the data table as before, but now it will include a column for the frame number. It will also display a text box with the current frame number as well as previous and next arrows so you can cycle through the frames. If your image does not have multiple frames then these controls will not appear in the UI and it will continue to work and look like it did in the previous version. There are some new selection controls - Composite and Delay. If Composite is on, a selection will include not only the pixels for the current frame, but all the corresponding pixels in all the frames. This is only available for multi-frame images. Since the selection is sometimes slow, especially for multiple frames, you can select the Delay option which will show the selection rectangle but it will delay the update of the selection (in the data table and in the image) until you release your mouse. I also added an option to change the color used for the selection rectangle. I noticed this was an issue when changing between images that were really light versus images that were dark. Now you can change the selection rectangle color so it will always be visible.

The multi-frame feature requires functionality that was added in Version 13 of JMP so you will only see the controls for the multiple frames if you are running JMP 13 (or later) and if your image has multiple frames.  This version of the Addin can be installed in earlier versions of JMP but it will function as before, only having access to the first frame.

Comments

Very interesting!  Thank-you!

scott1588

Very valuable script. I hope we will see further development of image analysis capabilities in JMP.

d_barnett

John, this work on image analysis is very powerful for JMP, many of my analysis involves using external programs ( ImageJ in particular) to produce the data for analysis in JMP.

Is there any thought of having a connection available, similar to R etc., in a future release or as an add-in?

David

JohnPonte

I hadn't really thought about that. In JMP, using JSL, you can connect to a DLL and call functions that are exposed through the DLL. Here is a link to some more information on how to do that, Dynamic Link Libraries (DLLs). I don't know if that will help you with the external programs you are using. What functionality do you utilize through these other programs? What functionality would you like to see added to JMP regarding your image analysis work?

Thanks for the suggestions!

Very useful add-in for JMP! However, I just want to ask, how can I retrieve the interaction between the data table and image once I close JMP? This is because I created additional columns in that data table and saved it. But every time I close it and re-open that table for another session, I can't find a way to retrieve the interaction it had with the image.

Thank you!

JohnPonte

Great question! The Add-in creates the interaction, by generating the data table from the image. If you use the Add-in to open the image again (and re-generate the data table) you will not have the columns you added. And if you use JMP to open the data table (with your added columns) you will not have the association with the image. It sounds like I need to create a new version of the Add-in, or another Add-in, that goes the other way - generate an image from the data table. If the data table was originally generated from the image, then it would be easy to generate the image from the data table. I will add that to my list of enhancements for the Add-in.

Thanks for the suggestion!

Hi John, I have a question regarding the way HLS is processed. I have a disparity between your numbers of saturation using ColortoHLS and ImageJ's.

For the attached image I get two different distributions of saturation.

11053_dirty white-cropped.png

11055_pastedImage_11.png

I understand if you haven't worked with ImageJ but I was wondering if there was any reason you could think of for the mode at 1 for your saturation values (Other than "That's what it is")

11056_pastedImage_12.png

Thank you for this plugin, it's lovely. 

JohnPonte

Looking at your last image (I presume from ImageJ), it shows the color represented as HSB (Hue, Saturation and Brightness). This is referred to as the HSB or sometimes HSV color space (where V is value). In JMP, we are using the HLS (Hue, Lightness and Saturation), or HSL color space. Based on the names, you might expect that the Saturation in both color spaces would be the same, but in fact they are not. While both HSL and HSV color spaces are similar in what they do, they are different in how they do it. I would expect Hue to be the same and it appears it is based on your images above. But the Saturation is calculated differently in both systems, as is the Lightness / Brightness / Value. Here is a link to a page that explains the differences: HSL and HSV - Wikipedia, the free encyclopedia

I hope this helps,

JohnP

Oh, yup.  I totally assumed they were the same.  Thank you for the reference. 

joe_perez0

This is a great tool, thanks for creating it!

Is it possible to use any of the custom selection tools for region selection such as the lasso or brush?  Only rectangular region selection seems to work currently.

JohnPonte

Currently, the selection is done within the JSL script and it is always a rectangle. I'm not sure if I can utilize the custom selection tools, as an Add-in. I will look into that. Thanks for the suggestion.

Hi,

 

Can you do the inverse action, using the data and create the image?

 

Thanks

ygarb

What a marvelous add-in.  I move between ImageJ (in its FIJI incarnation) and QGIS (GIS software) and JMP for analysis of remote sensing images for environmental purposes, and was cobbling together my own export/import workflow before finding this.  You have saved me hours and made certain lines of analysis feasible again.  (And immediate HLS in parallel to RGB is icing on the cake.)  Much appreciated.

Wow. That's a lovely add-in! Thanks a lot. Since I am not an expert in the color area and just starting with this subject, I have got a question, what "I" means in the generated table - right between RGB and HLS. I suppose, it must be "Intensity", mustn't?
Thank you!

Cool stuff. I'm working on it.

Thanks a lot!.

Just a curiosity: is it possible to develop the JSL codes to transform images into their vector forms (to perform so-called embedding), like the algorithms, such as Inception v3, VGG-16 or VGG-19 do? Thanks

JMP Explain.JPGcan someone explain this to me? I'm new in jmp.

From the graph builder (box plot), it looks like you are comparing 2 events (UHAST & UHASTx) at different time interval.

each box represent you 48Hr, 144Hr, 192Hr, 288Hr (category? label?).

But, I'm not sure what is the Y value

 

For me, this box plot can be fine tuned for a better graphical analysis to see difference between events at each time interval. Maybe you should stack the time interval in the data table.

Recommended Articles