Returns a reference to the current ImageProcessor. If there is no ImageProcessor, it creates one. Returns null if this ImagePlus contains no ImageProcessor and no AWT Image. Sets the line width to the current line width and sets the calibration table if the image is density calibrated.
()
| 1077 | Sets the line width to the current line width and sets the |
| 1078 | calibration table if the image is density calibrated. */ |
| 1079 | public ImageProcessor getProcessor() { |
| 1080 | if (ip==null) |
| 1081 | return null; |
| 1082 | if (roi!=null && roi.isArea()) |
| 1083 | ip.setRoi(roi.getBounds()); |
| 1084 | else |
| 1085 | ip.resetRoi(); |
| 1086 | if (!compositeImage) |
| 1087 | ip.setLineWidth(Line.getWidth()); |
| 1088 | if (ij!=null) |
| 1089 | ip.setProgressBar(ij.getProgressBar()); |
| 1090 | Calibration cal = getCalibration(); |
| 1091 | if (cal.calibrated()) |
| 1092 | ip.setCalibrationTable(cal.getCTable()); |
| 1093 | else |
| 1094 | ip.setCalibrationTable(null); |
| 1095 | if (IJ.recording()) { |
| 1096 | Recorder recorder = Recorder.getInstance(); |
| 1097 | if (recorder!=null) recorder.imageUpdated(this); |
| 1098 | } |
| 1099 | return ip; |
| 1100 | } |
| 1101 | |
| 1102 | /** Frees RAM by setting the snapshot (undo) buffer in |
| 1103 | the current ImageProcessor to null. */ |
no test coverage detected