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

Return VQImageCompressor for `QuantizationType.Vector3D`.

parent 24b62df8
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ public class ScifioWrapper { ...@@ -37,6 +37,7 @@ public class ScifioWrapper {
*/ */
public static Reader getReader(final String path) throws IOException, FormatException { public static Reader getReader(final String path) throws IOException, FormatException {
SCIFIO scifio = getScifio(); SCIFIO scifio = getScifio();
// return scifio.initializer().initializeReader(new FileLocation(path));
return scifio.initializer().initializeReader(path); return scifio.initializer().initializeReader(path);
} }
......
...@@ -25,10 +25,9 @@ public class ImageCompressor extends CompressorDecompressorBase { ...@@ -25,10 +25,9 @@ public class ImageCompressor extends CompressorDecompressorBase {
break; break;
case Vector1D: case Vector1D:
case Vector2D: case Vector2D:
case Vector3D:
compressor = new VQImageCompressor(options); compressor = new VQImageCompressor(options);
break; break;
case Vector3D:
case Invalid: case Invalid:
default: default:
return null; return null;
......
...@@ -15,8 +15,6 @@ import java.io.DataInputStream; ...@@ -15,8 +15,6 @@ import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
// TODO(Moravec): Handle huffman decoding.
public class VQImageDecompressor extends CompressorDecompressorBase implements IImageDecompressor { public class VQImageDecompressor extends CompressorDecompressorBase implements IImageDecompressor {
public VQImageDecompressor(CompressionOptions options) { public VQImageDecompressor(CompressionOptions options) {
super(options); super(options);
......
...@@ -86,8 +86,10 @@ public abstract class BasicLoader { ...@@ -86,8 +86,10 @@ public abstract class BasicLoader {
final int xVoxelCount = (int) Math.ceil((double) dims.getX() / (double) voxelDim.getX()); final int xVoxelCount = (int) Math.ceil((double) dims.getX() / (double) voxelDim.getX());
final int yVoxelCount = (int) Math.ceil((double) dims.getY() / (double) voxelDim.getY()); final int yVoxelCount = (int) Math.ceil((double) dims.getY() / (double) voxelDim.getY());
int[][] voxels = new int[calculateRequiredVoxelCount(dims, voxelDim)][(int) voxelDim.multiplyTogether()]; int[][] voxels = new int[calculateRequiredVoxelCount(dims, voxelDim)][(int) voxelDim.multiplyTogether()];
int dstZ, dstY, dstX, voxelX, voxelY, voxelZ, voxelIndex; int dstZ, dstY, dstX, voxelX, voxelY, voxelZ, voxelIndex;
for (int srcZ = 0; srcZ < dims.getZ(); srcZ++) { for (int srcZ = 0; srcZ < dims.getZ(); srcZ++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment