Commit 3ae3cafd authored by Luc Deschenaux's avatar Luc Deschenaux

set codec default options for tiffsaver

parent e69ea295
......@@ -285,7 +285,7 @@ public class EyesisCorrectionParameters {
gd.addCheckbox ("Save chroma denoise mask (white - use hi-res, black - low-res)", this.saveChromaDenoiseMask);
gd.addCheckbox ("Rotate result image", this.rotate);
gd.addCheckbox ("Crop result image to the original size", this.crop);
String [] tiffCompressionChoices={"UNCOMPRESSED","LZW","JPEG_2000","ALT_JPEG2000"};
String [] tiffCompressionChoices={"UNCOMPRESSED","LZW","JPEG", "JPEG_2000","ALT_JPEG2000"};
int tiffCompressionIndex=0;
String [] equirectangularFormatChoices={"RGBA 8-bit","RGBA 16-bit","RGBA 32-bit integer","RGBA 32-bit float","ImageJ stack"};
int [] equirectangularFormats={0,1,2,3,4};
......
......@@ -34,6 +34,7 @@ import java.util.Arrays;
//import org.apache.log4j.Logger;
import ij.IJ;
import ij.ImagePlus;
import ij.WindowManager;
......@@ -42,6 +43,7 @@ import loci.common.RandomAccessInputStream;
import loci.common.services.DependencyException;
import loci.common.services.ServiceException;
import loci.formats.FormatException;
import loci.formats.codec.CodecOptions;
import loci.formats.tiff.IFD;
import loci.formats.tiff.IFDList;
import loci.formats.tiff.TiffParser;
......@@ -222,6 +224,7 @@ public EyesisTiff(String codec){
TiffSaver tiffSaver = new TiffSaver(path);
tiffSaver.setWritingSequentially(true);
tiffSaver.setLittleEndian(false);
tiffSaver.setCodecOptions(TiffCompression.valueOf(codec).getCompressionCodecOptions(ifd));
tiffSaver.writeHeader();
// tiffSaver.writeIFD(ifd,0); //* SHould not write here, some fields are calculated during writeImage, that writes IFD too
// System.out.println("bytes.length="+bytes.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment