Skip to content

Commit

Permalink
Merge pull request #40 from imglib/feature-rai-getType
Browse files Browse the repository at this point in the history
Addition of getType() API
  • Loading branch information
tpietzsch authored May 8, 2024
2 parents bfe61df + 31cc0b8 commit d8ebbba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>35.1.1</version>
<version>37.0.0</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -159,6 +159,9 @@ Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>

<imglib2.version>7.0.1</imglib2.version>
<imglib2-cache.version>1.0.0-beta-18</imglib2-cache.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import net.imglib2.util.Fraction;
import net.imglib2.util.IntervalIndexer;
import net.imglib2.util.Intervals;
import net.imglib2.util.Util;

import java.util.AbstractList;
import java.util.List;
Expand Down Expand Up @@ -117,7 +116,7 @@ private static < T > ImgPlus< T > toPlanarImgPlus( ImgPlus< T > image )
toPlanar( AbstractCellImg< T, A, ?, ? > cellImage )
{
final long[] dim = Intervals.dimensionsAsLongArray( cellImage );
final T type = Util.getTypeFromInterval( cellImage ).copy();
final T type = cellImage.getType().createVariable();
final Fraction entitiesPerPixel = type.getEntitiesPerPixel();
List< A > slices = new SlicesList<>( cellImage );
final PlanarImg< T, A > ts = new PlanarImg<>( slices, dim, entitiesPerPixel );
Expand Down

0 comments on commit d8ebbba

Please sign in to comment.