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

Working SCIFIO version.

parent a61d65a7
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>26.0.0</version>
<version>27.0.1</version>
<relativePath/>
</parent>
......
......@@ -12,8 +12,6 @@ import org.apache.commons.cli.*;
import java.io.IOException;
public class DataCompressor {
public static void main(String[] args) {
Options options = CliConstants.getOptions();
......
package azgracompress;
import io.scif.SCIFIO;
import io.scif.formats.TIFFFormat;
public class ScifioWrapper {
private static ScifioWrapper instance = null;
private SCIFIO scifioInstance = null;
private ScifioWrapper() {
scifioInstance = new SCIFIO();
}
public static SCIFIO getScifio() {
if (instance == null) {
synchronized (ScifioWrapper.class) {
if (instance == null) {
instance = new ScifioWrapper();
}
}
}
return instance.scifioInstance;
}
public synchronized static void dispose() {
if (instance != null) {
if (instance.scifioInstance != null) {
instance.scifioInstance.context().dispose();
}
}
}
}
package azgracompress.io;
import azgracompress.data.ImageU16;
import azgracompress.data.V3i;
import io.scif.jj2000.j2k.NotImplementedError;
import java.io.IOException;
/**
* Class handling loading and writing of plane data.
* Multiple data types should be supported.
* For start: RAW, TIFF
*/
public class ImagePlaneIO {
public static ImageU16 loadImageU16(final String rawFile,
final V3i rawDataDimension,
final int plane) throws IOException {
// TODO(Moravec): Handle loading of different types.
// TODO(Moravec): If the loaded image is not U16 convert it to U16 image.
throw new NotImplementedError();
}
public static int[] loadPlanesData(final String rawFile,
final V3i rawDataDims,
int[] planes) throws IOException {
// TODO(Moravec): Handle loading of different types.
// TODO(Moravec): If the loaded image is not U16 convert it to U16 image.
throw new NotImplementedError();
}
public static int[] loadAllPlanesData(final String rawFile, final V3i imageDims) throws IOException {
// TODO(Moravec): Handle loading of different types.
// TODO(Moravec): If the loaded image is not U16 convert it to U16 image.
throw new NotImplementedError();
}
public static void writeImageU16(final String rawFile,
final ImageU16 image,
final boolean littleEndian) throws IOException {
// TODO(Moravec): Handle writing of U16 image to multiple types.
throw new NotImplementedError();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment