9 template <
typename TImageType,
typename TInterpolatorPrecisionType>
14 this->Superclass::BeforeThreadedGenerateData();
16 m_WorkMats.resize(this->GetNumberOfWorkUnits());
17 m_TmpTensors.resize(this->GetNumberOfWorkUnits());
19 for (
unsigned int i = 0;i < this->GetNumberOfWorkUnits();++i)
21 m_WorkMats[i].set_size(m_TensorDimension,m_TensorDimension);
22 m_TmpTensors[i].set_size(m_TensorDimension,m_TensorDimension);
25 if (!this->GetFiniteStrainReorientation())
27 m_WorkEigenValues.resize(this->GetNumberOfWorkUnits());
28 m_WorkEigenVectors.resize(this->GetNumberOfWorkUnits());
29 m_WorkPPDOrientationMatrices.resize(this->GetNumberOfWorkUnits());
33 template <
typename TImageType,
typename TInterpolatorPrecisionType>
41 if (this->GetFiniteStrainReorientation())
45 typedef itk::Matrix <double,3,3> MatrixType;
46 typedef vnl_vector_fixed <double,3> VectorType;
47 itk::SymmetricEigenAnalysis < MatrixType, VectorType, MatrixType> eigenComputer(3);
48 eigenComputer.ComputeEigenValuesAndVectors(m_WorkMats[threadId],m_WorkEigenValues[threadId],
49 m_WorkEigenVectors[threadId]);
virtual void ReorientInterpolatedModel(const InputPixelType &interpolatedModel, vnl_matrix< double > &modelOrientationMatrix, InputPixelType &rotatedModel, itk::ThreadIdType threadId) ITK_OVERRIDE
Needs to be implemented in sub-classes, does the actual re-orientation of the model.
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE
void GetVectorRepresentation(const vnl_matrix< T1 > &tensor, itk::VariableLengthVector< T2 > &vector, unsigned int vecDim=0, bool scale=false)
InputImageType::PixelType InputPixelType
void RotateSymmetricMatrix(T1 &tensor, T2 &rotationMatrix, T3 &rotated_tensor, unsigned int tensorDim)
Rotates a symmetric matrix by performing R^T D R where R is a rotation matrix and D the symmetric mat...
void GetTensorFromVectorRepresentation(const itk::VariableLengthVector< T1 > &vector, vnl_matrix< T2 > &tensor, unsigned int tensDim=0, bool scale=false)
void ExtractPPDRotationFromJacobianMatrix(vnl_matrix< RealType > &jacobianMatrix, vnl_matrix< RealType > &rotationMatrix, MatrixType &eigenVectors)