Skip to content

Commit

Permalink
Add missing getType() implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Apr 5, 2024
1 parent e1a8545 commit 823a54d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public FinalInterval getExtInterval() {
return extDims;
}

@Override
public T getType()
{
return img.getType();
}

/**
* TODO: For efficiency reasons we should implement it as a RandomAccess that actually updates the underlying
* imgRA for every move. This way, the outofbounds can work very efficiently when it is iterated through Views.iterable().cursor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ public RealRandomAccess<FloatType> realRandomAccess( final RealInterval interval
{
return realRandomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ public RandomAccess< T > randomAccess(Interval interval)
{
return new AverageRandomAccess(numD);
}


@Override
public T getType()
{
return randomAccessibles.isEmpty() ? null : randomAccessibles.get( 0 ).getType();
}

class AverageRandomAccess /* extends Point */ implements RandomAccess< T >
{
final ArrayList< RandomAccess< T > > RAs;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/net/preibisch/stitcher/algorithm/RAIProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,10 @@ public long dimension(int d)
return rai.dimension( d );
}

@Override
public T getType()
{
loadIfNecessary();
return rai.getType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,10 @@ public JuliaRealRandomAccess realRandomAccess( final RealInterval interval )
{
return realRandomAccess();
}

@Override
public LongType getType()
{
return new LongType();
}
}

0 comments on commit 823a54d

Please sign in to comment.