| 818 | } |
| 819 | |
| 820 | void PlaneGeometry::SetSizeInUnits(mitk::ScalarType width, mitk::ScalarType height) |
| 821 | { |
| 822 | ScalarType bounds[6] = {0, width, 0, height, 0, 1}; |
| 823 | ScalarType extent, newextentInMM; |
| 824 | if (GetExtent(0) > 0) |
| 825 | { |
| 826 | extent = GetExtent(0); |
| 827 | if (width > extent) |
| 828 | newextentInMM = GetExtentInMM(0) / width * extent; |
| 829 | else |
| 830 | newextentInMM = GetExtentInMM(0) * extent / width; |
| 831 | SetExtentInMM(0, newextentInMM); |
| 832 | } |
| 833 | if (GetExtent(1) > 0) |
| 834 | { |
| 835 | extent = GetExtent(1); |
| 836 | if (width > extent) |
| 837 | newextentInMM = GetExtentInMM(1) / height * extent; |
| 838 | else |
| 839 | newextentInMM = GetExtentInMM(1) * extent / height; |
| 840 | SetExtentInMM(1, newextentInMM); |
| 841 | } |
| 842 | SetBounds(bounds); |
| 843 | } |
| 844 | |
| 845 | bool PlaneGeometry::Project(const mitk::Point3D &pt3d_mm, mitk::Point3D &projectedPt3d_mm) const |
| 846 | { |
no outgoing calls