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