Hi all,
from the thread (distance between adjacent particles) I have another problem, possibly easy to solve: I have an image with say particles, thresholded. This image can be measured by 'Analyze particles ...'. So far so good, but now I am interested to measure additionally any other sub/super-structures of those particles (holes [number, area], watershed bassins (environment), labelled signals [number, intensity]) morphometrically. Is there a possibility to preserve the particle number from the first mesurement for use with any other binary image? Wow, how to relate particle measurements of different binary images? The idea I have, up to now not solved with ImageJ, is to create a 'labelimage' of connected components of the original binary image and use this by 'Redirect to' for measurements. Measured intensities would deliver the label number. But how to generate the labelimage? I must confess only being able to read Java quite slowly! With thanks in advance Karsten |
On Thursday 10 May 2007 07:36:29 Karsten Rodenacker wrote:
> Is there a possibility to preserve the particle number from the first > mesurement for use with any other binary image? > Wow, how to relate particle measurements of different binary images? Hi Karsten, I do it this way: I do a preliminary particle analysis and record only XStart YStart. Then I read the XStart YStart from the Results Table in an array x(), y(). You have now all the particle numbers (the table index) and their unique start pixel coordinates. Do the analysis you want for each cell located at x(n), y(n). For instance if you need to know the holes in a single image, just create an empty image, of the same size as the original, set the current pixel in this empty image at x(n) y(n) and use BinaryReconstruct to recreate only that particle (using this single set pixel image as the seed and the original image as the mask). Invert the image, delete the border-touching particles (i.e. the background) and count particles again. That is the number of holes. However there maybe some issues with holes within holes within holes, etc. Then, get the number of items in the Results Table (given by the "nResults" variable and print it to the Log window (using "print" macro command) including in the same line the particle number and its x() y() values. So thid new text file will have the original particle number and its coordinates too, plus the the new parameter(s) you calculated. (I am sure that there are way better algorithms for counting holes, but I have not seen them implemented). This is a bit sloppy but it works well. All this could be facilitated if one could create more than one Results Table, (so there is no problem in overwriting the Results table with every new analysis) but this is not currently possible. > The idea I have, up to now not solved with ImageJ, is to create a > 'labelimage' of connected components of the original binary image and > use this by 'Redirect to' for measurements. Measured intensities > would deliver the label number. But how to generate the labelimage? > I must confess only being able to read Java quite slowly! You could use the BinaryLabel8 plugin which will label up to 65530 binary particles in a 16 bit image. (the colour is the label). It is in the morphology.zip file here: http://www.dentistry.bham.ac.uk/landinig/software/software.html Regards, Gabriel |
Thank you Gabriel. Using the binarylabel8 on the filled particles
works well to get the correspondence for particles with and without holes. Surprisingly I get two particles more in the second case of run("Analyze Particles...", "size=20-Infinity circularity=0.00-1.00 show=Nothing display clear include"); run("Analyze Particles...", "size=20-Infinity circularity=0.00-1.00 show=Nothing display"); without 'include'. In fact these are objects inside of holes. Possibly I should apply the rois of the first run on the difference of the filled version and the original (the holes). Regards Karsten Am 10.05.2007 um 14:27 schrieb Gabriel Landini: > >> The idea I have, up to now not solved with ImageJ, is to create a >> 'labelimage' of connected components of the original binary image and >> use this by 'Redirect to' for measurements. Measured intensities >> would deliver the label number. But how to generate the labelimage? >> I must confess only being able to read Java quite slowly! > > You could use the BinaryLabel8 plugin which will label up to 65530 > binary > particles in a 16 bit image. (the colour is the label). > It is in the morphology.zip file here: > http://www.dentistry.bham.ac.uk/landinig/software/software.html |
On Thursday 10 May 2007 15:30:02 Karsten Rodenacker wrote:
> Surprisingly I get two particles more in the second case of > run("Analyze Particles...", "size=20-Infinity circularity=0.00-1.00 > show=Nothing display clear include"); > run("Analyze Particles...", "size=20-Infinity circularity=0.00-1.00 > show=Nothing display"); > without 'include'. In fact these are objects inside of holes. Hi, The labelling plugin uses the same algorithm as the Particles8_plus and will consider particles inside others as separate ones. Otherwise, there may be some difference between the area coding of the built-in and the Particles8_Plus. I would like to see the image to test where is the difference arising from. Would it be possible to email me that binary image? > Possibly I should apply the rois of the first run on the difference > of the filled version and the original (the holes). You can try running the Particles8_Plus and also Fill Holes and then Particles8_Plus (I guess that this will also give a 2 particles difference). Regards, Gabriel |
Gabriel, your algorithm is as far as I can see ok. I have traced the
two particles inside the holes of particles. Karsten Am 10.05.2007 um 17:08 schrieb Gabriel Landini: > The labelling plugin uses the same algorithm as the Particles8_plus > and will > consider particles inside others as separate ones. > Otherwise, there may be some difference between the area coding of the > built-in and the Particles8_Plus. |
Free forum by Nabble | Edit this page |