Questions tagged [imagej]

ImageJ is a Java-based open-source image processing program that is used extensively in scientific image analysis, particularly life sciences. Please consider asking ImageJ-specific questions on the Image.sc forum: https://forum.image.sc/tags/imagej. This tag should be used for questions about programming in/for ImageJ.

ImageJ is a Java-based open-source image processing program that is used extensively in scientific multidimensional image analysis, particularly life sciences. This tag should be used for questions about ImageJ-related programming.

For questions regarding general ImageJ usage as well as ImageJ-specific questions, the Image.sc forum is the best place to ask.

ImageJ supports plugins written in Java and scripts in several languages (i.e., JavaScript, Python, BeanShell, Groovy, Clojure, Ruby, and the ImageJ1 macro language).

885 questions
2
votes
1 answer

String format in imageJ macro

I would like to convert an integer into a string with leading zeros in ImageJ / Fiji macro editor using String.format() function. With this code: s = String.format("%04d", 13); print(s); I get the following error: Unrecognized String function in…
NicoH
  • 1,240
  • 3
  • 12
  • 23
2
votes
1 answer

Exception `java.lang.IllegalStateException: zip file closed`, when running code from Fat-JAR/Uber-JAR

I have an issue with my software, when building and running it as an FatJAR/UberJar built with Maven. In this case I get this error: Uncaught error fetching image: java.lang.IllegalStateException: zip file closed at…
packoman
  • 1,230
  • 1
  • 16
  • 36
2
votes
1 answer

how do I perform image stitching with a reference image as a guide?

image stitching with a reference image. I have multiple images of subject(bone), the images are of different sections of the subject as on a 3x3 matrix. I would like to stitch them together but the problem is they don't have any common feature, as…
2
votes
1 answer

Exception during Fiji/ImageJ launching from Python

I want to write some code in Python that will be used for manipulating data in Fiji. I followed the instructions to install the library "imagej" so that I can access Fiji via Anaconda-Python. This is how the two lines look like: import imagej ij =…
pedro_galher
  • 334
  • 8
  • 18
2
votes
1 answer

How to obtain the scale of an image automatically in imageJ

I need to measure leaf area in a large set of leaves. The problem is that each image has a different scale since they were made with a camera at different heights. Next to each sheet I put a graph paper as a scale. Is there any method / macro of…
2
votes
1 answer

How do I fix 'BanDuplicateClasses failed' in maven project

I'm trying to build a basic imagej plugin using bioformats to enable me to open czi files etc. However, when I add the bioformats dependency the maven plugin BanDuplicateClasses fails. These are the dependencies in my pom file
Mike Davies
  • 487
  • 5
  • 14
2
votes
1 answer

scikit-image read 8-bit image as 16-bit

I am using both ImageJ and scikit-image to analyze 3D images. My original image is 16-bit and it is very big. I converted 16-bit image to 8-bit image in imageJ so that I can work easily. Now when I am reading the image with scikit-image module both…
ankit agrawal
  • 301
  • 1
  • 14
2
votes
3 answers

Error with an import module jnius while using imagej in python

I am trying to connect a headless imageJ library to my python application. Unfortunately, the dependency error list goes on endless and I am now stuck at an import error involving the import of a java wrapper called jnius. So far I have installed:…
ABK
  • 145
  • 1
  • 14
2
votes
1 answer

How to modify the code of the dependencies of a maven Project

I just started to do some work on the ImageJ project. This software is developped in Java using Maven as a build system and is split intp numerous sub-projects/modules. I would like to work and modify some of these sub/projects and have them compile…
2
votes
1 answer

Calculate binary optimal threshold ImageJ based on foreground/background mean

I was researching on how to calculate an Optimal Threshold for ImageJ and found this explanation of the Otsu Thresholding, which I thought made perfect sense for me to use. I've struggled with implementing it though, and after some thought I found a…
gizmo
  • 81
  • 8
2
votes
1 answer

How to run imageJ from terminal at current folder?

I need to run a Fiji(imageJ) script from terminal on a macOS. Using the code below. /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless -macro ~/desktop/testing.ijm.ijm And the Fiji script I need to run is dir = getDirectory("Where I…
Geyao Li
  • 21
  • 2
2
votes
2 answers

Incorporating a plugin into an ImageJ/FIJI Macro (bUnwarpJ)

I am trying to integrate the plugin, bUnwarpJ into an ImageJ macro I have been writing. The aim is to call this plugin, allow the user to define the parameters and run it. This plugin has an option to save the user defined parameters, i.e.,…
Pradeep R
  • 21
  • 2
2
votes
1 answer

Is it remotely possible to have a macro in imagej that automatically set scale from an image

Is it remotely possible to have a macro that automatically set scale multiple times from an image and then use it to calculate arae and other measurement parameters ? for example i have over a thousand of the image below, with usually three views of…
Hammao
  • 801
  • 1
  • 9
  • 28
2
votes
3 answers

How to generate valid HyperStack ImageJ data files from Matlab?

ImageJ HyperStacks have a data type (8-32 bit), a width, a height, a number of channels, a number of slices and a number of frames. They represent 5D (XYCZT) data sets. ImageJ stores them as multipage tiff files where number of channels times number…
NoDataDumpNoContribution
  • 10,591
  • 9
  • 64
  • 104
2
votes
1 answer

Encapsulating a JNI library inside a jar file

I am trying to develop a plugin for Fiji/ImageJ that relies on a native library (JNI). The JNI library itself depends on libtiff and fftw. On OSX and Linux, I use the class NativeUtils and everything works fine. On windows, I included binary…
hpixel
  • 260
  • 1
  • 10