Skip to content

Commit a3da58b

Browse files
committedOct 19, 2018
Update to scifio 0.37.2
1 parent e02d78d commit a3da58b

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed
 

‎pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.scijava</groupId>
1010
<artifactId>pom-scijava</artifactId>
11-
<version>17.1.1</version>
11+
<version>23.2.0</version>
1212
<relativePath />
1313
</parent>
1414

‎src/main/java/io/scif/javacv/MovieFormat.java

+17-13
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@
5555
import java.io.IOException;
5656

5757
import net.imagej.axis.Axes;
58+
import net.imglib2.Interval;
5859

59-
import org.scijava.log.LogService;
60-
import org.scijava.plugin.Parameter;
61-
import org.scijava.plugin.Plugin;
62-
60+
import org.bytedeco.javacpp.opencv_core.IplImage;
6361
import org.bytedeco.javacv.FFmpegFrameGrabber;
6462
import org.bytedeco.javacv.FFmpegFrameRecorder;
6563
import org.bytedeco.javacv.FrameGrabber;
6664
import org.bytedeco.javacv.FrameRecorder;
67-
import org.bytedeco.javacpp.opencv_core.IplImage;
65+
import org.scijava.log.LogService;
66+
import org.scijava.plugin.Parameter;
67+
import org.scijava.plugin.Plugin;
6868

6969
/**
7070
* A SCIFIO format for reading and writing movies using JavaCV.
@@ -205,7 +205,8 @@ public synchronized void close() throws IOException {
205205

206206
@Override
207207
public void writePlane(int imageIndex, long planeIndex, Plane plane,
208-
long[] min, long[] max) throws FormatException, IOException {
208+
Interval bounds) throws FormatException, IOException
209+
{
209210
if (imageIndex != 0) {
210211
throw new IllegalArgumentException("Invalid image index: " + imageIndex);
211212
}
@@ -215,7 +216,7 @@ public void writePlane(int imageIndex, long planeIndex, Plane plane,
215216
}
216217
Metadata meta = getMetadata();
217218

218-
if (!SCIFIOMetadataTools.wholePlane(imageIndex, meta, min, max)) {
219+
if (!SCIFIOMetadataTools.wholePlane(imageIndex, meta, bounds)) {
219220
throw new FormatException(
220221
"MovieWriter does not yet support saving image tiles.");
221222
}
@@ -297,15 +298,16 @@ public void close() throws IOException {
297298

298299
@Override
299300
public BufferedImagePlane openPlane(int imageIndex, long planeIndex,
300-
BufferedImagePlane plane, long[] min, long[] max)
301-
throws FormatException, IOException {
302-
return openPlane(imageIndex, planeIndex, plane, min, max, null);
301+
BufferedImagePlane plane, Interval bounds) throws FormatException,
302+
IOException
303+
{
304+
return openPlane(imageIndex, planeIndex, plane, bounds, null);
303305
}
304306

305307
@Override
306308
public BufferedImagePlane openPlane(int imageIndex, long planeIndex,
307-
BufferedImagePlane plane, long[] min, long[] max,
308-
SCIFIOConfig config) throws FormatException, IOException
309+
BufferedImagePlane plane, Interval bounds, SCIFIOConfig config)
310+
throws FormatException, IOException
309311
{
310312
if (imageIndex != 0) {
311313
throw new IllegalArgumentException("Illegal image index: " + imageIndex);
@@ -318,7 +320,9 @@ public BufferedImagePlane openPlane(int imageIndex, long planeIndex,
318320
try {
319321
final BufferedImage image = grabber.grab().getBufferedImage();
320322
nextPlaneIndex++;
321-
plane.setData(AWTImageTools.getSubimage(image, false, (int) min[0], (int) min[1], (int) max[0], (int) max[1]));
323+
plane.setData(AWTImageTools.getSubimage(image, false, //
324+
(int) bounds.min(0), (int) bounds.min(1), //
325+
(int) bounds.max(0), (int) bounds.max(1)));
322326
return plane;
323327
} catch (FrameGrabber.Exception e) {
324328
throw new IOException(e);

0 commit comments

Comments
 (0)
Please sign in to comment.