GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Default projection assumes projection dimension interval starts at 0 · Issue #292 · scijava/scijava

Default projection assumes projection dimension interval starts at 0 #292

New issue
Copy link
New issue
Copy link
Open
Open
Default projection assumes projection dimension interval starts at 0#292
Copy link

Description

@andmccall
andmccall
opened on Aug 12, 2026
Issue body actions

Hi @gselzer,

The DimensionIterable class in DefaultProjectParallel (see below) does not project any data from negative coordinates in the projection dimension, basically assuming that the RAI has a zero valued origin. This causes the projection to be incomplete if the data spans into negative coordinates. In line 109, k is statically set to -1, when it should probably be set to the min value for that dimension. I think this would require another parameter (starting position?), and passing it a value of input.min(dim), then subtracting 1 from that. Luckily this is a nested class and this change doesn't seem like it should affect the Op call.

This issue also seems to be present in ImageJ ops, but I know we're not updating that any more.

scijava/scijava-ops-image/src/main/java/org/scijava/ops/image/transform/project/project/DefaultProjectParallel.java

Lines 91 to 129 in 82d58a2

final class DimensionIterable implements Iterable<T> {
private final long size;
private final int dim;
private final RandomAccess<T> access;
public DimensionIterable(final long size, final int dim,
final RandomAccess<T> access)
{
this.size = size;
this.dim = dim;
this.access = access;
}
@Override
public Iterator<T> iterator() {
return new Iterator<T>() {
int k = -1;
@Override
public boolean hasNext() {
return k < size - 1;
}
@Override
public T next() {
k++;
access.setPosition(k, dim);
return access.get();
}
@Override
public void remove() {
throw new UnsupportedOperationException("Not supported");
}
};
}
}

Activity

  1. gselzer commented on Aug 12, 2026

    @gselzer
    gselzer
    on Aug 12, 2026
    Member
    More actions

    @andmccall great catch, yet another bug in these projection Ops 🙁

    I think that fixing these projection Ops is quickly jumping to the top of my SciJava Ops priority list.

    This issue also seems to be present in ImageJ ops, but I know we're not updating that any more.

    To be clear, bugfixes to ImageJ Ops are always welcome - I just don't want to add new Ops 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.