Fill bubbles with different colors based on their area

imagej

#1

Hello

I have stack of binary images with bubbles, I want to fill the bubbles with different colors based on their area. BioVoxxel plugin does this for single image but it can’t handle stacks. Plus I am only interested in area and not any other morphological parameter. Any suggestions?

Warm regards
Mandar


#2

When you are looking at the bubbles in 3D, you will be analyzing the volume and not the area.
Look into the 3D ROI Manager @ThomasBoudier has written.
He has a few macro functions in this page:
http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_roi_manager:start

I think the one you are after is this macro which colourises the object based on their volume:
http://imagejdocu.tudor.lu/lib/exe/fetch.php?media=plugin:stacks:3d_ij_suite:macromanager3d2_colorsize.ijm


#3

Thank you for your replay and sorry for delay in response.
My image is actually a 2D image and therefore specifically looking to color the objects (bubbles in my case) based on area. Attaching a sample image for your reference.

Thanks again.

test|nullxnull


#4

You can do this using a macro. The following example fills the objects in the Blobs sample image with their area. It also labels the objects with their area.

  run("Blobs (25K)");
  setAutoThreshold("Default");
  setOption("Area", true)
  run("Analyze Particles...", "  show=Overlay display clear");
  run("32-bit");
  maxArea = 0;
  for (i=0; i<Overlay.size; i++) {
     area = getResult("Area", i); 
     Overlay.activateSelection(i);
     setColor(area);
     fill;
     Roi.setName(""+area);
     if (area>maxArea) maxArea=area;
  }
  setMinAndMax(0, maxArea);
  run("Ice");
  Roi.remove
  run("Labels...", "color=white font=9 show use draw");
  run("In [+]");

Screenshot