Certain RankFilters() operations never report system exit, hang indefinitely
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 350
- PR merge metrics
- No merged PRs in 30d
Description
I have recently been working with both pyimagej and FIJI/ImageJ and have identified an issue that is common to both and persists regardless of how I run it.
PyImageJ script:
```
import imagej, scyjava
ij = imagej.init("sc.fiji:fiji", mode = "interactive")
imp = ij.IJ.openImage("http://imagej.net/images/Rat_Hippocampal_Neuron.zip")
ij.IJ.run(imp, "Despeckle", "stack")
ij.IJ.saveAs(imp, "Tiff", "Rat_Hippocampal_Neuron_processed.tif")
```
I would note that the preferred (at least to me) `RankFilters = scyjava.jimport("ij.plugin.filter.RankFilters"); RankFilters.rank(imp.getProcessor(), 1.0, 4)` does not work due to challenges with translating python int/float values to a correct Java double
Jython version:
```
from ij import IJ, ImagePlus
from ij.plugin.filter import RankFilters
import sys
imp = IJ.openImage("http://imagej.net/images/Rat_Hippocampal_Neuron.zip")
RankFilters().rank(imp.getProcessor(), 1.0, 4)
# IJ.run(imp, "Despeckle", "stack") # Also does not work...
IJ.saveAs(imp, "Tiff", "Rat_Hippocampal_Neuron_processed.tif")
```
Run with `Fiji.app/ImageJ-linux64 --ij2 --headless --run script.py`
I would note that I am running both contexts with Xvfb, which works fine with almost any other kind of operation I can think of performing.
If anybody has any insight on this topic or if this is truly a bug, that would be appreciated. Running on the latest versions of everything.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the hang with the provided pyimagej and Jython scripts, using IJ.run and RankFilters.rank through the headless Fiji.app/ImageJ-linux64 --ij2 --headless --run script.py entry point. Compare behavior with and without Xvfb and determine why RankFilters operations do not report system exit. Done means the affected operations terminate and report completion or failure instead of hanging indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100