Changeset 4315
 Timestamp:
 08/18/08 15:15:24 (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/loci/plugins/Importer.java
r4311 r4315 562 562 average + " ms per plane)"); 563 563 } 564 565 if (concatenate) { 566 Vector widths = new Vector(); 567 Vector heights = new Vector(); 568 Vector types = new Vector(); 569 Vector newImps = new Vector(); 570 571 for (int j=0; j<imps.size(); j++) { 572 ImagePlus imp = (ImagePlus) imps.get(j); 573 int wj = imp.getWidth(); 574 int hj = imp.getHeight(); 575 int tj = imp.getBitDepth(); 576 boolean append = false; 577 for (int k=0; k<widths.size(); k++) { 578 int wk = ((Integer) widths.get(k)).intValue(); 579 int hk = ((Integer) heights.get(k)).intValue(); 580 int tk = ((Integer) types.get(k)).intValue(); 581 582 if (wj == wk && hj == hk && tj == tk) { 583 ImagePlus oldImp = (ImagePlus) newImps.get(k); 584 ImageStack is = oldImp.getStack(); 585 ImageStack newStack = imp.getStack(); 586 for (int s=0; s<newStack.getSize(); s++) { 587 is.addSlice(newStack.getSliceLabel(s + 1), 588 newStack.getProcessor(s + 1)); 589 } 590 oldImp.setStack(oldImp.getTitle(), is); 591 newImps.setElementAt(oldImp, k); 592 append = true; 593 k = widths.size(); 564 } 565 566 if (concatenate) { 567 Vector widths = new Vector(); 568 Vector heights = new Vector(); 569 Vector types = new Vector(); 570 Vector newImps = new Vector(); 571 572 for (int j=0; j<imps.size(); j++) { 573 ImagePlus imp = (ImagePlus) imps.get(j); 574 int wj = imp.getWidth(); 575 int hj = imp.getHeight(); 576 int tj = imp.getBitDepth(); 577 boolean append = false; 578 for (int k=0; k<widths.size(); k++) { 579 int wk = ((Integer) widths.get(k)).intValue(); 580 int hk = ((Integer) heights.get(k)).intValue(); 581 int tk = ((Integer) types.get(k)).intValue(); 582 583 if (wj == wk && hj == hk && tj == tk) { 584 ImagePlus oldImp = (ImagePlus) newImps.get(k); 585 ImageStack is = oldImp.getStack(); 586 ImageStack newStack = imp.getStack(); 587 for (int s=0; s<newStack.getSize(); s++) { 588 is.addSlice(newStack.getSliceLabel(s + 1), 589 newStack.getProcessor(s + 1)); 594 590 } 595 } 596 if (!append) { 597 widths.add(new Integer(wj)); 598 heights.add(new Integer(hj)); 599 types.add(new Integer(tj)); 600 newImps.add(imp); 601 } 602 } 603 604 boolean splitC = options.isSplitChannels(); 605 boolean splitZ = options.isSplitFocalPlanes(); 606 boolean splitT = options.isSplitTimepoints(); 607 608 for (int j=0; j<newImps.size(); j++) { 609 ImagePlus imp = (ImagePlus) newImps.get(j); 610 imp.show(); 611 if (splitC  splitZ  splitT) { 612 IJ.runPlugIn("loci.plugins.Slicer", "slice_z=" + splitZ + 613 " slice_c=" + splitC + " slice_t=" + splitT + 614 " stack_order=" + stackOrder + " keep_original=false " + 615 "hyper_stack=" + options.isViewHyperstack() + " "); 616 } 591 oldImp.setStack(oldImp.getTitle(), is); 592 newImps.setElementAt(oldImp, k); 593 append = true; 594 k = widths.size(); 595 } 596 } 597 if (!append) { 598 widths.add(new Integer(wj)); 599 heights.add(new Integer(hj)); 600 types.add(new Integer(tj)); 601 newImps.add(imp); 602 } 603 } 604 605 boolean splitC = options.isSplitChannels(); 606 boolean splitZ = options.isSplitFocalPlanes(); 607 boolean splitT = options.isSplitTimepoints(); 608 609 for (int j=0; j<newImps.size(); j++) { 610 ImagePlus imp = (ImagePlus) newImps.get(j); 611 imp.show(); 612 if (splitC  splitZ  splitT) { 613 IJ.runPlugIn("loci.plugins.Slicer", "slice_z=" + splitZ + 614 " slice_c=" + splitC + " slice_t=" + splitT + 615 " stack_order=" + stackOrder + " keep_original=false " + 616 "hyper_stack=" + options.isViewHyperstack() + " "); 617 617 } 618 618 }
Note: See TracChangeset
for help on using the changeset viewer.