Thanks, for the information.
I only need to detect fatty tissue and real 'holes' to accurately calculate tissue areas! I will definitely try this out and let you guys and girls know. Best regards Koen ir. Koen Marien Imaging Scientist, PhD student Lab building, 1st floor (campus ZNA Middelheim) Lindendreef 1, 2020 Antwerpen (Belgium) Phone: +32 (0)3 218 19 17 https://www.uantwerp.be/en/staff/koen-marien/ ________________________________________ Van: ImageJ Interest Group [[hidden email]] namens IMAGEJ automatic digest system [[hidden email]] Verzonden: dinsdag 2 september 2014 6:00 Aan: [hidden email] Onderwerp: IMAGEJ Digest - 31 Aug 2014 to 1 Sep 2014 (#2014-252) There are 22 messages totaling 2001 lines in this issue. Topics of the day: 1. How do I get the pixel coordinate with minimum value?? please help! (2) 2. ImageJ Batch Macro (9) 3. Help Please (4) 4. detection of fatty tissue in HE images 5. persistence homology diagram 6. Not so easy ROI Manager macro 7. How to read and write files using a java plugin 8. Java Exception when opening a large (1.5 Gb) tiff 9. Image Processing Specialist - Open position at the Friedrich Miescher Institut, Basel 10. Fast Math Operations on Images -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ---------------------------------------------------------------------- Date: Mon, 1 Sep 2014 10:26:46 +0200 From: Jan Eglinger <[hidden email]> Subject: Re: How do I get the pixel coordinate with minimum value?? please help! Hi all, On 31.08.2014, 2:19 AM, Gabriel Landini wrote: > run("Interpolate", "interval=1 adjust"); > [...] > There are no details/documentation on the "adjust" option in the interpolate > command, maybe it is not needed. In the changelog for 1.49e (2 August 2014), it reads: >> Thanks to Norbert Vischer, added an "Adjust interval to match" option >> to the Edit>Selection>Interpolate dialog. This option adjusts the >> interval so that the steps between the first and last point are >> equidistant. Jan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:36:25 +0100 From: Gabriel Landini <[hidden email]> Subject: Re: How do I get the pixel coordinate with minimum value?? please help! On Monday 01 Sep 2014 10:26:46 Jan Eglinger wrote: > On 31.08.2014, 2:19 AM, Gabriel Landini wrote: > > There are no details/documentation on the "adjust" option in the > > interpolate command, maybe it is not needed. > In the changelog for 1.49e (2 August 2014), it reads: > >> Thanks to Norbert Vischer, added an "Adjust interval to match" option > >> to the Edit>Selection>Interpolate dialog. This option adjusts the > >> interval so that the steps between the first and last point are > >> equidistant. Thanks Jan, I looked in the user guide, which is excellent, but it had the old version of the command. Now I realise that this is quite a new feature and it will probably be included in some future revision. In the context of OP perhaps the option is better not included and the addressing of each pixel in the line can be obtained by rounding the interpolated coordinates? Thanks again Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 05:00:56 -0400 From: Paul Dennis <[hidden email]> Subject: ImageJ Batch Macro Hello, I am new to ImageJ. I am wondering if anyone can help? I am trying to use a batch option to process a macro to overlay a grid on an image. In this case a folder with 70 images. I can create a macro and I can see the batch option but is it possible to add a new macro to the batch option? Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:22:03 +0100 From: "James gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST)" <[hidden email]> Subject: Re: Help Please Hi, I would use the 'getHistogram' macro function... getHistogram(values, counts, nBins[, histMin, histMax]) Then the number of zero pixels is given by 'counts[0]'. Greg. ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Lee Berndt [[hidden email]] Sent: 30 August 2014 22:44 To: [hidden email] Subject: Help Please Greetings: I've written a macro to help determine the area of injury to turfgrass (putting greens)....the macro works great except for the very end....what I need to do is to get the number of pixels in an image corresponding to count 0 of 256 (black)....I can get the total number of pixels in the image but need the value for count 0 to create a percentage of black to all other pixels.....how do I get that value? Any help is greatly appreciated....thank you. William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:37:05 +0000 From: "Lendl,Thomas" <[hidden email]> Subject: Re: detection of fatty tissue in HE images Hi Marien, If you are just interested in tissue sizes and not in single cells, this could be a possible approach for you: 1.Use the green Channel for segmentation, make a copy of it. 2.Define tissue versus Background by using the FeatureJ Edges filter and thresholding on that. 3. Create a mask from the thresholded Image, reshape your region via binary operations (dilation and closing, fill holes) to cover the whole tissue. 4. Create a selection on the binary image, measure the size, transfer it to your original green channel. 5. Clear outside so that you get a black background. Smooth once. 6. Threshold again on the brighter fatty tissue, make a selection and measure the size. If necessary you can create a binary mask again to reshape your objects before measuring. This should be doable to automate with a macro and run on a batch of images, at least if they are similar enough. Just tell me if this worked out for you. Best, Thomas -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Volker Baecker Sent: Friday, August 29, 2014 10:51 AM To: [hidden email] Subject: Re: detection of fatty tissue in HE images -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hello, I did something similar, see http://dev.mri.cnrs.fr/projects/imagej-macros/wiki/Adipocytes_Tool You will need to find the right parameters and maybe adapt the macros to your needs. Alternatively there is Osman OS, Selway JL, K?pczy?ska MA, Stocker CJ, O'Dowd JF, Cawthorne MA, et al. A novel automated image analysis method for accurate adipocyte quantification. Adipocyte. 2013 Jul 1;2(3):0-1. using MATLAB Best regards, Volker Baecker Marien Koen wrote: > Dear ImageJ mailing list > > > Currently I'm trying to write an algorithm that can detect fatty > tissue in an image of HE stained tissue (examples: > https://www.dropbox.com/sh/40unigstsq795tk/AADpFIvIbudvDCJqdNxINa1_a?dl=0). > > Making a difference between holes in the tissue and the fatty is not easy. > > Can somebody help me with a succesful workflow? With choosing the > right filters? Or if you know good literature about this? > > > Thanks Koen > > > ir. Koen Marien > > Imaging Scientist, PhD student > > <file://hgx-storage2/General/Templates/HGX%20logooke.jpg> > > Lab building, 1st floor (campus ZNA Middelheim) > > Lindendreef 1, 2020 Antwerpen (Belgium) Phone: +32 (0)3 218 > 19 17 > > https://www.uantwerp.be/en/staff/koen-marien/ > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJUAD7gAAoJENcVU956o58NbiMIAJWCBRMYPYFDnAkUxKMp2Gms kiNSJSWSxZ++Slf8DBCRmT1ijmrj6Fg7vQjdA204x703FD2g5kjzlasQYYfcuoJ6 u+HLlG0wvoQq0JkZOYIPVcwXZTlevCJAZaK+NQCHNuPCZ34RsGbTIv6bF412X7aO NLJ4Hy2rPnv2LSg0xJ+/q40MxptdnvYz2e316kpHXOygoxdp8V6rWKD4PFvmzs8g iGzILsY3HDl9ivIS/fWiWPE7hGb32uImBtO4ocsAcyg8IlJnnu9tRNdfkMXGH0M9 5t9+keNKxEC7yc2KRKW68gfaFdea78ShzWP/H2hfb2eu15twQW9SqA5t4RBxCso= =zq0H -----END PGP SIGNATURE----- -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 14:04:11 +0300 From: rabih assaf <[hidden email]> Subject: persistence homology diagram Hello , does anyone know how to plot the persistence diagram of an image ? thank you -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 13:51:47 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro Hi Paul, Process/Batch/Macro... allows you to write your macro (or open it if already written). To add an image in the overlay of all the image of a folder : run("Add Image...", "image=Untitled x=0 y=0 opacity=100 zero"); see enclosed exemple. Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 11:00, Paul Dennis a écrit : > Hello, I am new to ImageJ. > > I am wondering if anyone can help? > > I am trying to use a batch option to process a macro to overlay a grid on an image. In this case a folder with 70 images. > > I can create a macro and I can see the batch option but is it possible to add a new macro to the batch option? > > Many thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 08:51:23 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. thank you for the quick reply! I have code for a macro to overlay a grid. // This macro demonstrates how to use the Image>Overlay>Add Selection // command to draw a line grid on an image in a non-destructive overlay. requires("1.43j"); color = "cyan"; nLines = 50; if (nImages==0) run("Boats (356K)"); run("Remove Overlay"); width = getWidth; height = getHeight; tileWidth = width/(nLines+1); tileHeight = tileWidth; xoff=tileWidth; while (true && xoff<width) { // draw vertical lines makeLine(xoff, 0, xoff, height); run("Add Selection...", "stroke="+color); xoff += tileWidth; } yoff=tileHeight; while (true && yoff<height) { // draw horizonal lines makeLine(0, yoff, width, yoff); run("Add Selection...", "stroke="+color); yoff += tileHeight; } run("Select None"); This works fine if I open an image and run the macro. If I open batch and then open the macro or paste the macro code in and process nothing happens. If I save the macro it doesn't show in the drop down list. I thought the macro would overlay/ save the grid on top of the image but maybe it's just intended to be used on an open file? Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:23:33 +0200 From: Philippe CARL <[hidden email]> Subject: Not so easy ROI Manager macro Dear all, I have a whole bunch of ROIs saved within the ROI Manager for which I would like to create a macro that creates me a file (or alternatively a results window) containing the x, y positions (2 first columns) of all the pixels within the different ROIs together with a tag (3rd column) referring to the given ROI ID within the ROI Manager (= ROI Name within the ROI Manager). You ideas on the best strategies for writing such a macro are more than welcome. Also the link: http://rsbweb.nih.gov/ij/docs/macros/Roi_Properties_Test.txt that is given as example for the getProperty(), setProperty() and getProperties() methods additions of Jérôme on the 1.48h 30 November 2013 update seems to be broken. I thank you very much in advance. My best regards, Philippe Philippe CARL Laboratoire de Biophotonique et Pharmacologie UMR 7213 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:55:07 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I got the following code to work on a folder. (I removed from the while loop : true &&.) Hope it helps. color = "cyan"; nLines = 50; if (nImages==0) run("Boats (356K)"); run("Remove Overlay"); width = getWidth; height = getHeight; tileWidth = width/(nLines+1); tileHeight = tileWidth; xoff=tileWidth; while ( xoff<width) { // draw vertical lines makeLine(xoff, 0, xoff, height); run("Add Selection...", "stroke="+color); xoff += tileWidth; } yoff=tileHeight; while ( yoff<height) { // draw horizonal lines makeLine(0, yoff, width, yoff); run("Add Selection...", "stroke="+color); yoff += tileHeight; } run("Select None"); Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 14:51, Paul Dennis a écrit : > // This macro demonstrates how to use the Image>Overlay>Add Selection > // command to draw a > > line grid on an image in a non-destructive overlay. > > requires("1.43j"); > color = "cyan"; > > > nLines = 50; > if (nImages==0) run("Boats (356K)"); > run("Remove Overlay"); > width = > > getWidth; > height = getHeight; > tileWidth = width/(nLines+1); > tileHeight = tileWidth; > > > xoff=tileWidth; > while (true && xoff<width) { // draw vertical lines > makeLine(xoff, 0, > > xoff, height); > run("Add Selection...", "stroke="+color); > xoff += tileWidth; > } > > > yoff=tileHeight; > while (true && yoff<height) { // draw horizonal lines > makeLine(0, > > yoff, width, yoff); > run("Add Selection...", "stroke="+color); > yoff += tileHeight; > > > } > run("Select None"); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:08:13 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. Thank you for the code. I am able to run that fine as a record / run macro. If I paste the code to the batch window and process (selected input and output folders) it closed the dialogue box and the images are not having the grid overlayed. If I use the drop down and select say Borders it processes just fine. I am sorry for the many questions! Thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:06:45 -0400 From: Lee Berndt <[hidden email]> Subject: Re: Help Please Hi Greg....thank you for your reply.....I made my problem go away by using the following code: getHistogram(values, counts, nBins); for (i=0; i<nBins; i++) { setResult("Value", row, values[i]); setResult("Count", row, counts[i]); row++; } updateResults(); m = (getResult("Count",0)); thanks again.....Lee William L. Berndt, Ph.D. 239.246.0396 -----Original Message----- From: James gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST) <[hidden email]> To: IMAGEJ <[hidden email]> Sent: Mon, Sep 1, 2014 5:13 am Subject: Re: Help Please Hi, I would use the 'getHistogram' macro function... getHistogram(values, counts, nBins[, histMin, histMax]) Then the number of zero pixels is given by 'counts[0]'. Greg. ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Lee Berndt [[hidden email]] Sent: 30 August 2014 22:44 To: [hidden email] Subject: Help Please Greetings: I've written a macro to help determine the area of injury to turfgrass (putting greens)....the macro works great except for the very end....what I need to do is to get the number of pixels in an image corresponding to count 0 of 256 (black)....I can get the total number of pixels in the image but need the value for count 0 to create a percentage of black to all other pixels.....how do I get that value? Any help is greatly appreciated....thank you. William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:22:42 -0400 From: Lee Berndt <[hidden email]> Subject: Re: Help Please Greeting from Florida: I'm have a bit of trouble and was wondering about a solution. When I run color threshold on an open RBG image the threshold window pops up and settings (i.e., min hue, etc.) can be manually configured (i.e., min hue, max hue, etc.)....my question is that since I have numerous images to do this on is there macro language that would allow me to simply set the configurations instead of having to do it manually via adjusting the sliders every time?....when I click the macro button on the threshold window with the correct setting it generates a lot of code that is not applicable to my need and I'm having a heck of a time modifying the code....in other words is there a way to, for example, set maxHue or minHue via a macro?....any suggestions would be of great help.... I need to have the following settings: min hue = 40 max hue = 255 min sat = 0 max sat = 255 min bri = 0 max bri = 255 band.pass = false (unchecked) band.pass1 =true (checked) band.pass2=true (checked) method = default threshold color = Red color space = HSB and dark background (checked) thanks in advance for any suggestions.... William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:30:36 +0100 From: Gabriel Landini <[hidden email]> Subject: Re: Help Please On Monday 01 Sep 2014 10:22:42 Lee Berndt wrote: > I'm have a bit of trouble and was wondering about a solution. When I run > color threshold on an open RBG image the threshold window pops up and > settings (i.e., min hue, etc.) can be manually configured (i.e., min hue, > max hue, etc.)....my question is that since I have numerous images to do > this on is there macro language that would allow me to simply set the > configurations instead of having to do it manually via adjusting the > sliders every time?....when I click the macro button on the threshold > window with the correct setting it generates a lot of code that is not > applicable to my need and I'm having a heck of a time modifying the > code....in other words is there a way to, for example, set maxHue or minHue > via a macro?....any suggestions would be of great help.... You can use the "Macro" button to generate a macro that corresponds to the current settings of the dialog. Regards Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 16:18:03 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I can't understand the problem. I used either imageJ 1.49b3 or Fiji 1.48v. It works with both. Sorry but I can't find anything else !!!! Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 16:08, Paul Dennis a écrit : > Hello Eric. > > Thank you for the code. > > I am able to run that fine as a record / run macro. > > If I paste the code to the batch window and process (selected input and output folders) it closed the dialogue box and the images are not having the grid overlayed. > > If I use the drop down and select say Borders it processes just fine. > > I am sorry for the many questions! > > Thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:41:22 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. Thank you for the update. I realsie I am on version 148. I will download and test on 149. Thank you for your help! Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 11:27:39 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. I just updated ImageJ to version 1.49 from the update menue item but have the same issue. When I click porcess nothing happens and the folders contents are unchanged :( Are your original images in a TIFF format? I wonder if that is the issue for me. Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 17:48:04 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I have jpeg tiff and png images in the folder and even a stack!!!! Are you sure your output format is .tif ???? Other format will not work !!! Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 17:27, Paul Dennis a écrit : > Hello Eric. > > I just updated ImageJ to version 1.49 from the update menue item but have the same issue. When I click porcess nothing happens and the folders contents are unchanged :( Are your original images in a TIFF format? I wonder if that is the issue for me. > > Many thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 18:12:57 +0200 From: Michael Schmid <[hidden email]> Subject: Re: How to read and write files using a java plugin Hi Avital, if you know what to write in a macro, here is a simple way how to find the corresponding commands for a plugin: - Have a look at the static IJ class. Many macro commands have equivalents there. - If you don't find it in IJ, have a look at ij.macro.Functions.java. There you will find the code executed upon calling one of the ImageJ built-in macro functions. Example: Reading a file into a string, macro command File.openAsString(path): IJ.openAsString(String path) For writing a file, you may find some code in ij.macro.Functions.openFile(), closeFile() etc: FileOutputStream fos = new FileOutputStream(path); BufferedOutputStream bos = new BufferedOutputStream(fos); PrintWriter writer = new PrintWriter(bos); writer.println(myString); writer.close(); --- Another option is using java.util.Properties; this is essentially a Hashtable that can be used to nicely save pairs like myKey1=myValue1 myKey2=myValue2 or an XML file ('flat' XML file with key-value pairs only, no hierarchies). Values must be Strings, but you can convert them back to numbers with, e.g., ij.utils.parseDouble. In that case, you can call ij.io.SaveDialog.java and ij.io.OpenDialog.java for the file dialogs, then create the java.io.FileOutputStream.html and FileInputStream streams required by the Properties.store and Properties.load. Michael ________________________________________________________________ On Aug 28, 2014, at 10:40, Avital Steinberg wrote: > Hi, > My plugin has a function (function A) that calculates results that I would > like to save in a file. These results will be used by another function, > which means that function B has to read this file (that should be chosen by > the user). Function B will use the parameters that were saved in it to do > calculations. > > It would have been easy to do with the ImageJ macro, but I am trying to do > it in a Java plugin. What is the best way to do it? > > Thank you, > Avital -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 12:07:58 -0700 From: Taylor_B <[hidden email]> Subject: Java Exception when opening a large (1.5 Gb) tiff Hi, When trying to open a large 16-bit RGB TIFF, I received the following exception: "(Fiji Is Just) ImageJ 2.0.0-rc-14/1.49g; Java 1.6.0_65 [64-bit]; Mac OS X 10.9.4; 2402MB of 6889MB (34%) java.lang.ArrayIndexOutOfBoundsException: 2 at io.scif.util.FormatTools.checkTileSize(FormatTools.java:649) at io.scif.util.FormatTools.checkPlaneForWriting(FormatTools.java:626) at io.scif.util.FormatTools.checkPlaneForReading(FormatTools.java:611) at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:607) at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:534) at io.scif.AbstractReader.openPlane(AbstractReader.java:167) at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:170) at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:151) at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:297) at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:208) at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:225) at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:191) at io.scif.img.ImgOpener.read(ImgOpener.java:808) at io.scif.img.ImgOpener.read(ImgOpener.java:793) at io.scif.img.ImgOpener.read(ImgOpener.java:775) at io.scif.img.ImgOpener.readPlanes(ImgOpener.java:761) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:362) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:257) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:145) at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:266) at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:250) at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:78) at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50) at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:136) at net.imagej.legacy.DefaultLegacyHooks.interceptFileOpen(DefaultLegacyHooks.java:327) at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:150) at ij.IJ.runPlugIn(IJ.java) at ij.Executer.runCommand(Executer.java:131) at ij.Executer.run(Executer.java:64) at java.lang.Thread.run(Thread.java:695)" I've updated ImageJ using Fiji. Based on the header, this doesn't appear to be a memory allocation problem, but I could be wrong. Any suggestions would be appreciated. -- View this message in context: http://imagej.1557.x6.nabble.com/Java-Exception-when-opening-a-large-1-5-Gb-tiff-tp5009451.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 21:35:40 +0000 From: "Gelman, Laurent" <[hidden email]> Subject: Image Processing Specialist - Open position at the Friedrich Miescher Institut, Basel Hi everybody, We have an open position for an image processing specialist at our facility (see website below and/or attachment). http://www.fmi.ch/Careers/JobDetails.html?jobID=174 Best regards, Laurent. ___________________________ Laurent Gelman, PhD Friedrich Miescher Institut Facility for Advanced Imaging and Microscopy Head of Light Microscopy WRO 1066.2.16 Maulbeerstrasse 66 CH-4058 Basel +41 (0)79 618 73 69 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 16:47:30 -0700 From: haider <[hidden email]> Subject: Fast Math Operations on Images Hello everyone I have been looking at ways to do mathematical operations on an ImageStack in the most optimized way in ImageJ possible. The first method is to simply iterate through every pixel of every slice of the image (two for loops). I perform three operations on the pixels of two identical size image stacks: add (3/8) , square root , multiply by 2 . There are 8388608 x 2 elements and it takes like 11 seconds to modify the two image stacks simultaneously. The next thing I tried using was the internal ImageJ commands: IJ.run( ing, "Add...", "value= 0.4" ) IJ.run( img, "Square Root", "") IJ.run( img, "Multiply...", "value=2") This seems much faster but the problem is that only the square root operation is performed on the whole image stack (I get a prompt where I conform that the square root should be performed on the whole stack). The other two operations only get performed on the first slice of the stack. The other issue with this approach is that I can not add (3/8) to each pixel because the pixels are stores as int . And adding (3/8) has no effect. Is there a way to perform adding and multiplying with the internal ImageJ commands such that they get performed on the whole stack. Also, how would I get floating point precision using these internal commands. Thanks Haider -- View this message in context: http://imagej.1557.x6.nabble.com/Fast-Math-Operations-on-Images-tp5009453.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ End of IMAGEJ Digest - 31 Aug 2014 to 1 Sep 2014 (#2014-252) ************************************************************ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Thomas
Your suggestion was implemented as follows: macro "[M] Measure Tissue" { setBatchMode(true); roiManager("reset"); run("Clear Results"); id = getImageID; selectImage(id); // Select green channel (most informative) run("RGB Stack"); setSlice(2); run("Duplicate...", "Green"); gid = getImageID; // Segmentation (result should be a binarized image with inverting LUT) selectImage(gid); run("Median...", "radius=2"); run("Find Edges"); setAutoThreshold("Huang dark"); setOption("BlackBackground", false); run("Convert to Mask"); for(i = 0; i < 8;i++) { run("Dilate"); } for(i = 0; i < 8;i++) { run("Erode"); } // remove all white small spots <2000 selectImage(gid); run("Invert"); run("Analyze Particles...", "size=0-2000 show=Nothing clear add"); run("Invert"); roiManager("OR") run("Set...","value=255"); roiManager("reset"); run("Select None"); // remove all small black spots < 10000 selectImage(gid); run("Analyze Particles...", "size=0-10000 show=Nothing clear add"); roiManager("OR") run("Set...","value=0"); roiManager("reset"); run("Select None"); // smoothen edges and create selection selectImage(gid); run("Gaussian Blur...","sigma = 5"); setAutoThreshold("Huang "); run("Create Selection"); roiManager("Add"); selectImage(gid);close; // measure and visualise ROI selectImage(id); run("RGB Color"); run("Duplicate...","Segmented"); roiManager("select",0); run("Make Inverse"); run("Set...","value=0"); run("Make Inverse"); run("Set Measurements...", "area redirect=None decimal=6"); run("Measure"); run("Tile"); setBatchMode("exit and display"); } But it must be more accurate, exclusion of real whitespace (no fatty tissue) must be achieved. Now I still have some whitespace: https://www.dropbox.com/s/mlnpa0nlcdunne7/ExportImage.tif?dl=0 (red arrows for not-detected whitespace). Thanks! Koen ir. Koen Marien Imaging Scientist, PhD student Lab building, 1st floor (campus ZNA Middelheim) Lindendreef 1, 2020 Antwerpen (Belgium) Phone: +32 (0)3 218 19 17 https://www.uantwerp.be/en/staff/koen-marien/ ________________________________________ Van: ImageJ Interest Group [[hidden email]] namens IMAGEJ automatic digest system [[hidden email]] Verzonden: dinsdag 2 september 2014 6:00 Aan: [hidden email] Onderwerp: IMAGEJ Digest - 31 Aug 2014 to 1 Sep 2014 (#2014-252) There are 22 messages totaling 2001 lines in this issue. Topics of the day: 1. How do I get the pixel coordinate with minimum value?? please help! (2) 2. ImageJ Batch Macro (9) 3. Help Please (4) 4. detection of fatty tissue in HE images 5. persistence homology diagram 6. Not so easy ROI Manager macro 7. How to read and write files using a java plugin 8. Java Exception when opening a large (1.5 Gb) tiff 9. Image Processing Specialist - Open position at the Friedrich Miescher Institut, Basel 10. Fast Math Operations on Images -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ---------------------------------------------------------------------- Date: Mon, 1 Sep 2014 10:26:46 +0200 From: Jan Eglinger <[hidden email]> Subject: Re: How do I get the pixel coordinate with minimum value?? please help! Hi all, On 31.08.2014, 2:19 AM, Gabriel Landini wrote: > run("Interpolate", "interval=1 adjust"); > [...] > There are no details/documentation on the "adjust" option in the interpolate > command, maybe it is not needed. In the changelog for 1.49e (2 August 2014), it reads: >> Thanks to Norbert Vischer, added an "Adjust interval to match" option >> to the Edit>Selection>Interpolate dialog. This option adjusts the >> interval so that the steps between the first and last point are >> equidistant. Jan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:36:25 +0100 From: Gabriel Landini <[hidden email]> Subject: Re: How do I get the pixel coordinate with minimum value?? please help! On Monday 01 Sep 2014 10:26:46 Jan Eglinger wrote: > On 31.08.2014, 2:19 AM, Gabriel Landini wrote: > > There are no details/documentation on the "adjust" option in the > > interpolate command, maybe it is not needed. > In the changelog for 1.49e (2 August 2014), it reads: > >> Thanks to Norbert Vischer, added an "Adjust interval to match" option > >> to the Edit>Selection>Interpolate dialog. This option adjusts the > >> interval so that the steps between the first and last point are > >> equidistant. Thanks Jan, I looked in the user guide, which is excellent, but it had the old version of the command. Now I realise that this is quite a new feature and it will probably be included in some future revision. In the context of OP perhaps the option is better not included and the addressing of each pixel in the line can be obtained by rounding the interpolated coordinates? Thanks again Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 05:00:56 -0400 From: Paul Dennis <[hidden email]> Subject: ImageJ Batch Macro Hello, I am new to ImageJ. I am wondering if anyone can help? I am trying to use a batch option to process a macro to overlay a grid on an image. In this case a folder with 70 images. I can create a macro and I can see the batch option but is it possible to add a new macro to the batch option? Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:22:03 +0100 From: "James gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST)" <[hidden email]> Subject: Re: Help Please Hi, I would use the 'getHistogram' macro function... getHistogram(values, counts, nBins[, histMin, histMax]) Then the number of zero pixels is given by 'counts[0]'. Greg. ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Lee Berndt [[hidden email]] Sent: 30 August 2014 22:44 To: [hidden email] Subject: Help Please Greetings: I've written a macro to help determine the area of injury to turfgrass (putting greens)....the macro works great except for the very end....what I need to do is to get the number of pixels in an image corresponding to count 0 of 256 (black)....I can get the total number of pixels in the image but need the value for count 0 to create a percentage of black to all other pixels.....how do I get that value? Any help is greatly appreciated....thank you. William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 09:37:05 +0000 From: "Lendl,Thomas" <[hidden email]> Subject: Re: detection of fatty tissue in HE images Hi Marien, If you are just interested in tissue sizes and not in single cells, this could be a possible approach for you: 1.Use the green Channel for segmentation, make a copy of it. 2.Define tissue versus Background by using the FeatureJ Edges filter and thresholding on that. 3. Create a mask from the thresholded Image, reshape your region via binary operations (dilation and closing, fill holes) to cover the whole tissue. 4. Create a selection on the binary image, measure the size, transfer it to your original green channel. 5. Clear outside so that you get a black background. Smooth once. 6. Threshold again on the brighter fatty tissue, make a selection and measure the size. If necessary you can create a binary mask again to reshape your objects before measuring. This should be doable to automate with a macro and run on a batch of images, at least if they are similar enough. Just tell me if this worked out for you. Best, Thomas -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Volker Baecker Sent: Friday, August 29, 2014 10:51 AM To: [hidden email] Subject: Re: detection of fatty tissue in HE images -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hello, I did something similar, see http://dev.mri.cnrs.fr/projects/imagej-macros/wiki/Adipocytes_Tool You will need to find the right parameters and maybe adapt the macros to your needs. Alternatively there is Osman OS, Selway JL, K?pczy?ska MA, Stocker CJ, O'Dowd JF, Cawthorne MA, et al. A novel automated image analysis method for accurate adipocyte quantification. Adipocyte. 2013 Jul 1;2(3):0-1. using MATLAB Best regards, Volker Baecker Marien Koen wrote: > Dear ImageJ mailing list > > > Currently I'm trying to write an algorithm that can detect fatty > tissue in an image of HE stained tissue (examples: > https://www.dropbox.com/sh/40unigstsq795tk/AADpFIvIbudvDCJqdNxINa1_a?dl=0). > > Making a difference between holes in the tissue and the fatty is not easy. > > Can somebody help me with a succesful workflow? With choosing the > right filters? Or if you know good literature about this? > > > Thanks Koen > > > ir. Koen Marien > > Imaging Scientist, PhD student > > <file://hgx-storage2/General/Templates/HGX%20logooke.jpg> > > Lab building, 1st floor (campus ZNA Middelheim) > > Lindendreef 1, 2020 Antwerpen (Belgium) Phone: +32 (0)3 218 > 19 17 > > https://www.uantwerp.be/en/staff/koen-marien/ > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJUAD7gAAoJENcVU956o58NbiMIAJWCBRMYPYFDnAkUxKMp2Gms kiNSJSWSxZ++Slf8DBCRmT1ijmrj6Fg7vQjdA204x703FD2g5kjzlasQYYfcuoJ6 u+HLlG0wvoQq0JkZOYIPVcwXZTlevCJAZaK+NQCHNuPCZ34RsGbTIv6bF412X7aO NLJ4Hy2rPnv2LSg0xJ+/q40MxptdnvYz2e316kpHXOygoxdp8V6rWKD4PFvmzs8g iGzILsY3HDl9ivIS/fWiWPE7hGb32uImBtO4ocsAcyg8IlJnnu9tRNdfkMXGH0M9 5t9+keNKxEC7yc2KRKW68gfaFdea78ShzWP/H2hfb2eu15twQW9SqA5t4RBxCso= =zq0H -----END PGP SIGNATURE----- -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 14:04:11 +0300 From: rabih assaf <[hidden email]> Subject: persistence homology diagram Hello , does anyone know how to plot the persistence diagram of an image ? thank you -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 13:51:47 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro Hi Paul, Process/Batch/Macro... allows you to write your macro (or open it if already written). To add an image in the overlay of all the image of a folder : run("Add Image...", "image=Untitled x=0 y=0 opacity=100 zero"); see enclosed exemple. Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 11:00, Paul Dennis a écrit : > Hello, I am new to ImageJ. > > I am wondering if anyone can help? > > I am trying to use a batch option to process a macro to overlay a grid on an image. In this case a folder with 70 images. > > I can create a macro and I can see the batch option but is it possible to add a new macro to the batch option? > > Many thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 08:51:23 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. thank you for the quick reply! I have code for a macro to overlay a grid. // This macro demonstrates how to use the Image>Overlay>Add Selection // command to draw a line grid on an image in a non-destructive overlay. requires("1.43j"); color = "cyan"; nLines = 50; if (nImages==0) run("Boats (356K)"); run("Remove Overlay"); width = getWidth; height = getHeight; tileWidth = width/(nLines+1); tileHeight = tileWidth; xoff=tileWidth; while (true && xoff<width) { // draw vertical lines makeLine(xoff, 0, xoff, height); run("Add Selection...", "stroke="+color); xoff += tileWidth; } yoff=tileHeight; while (true && yoff<height) { // draw horizonal lines makeLine(0, yoff, width, yoff); run("Add Selection...", "stroke="+color); yoff += tileHeight; } run("Select None"); This works fine if I open an image and run the macro. If I open batch and then open the macro or paste the macro code in and process nothing happens. If I save the macro it doesn't show in the drop down list. I thought the macro would overlay/ save the grid on top of the image but maybe it's just intended to be used on an open file? Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:23:33 +0200 From: Philippe CARL <[hidden email]> Subject: Not so easy ROI Manager macro Dear all, I have a whole bunch of ROIs saved within the ROI Manager for which I would like to create a macro that creates me a file (or alternatively a results window) containing the x, y positions (2 first columns) of all the pixels within the different ROIs together with a tag (3rd column) referring to the given ROI ID within the ROI Manager (= ROI Name within the ROI Manager). You ideas on the best strategies for writing such a macro are more than welcome. Also the link: http://rsbweb.nih.gov/ij/docs/macros/Roi_Properties_Test.txt that is given as example for the getProperty(), setProperty() and getProperties() methods additions of Jérôme on the 1.48h 30 November 2013 update seems to be broken. I thank you very much in advance. My best regards, Philippe Philippe CARL Laboratoire de Biophotonique et Pharmacologie UMR 7213 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:55:07 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I got the following code to work on a folder. (I removed from the while loop : true &&.) Hope it helps. color = "cyan"; nLines = 50; if (nImages==0) run("Boats (356K)"); run("Remove Overlay"); width = getWidth; height = getHeight; tileWidth = width/(nLines+1); tileHeight = tileWidth; xoff=tileWidth; while ( xoff<width) { // draw vertical lines makeLine(xoff, 0, xoff, height); run("Add Selection...", "stroke="+color); xoff += tileWidth; } yoff=tileHeight; while ( yoff<height) { // draw horizonal lines makeLine(0, yoff, width, yoff); run("Add Selection...", "stroke="+color); yoff += tileHeight; } run("Select None"); Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 14:51, Paul Dennis a écrit : > // This macro demonstrates how to use the Image>Overlay>Add Selection > // command to draw a > > line grid on an image in a non-destructive overlay. > > requires("1.43j"); > color = "cyan"; > > > nLines = 50; > if (nImages==0) run("Boats (356K)"); > run("Remove Overlay"); > width = > > getWidth; > height = getHeight; > tileWidth = width/(nLines+1); > tileHeight = tileWidth; > > > xoff=tileWidth; > while (true && xoff<width) { // draw vertical lines > makeLine(xoff, 0, > > xoff, height); > run("Add Selection...", "stroke="+color); > xoff += tileWidth; > } > > > yoff=tileHeight; > while (true && yoff<height) { // draw horizonal lines > makeLine(0, > > yoff, width, yoff); > run("Add Selection...", "stroke="+color); > yoff += tileHeight; > > > } > run("Select None"); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:08:13 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. Thank you for the code. I am able to run that fine as a record / run macro. If I paste the code to the batch window and process (selected input and output folders) it closed the dialogue box and the images are not having the grid overlayed. If I use the drop down and select say Borders it processes just fine. I am sorry for the many questions! Thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:06:45 -0400 From: Lee Berndt <[hidden email]> Subject: Re: Help Please Hi Greg....thank you for your reply.....I made my problem go away by using the following code: getHistogram(values, counts, nBins); for (i=0; i<nBins; i++) { setResult("Value", row, values[i]); setResult("Count", row, counts[i]); row++; } updateResults(); m = (getResult("Count",0)); thanks again.....Lee William L. Berndt, Ph.D. 239.246.0396 -----Original Message----- From: James gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST) <[hidden email]> To: IMAGEJ <[hidden email]> Sent: Mon, Sep 1, 2014 5:13 am Subject: Re: Help Please Hi, I would use the 'getHistogram' macro function... getHistogram(values, counts, nBins[, histMin, histMax]) Then the number of zero pixels is given by 'counts[0]'. Greg. ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Lee Berndt [[hidden email]] Sent: 30 August 2014 22:44 To: [hidden email] Subject: Help Please Greetings: I've written a macro to help determine the area of injury to turfgrass (putting greens)....the macro works great except for the very end....what I need to do is to get the number of pixels in an image corresponding to count 0 of 256 (black)....I can get the total number of pixels in the image but need the value for count 0 to create a percentage of black to all other pixels.....how do I get that value? Any help is greatly appreciated....thank you. William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:22:42 -0400 From: Lee Berndt <[hidden email]> Subject: Re: Help Please Greeting from Florida: I'm have a bit of trouble and was wondering about a solution. When I run color threshold on an open RBG image the threshold window pops up and settings (i.e., min hue, etc.) can be manually configured (i.e., min hue, max hue, etc.)....my question is that since I have numerous images to do this on is there macro language that would allow me to simply set the configurations instead of having to do it manually via adjusting the sliders every time?....when I click the macro button on the threshold window with the correct setting it generates a lot of code that is not applicable to my need and I'm having a heck of a time modifying the code....in other words is there a way to, for example, set maxHue or minHue via a macro?....any suggestions would be of great help.... I need to have the following settings: min hue = 40 max hue = 255 min sat = 0 max sat = 255 min bri = 0 max bri = 255 band.pass = false (unchecked) band.pass1 =true (checked) band.pass2=true (checked) method = default threshold color = Red color space = HSB and dark background (checked) thanks in advance for any suggestions.... William L. Berndt, Ph.D. 239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 15:30:36 +0100 From: Gabriel Landini <[hidden email]> Subject: Re: Help Please On Monday 01 Sep 2014 10:22:42 Lee Berndt wrote: > I'm have a bit of trouble and was wondering about a solution. When I run > color threshold on an open RBG image the threshold window pops up and > settings (i.e., min hue, etc.) can be manually configured (i.e., min hue, > max hue, etc.)....my question is that since I have numerous images to do > this on is there macro language that would allow me to simply set the > configurations instead of having to do it manually via adjusting the > sliders every time?....when I click the macro button on the threshold > window with the correct setting it generates a lot of code that is not > applicable to my need and I'm having a heck of a time modifying the > code....in other words is there a way to, for example, set maxHue or minHue > via a macro?....any suggestions would be of great help.... You can use the "Macro" button to generate a macro that corresponds to the current settings of the dialog. Regards Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 16:18:03 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I can't understand the problem. I used either imageJ 1.49b3 or Fiji 1.48v. It works with both. Sorry but I can't find anything else !!!! Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 16:08, Paul Dennis a écrit : > Hello Eric. > > Thank you for the code. > > I am able to run that fine as a record / run macro. > > If I paste the code to the batch window and process (selected input and output folders) it closed the dialogue box and the images are not having the grid overlayed. > > If I use the drop down and select say Borders it processes just fine. > > I am sorry for the many questions! > > Thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 10:41:22 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. Thank you for the update. I realsie I am on version 148. I will download and test on 149. Thank you for your help! Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 11:27:39 -0400 From: Paul Dennis <[hidden email]> Subject: Re: ImageJ Batch Macro Hello Eric. I just updated ImageJ to version 1.49 from the update menue item but have the same issue. When I click porcess nothing happens and the folders contents are unchanged :( Are your original images in a TIFF format? I wonder if that is the issue for me. Many thanks, Paul - -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 17:48:04 +0200 From: Eric Denarier <[hidden email]> Subject: Re: ImageJ Batch Macro I have jpeg tiff and png images in the folder and even a stack!!!! Are you sure your output format is .tif ???? Other format will not work !!! Eric Denarier Grenoble Institut des Neurosciences Inserm U836 Chemin Fortuné Ferrini 38700 La Tronche France Tél :33 (0)4 56 52 05 38 Fax :33 (0)4 56 52 06 57 http://neurosciences.ujf-grenoble.fr/ Le 01/09/2014 17:27, Paul Dennis a écrit : > Hello Eric. > > I just updated ImageJ to version 1.49 from the update menue item but have the same issue. When I click porcess nothing happens and the folders contents are unchanged :( Are your original images in a TIFF format? I wonder if that is the issue for me. > > Many thanks, > > Paul - > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 18:12:57 +0200 From: Michael Schmid <[hidden email]> Subject: Re: How to read and write files using a java plugin Hi Avital, if you know what to write in a macro, here is a simple way how to find the corresponding commands for a plugin: - Have a look at the static IJ class. Many macro commands have equivalents there. - If you don't find it in IJ, have a look at ij.macro.Functions.java. There you will find the code executed upon calling one of the ImageJ built-in macro functions. Example: Reading a file into a string, macro command File.openAsString(path): IJ.openAsString(String path) For writing a file, you may find some code in ij.macro.Functions.openFile(), closeFile() etc: FileOutputStream fos = new FileOutputStream(path); BufferedOutputStream bos = new BufferedOutputStream(fos); PrintWriter writer = new PrintWriter(bos); writer.println(myString); writer.close(); --- Another option is using java.util.Properties; this is essentially a Hashtable that can be used to nicely save pairs like myKey1=myValue1 myKey2=myValue2 or an XML file ('flat' XML file with key-value pairs only, no hierarchies). Values must be Strings, but you can convert them back to numbers with, e.g., ij.utils.parseDouble. In that case, you can call ij.io.SaveDialog.java and ij.io.OpenDialog.java for the file dialogs, then create the java.io.FileOutputStream.html and FileInputStream streams required by the Properties.store and Properties.load. Michael ________________________________________________________________ On Aug 28, 2014, at 10:40, Avital Steinberg wrote: > Hi, > My plugin has a function (function A) that calculates results that I would > like to save in a file. These results will be used by another function, > which means that function B has to read this file (that should be chosen by > the user). Function B will use the parameters that were saved in it to do > calculations. > > It would have been easy to do with the ImageJ macro, but I am trying to do > it in a Java plugin. What is the best way to do it? > > Thank you, > Avital -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 12:07:58 -0700 From: Taylor_B <[hidden email]> Subject: Java Exception when opening a large (1.5 Gb) tiff Hi, When trying to open a large 16-bit RGB TIFF, I received the following exception: "(Fiji Is Just) ImageJ 2.0.0-rc-14/1.49g; Java 1.6.0_65 [64-bit]; Mac OS X 10.9.4; 2402MB of 6889MB (34%) java.lang.ArrayIndexOutOfBoundsException: 2 at io.scif.util.FormatTools.checkTileSize(FormatTools.java:649) at io.scif.util.FormatTools.checkPlaneForWriting(FormatTools.java:626) at io.scif.util.FormatTools.checkPlaneForReading(FormatTools.java:611) at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:607) at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:534) at io.scif.AbstractReader.openPlane(AbstractReader.java:167) at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:170) at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:151) at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:297) at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:208) at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:225) at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:191) at io.scif.img.ImgOpener.read(ImgOpener.java:808) at io.scif.img.ImgOpener.read(ImgOpener.java:793) at io.scif.img.ImgOpener.read(ImgOpener.java:775) at io.scif.img.ImgOpener.readPlanes(ImgOpener.java:761) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:362) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:257) at io.scif.img.ImgOpener.openImgs(ImgOpener.java:145) at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:266) at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:250) at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:78) at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50) at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:136) at net.imagej.legacy.DefaultLegacyHooks.interceptFileOpen(DefaultLegacyHooks.java:327) at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:150) at ij.IJ.runPlugIn(IJ.java) at ij.Executer.runCommand(Executer.java:131) at ij.Executer.run(Executer.java:64) at java.lang.Thread.run(Thread.java:695)" I've updated ImageJ using Fiji. Based on the header, this doesn't appear to be a memory allocation problem, but I could be wrong. Any suggestions would be appreciated. -- View this message in context: http://imagej.1557.x6.nabble.com/Java-Exception-when-opening-a-large-1-5-Gb-tiff-tp5009451.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 21:35:40 +0000 From: "Gelman, Laurent" <[hidden email]> Subject: Image Processing Specialist - Open position at the Friedrich Miescher Institut, Basel Hi everybody, We have an open position for an image processing specialist at our facility (see website below and/or attachment). http://www.fmi.ch/Careers/JobDetails.html?jobID=174 Best regards, Laurent. ___________________________ Laurent Gelman, PhD Friedrich Miescher Institut Facility for Advanced Imaging and Microscopy Head of Light Microscopy WRO 1066.2.16 Maulbeerstrasse 66 CH-4058 Basel +41 (0)79 618 73 69 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ Date: Mon, 1 Sep 2014 16:47:30 -0700 From: haider <[hidden email]> Subject: Fast Math Operations on Images Hello everyone I have been looking at ways to do mathematical operations on an ImageStack in the most optimized way in ImageJ possible. The first method is to simply iterate through every pixel of every slice of the image (two for loops). I perform three operations on the pixels of two identical size image stacks: add (3/8) , square root , multiply by 2 . There are 8388608 x 2 elements and it takes like 11 seconds to modify the two image stacks simultaneously. The next thing I tried using was the internal ImageJ commands: IJ.run( ing, "Add...", "value= 0.4" ) IJ.run( img, "Square Root", "") IJ.run( img, "Multiply...", "value=2") This seems much faster but the problem is that only the square root operation is performed on the whole image stack (I get a prompt where I conform that the square root should be performed on the whole stack). The other two operations only get performed on the first slice of the stack. The other issue with this approach is that I can not add (3/8) to each pixel because the pixels are stores as int . And adding (3/8) has no effect. Is there a way to perform adding and multiplying with the internal ImageJ commands such that they get performed on the whole stack. Also, how would I get floating point precision using these internal commands. Thanks Haider -- View this message in context: http://imagej.1557.x6.nabble.com/Fast-Math-Operations-on-Images-tp5009453.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ------------------------------ End of IMAGEJ Digest - 31 Aug 2014 to 1 Sep 2014 (#2014-252) ************************************************************ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |