Changeset 7893 for trunk/projects/flow-cytometry
- Timestamp:
- 02/18/12 02:11:40 (8 years ago)
- Location:
- trunk/projects/flow-cytometry/src/main/java/loci/apps/flow
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/projects/flow-cytometry/src/main/java/loci/apps/flow/FlowCytometry.java
r7877 r7893 51 51 import ij.process.ImageProcessor; 52 52 import java.awt.BorderLayout; 53 import java.awt.Component; 53 54 import java.awt.Scrollbar; 54 55 import java.awt.event.AdjustmentEvent; 55 56 import java.awt.event.AdjustmentListener; 57 import java.awt.event.ComponentEvent; 58 import java.awt.event.ComponentListener; 56 59 import java.awt.event.ItemEvent; 57 60 import java.awt.event.ItemListener; … … 166 169 private static FunctionType fn; 167 170 private static DataReferenceImpl data_ref; 168 private static Scrollbarscroll;171 private static Component scroll; 169 172 private static DisplayImpl display; 170 173 private static ResultsTable rt; … … 274 277 else if (nSlices == 2) { 275 278 ImageWindow stackwin = imp.getWindow(); 276 scroll = (Scrollbar)stackwin.getComponent(1);277 278 AdjustmentListener l = new AdjustmentListener() {279 scroll = stackwin.getComponent(1); 280 281 ComponentListener l = new ComponentListener() { 279 282 @SuppressWarnings("synthetic-access") 280 @Override281 283 public void adjustmentValueChanged(AdjustmentEvent arg0) { 282 284 try { … … 311 313 } 312 314 } 315 316 @Override 317 public void componentHidden(ComponentEvent e) { 318 // TODO Auto-generated method stub 319 320 } 321 322 @Override 323 public void componentMoved(ComponentEvent e) { 324 // TODO Auto-generated method stub 325 326 } 327 328 @Override 329 public void componentResized(ComponentEvent e) { 330 // TODO Auto-generated method stub 331 332 } 333 334 @Override 335 public void componentShown(ComponentEvent e) { 336 // TODO Auto-generated method stub 337 338 } 313 339 }; 314 scroll.add AdjustmentListener(l);340 scroll.addComponentListener((ComponentListener) l); 315 341 } 316 342 } … … 648 674 IJ.run("bf ParticleAreasPlugin"); 649 675 // IJ.runPlugIn("bf ParticleAreasPlugin", null); 650 RoiManager rm = RoiManager.getInstance(); 651 ResultsTable rt = ResultsTable.getResultsTable(); 652 653 int lengthOfRoiTable = rm.getCount(); 654 rm.runCommand("Deselect"); 655 rm.runCommand("Delete"); 656 676 RoiManager rman = RoiManager.getInstance(); 677 ResultsTable rtab = ResultsTable.getResultsTable(); 678 679 int lengthOfRoiTable = rman.getCount(); 680 657 681 if (lengthOfRoiTable!=0){ 682 rman.runCommand("Deselect"); 683 rman.runCommand("Delete"); 658 684 659 685 retVal = new int[lengthOfRoiTable]; 660 float[] temp = rt .getColumn(rt.getColumnIndex("Area"));661 662 if(temp!=null && retVal!=null){686 float[] temp = rtab.getColumn(rtab.getColumnIndex("Area")); 687 688 if(temp!=null){ 663 689 for (int i = 0; i < lengthOfRoiTable; i++){ 664 690 retVal[i]=(int)temp[i]; … … 1218 1244 //fall through 1219 1245 } 1246 ResultsTable.getResultsTable().reset(); 1247 WindowManager.closeAllWindows(); 1220 1248 ij.quit(); 1221 1249 } -
trunk/projects/flow-cytometry/src/main/java/loci/apps/flow/bf_ParticleAreasPlugin.java
r7876 r7893 1 1 package loci.apps.flow; 2 // DELETE the package script above, and place in WiscScan/plugins 2 3 3 4 import ij.*; 4 5 import ij.plugin.*; … … 25 26 try{ 26 27 Interpreter.batchMode=true; 27 Duplicator dup = new Duplicator(); 28 ImagePlus duplicate = dup.run(image); 28 29 //Duplicator dup = new Duplicator(); 30 //ImagePlus duplicate = dup.run(image); 29 31 //TODO use duplicate image in all "run"s, 30 IJ.run("Duplicate...", "title=Duplicate"); 31 IJ.run("Find Edges"); 32 IJ.run("Find Edges"); 33 IJ.run("Gaussian Blur...", "sigma=5"); 34 IJ.run("Auto Threshold", "method=Minimum white"); 35 IJ.run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Masks exclude clear add"); 36 IJ.runMacro("roiManager(\"Measure\")",null); 32 IJ.log("Started scan");//TEMP 33 ImageProcessor duplicatedArg0 = arg0.duplicate(); 34 ImagePlus imp = new ImagePlus("duplicate", duplicatedArg0); // has only one slice 35 IJ.log("Duplicate ImageProcessor and ImagePlus successfully created");//TEMP 36 37 //IJ.run(imp, "Duplicate...", "title=Duplicate"); 38 IJ.run(imp, "Find Edges", null); 39 IJ.run(imp, "Find Edges", null); 40 IJ.log("Ran Find Edges twice...");//TEMP 41 42 IJ.run(imp, "Gaussian Blur...", "sigma=5"); 43 IJ.log("Gaussian Blur with sigma 5");//TEMP 44 45 IJ.run(imp, "Auto Threshold", "method=Minimum white"); 46 IJ.log("thresholded ImagePlus duplicate with Auto Threshold Minimum");//TEMP 47 48 IJ.run(imp, "Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Masks exclude clear add"); 49 IJ.log("Analyzed particles, loaded to ROI Manager");//TEMP 50 51 IJ.log("ROI count = " + RoiManager.getInstance().getCount());//TEMP 52 if(RoiManager.getInstance().getCount()>0) 53 IJ.runMacro("roiManager(\"Measure\")",null); 54 55 IJ.log("Successfully measured, finished all calculations");//TEMP 56 57 //IJ.selectWindow("Duplicate"); 58 //WindowManager.removeWindow(WindowManager.getFrontWindow()); 59 imp.close(); 60 IJ.log("Closed ImagePlus duplicate.");//TEMP 61 IJ.log("Done.");//TEMP 62 63 Interpreter.batchMode=false; 64 37 65 } catch(Exception e){ 38 66 e.printStackTrace(); 67 //String stackTrace = DebugTools.printStackTrace(e); 68 //IJ.handleException(e); 39 69 } 40 70 Interpreter.batchMode=false; 41 71 //REPLACE SIZE IN ANALYZE PARTICLE TO ACCOMODATE MIN AND MAX 42 72 43 73 }
Note: See TracChangeset
for help on using the changeset viewer.