コード例 #1
0
ファイル: ImageWriter.java プロジェクト: dannyZhou/imagej
 void write16BitVirtualStack(OutputStream out, VirtualStack virtualStack) throws IOException {
   showProgressBar = false;
   boolean flip = "FlipTheseImages".equals(fi.fileName);
   for (int i = 1; i <= fi.nImages; i++) {
     IJ.showStatus("Writing: " + i + "/" + fi.nImages);
     ImageProcessor ip = virtualStack.getProcessor(i);
     if (flip) ip.flipVertical();
     short[] pixels = (short[]) ip.getPixels();
     write16BitImage(out, pixels);
     IJ.showProgress((double) i / fi.nImages);
   }
 }