Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commitdec9888

Browse files
committed
Fix compile errors caused by the version updates
1 parent167a5f7 commitdec9888

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

‎pom.xml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,17 @@
164164
<groupId>net.imagej</groupId>
165165
<artifactId>imagej</artifactId>
166166
</dependency>
167-
168167
<dependency>
169168
<groupId>net.imagej</groupId>
170169
<artifactId>imagej-ops</artifactId>
171170
</dependency>
172171

172+
<!-- ImageJ packages used in the converters-->
173+
<dependency>
174+
<groupId>net.imagej</groupId>
175+
<artifactId>ij</artifactId>
176+
</dependency>
177+
173178
<!-- Supported languages-->
174179
<dependency>
175180
<groupId>org.scijava</groupId>

‎src/main/java/net/imagej/notebook/DefaultImageJNotebookService.java‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
importnet.imglib2.util.Pair;
4444
importnet.imglib2.util.Util;
4545
importnet.imglib2.view.IntervalView;
46-
importnet.imglib2.view.MixedTransformView;
4746

4847
importorg.scijava.log.LogService;
4948
importorg.scijava.notebook.converter.NotebookConverters;
@@ -73,7 +72,7 @@ public <T extends RealType<T>> Object RAIToPNG(
7372
finalintxAxis,finalintyAxis,finalintcAxis,//
7473
finalValueScalingscaling,finallong...pos) {
7574

76-
finalIntervalView<T>image =ops.transform().zeroMin(source);
75+
finalIntervalView<T>image =ops.transform().zeroMinView(source);
7776

7877
finalintw =xAxis >=0 ? (int)image.dimension(xAxis) :1;
7978
finalinth =yAxis >=0 ? (int)image.dimension(yAxis) :1;
@@ -92,7 +91,7 @@ public <T extends RealType<T>> Object RAIToPNG(
9291
max =image.firstElement().getMaxValue();
9392
}else {
9493
// scale the intensities based on the sample values
95-
finalIterableInterval<T>ii =ops.transform().flatIterable(source);
94+
finalIterableInterval<T>ii =ops.transform().flatIterableView(source);
9695
finalPair<T,T>minMax =ops.stats().minMax(ii);
9796
min =minMax.getA().getRealDouble();
9897
max =minMax.getB().getRealDouble();
@@ -194,32 +193,18 @@ public <T extends RealType<T>> Object RAIToPNG(
194193
for (intd =0;d <numDims;d++) {
195194
offset[d] =offsets[d][pos[d]];
196195
}
197-
finalMixedTransformView<T>translated
198-
=//
199-
ops.transform().translate(ops.transform().zeroMin(images[i]),offset);
200-
201-
// Unfortunately, this operation loses the "Interval" from the RAI:
202-
// translated objects are RAs, not RAIs.
203-
// So, we readd the bounds to match the newly translated coordinates.
204-
// NB: The max bound is _inclusive_, so we must subtract 1.
205-
finallong[]max =newlong[numDims];
206-
for (intd =0;d <numDims;d++) {
207-
max[d] =offset[d] +images[i].dimension(d) -1;
208-
}
209-
finalFinalIntervalbounds =newFinalInterval(offset,max);
210-
finalRandomAccessibleInterval<T>bounded
211-
=//
212-
ops.transform().interval(translated,bounds);
196+
finalIntervalView<T>translated =//
197+
ops.transform().translateView(ops.transform().zeroMinView(images[i]),offset);
213198

214199
// Declare that all values outside the interval proper will be 0.
215200
// If we do not perform this step, we will get an error when querying
216201
// out-of-bounds coordinates.
217-
finalRandomAccessible<T>extended =ops.transform().extendZero(bounded);
202+
finalRandomAccessible<T>extended =ops.transform().extendZeroView(translated);
218203

219204
// Define the interval of the image to match the size of the mosaic.
220205
finalRandomAccessibleInterval<T>expanded
221206
=//
222-
ops.transform().interval(extended,mosaicBox);
207+
ops.transform().intervalView(extended,mosaicBox);
223208

224209
// Add the full-size zero-padded translated image into the mosaic.
225210
Inplaces.binary1(ops,Ops.Math.Add.class,result,expanded).mutate1(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp