RTPlan data widget as TreeWidget
This commit is contained in:
@ -1362,85 +1362,6 @@ void itkImageProcessor::CalculateExternalUserTransform(TransformType::Pointer tr
|
|||||||
m_TransformMetaInfo->SetUserRotations(LPStoIEC_Directions * rotationUser);
|
m_TransformMetaInfo->SetUserRotations(LPStoIEC_Directions * rotationUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
itkImageProcessor::TransformType::Pointer
|
|
||||||
itkImageProcessor::CalculateInternalTransformV2(
|
|
||||||
ImageType3D::PointType m_ImportOffsetLPS,
|
|
||||||
ImageType3D::PointType m_RotationOffsetIEC,
|
|
||||||
ImageType3D::PointType m_TranslationUserIEC,
|
|
||||||
ImageType3D::PointType m_RotationUserIEC,
|
|
||||||
ImageType3D::PointType m_ProjectionCenterLPS,
|
|
||||||
ImageType3D::PointType m_RTIsocenterLPS,
|
|
||||||
InternalImageType::DirectionType m_IECtoLPSDirections
|
|
||||||
){
|
|
||||||
|
|
||||||
const double dtr = (atan(1.0) * 4.0) / 180.0;
|
|
||||||
|
|
||||||
ImageType3D::PointType m_ROffsetLPS =
|
|
||||||
m_IECtoLPSDirections * m_RotationOffsetIEC;
|
|
||||||
|
|
||||||
ImageType3D::PointType m_TUserLPS =
|
|
||||||
m_IECtoLPSDirections * m_TranslationUserIEC;
|
|
||||||
|
|
||||||
ImageType3D::PointType m_RUserLPS =
|
|
||||||
m_IECtoLPSDirections * m_RotationUserIEC;
|
|
||||||
|
|
||||||
|
|
||||||
TransformType::OutputVectorType translation;
|
|
||||||
translation[0] = m_TUserLPS[0];
|
|
||||||
translation[1] = m_TUserLPS[1];
|
|
||||||
translation[2] = m_TUserLPS[2];
|
|
||||||
|
|
||||||
ImageType3D::PointType m_TransformRotations;
|
|
||||||
m_TransformRotations[0] = m_ROffsetLPS[0] + m_RUserLPS[0] ;
|
|
||||||
m_TransformRotations[1] = m_ROffsetLPS[1] + m_RUserLPS[1] ;
|
|
||||||
m_TransformRotations[2] = m_ROffsetLPS[2] + m_RUserLPS[2] ;
|
|
||||||
|
|
||||||
ImageType3D::PointType m_RTIsocenterLPSNEG;
|
|
||||||
m_RTIsocenterLPSNEG[0] = -m_RTIsocenterLPS[0] + m_ProjectionCenterLPS[0];
|
|
||||||
m_RTIsocenterLPSNEG[1] = -m_RTIsocenterLPS[1] + m_ProjectionCenterLPS[0];
|
|
||||||
m_RTIsocenterLPSNEG[2] = -m_RTIsocenterLPS[2] + m_ProjectionCenterLPS[0];
|
|
||||||
|
|
||||||
// Map user to the projection center
|
|
||||||
TransformType::Pointer m_IsoTransformZeroAtCTOrigin =
|
|
||||||
MapTransformToNewOrigin (
|
|
||||||
m_RTIsocenterLPSNEG,
|
|
||||||
translation,
|
|
||||||
m_TransformRotations
|
|
||||||
);
|
|
||||||
|
|
||||||
TransformType::Pointer m_OutputTransform =
|
|
||||||
TransformType::New();
|
|
||||||
m_OutputTransform ->SetComputeZYX(true);
|
|
||||||
m_OutputTransform ->SetIdentity();
|
|
||||||
|
|
||||||
TransformType::OutputVectorType translation_Out;
|
|
||||||
translation_Out[0] =
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetTranslation()[0] +
|
|
||||||
m_ImportOffsetLPS[0] +
|
|
||||||
m_ProjectionCenterLPS[0];
|
|
||||||
translation_Out[1] =
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetTranslation()[1] +
|
|
||||||
m_ImportOffsetLPS[1] +
|
|
||||||
m_ProjectionCenterLPS[1];
|
|
||||||
translation_Out[2] =
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetTranslation()[2] +
|
|
||||||
m_ImportOffsetLPS[2] +
|
|
||||||
m_ProjectionCenterLPS[2];
|
|
||||||
|
|
||||||
m_OutputTransform->SetTranslation(
|
|
||||||
translation_Out);
|
|
||||||
|
|
||||||
m_OutputTransform->SetRotation(
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetAngleX(),
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetAngleY(),
|
|
||||||
m_IsoTransformZeroAtCTOrigin->GetAngleZ());
|
|
||||||
|
|
||||||
m_OutputTransform->SetCenter(
|
|
||||||
m_ProjectionCenterLPS);
|
|
||||||
|
|
||||||
return m_OutputTransform;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
itkImageProcessor::TransformType::Pointer
|
itkImageProcessor::TransformType::Pointer
|
||||||
itkImageProcessor::CalculateInternalTransformV2(
|
itkImageProcessor::CalculateInternalTransformV2(
|
||||||
|
@ -294,16 +294,7 @@ private:
|
|||||||
InternalImageType::DirectionType m_IECtoLPSDirections
|
InternalImageType::DirectionType m_IECtoLPSDirections
|
||||||
);
|
);
|
||||||
|
|
||||||
TransformType::Pointer
|
|
||||||
CalculateInternalTransformV2(
|
|
||||||
ImageType3D::PointType m_ImportOffsetLPS,
|
|
||||||
ImageType3D::PointType m_RotationOffsetIEC,
|
|
||||||
ImageType3D::PointType m_TranslationUserIEC,
|
|
||||||
ImageType3D::PointType m_RotationUserIEC,
|
|
||||||
ImageType3D::PointType m_ProjectionCenterLPS,
|
|
||||||
ImageType3D::PointType m_RTIsocenterLPS,
|
|
||||||
InternalImageType::DirectionType m_IECtoLPSDirections
|
|
||||||
);
|
|
||||||
|
|
||||||
TransformType::Pointer
|
TransformType::Pointer
|
||||||
transform1,
|
transform1,
|
||||||
|
Reference in New Issue
Block a user