| 364 | } |
| 365 | |
| 366 | void mitk::BaseGeometry::SetExtentInMM(int direction, ScalarType extentInMM) |
| 367 | { |
| 368 | mitk::ModifiedLock lock(this); |
| 369 | |
| 370 | ScalarType len = GetExtentInMM(direction); |
| 371 | if (fabs(len - extentInMM) >= mitk::eps) |
| 372 | { |
| 373 | AffineTransform3D::MatrixType::InternalMatrixType vnlmatrix; |
| 374 | vnlmatrix = m_GeometryTransform->GetVnlMatrix(); |
| 375 | if (len > extentInMM) |
| 376 | vnlmatrix.set_column(direction, vnlmatrix.get_column(direction) / len * extentInMM); |
| 377 | else |
| 378 | vnlmatrix.set_column(direction, vnlmatrix.get_column(direction) * extentInMM / len); |
| 379 | Matrix3D matrix; |
| 380 | matrix = vnlmatrix; |
| 381 | m_GeometryTransform->SetMatrix(matrix); |
| 382 | |
| 383 | Modified(); |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | bool mitk::BaseGeometry::IsInside(const mitk::Point3D &p) const |
| 388 | { |