Dear All,
I've been tangled up in a problem with ImageJ and hope to find somebody who can help... I'm trying to turn a thresholded image into a heat map, where different colours indicate the density of black pixels in a given area. More labelling would be red, changing to green and then blue in areas with less labelling and white is no label at all. Is there any way of doing this in ImageJ? Can't find any macros or plugins (not even any kind of free software), even though I'm sure I'm not the first to tackle this problem. Hope somebody can help... Szilvia Mezey Semmelweis University Budapest, Hungary |
On Thursday 26 November 2009 13:46:07 Szilvia Mezey wrote:
> I've been tangled up in a problem with ImageJ and hope to find somebody who > can help... > > I'm trying to turn a thresholded image into a heat map, where different > colours indicate the density of black pixels in a given area. More labelling > would be red, changing to green and then blue in areas with less labelling > and white is no label at all. Is there any way of doing this in ImageJ? > Can't find any macros or plugins (not even any kind of free software), even > though I'm sure I'm not the first to tackle this problem. Run a mean filter of size of your local region. Apply some LUT such as "fire" The colour will vary depending on the mean value of the set pixels in a region given by the filter kernel size centred at that location. Cheers G. |
Gabriel,
thank you very much, it works a treat! I've also found an LUT called "thermal" which does the job perfectly. Szilvi 2009/11/26 Gabriel Landini <[hidden email]> > On Thursday 26 November 2009 13:46:07 Szilvia Mezey wrote: > > I've been tangled up in a problem with ImageJ and hope to find somebody > who > > can help... > > > > I'm trying to turn a thresholded image into a heat map, where different > > colours indicate the density of black pixels in a given area. More > labelling > > would be red, changing to green and then blue in areas with less > labelling > > and white is no label at all. Is there any way of doing this in ImageJ? > > Can't find any macros or plugins (not even any kind of free software), > even > > though I'm sure I'm not the first to tackle this problem. > > Run a mean filter of size of your local region. > Apply some LUT such as "fire" > The colour will vary depending on the mean value of the set pixels in a > region > given by the filter kernel size centred at that location. > > Cheers > > G. > > |
In reply to this post by Szilvi Mezey
From other macros, I cobbled together a macro that will batch convert
all files to 8-bit grey scale from 24 bit color and saves them with a different name. (The built-in batch convert function does not 1) go to grey scale and 2) does not change the file name). Yes it returns an error about the file type in the target directory being wrong. I get the same error when I run the Batch convert macro. Has something changed that causes this problem? Thanks! // These macros convert all the files in a folder to a different format. // Two dialog boxes are displayed. Select the source folder in the // first and the destination folder in the second. macro "Batch Convert to 8-bit TIFF" {convert("8-bit tiff");} function convert(format) { requires("1.33s"); dir1 = getDirectory("Choose Source Directory "); dir2 = getDirectory("Choose Destination Directory "); list = getFileList(dir1); setBatchMode(true); for (i=0; i<list.length; i++) { showProgress(i+1, list.length); path = dir1+list[i]; open(path); if (startsWith(format, "8-bit")) convertTo8Bit(); run("8-bit"); dotIndex = lastIndexOf(path, "."); if (dotIndex!=-1) path = substring(path, 0, dotIndex); // remove extension save(path+"-8bit.tif"); close(); } } function convertTo8Bit() { if (bitDepth==24) run("8-bit Color", "number=256"); else run("8-bit"); } -- -------------------------------------- Herbert M. Geller, Ph.D. Developmental Neurobiology Section National Heart Lung and Blood Institute, NIH 10 Center Drive MSC 1754 Bldg 10, Room 6D18 Bethesda, MD 20892-1754 Tel: 301-451-9440; Fax: 301-594-8133 e-mail: [hidden email] Web: http://dir.nhlbi.nih.gov/labs/ldn/index.asp --------------------------------------- |
Free forum by Nabble | Edit this page |