10000 DistanceTransform throws Exception with certain weights · Issue #108 · imglib/imglib2-algorithm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
DistanceTransform throws Exception with certain weights #108
Open
@bogovicj

Description

@bogovicj

This code

double M = Double.MAX_VALUE;
double[] data = new double[] {M, 0, M, M};
ArrayImg<DoubleType, DoubleArray> dists = ArrayImgs.doubles(data, 4);

double w = 0.1;
DistanceTransform.transform(dists, new EuclidianDistanceAnisotropic(wx));

throws:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
	at net.imglib2.img.basictypeaccess.array.AbstractLongArray.getValue(AbstractLongArray.java:61)
	at net.imglib2.type.numeric.integer.GenericLongType.getLong(GenericLongType.java:135)
	at net.imglib2.type.numeric.integer.LongType.get(LongType.java:93)
	at net.imglib2.algorithm.morphology.distance.DistanceTransform.transformSingleColumn(DistanceTransform.java:1193)
	at net.imglib2.algorithm.morphology.distance.DistanceTransform.transformAlongDimension(DistanceTransform.java:1128)
	at net.imglib2.algorithm.morphology.distance.DistanceTransform.transform(DistanceTransform.java:541)
	at net.imglib2.algorithm.morphology.distance.DistanceTransform.transform(DistanceTransform.java:455)
	at net.imglib2.algorithm.morphology.distance.DistanceTransform.transform(DistanceTransform.java:393)

weights less than 1.0 seem to be the cause of this.

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

      0