Hi simon
About the nslices issue. It seems that your avi stack is read as frames instead of slices. The easiest solution seems to be to incorporate an if that checks this. Count=nSlices If (nSlices==1){ Count=nFrames } And then run the loop till count Regards Joost Op 11 jun. 2015 06:01 schreef "IMAGEJ automatic digest system" < [hidden email]>: > There are 11 messages totaling 598 lines in this issue. > > Topics of the day: > > 1. Automate circular ROI selection > 2. Automatic processing of a new image saved in a folder (3) > 3. Area and pixel count in Photoshop vs ImageJ (2) > 4. Fwd: Particle Analysis > 5. Parallel Iterative Deconvolution (2) > 6. Issue with setSlice > 7. SaveAsMovie plugin - avcodec_open2() error > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ---------------------------------------------------------------------- > > Date: Wed, 10 Jun 2015 07:28:54 +0000 > From: "Straatman, Kees (Dr.)" <[hidden email]> > Subject: Re: Automate circular ROI selection > > Dear Andrew, > > Is the ring more or less in the same place on all the images or does it > move around? > > Kees > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Anderson, Charles (DNR) > Sent: 08 June 2015 23:31 > To: [hidden email] > Subject: Re: Automate circular ROI selection > > Good day, Andrew, > > The rim of your cylinder will be slightly elliptical because the camera is > slightly off axis. It will be hard to identify automatically because it is > partly occluded by soil and vegetation. Additionally, the white rim will be > hard to distinguish from the interior walls. That said, I hope someone > will show us a good automatic approximation method for your challenging > circle! > > The macro below will automate most of the process, though it still > requires you to identify a circle as each image is processed. The results > table reports the area (pixels) of the circle you choose and the mean gray > level. The proportion of 'green' pixels can be found as the mean / 255. I > have used only a very crude method to identify "green", but there are > papers on identifying vegetation from images that might give better answers. > > As a biologist, I'd be more willing to believe results if you place > circular ROI than if it is done automatically. I think you can best place > them so none of the shadow or reflection on the interior walls is > miss-identified as 'green', yet nearly all the interior of your cylinder is > within your ROI. Perhaps some effort with the Wiki segmentation plugin > could allow you to distinguish green plants, dead grass, and soil. Dead > grass occludes some of the greenery, so there are more questions to think > about. > > Charles > > // CircleVeg.ijm > > //run("Set Measurements...", "area mean centroid bounding shape feret's > redirect=None decimal=2"); run("Set Measurements...", "area mean shape > redirect=None decimal=2"); //setForegroundColor(255, 255, 255); > setForegroundColor(0, 0, 0); > > dir1 = getDirectory("Choose Source Directory "); list = getFileList(dir1); > //setBatchMode(true); for (i = 0; i<list.length; i++) { > showProgress(i+1, list.length); > open(dir1+list[i]); > run("Duplicate...", "title=a"); > selectWindow("a"); > run("Split Channels"); > selectWindow("a (blue)"); > imageCalculator("Subtract create", "a (green)","a (red)"); > selectWindow("Result of a (green)"); > setAutoThreshold("Default dark"); > //run("Threshold..."); > setThreshold(1, 255); > run("Convert to Mask"); > setTool("oval"); > waitForUser("Select areas","Hold shift to draw circle, then click > 'Ok'"); > > // Draw circle using oval tool holding shift down > > run("Clear Outside"); > run("Measure"); > > selectWindow("Result of a (green)"); > close(); > selectWindow("a (blue)"); > close(); > selectWindow("a (green)"); > close(); > selectWindow("a (red)"); > close(); > selectWindow(list[i]); > close(); > } > > > > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Andrew Sanchez > Sent: Friday, June 05, 2015 3:35 PM > To: [hidden email] > Subject: Automate circular ROI selection > > I am trying to automate the selection of a circular ROI. I have been > exploring some suggested solutions like Hough transformation ( > http://rsb.info.nih.gov/ij/plugins/hough-circles.html) and segmentation, > including the Trainable Weka Segmentation tool, but have not had any so > far, most likely due to my slow climb of the learning curve as a new user. > > I am brand new to ImageJ, and am working my way through tutorials and > documentation for a solution. > > Here is a sample image: > > https://drive.google.com/file/d/0B208tul7KbkbX2RYLXhDLXJlVFE/view?usp=sharing > > I need to select everything inside of the thick white circle, take the > area of the circle in pixels, and then count the number of green pixels. > Is there a way to do this without manually selecting the circle for every > image? > > -- > Thank you, > Andrew Sanchez > Lab Assistant > Center for Ecosystem Science > Northern Arizona University > > -- > 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 > > ------------------------------ > > Date: Tue, 9 Jun 2015 18:14:32 +0200 > From: Peter Haub <[hidden email]> > Subject: Re: Automatic processing of a new image saved in a folder > > Check Watch-Dir > > http://imagej.nih.gov/ij/plugins/watch-dir/index.html > > Best > > Peter > > On 09.06.2015 13:13, Jeremy Goodwin wrote: > > Hi All, > > > > Is it possible to setup ImageJ to automatically process a NEW image saved > > in a folder? > > > > Or setup up a toolbar button that can be run to execute a macro that > > processes the most recent image file saved in a specified folder? > > > > I am running some testing on forearm skin. What I'd like to know is that > > when I photograph a position on the left and right arms, the images are > > "about" the same. The skin structure varies up the arm, so to be able to > > compare images they need to be in about the same area on each arm. I > have > > a process that analyses the images and gives me a "measurement" relating > > the skin structure. What I would like to do is run that process as soon > as > > an image is taken so that I can compare the values for left and right > arms > > before proceeding to make sure the positions on each arm are similar. > > > > Yours > > > > Jez > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 09:31:38 +0100 > From: Jeremy Goodwin <[hidden email]> > Subject: Re: Automatic processing of a new image saved in a folder > > Hi Peter, > > Thank you, I'll have an explore with that. > > Yours > > Jez > > On 9 June 2015 at 17:14, Peter Haub <[hidden email]> wrote: > > > Check Watch-Dir > > > > http://imagej.nih.gov/ij/plugins/watch-dir/index.html > > > > Best > > > > Peter > > > > > > On 09.06.2015 13:13, Jeremy Goodwin wrote: > > > >> Hi All, > >> > >> Is it possible to setup ImageJ to automatically process a NEW image > saved > >> in a folder? > >> > >> Or setup up a toolbar button that can be run to execute a macro that > >> processes the most recent image file saved in a specified folder? > >> > >> I am running some testing on forearm skin. What I'd like to know is > that > >> when I photograph a position on the left and right arms, the images are > >> "about" the same. The skin structure varies up the arm, so to be able > to > >> compare images they need to be in about the same area on each arm. I > have > >> a process that analyses the images and gives me a "measurement" relating > >> the skin structure. What I would like to do is run that process as soon > >> as > >> an image is taken so that I can compare the values for left and right > arms > >> before proceeding to make sure the positions on each arm are similar. > >> > >> Yours > >> > >> Jez > >> > >> -- > >> 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 > > ------------------------------ > > Date: Wed, 10 Jun 2015 12:29:58 +0100 > From: Jeremy Goodwin <[hidden email]> > Subject: Re: Automatic processing of a new image saved in a folder > > Hi Peter, > > Works brilliantly, thank you. Excellent that Watch-Dir can run a custom > macro once the Watch-Dir macro is itself run. Does exactly what I needed. > > I need to get a second monitor now :) > > Yours > > Jez > > On 9 June 2015 at 17:14, Peter Haub <[hidden email]> wrote: > > > Check Watch-Dir > > > > http://imagej.nih.gov/ij/plugins/watch-dir/index.html > > > > Best > > > > Peter > > > > > > On 09.06.2015 13:13, Jeremy Goodwin wrote: > > > >> Hi All, > >> > >> Is it possible to setup ImageJ to automatically process a NEW image > saved > >> in a folder? > >> > >> Or setup up a toolbar button that can be run to execute a macro that > >> processes the most recent image file saved in a specified folder? > >> > >> I am running some testing on forearm skin. What I'd like to know is > that > >> when I photograph a position on the left and right arms, the images are > >> "about" the same. The skin structure varies up the arm, so to be able > to > >> compare images they need to be in about the same area on each arm. I > have > >> a process that analyses the images and gives me a "measurement" relating > >> the skin structure. What I would like to do is run that process as soon > >> as > >> an image is taken so that I can compare the values for left and right > arms > >> before proceeding to make sure the positions on each arm are similar. > >> > >> Yours > >> > >> Jez > >> > >> -- > >> 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 > > ------------------------------ > > Date: Wed, 10 Jun 2015 14:12:26 +0000 > From: "Cammer, Michael" <[hidden email]> > Subject: Re: Area and pixel count in Photoshop vs ImageJ > > We just has a problem yesterday where were getting odd area measurements > until we realized that some pixels were set the NaN so they weren't being > counted. > > Check this? > > ========================================================================= > Michael Cammer, Microscopy Core & Skirball Institute, NYU Langone Medical > Center > Cell: 914-309-3270 ** MY OFFICE HAS MOVED TO > SKIRBALL 2nd FLOOR, Back right ** > http://ocs.med.nyu.edu/microscopy & http://microscopynotes.com/ > > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Gabriel Landini > Sent: Tuesday, June 09, 2015 4:05 AM > To: [hidden email] > Subject: Re: Area and pixel count in Photoshop vs ImageJ > > On Monday 08 Jun 2015 16:04:44 you wrote: > > Here are results between Photoshop and ImageJ: > > > > In Photoshop, the measurement log shows that the Area of a 100x100 > > circle is 5720. In my histogram, it reads "Pixels: 5640 pixels." The > > measurement scale is set to 1 pixel = 1 pixel. > > > > My project involves counting the number of green pixels in an image > > and dividing that number by the total number of pixels in the ROI, in > > order to get the percentage of vegetation. The number shown in the > > histogram of Photoshop next to Pixels is the value I've been using as > > the total number of pixels. Since starting to look into ImageJ, I'm > > worried that this method is not accurate. > > > > In ImageJ, I removed the scale and get the correct area of 7860. > > > > I am hoping to switch over from using Photoshop to ImageJ, but I need > > to first understand why the numbers I get in Photoshop are so different. > > Most likely PS is not strictly counting pixels (some area algorithms > measure , for example, the area inside the boundary pixels), or your image > was calibrated or PS interpolates the boundary. > > IJ is correct, I also get 7860 "in number of pixels", but the area inside > the circle I get 7719 "pixels squared "according to the Freeman chain > encoding algorithm implemented in Particles8. > There are more ways of counting lengths and areas to compensate for the > discretisation of the lattice and also various ways of deciding what is the > boundary of an object. > They are not wrong, it just depends what definitions you use. > > Cheers > Gabriel > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 09:26:45 -0400 > From: Claudia Carranza <[hidden email]> > Subject: Fwd: Particle Analysis > > Claudia > Enviado desde mi iPhone > > Inicio del mensaje reenviado: > > > De: Claudia Carranza-Salazar <[hidden email]> > > Fecha: 9 de junio de 2015 12:01:46 p.m. GMT-4 > > Para: imagej NIH <[hidden email]> > > Asunto: Particle Analysis > > > > Hi I´m Claudia Carranza > > I'm trying to do an analysis of particles pollutants phagocytosed by > alveolar macrophages (Image attaches). > > It is the first time that I use the imageJ, I read the guide of the > softwere and I do not understand how I can set the ROI of each cell and > then count the percentage of particule in each cell (analyze particle). > > I chose a single cell, I set the ROI, analyze particule and my big > problen is that I don´t mean the results. > > How do I know which is the total area which measures particle analaisis? > > And Where the% of the area is obtained by analyzing the particles? > > Thanks > > Claudia > > -- > > M en C. Claudia Carranza Salazar > > Investigador en Ciencia Médicas C > > Investigación en Microbiología > > Instituto Nacional de Enfermedades Respiratorias > > Tel: 54841700 > > ext 5117 > > > > > > <Particle Analysis.pdf> > > <Particle Analysis 3.jpg> > > <Summary 3.csv> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 19:46:56 +0000 > From: "Feinstein, Timothy N" <[hidden email]> > Subject: Parallel Iterative Deconvolution > > Hi all, > > I love Piotr Wendykier's deconvolution plugin for Fiji, but it stopped > working today (see error message below). Is it possible that something > updated in Fiji (e.g., parallelcolt) and made it no longer compatible? I > am trying to create a simple workflow for non-imaging specialists. > > java.lang.NoSuchMethodError: > edu.emory.mathcs.utils.ConcurrencyUtils.submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future; > at cern.colt.matrix.tfloat.impl.DenseFloatMatrix3D.getMaxLocation(Unknown > Source) > at edu.emory.mathcs.restoretools.iterative.psf.FloatPSF3D.<init>(Unknown > Source) > at > edu.emory.mathcs.restoretools.iterative.psf.FloatPSFMatrix3D.<init>(Unknown > Source) > at > edu.emory.mathcs.restoretools.iterative.AbstractFloatIterativeDeconvolver3D.<init>(Unknown > Source) > at > edu.emory.mathcs.restoretools.iterative.mrnsd.MRNSDFloatIterativeDeconvolver3D.<init>(Unknown > Source) > at > edu.emory.mathcs.restoretools.iterative.ParallelIterativeDeconvolution3D$MainPanel$DeconvolveButtonActionListener$1.run(Unknown > Source) > at java.lang.Thread.run(Thread.java:695) > > Thanks, > > > Tim > > Timothy Feinstein, Ph.D. > Research Scientist > University of Pittsburgh Department of Developmental Biology > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 22:32:21 +0200 > From: Piotr Wendykier <[hidden email]> > Subject: Re: Parallel Iterative Deconvolution > > Hi Tim, > > You have multiple versions of Parallel Colt in the plugins directory. > You need to remove other versions and keep only the one in > ParallelIterativeDeconvolution directory. > > Piotr > > On Wed, Jun 10, 2015 at 9:46 PM, Feinstein, Timothy N <[hidden email]> > wrote: > > Hi all, > > > > I love Piotr Wendykier's deconvolution plugin for Fiji, but it stopped > working today (see error message below). Is it possible that something > updated in Fiji (e.g., parallelcolt) and made it no longer compatible? I > am trying to create a simple workflow for non-imaging specialists. > > > > java.lang.NoSuchMethodError: > edu.emory.mathcs.utils.ConcurrencyUtils.submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future; > > at > cern.colt.matrix.tfloat.impl.DenseFloatMatrix3D.getMaxLocation(Unknown > Source) > > at edu.emory.mathcs.restoretools.iterative.psf.FloatPSF3D.<init>(Unknown > Source) > > at > edu.emory.mathcs.restoretools.iterative.psf.FloatPSFMatrix3D.<init>(Unknown > Source) > > at > edu.emory.mathcs.restoretools.iterative.AbstractFloatIterativeDeconvolver3D.<init>(Unknown > Source) > > at > edu.emory.mathcs.restoretools.iterative.mrnsd.MRNSDFloatIterativeDeconvolver3D.<init>(Unknown > Source) > > at > edu.emory.mathcs.restoretools.iterative.ParallelIterativeDeconvolution3D$MainPanel$DeconvolveButtonActionListener$1.run(Unknown > Source) > > at java.lang.Thread.run(Thread.java:695) > > > > Thanks, > > > > > > Tim > > > > Timothy Feinstein, Ph.D. > > Research Scientist > > University of Pittsburgh Department of Developmental Biology > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 13:52:21 -0700 > From: SimonBohn <[hidden email]> > Subject: Issue with setSlice > > Hello, > > I'm trying to write a macro that cycles through all the slices of an avi > stack and applies a plugin to them. Here's my code: > > selectWindow("CIMG2136.avi"); > s = nSlices > print(s) > for (i = 1; i < s; i++) { > setSlice(i); > makeSelection("point", newArray(782,822,1050,1016), > newArray(852,298,298,902)); > selectWindow("square.png"); > makeSelection("point", newArray(272,272,583,583), > newArray(364,53,53,364)); > //run("Landmark Correspondences", "source_image=CIMG2136.avi > template_image=square.png transformation_method=[Least Squares] alpha=1 > mesh_resolution=32 transformation_class=Perspective interpolate"); > } > > The error message I get when I run this is > > Argument must be >=1 and <=1 in line 6 > setSlice (i<)>; > > What am I doing wrong, or is there something wrong with setSlice? Thanks in > advance! > > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Issue-with-setSlice-tp5013105.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 14:41:11 -0700 > From: Andrew Sanchez <[hidden email]> > Subject: Re: Area and pixel count in Photoshop vs ImageJ > > It turns out I needed to set the "Feather" setting in Photoshop to 0 px. I > am now getting an area measurement that is consistent with ImageJ. > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Area-and-pixel-count-in-Photoshop-vs-ImageJ-tp5013084p5013107.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > Date: Wed, 10 Jun 2015 21:19:29 +0000 > From: Oliver Tills <[hidden email]> > Subject: SaveAsMovie plugin - avcodec_open2() error > > Hi, > > I am running Fiji v1.49t on OS X Yosemite 10.10.3 and am having problems > with the SaveAsMovie plugin. > > Specifically, the plugin either fails to produce any output, or produces > the error message: 'error:org.bytedeco.javacv.FrameRecorder$Exception: > avcodec_open2() error -1: Could not open video codec.’ , however only when > using the MP4 codec. I have followed the instructions for adding the > specified files Fiji’s plugin directory ( > https://sites.google.com/site/qingzongtseng/save-as-movie) and tried > reinstalling etc, all to no avail. > > I do have this plugin functioning on other systems so I guess it might be > related to something strange with the installation of codecs etc. > Installing OpenCV, ffmpeg or VLC appear to make no difference. > Unfortunately I need to produce mp4s for this project and so any support is > welcome. > > Can anyone offer any pointers? > > Thanks in advance, > > Oli > > > ________________________________ > [http://www.plymouth.ac.uk/images/email_footer.gif]< > http://www.plymouth.ac.uk/worldclass> > > This email and any files with it are confidential and intended solely for > the use of the recipient to whom it is addressed. If you are not the > intended recipient then copying, distribution or other use of the > information contained is strictly prohibited and you should not rely on it. > If you have received this email in error please let the sender know > immediately and delete it from your system(s). Internet emails are not > necessarily secure. While we take every care, Plymouth University accepts > no responsibility for viruses and it is your responsibility to scan emails > and their attachments. Plymouth University does not accept responsibility > for any changes made after it was sent. Nothing in this email or its > attachments constitutes an order for goods or services unless accompanied > by an official order form. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > ------------------------------ > > End of IMAGEJ Digest - 9 Jun 2015 to 10 Jun 2015 (#2015-183) > ************************************************************ > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |