()
| 2008 | } |
| 2009 | |
| 2010 | void getLine() { |
| 2011 | Variable vx1 = getFirstVariable(); |
| 2012 | Variable vy1 = getNextVariable(); |
| 2013 | Variable vx2 = getNextVariable(); |
| 2014 | Variable vy2 = getNextVariable(); |
| 2015 | Variable lineWidth = getLastVariable(); |
| 2016 | ImagePlus imp = getImage(); |
| 2017 | double x1=-1, y1=-1, x2=-1, y2=-1; |
| 2018 | Roi roi = imp.getRoi(); |
| 2019 | if (roi!=null && roi.getType()==Roi.LINE) { |
| 2020 | Line line = (Line)roi; |
| 2021 | x1=line.x1d; y1=line.y1d; x2=line.x2d; y2=line.y2d; |
| 2022 | } |
| 2023 | vx1.setValue(x1); |
| 2024 | vy1.setValue(y1); |
| 2025 | vx2.setValue(x2); |
| 2026 | vy2.setValue(y2); |
| 2027 | lineWidth.setValue(roi!=null?roi.getStrokeWidth():1); |
| 2028 | } |
| 2029 | |
| 2030 | void getVoxelSize() { |
| 2031 | Variable width = getFirstVariable(); |
no test coverage detected