Changeset 4829


Ignore:
Timestamp:
02/20/09 12:36:23 (11 years ago)
Author:
mike
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/flow-cytometry/src/loci/apps/flow/JVMLinkFlowCytometry.java

    r4552 r4829  
    135135  private static boolean showParticles=false; 
    136136  private static boolean b_logY = false; 
     137  private static Vector<Particle> lastFrameParticles; 
    137138 
    138139  private static Vector<Integer> sliceBegin, sliceEnd; 
     
    451452      intensityThreshold, areaThresholdInPixels); 
    452453    d.findParticles(stack.getProcessor(sliceNum)); 
    453     Vector<Particle> thisParticles = d.crunchArray(); 
     454    lastFrameParticles = d.crunchArray(); 
    454455    if (showParticles) { 
    455456      System.out.println("Processing slice "+sliceNum); 
     
    457458    } 
    458459    Slice thisSlice = new Slice(nSlices); 
    459     if (thisParticles.size() > 0) { 
     460        if (lastFrameParticles.size() > 0) { 
    460461      thisSlice.hasParticles = true; 
    461462      thisSlice.begin = nParticles; 
    462       thisSlice.end = nParticles+thisParticles.size()-1; 
    463     } 
    464  
    465     for (int i=0; i<thisParticles.size(); i++) { 
    466       Particle thisParticle = thisParticles.get(i); 
     463          thisSlice.end = nParticles + lastFrameParticles.size() - 1; 
     464    } 
     465 
     466        for (int i = 0; i < lastFrameParticles.size(); i++) { 
     467      Particle thisParticle = lastFrameParticles.get(i); 
    467468      thisParticle.setNum(nParticles++); 
    468469      thisParticle.setSliceNum(nSlices); 
     
    485486  } 
    486487 
    487   private static boolean addParticle(Particle particle) { 
     488        public static int[] getParticleMicronAreas() { 
     489                int[] micronAreas = new int[lastFrameParticles.size()]; 
     490                for (int i = 0; i < micronAreas.length; i++) { 
     491                        micronAreas[i] = lastFrameParticles.get(i).getMicronArea(); 
     492                } 
     493                return micronAreas; 
     494        } 
     495 
     496        private static boolean addParticle(Particle particle) 
     497        { 
    488498    int particleIndex = particles.size()-1; 
    489499    if (particles.size() == 0) { 
Note: See TracChangeset for help on using the changeset viewer.