\brief short description * parameters * */
| 37 | * |
| 38 | */ |
| 39 | mitk::Point3D mitk::TimeGeometry::GetCornerPointInWorld(int id) const |
| 40 | { |
| 41 | assert(id >= 0); |
| 42 | assert(m_BoundingBox.IsNotNull()); |
| 43 | |
| 44 | auto& bounds = m_BoundingBox->GetBounds(); |
| 45 | |
| 46 | Point3D cornerpoint; |
| 47 | switch (id) |
| 48 | { |
| 49 | case 0: |
| 50 | FillVector3D(cornerpoint, bounds[0], bounds[2], bounds[4]); |
| 51 | break; |
| 52 | case 1: |
| 53 | FillVector3D(cornerpoint, bounds[0], bounds[2], bounds[5]); |
| 54 | break; |
| 55 | case 2: |
| 56 | FillVector3D(cornerpoint, bounds[0], bounds[3], bounds[4]); |
| 57 | break; |
| 58 | case 3: |
| 59 | FillVector3D(cornerpoint, bounds[0], bounds[3], bounds[5]); |
| 60 | break; |
| 61 | case 4: |
| 62 | FillVector3D(cornerpoint, bounds[1], bounds[2], bounds[4]); |
| 63 | break; |
| 64 | case 5: |
| 65 | FillVector3D(cornerpoint, bounds[1], bounds[2], bounds[5]); |
| 66 | break; |
| 67 | case 6: |
| 68 | FillVector3D(cornerpoint, bounds[1], bounds[3], bounds[4]); |
| 69 | break; |
| 70 | case 7: |
| 71 | FillVector3D(cornerpoint, bounds[1], bounds[3], bounds[5]); |
| 72 | break; |
| 73 | default: |
| 74 | { |
| 75 | itkExceptionMacro(<< "A cube only has 8 corners. These are labeled 0-7."); |
| 76 | return Point3D(); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // TimeGeometry has no Transformation. Therefore the bounding box |
| 81 | // contains all data in world coordinates |
| 82 | return cornerpoint; |
| 83 | } |
| 84 | |
| 85 | mitk::Point3D mitk::TimeGeometry::GetCornerPointInWorld(bool xFront, bool yFront, bool zFront) const |
| 86 | { |