Hi,
I have to following problem: I want to suppress the noise in an AFM picture. I want everything below a chosen value to be zero. (to get rid of all the stuff lying on the surface which could be oligomers of the polymer the particles consist of.) Can anyone please ell me how this can be made? Thanks a lot in advance Best regard Johannes Sitterberg [hidden email] |
I wonder what is the best way to run ImageJ on devices with limited amount
of RAM. This is a handheld computer running on embedded Linux with 60 MB RAM. At any given time, about 24 MB is free, 15 MB cached, and 1 MB in the buffer. I usually use ImageJ to view single images and will run into memory problems with larger files (e.g., a 3 megapixel jpg from a digital camera). If according to the 3/4 RAM recommendation, I will have to use -mx45m. Is this an acceptable setting in this case? Also, will a swap file help? Thanks for your advice. -- Pang (Wai Pang Chan, [hidden email], PAB A087, 206-685-1519) The Biology Imaging Facility (http://staff.washington.edu/wpchan/if/) |
In reply to this post by Johannes Sitterberg
Hi,
what you can do is to use the function Substract (Process>Math>Substract) but that would change the values of all the other pixels too. If you want to keep the same values in the rest of the image you can write a simple plug-in that modifies the pixel values: public void run(ImageProcessor ip){ byte minvalue=(byte) 45; //for example, min value 45 int numpixels; byte[] pixels = ( byte[] ) ip.getPixels(); numpixels=pixels.length; int i=0; do{ if (pixels[i]<=minvalue) pixels[i]=(byte) 0; i++; }while(i<numpixels); } Hope that will be of some help, Agnès 2006/3/2, Johannes Sitterberg <[hidden email]>: > > Hi, > > I have to following problem: > > I want to suppress the noise in an AFM picture. > I want everything below a chosen value to be zero. (to get rid of all the > stuff lying on the surface which could be oligomers of the polymer the > particles consist of.) > > Can anyone please ell me how this can be made? > > Thanks a lot in advance > > Best regard > > Johannes Sitterberg > [hidden email] > |
In reply to this post by Johannes Sitterberg
Try the following plugin.
Gary. ////////////////////////////////////////////////////////// import ij.*; import ij.plugin.filter.*; import ij.process.*; import ij.gui.*; /** Replaces each pixel value above or below the given limits with the entered values Gary Chinga www.gcsca.net 060303 */ public class CorrectPixels_1a implements PlugInFilter { double ps, maxBlock, minBlock; ImagePlus imp; float tHeight,hValue, tValley, vValue; boolean canceled; public int setup(String arg, ImagePlus imp) { if (IJ.versionLessThan("1.30")) return DONE; this.imp = imp; return DOES_ALL+NO_UNDO; } public void run(ImageProcessor ip) { getDetails(); if (canceled) return; ImageStack stack = imp.getStack(); int w = stack.getWidth(); int h = stack.getHeight(); int nSlices = imp.getStackSize(); // Calibration cal = imp.getCalibration(); //ps = cal.pixelWidth; ImageProcessor ipSlice; for (int i = 0; i < nSlices; i++) { IJ.showStatus("a: "+(i+1)+"/"+nSlices); imp.setSlice(i+1); ipSlice = stack.getProcessor(i+1); String label= stack.getSliceLabel(i+1); ipSlice=suppressNoise(ipSlice, tHeight,hValue,tValley,vValue); } imp.updateAndDraw(); } public ImageProcessor suppressNoise(ImageProcessor ipTemp, float tHeight, float hValue, float tValley, float vValley){ //counter=0; int ww=ipTemp.getWidth(); int hh=ipTemp.getHeight(); for (int y = 0;y<hh;y++){ for (int x = 0;x<ww;x++){ if (ipTemp.getPixelValue(x,y)<tValley) ipTemp.putPixelValue(x,y, vValue); if (ipTemp.getPixelValue(x,y)>tHeight) ipTemp.putPixelValue(x,y, hValue); } } return ipTemp; } void getDetails() { GenericDialog gd = new GenericDialog("Correct pixels 1a..."); gd.addNumericField("Replace pixels >: ", 2, 0); gd.addNumericField("With: ", 0, 0); gd.addNumericField("Replace pixels <: ", -2, 0); gd.addNumericField("With: ", 0, 0); gd.showDialog(); if (gd.wasCanceled()){ canceled = true; return; } tHeight=(float)gd.getNextNumber(); hValue=(float)gd.getNextNumber(); tValley=(float)gd.getNextNumber(); vValue=(float)gd.getNextNumber(); } } ////////////////////////////////////////////////////////// On Mar 2, 2006, at 6:41 PM, Johannes Sitterberg wrote: > Hi, > > I have to following problem: > > I want to suppress the noise in an AFM picture. > I want everything below a chosen value to be zero. (to get rid of > all the > stuff lying on the surface which could be oligomers of the polymer the > particles consist of.) > > Can anyone please ell me how this can be made? > > Thanks a lot in advance > > Best regard > > Johannes Sitterberg > [hidden email] > > |
On Friday 03 March 2006 19:52, Gary Chinga wrote:
> Try the following plugin. > public class CorrectPixels_1a implements PlugInFilter { Is there a prize for the shortest macro to do the task? :-) //-------------8<--------------- // Changes values in the range 0 to 127 to 0 changeValues(0, 127, 0); //-------------8<--------------- cheers, Gabriel |
In reply to this post by W. Chan
Folks,
We are running IJ on a Windows 2000 machine with 1.5 G of RAM. I set the memory for IJ as 1GB, and this is reflected in the cfg file. However, when we open large stacks, it stops at 63 Meg and says that we have used up all the memory. This does not happen on every machine with the same installation. Others work fine. Thanks for your advice. HMG -- -------------------------------------- Herbert M. Geller, Ph.D. Developmental Neurobiology Group National Heart Lung and Blood Institute, NIH 10 Center Drive MSC 1754 Bldg 10, Room 8C102 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 --------------------------------------- |
In reply to this post by Gabriel Landini
Dear friends, I use Imagej 1.34s and tried to open my LSM timelapse files.
I have the LSM Reader plugin and it does open my snapshots but cannot do it for me time series experiments. Any suggestions welcome! Katerina -- Katherine Bilitou, M.Sc., PhD Hutchison/MRC Research Centre, Department of Oncology, University of Cambridge Hills Road, Cambridge CB2 2XZ tel: +441223 763362 (lab) +44770 4871771 (mob) www.hutchison-mrc.cam.ac.uk |
In reply to this post by Johannes Sitterberg
Dear Johannes,
please mail us an image off the list and we will test the different prpgrams we have best regards Hugo Ostermann CHROMAPHOR Analysen-Technik GmbH Mühlenkamp 37 D-59387 Ascheberg - Germany Tel: 0049 - 2593-928.600 Fax: .601 mail: [hidden email] URL: http://www.chromaphor.de -----Ursprüngliche Nachricht----- Von: ImageJ Interest Group [mailto:[hidden email]] Im Auftrag von Johannes Sitterberg Gesendet: Donnerstag, 2. März 2006 18:41 An: [hidden email] Betreff: Suppress noise Hi, I have to following problem: I want to suppress the noise in an AFM picture. I want everything below a chosen value to be zero. (to get rid of all the stuff lying on the surface which could be oligomers of the polymer the particles consist of.) Can anyone please ell me how this can be made? Thanks a lot in advance Best regard Johannes Sitterberg [hidden email] |
Free forum by Nabble | Edit this page |