Skip to content

ClassCastException from ConstantToIIOutputII #648

@gselzer

Description

@gselzer

The following script, run in Fiji, throws a ClassCastException. I couldn't find any existing issue for this.

#@OpService ops

from net.imglib2.img.array import ArrayImgs
from net.imglib2.type.numeric.real import DoubleType

input = ArrayImgs.bytes(10, 10)
output = ArrayImgs.bytes(10, 10)
value = DoubleType(10)

ops.run("math.add", output, input, value)

This is probably due to Ops' insufficient generic type reasoning during matching; ConstantToIIOutputII.Add (it's autogenerated, or I'd link it), is being satisfied despite the Ts not matching between the ByteType of the images and the DoubleType of the value.

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