MCPcopy Create free account
hub / github.com/MITK/MITK / GetRotation

Function GetRotation

Modules/Core/include/mitkMatrixConvert.h:122–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 */
121 template <class TMatrixType>
122 void GetRotation(const mitk::BaseGeometry *geometry, TMatrixType &itkmatrix)
123 {
124 const mitk::Vector3D &spacing = geometry->GetSpacing();
125 auto &geometryVnlMatrix = geometry->GetIndexToWorldTransform()->GetMatrix().GetVnlMatrix();
126
127 typename TMatrixType::InternalMatrixType &outputVnlMatrix =
128 itkmatrix.GetVnlMatrix();
129
130 for (int i = 0; i < 3; ++i)
131 for (int j = 0; j < 3; ++j)
132 outputVnlMatrix[i][j] = geometryVnlMatrix[i][j] / spacing[j];
133 }
134
135 /**
136 * \brief Compute the world-to-ITK-physical-space transform from a geometry.

Callers 3

testGeometry3DFunction · 0.85
TestExecuteOperationMethod · 0.85

Calls 4

GetVnlMatrixMethod · 0.80
GetMatrixMethod · 0.80
GetSpacingMethod · 0.45

Tested by 2

testGeometry3DFunction · 0.68
TestExecuteOperationMethod · 0.68