(ImageProcessor ip)
| 67 | } |
| 68 | |
| 69 | public void run(ImageProcessor ip) { |
| 70 | global1 = imp.getGlobalCalibration()!=null; |
| 71 | if (!showDialog(imp)) |
| 72 | return; |
| 73 | if (choiceIndex==customIndex) { |
| 74 | showPlot(null, null, imp.getCalibration(), null); |
| 75 | return; |
| 76 | } else if (imp.getType()==ImagePlus.GRAY32) { |
| 77 | if (choiceIndex==0) |
| 78 | imp.getCalibration().setValueUnit(unit); |
| 79 | else |
| 80 | IJ.error("Calibrate", "Function must be \"None\" for 32-bit images,\nbut you can change the Unit."); |
| 81 | } else |
| 82 | calibrate(imp); |
| 83 | } |
| 84 | |
| 85 | public boolean showDialog(ImagePlus imp) { |
| 86 | String defaultChoice; |
nothing calls this directly
no test coverage detected