If there is a user selected ROI, set the class variables {roiX} and {roiY}, {roiWidth}, {roiHeight} to the corresponding features of the ROI, and return true. Otherwise, return false.
()
| 130 | * features of the ROI, and return true. Otherwise, return false. |
| 131 | */ |
| 132 | boolean parseCurrentROI() { |
| 133 | Roi roi = imp.getRoi(); |
| 134 | if (roi == null) return false; |
| 135 | |
| 136 | Rectangle r = roi.getBounds(); |
| 137 | roiX = r.x; |
| 138 | roiY = r.y; |
| 139 | roiWidth = r.width; |
| 140 | roiHeight = r.height; |
| 141 | return true; |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * There is no hard coded value for the width of the scalebar, |