Help with analysis

I am an honours student doing analysis on mouse pancreatic tissue. My project entails analysis on the islets where i must measure the total islet area, calculate the total number of alpha and beta cells and their respective areas…
My first problem is setting a scale/calibrayion…is this the same thing? I captured my pictures at 10X objective with a 0.33um/pixel value. Please assist with setting of scale as Image j asks for pixel/um…
I am new to Image J and i am lost really…ive tried thresholding…counting manually…i just cant get it right…the manual counting is very time consuming as i have 320 samples to count…each with numerous islets…

Ive heard about macros? Can somebody please help assisting me in writing one perhaps or a link to one that i can use perhaps?

Please i am losing my mind here​:cry::sob:

Hi and welcome to the forum,

here is a tutorial for setting the scale:

For the first basic analysis you might not need macros. If you could post example images we might be able to help you with the segmentation.


The default answer to starting macro programming is the page with all available functions listed, the fact that ImageJ 1 has a debugger built in, allowing you to step through code line by line while inspecting the variables you use, and the macro recorder, which helps you to translate manual image processing steps to a list of code.

1 Like

SLIDE 347-18 003.2X10.tif (3.5 MB) this is a relatively big islet…
SLIDE 245-18 004 X10.tif (3.6 MB) this is a medium sized one…majority of myislets are these size

Wit regards to spatial calibration as in the tutorial…do I set the scale for each new image i analyze?
I used an Olympus BX50 to capture at 10X and the calibration of the objective said 0.33 um/px. I captured all the images at that magnification. I was advised to used his value to set the scale by setting the distance inpx to 1.00 and the known distance to 0.33 ad unit um. Was this wrong to do?

What brings you to doubting that setting? I notice image 003 has a scaling of 1.14 pix/µm while image 004 has no scaling set. Hard to tell if this should be 0.33 µm/px.

Setting scale in an unknown system is best done using a micrometer as you might unknowingly have intermediate adaptive optics between the objective lens and the camera.

If you were told to use 0.33 µm/pixel, you could ask around how this value was established. Oftentimes people take things for granted that may be totally wrong or, on the other end of the spectrum, may have been thoroughly verified in a distant past but forgotten. Adaptive optics magnification of a microscope setup doesn’t change that often :wink: .

Once you set the scale globally, newly opened images will also have that scale. If an image is open and has been globally calibrated using 0.33 px/µm and another image is opened that has been calibrated with another scale, you will get an alert popping up.

I was told to ise 1.14 px/um ehen i started but then got told to use the value given when capturing om the microscope which was 0.33um/px…when i asked the person again where the 1.14 px/um came from i got a response of i dont know…and to use the 0.33 rather…i was also initially told to capture at 10x and store as jpeg files…after 2 months of doing this and using the 1.14 for analysis i was told to save as tiff files and use 0.33um/px so i am really confused and dont get any anwers…
I have downloaded the picture that was provided on the spatial calibration tutorial and set my scale acckrding to that…my images give me a range from 3.3818 to 3.4125 px/um…

I must note that i am working with images captured at 4x also to get the whole section area…

My question is thus now-for calibration purposes- do i set the scale each time for a new image?or use a relative one for example 3.42??

Thank you for the help by thr way!I really do appreciate it

Cluld you also please advise me on how to count the cells?beta and alpha…in the images beta cells would be the bright pink cells and alpha cells the brown cells

The Save as Tiff files seems to be the better advice :slightly_smiling_face: whether that also puts a quality stamp on the 0.33µm/px, I don’t know.

Downloading the picture on the tutorial page won’t help you. That image was made with that microscope, not your microscope (and camera). You need to get your hands on a slide containing objects of known dimensions. This can be a ‘counting chamber’, a real micrometer (beg, borrow or steal, no not steal, one) or e.g. a EM grid that you know the dimensions of.
Only that can give you real world numbers on the results. Fortunately you can recalibrate your already recorded images.

On how to count the cells I cannot be of much help but to mention that you best count the nucleii and at 4x magnification, depending on your camera resolution, that will be quite an effort. Although with Colour Thresholding, tissues are separated quite easily.

BTW, the images you have uploaded do not seem to be your originals; there are quite a few compression artifacts!

What stain is this?
Based on the stain you use you can use colour deconvolution to separate the image channels and then do the appropriate measurements. Another link

Depending on what you plan to do, you should use nuclei as a count for all cells. Once you separate the channels, you can use thresholding for quantification of the alpha and/or beta cells.


As @pr4deepr said, colour deconvolution is a basis.
After retrieving nucleus (sometimes hard to do), you could try to dilate them a bit and measure the average color in one of the other channel. This should allow to discriminate alpha and beta cells.


1 Like

Regarding the set scale matter…i recapture some of the images and added a scale to the images…i rhen used this scale in image j to set scale as suggested in the image j tutorial i read…i found that for the 4X images this method gave me 0.2091 px/um…this actually corresponds to the 4.78um/px that i saw when taking the picturees and that i was told to use the inverted value of when using image j.