Skip to content
Snippets Groups Projects
Commit 853556f8 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Scifio test

parent 2976e361
Branches
No related tags found
No related merge requests found
......@@ -5,8 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>26.0.0</version>
<relativePath/>
</parent>
<!-- <groupId>org.scijava</groupId>-->
<!-- <groupId>org.scijava</groupId>-->
<groupId>org.azgra</groupId>
<artifactId>DataCompressor</artifactId>
<version>1.0-SNAPSHOT</version>
......@@ -23,6 +29,13 @@
</plugins>
</build>
<repositories>
<repository>
<id>scijava.public</id>
<url>https://maven.scijava.org/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
......@@ -45,6 +58,10 @@
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>io.scif</groupId>
<artifactId>scifio</artifactId>
</dependency>
</dependencies>
......
import compression.benchmark.ScalarQuantizationBenchmark;
import compression.benchmark.VectorQuantizationBenchmark;
import compression.data.*;
import io.scif.Plane;
import io.scif.Reader;
import io.scif.SCIFIO;
import java.io.IOException;
import java.util.Random;
......@@ -8,9 +11,25 @@ import java.util.Random;
public class DataCompressor {
public static void main(String[] args) throws IOException {
SCIFIO scifio = new SCIFIO();
final String file = "D:\\tmp\\fused_tp_10_ch_0.tif";
final Reader reader;
try {
reader = scifio.initializer().initializeReader(file);
final long placeCount0 = reader.getPlaneCount(0);
final Plane plane = reader.openPlane(0, 1);
System.out.println("Plane (0,0) byte count: " + plane.getBytes().length);
scifio.getContext().dispose();
} catch (Exception e) {
e.printStackTrace();
}
// test2DChunking();
// test3DChunking();
......@@ -28,7 +47,7 @@ public class DataCompressor {
new int[]{351},
new V3i(1041, 996, 946));
vqBench.startBenchmark(new V2i(3,3));
vqBench.startBenchmark(new V2i(3, 3));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment