Skip to content

Certain RankFilters() operations never report system exit, hang indefinitely #317

@jaredbrewer

Description

@jaredbrewer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions