imagej

Is there a way to update the display window when the user loads a new image?

喜夏-厌秋 提交于 2019-12-11 18:19:21
问题 I am writing a program that loads an image(stack of images in one file) and do some operations on the image with the controls (buttons) and being able to load another image on the frame without having to change previous controls. The frame has a default window image at the start of the program. There is a button that loads a new image from the wanted directory. However the image never gets updated when the loadImage button is pressed. How do I get my frame to update the image window when a

ImageJ jar file plugin shortcut creation - More help needed

爷,独闯天下 提交于 2019-12-11 18:13:08
问题 I've been trying to automate cell counting on ImageJ/Fiji using an plugin called ITCN. This problem has come up on the forum before (ImageJ jar file plugin shortcut creation) and I am having the same unresolved problem. If I code a script using javascript as follows: imp = IJ.getImage(); IJ.run(imp, "Invert", ""); IJ.run(imp, "16-bit", ""); IJ.run(imp, "8-bit", ""); IJ.run(imp, "Median...", "radius=2"); runner = new ITCN_Runner( imp, 11, /* width*/ 5.5, /* minimum distance */ 0.7, /*

How to measure percentages of colored areas over background? ImageJ?

纵然是瞬间 提交于 2019-12-11 17:32:44
问题 I would like to measure the percentage of purple area of this gray map. I can say roughly speaking that represents the 10% of the area, but I need an exact value. I know there is a free tool called ImageJ but I don't know how to use it. Maybe you can suggest me another tool or how to perform such task. Thanks in advance. 回答1: You could write a small ImageJ plugin for that task: import ij.gui.DialogListener; import ij.gui.GenericDialog; import ij.plugin.filter.ExtendedPlugInFilter; import ij

How do I batch extract metadata from DM3 files using ImageJ?

点点圈 提交于 2019-12-11 11:29:16
问题 How can you extract metadata for a batch of images? My first thought was to record a macro and then modify it to operate on a list of file names. In that vein, I tried recording a macro doing something like this: Ctrl-o # Open a file 12.dm3 Enter # Select file to open Ctrl-i # Open metadata in a new window Ctrl-s # Save file Info for 12.txt Enter # Name of file being saved Ctrl-w # Close current window Ctrl-w # Close current window These steps work when I do them manually. This results in the

Java - how to add a listener in ImageJ plugin?

北慕城南 提交于 2019-12-11 06:16:57
问题 I am writing a plugin for ImageJ that scans the pixels of a desired line for brightness over a series of frames in an AVI video. The data is displayed in 2D graph for the active video frame, pixels on the x-axis and intensity on the y-axis. I want the graph to update itself to show the data for the active frame in the StackWindow (Where the frame is displayed). This is controlled by the slider in the window. I looked into this and found information on the AdjustmentListener class, which I can

How to get threshold value used by auto threshold Plugin

為{幸葍}努か 提交于 2019-12-11 05:44:59
问题 I have the following code, where I read images from directory and use ImageJ Auto Threshold plugin to segment my images. dir = getDirectory("path"); list = getFileList(dir); for (i=0; i<list.length; i++) { if (endsWith(list[i], ".tif")) { open(dir + list[i]); run("8-bit"); run("Gaussian Blur...", "sigma=2"); setAutoThreshold("Otsu dark"); run("Convert to Mask"); saveAs("TIFF", dir+list[i]); close(); } } I would like to get the threshold value using "Otsu dark" method, and modify that value (e

IJ.close() - Scripting python in ImageJ/FIJI

若如初见. 提交于 2019-12-10 12:04:17
问题 I'm exceptionally new to python/scripting and I'm having a problem. I'm writing the following in Fiji (shortened version of the script is below...) from ij import IJ, ImagePlus from java.lang import Runtime, Runnable import os filepaths = [] for folder, subs, files in os.walk('location/of/files/'): for filename in files: #the next part stops it appending DS files if not filename.startswith('.'): filepaths.append(os.path.abspath(os.path.join(folder, filename,))) for i in filepaths: IJ.open(i);

Options to Convert 16 bit Image

岁酱吖の 提交于 2019-12-10 11:50:47
问题 when i open a 16 bit image in tiff format, it opens up as a black image. The 16-bit tiff image only opens in the program ImageJ; however, it does not open in Preview. I am wondering what my options are now to view the format in an easier way that does not reduce the resolution than to open ImageJ to view it. Should I convert it to an 8-bit format, but wouldn't I lose data when the format is reduced from 16 to 8 bit? Also, I was thinking about converting the tiff image to jpeg, but would that

Matlab only opens first frame of multi-page tiff stack

浪尽此生 提交于 2019-12-10 10:59:54
问题 I've created multi-page tiff files with a macro in ImageJ, and I'm now trying to open it using matlab, but I can only access the first frame. Here is the result of imfinfo(filename). Accordingly, I get length(imfinfo(filename)) = 1 Filename: [1x129 char] FileModDate: '28-nov-2013 12:27:51' FileSize: 6.7905e+09 Format: 'tif' FormatVersion: [] Width: 512 Height: 512 BitDepth: 8 ColorType: 'grayscale' FormatSignature: [77 77 0 42] ByteOrder: 'big-endian' NewSubFileType: 0 BitsPerSample: 8

Twain device (scanner) control in Java

巧了我就是萌 提交于 2019-12-10 00:40:06
问题 I want to scan a number of papers through Java. I found the mm's computing twain library. When I run the example TwainExample.java at the site, I receive this error. uk.co.mmscomputing.device.twain.TwainIOException: Cannot load Twain Source Manager. On the other hand, almost the same code works with ImageJ as a plugin. Yet, when I used this code by itself I still receive the same exception. I wonder why this is not working. 回答1: You can try download TWAINDSM.DLL for 64bit and put it in C: