Commit 554a2181 authored by hvernier's avatar hvernier

remove bioformat and replace with gdal

parent 27189188
...@@ -1129,17 +1129,19 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen ...@@ -1129,17 +1129,19 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
BufferedImage bi = imgPanel.getFullColorImage(); BufferedImage bi = imgPanel.getFullColorImage();
String outputPath = "imageColor.tif"; String outputPath = "imageColor.tif";
File outputfile = new File(outputPath); File outputfile = new File(outputPath);
Vector<Color> colors = new Vector<Color>();
for (int k = 0 ; k < imgPanel.getClassification().getNbClusters(); k++) { TiffUtils.writeColorTableTiff(bi, outputPath, imgPanel.getImgData().getDataFilesName().get(0),
colors.add(imgPanel.getClassification().getClusteringResult().getCluster(k).getColor()); imgPanel.getClassification().getClusteringResult().getClusterMap(),
} imgPanel.getClassification().getClusteringResult().getClustersColorsList()
// ImageIO.write(bi, "png", outputfile); ,imgPanel.getImgData().getRawImages().get(0).getInfo());
if (TiffUtils.isTiff(imgPanel.getImgData().getDataFilesName().get(0))) {
/*if (TiffUtils.isTiff(imgPanel.getImgData().getDataFilesName().get(0))) {
TiffUtils.writeRGBTiffwithMetaData(bi, outputPath, TiffUtils.writeRGBTiffwithMetaData(bi, outputPath,
imgPanel.getImgData().getDataFilesName().get(0)); imgPanel.getImgData().getDataFilesName().get(0));
} else { } else {
TiffUtils.writeRGBTiff(bi, outputPath); TiffUtils.writeRGBTiff(bi, outputPath);
} }*/
Packager.zipFile(out, name + "/"+outputPath, outputfile); Packager.zipFile(out, name + "/"+outputPath, outputfile);
outputfile.delete(); outputfile.delete();
......
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