Skip to content

Initialize name property for ImagePlus outputs #24

@imagejan

Description

@imagejan

When you define:

@Parameter (type = ItemIO.OUTPUT)
private ImagePlus imp;

in an ImageJ2 command, the output Img in KNIME should get its name attribute populated from imp.getTitle(). Currently, it is always null which can lead to unexpected errors downstream of nodes with this output.
I assume this change would need to go somewhere into these lines:

ImgPlusCell output = null;
try {
output = factory.createCell(new ImgPlus(image));
} catch (final IOException e) {
e.printStackTrace();
}

EDIT: the output image also contains additional dimensions of length 1 and labelled Unknown. It would be nice to keep the dimensions from the ImagePlus, or at least clean the dimensions of length 1.

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