Dear list,
There have been several questions about plotting colour profiles in the past and I have written a macro that can profile up to 7 colours (red, green, blue, cyan, magenta, yellow and grey) and will handle different types of images. It also allows you to choose the channels you want to plot (by channel number). You can download it from: http://www.le.ac.uk/biochem/microscopy/macros/plot_multicolour4.ijm Best wishes Kees -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Michael,
Thanks for letting me know. I thought that getProfile handled scaled images like run("Plot Profile") but does not seem to be the case. I think I have found an easy way around this. The new macro can be found at: http://www.le.ac.uk/biochem/microscopy/macros/plot_multicolour4-1.ijm. Let me know if there are other (or new) problems with the macro. Best wishes Kees -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Epping Sent: 13 May 2013 08:30 To: [hidden email] Subject: Re: macro to plot multi color profiles Hello Kees, thanks for sharing your macro with us. I would suggest to change it a bit. The line > Plot.create("multi Channel Plot", "Distance("+unit+")", "Intensity"); could be misleading. It adds the unit to the x-axis label, but you still plot intensity against pixels. The best way is to scale the x-coordinates by using the VoxelSize. But this will make the macro much more complex. Best regards Michael Am 09.05.2013 10:31, schrieb Straatman, Kees R. (Dr.): > Dear list, > > There have been several questions about plotting colour profiles in the past and I have written a macro that can profile up to 7 colours (red, green, blue, cyan, magenta, yellow and grey) and will handle different types of images. It also allows you to choose the channels you want to plot (by channel number). > > You can download it from: > http://www.le.ac.uk/biochem/microscopy/macros/plot_multicolour4.ijm > > Best wishes > > Kees > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
Thanks for that, I have added the code to the macro which can be found at http://www.le.ac.uk/biochem/microscopy/macros.html. Best wishes Kees -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Epping Sent: 15 May 2013 13:15 To: [hidden email] Subject: Re: macro to plot multi color profiles Dear Kees, I have the clue to solve the problem with only two more lines of code. > getLine(x1, y1, x2, y2, lineWidth); > dx = (x2-x1)*vw; dy = (y2-y1)*vh; > Plot.setLimits(0,sqrt(dx*dx+dy*dy),intensityBottom,intensityTop); This will even work for images with vw!=vh. Best regards Michael Am 14.05.2013 10:50, schrieb Straatman, Kees R. (Dr.): > Dear Michael, > > Thanks for letting me know. I thought that getProfile handled scaled images like run("Plot Profile") but does not seem to be the case. I think I have found an easy way around this. The new macro can be found at: http://www.le.ac.uk/biochem/microscopy/macros/plot_multicolour4-1.ijm. Let me know if there are other (or new) problems with the macro. > > Best wishes > > Kees > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Epping > Sent: 13 May 2013 08:30 > To: [hidden email] > Subject: Re: macro to plot multi color profiles > > Hello Kees, > > thanks for sharing your macro with us. I would suggest to change it a bit. The line > > > Plot.create("multi Channel Plot", "Distance("+unit+")", "Intensity"); > > could be misleading. It adds the unit to the x-axis label, but you still plot intensity against pixels. The best way is to scale the x-coordinates by using the VoxelSize. But this will make the macro much more complex. > > Best regards > > Michael > > Am 09.05.2013 10:31, schrieb Straatman, Kees R. (Dr.): >> Dear list, >> >> There have been several questions about plotting colour profiles in the past and I have written a macro that can profile up to 7 colours (red, green, blue, cyan, magenta, yellow and grey) and will handle different types of images. It also allows you to choose the channels you want to plot (by channel number). >> >> You can download it from: >> http://www.le.ac.uk/biochem/microscopy/macros/plot_multicolour4.ijm >> >> Best wishes >> >> Kees >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
This post was updated on .
In reply to this post by Krs5
Hi Kees,
I used the macro on a 4 channels .lsm image. But obtained 4 plots with only "black" color. Even I changed image to a composite form, the macro could show 4 channels on "which channels do you want to plot?". And it also obtained 4 plots with black color. Could you please tell me what's wrong with my image or the operating steps i missed? Thanks in advance. chin |
Hi Putri,
This seems to be a specific problem with lsm files. The macro works fine when using for example the confocal series from the ImageJ samples. If you use a LUT table for each individual channel (Image > Lookup Tables and select for each channel the colour you want) on your lsm files the problem is solved. I am not sure but it almost looks like the lsm channels somehow don't report the colour in the channel with as results a black line for each channel in the graph. Best wishes Kees ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of chin [[hidden email]] Sent: 09 November 2013 02:21 To: [hidden email] Subject: Re: macro to plot multi color profiles Hi Kees, I used the macro on a 4 channels .lsm image. But obtained 4 plots with only "black" color. Even I changed image to a composite form, the macro could show 4 channels on "which channels do you want to plot?". And it also obtained 4 plots with black color. Could you please tell me what's wrong with my image or the operating steps i missed? Thanks in advance. putri <http://imagej.1557.x6.nabble.com/file/n5005516/1.jpg> -- View this message in context: http://imagej.1557.x6.nabble.com/macro-to-plot-multi-color-profiles-tp5002959p5005516.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
This post was updated on .
Hi Kees,
Thank you for your reply. Yes, after using the method you taught, the 4 channels could be shown with different colors. I tried to open the lsm file by using the "LSM reader" on the "Input-Output" plugin and it gave the results a black line. Next, I tried to use the Bio-Formats Importer. The colors could be shown correctly when the channels are less or equal to 3, but the colors will be 2 lines with two clors and other two lines with the same color when the channels are more than 3 ( eg.4). I have no idea what is the reason. Anyway, i could obtain the correct colors by using your suggestion. Thanks again. Best regards, putri |
Free forum by Nabble | Edit this page |