Skip to content

Commit

Permalink
Merge pull request #142 from fiji/feature-rai-getType
Browse files Browse the repository at this point in the history
Addition of getType() API
  • Loading branch information
ctrueden authored Aug 29, 2024
2 parents 5472f9b + 745b32b commit f5c9e6c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
13 changes: 9 additions & 4 deletions 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>34.1.0</version>
<version>38.0.1</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -129,11 +129,16 @@
<license.copyrightOwners>Fiji developers.</license.copyrightOwners>
<license.projectName>Fiji distribution of ImageJ for the life sciences.</license.projectName>

<imglib2.version>7.1.0</imglib2.version>
<imglib2-realtransform.version>4.0.3</imglib2-realtransform.version>
<imglib2-roi.version>0.15.0</imglib2-roi.version>
<imglib2-cache.version>1.0.0-beta-18</imglib2-cache.version>
<imglib2-algorithm.version>0.15.3</imglib2-algorithm.version>
<bigdataviewer-core.version>10.6.0</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-36</bigdataviewer-vistools.version>

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

<imglib2.version>6.1.0</imglib2.version>
<imglib2-realtransform.version>4.0.1</imglib2-realtransform.version>
</properties>

<repositories>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/spim/process/fusion/weights/Blending.java
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();
}
}
6 changes: 6 additions & 0 deletions src/main/java/spim/process/fusion/weights/ContentBased.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ public RealRandomAccess<FloatType> realRandomAccess( final RealInterval interval
).realRandomAccess( interval );
}

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

final private static Img< FloatType > createGaussianKernel( final double[] sigmas )
{
final int numDimensions = sigmas.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public RandomAccess< T > randomAccess()
@Override
public RandomAccess< T > randomAccess( final Interval interval ) { return randomAccess(); }

@Override
public T getType()
{
return type;
}

@Override
public long min( final int d ){ return interval.min( 0 ); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public RandomAccess< T > randomAccess()
@Override
public RandomAccess< T > randomAccess( final Interval interval ) { return randomAccess(); }

@Override
public T getType()
{
return zero;
}

@Override
public long min( final int d ){ return transformedInterval.min( d ); }

Expand Down

0 comments on commit f5c9e6c

Please sign in to comment.