Skip to content

Commit 1ffa597

Browse files
authored
Merge pull request #654 from imagej/feature-rai-getType
Addition of getType() API
2 parents d9d1528 + bd43d4f commit 1ffa597

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.scijava</groupId>
77
<artifactId>pom-scijava</artifactId>
8-
<version>37.0.0</version>
8+
<version>38.0.1</version>
99
<relativePath />
1010
</parent>
1111

@@ -256,7 +256,11 @@
256256
<!-- NB: Deploy releases to the SciJava Maven repository. -->
257257
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
258258

259-
<scijava-common.version>2.98.0</scijava-common.version>
259+
<imglib2.version>7.1.0</imglib2.version>
260+
<imglib2-realtransform.version>4.0.3</imglib2-realtransform.version>
261+
<imglib2-roi.version>0.15.0</imglib2-roi.version>
262+
<imglib2-algorithm.version>0.15.3</imglib2-algorithm.version>
263+
<imagej-common.version>2.1.1</imagej-common.version>
260264
</properties>
261265

262266
<repositories>

src/main/java/net/imagej/ops/coloc/ShuffledView.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ public RandomAccess<T> randomAccess(final Interval interval) {
134134
return randomAccess(); // FIXME
135135
}
136136

137+
@Override
138+
public T getType()
139+
{
140+
return image.getType();
141+
}
142+
137143
private class ShuffledRandomAccess extends Point implements RandomAccess<T> {
138144
private final RandomAccess<T> imageRA;
139145
private final long[] blockPos;

src/main/java/net/imagej/ops/geom/geom3d/DefaultInertiaTensor3D.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void initialize() {
6666
@Override
6767
public RealMatrix calculate(final IterableRegion<B> input) {
6868
final BlockRealMatrix output = new BlockRealMatrix(3, 3);
69-
Cursor<Void> c = input.localizingCursor();
69+
Cursor<Void> c = input.inside().localizingCursor();
7070
double[] pos = new double[3];
7171
double[] computedCentroid = new double[3];
7272
centroid.calculate(input).localize(computedCentroid);
@@ -87,7 +87,7 @@ public RealMatrix calculate(final IterableRegion<B> input) {
8787
output.setEntry(2, 1, output.getEntry(1, 2));
8888
}
8989

90-
final double size = input.size();
90+
final double size = input.inside().size();
9191
output.setEntry(0, 0, output.getEntry(0, 0) / size);
9292
output.setEntry(0, 1, output.getEntry(0, 1) / size);
9393
output.setEntry(0, 2, output.getEntry(0, 2) / size);

src/main/java/net/imagej/ops/image/watershed/Watershed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void compute(final RandomAccessibleInterval<T> in, final ImgLabeling<Inte
137137
final List<Long> imiList = new ArrayList<>();
138138

139139
if (mask != null) {
140-
final Cursor<Void> c = Regions.iterable(mask).localizingCursor();
140+
final Cursor<Void> c = Regions.iterable(mask).inside().localizingCursor();
141141
while (c.hasNext()) {
142142
c.next();
143143
imiList.add(IntervalIndexer.positionToIndex(c, in));

src/main/java/net/imagej/ops/labeling/MergeLabeling.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void compute(final ImgLabeling<L, I> input1,
9292
{
9393
if (mask != null) {
9494
final IterableRegion iterable = Regions.iterable(mask);
95-
final IterableInterval<LabelingType<L>> sample = Regions.sample(iterable,
95+
final IterableInterval<LabelingType<L>> sample = Regions.sample(iterable.inside(),
9696
output);
9797
final RandomAccess<LabelingType<L>> randomAccess = input1.randomAccess();
9898
final RandomAccess<LabelingType<L>> randomAccess2 = input2.randomAccess();

0 commit comments

Comments
 (0)