| 1281 | } |
| 1282 | |
| 1283 | bool mitk::Image::IsRotated() const |
| 1284 | { |
| 1285 | const mitk::BaseGeometry *geo = this->GetGeometry(); |
| 1286 | bool ret = false; |
| 1287 | |
| 1288 | if (geo) |
| 1289 | { |
| 1290 | const vnl_matrix_fixed<ScalarType, 3, 3> &mx = geo->GetIndexToWorldTransform()->GetMatrix().GetVnlMatrix(); |
| 1291 | mitk::ScalarType ref = 0; |
| 1292 | for (short k = 0; k < 3; ++k) |
| 1293 | ref += mx[k][k]; |
| 1294 | ref /= 1000; // Arbitrary value; if a non-diagonal (nd) element is bigger then this, matrix is considered nd. |
| 1295 | |
| 1296 | for (short i = 0; i < 3; ++i) |
| 1297 | { |
| 1298 | for (short j = 0; j < 3; ++j) |
| 1299 | { |
| 1300 | if (i != j) |
| 1301 | { |
| 1302 | if (std::abs(mx[i][j]) > ref) // matrix is nd |
| 1303 | ret = true; |
| 1304 | } |
| 1305 | } |
| 1306 | } |
| 1307 | } |
| 1308 | return ret; |
| 1309 | } |
| 1310 | |
| 1311 | mitk::ImageDimensionVectorType mitk::DetermineImageDimensionsFromTimeGeometry(const TimeGeometry* timeGeometry) |
| 1312 | { |
no test coverage detected