4343import net .imglib2 .util .Pair ;
4444import net .imglib2 .util .Util ;
4545import net .imglib2 .view .IntervalView ;
46- import net .imglib2 .view .MixedTransformView ;
4746
4847import org .scijava .log .LogService ;
4948import org .scijava .notebook .converter .NotebookConverters ;
@@ -73,7 +72,7 @@ public <T extends RealType<T>> Object RAIToPNG(
7372final int xAxis ,final int yAxis ,final int cAxis ,//
7473final ValueScaling scaling ,final long ...pos ) {
7574
76- final IntervalView <T >image =ops .transform ().zeroMin (source );
75+ final IntervalView <T >image =ops .transform ().zeroMinView (source );
7776
7877final int w =xAxis >=0 ? (int )image .dimension (xAxis ) :1 ;
7978final int h =yAxis >=0 ? (int )image .dimension (yAxis ) :1 ;
@@ -92,7 +91,7 @@ public <T extends RealType<T>> Object RAIToPNG(
9291max =image .firstElement ().getMaxValue ();
9392 }else {
9493// scale the intensities based on the sample values
95- final IterableInterval <T >ii =ops .transform ().flatIterable (source );
94+ final IterableInterval <T >ii =ops .transform ().flatIterableView (source );
9695final Pair <T ,T >minMax =ops .stats ().minMax (ii );
9796min =minMax .getA ().getRealDouble ();
9897max =minMax .getB ().getRealDouble ();
@@ -194,32 +193,18 @@ public <T extends RealType<T>> Object RAIToPNG(
194193for (int d =0 ;d <numDims ;d ++) {
195194offset [d ] =offsets [d ][pos [d ]];
196195 }
197- final MixedTransformView <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- final long []max =new long [numDims ];
206- for (int d =0 ;d <numDims ;d ++) {
207- max [d ] =offset [d ] +images [i ].dimension (d ) -1 ;
208- }
209- final FinalInterval bounds =new FinalInterval (offset ,max );
210- final RandomAccessibleInterval <T >bounded
211- =//
212- ops .transform ().interval (translated ,bounds );
196+ final IntervalView <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- final RandomAccessible <T >extended =ops .transform ().extendZero ( bounded );
202+ final RandomAccessible <T >extended =ops .transform ().extendZeroView ( translated );
218203
219204// Define the interval of the image to match the size of the mosaic.
220205final RandomAccessibleInterval <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.
225210Inplaces .binary1 (ops ,Ops .Math .Add .class ,result ,expanded ).mutate1 (