From b0beda81b86f9465215b60c4b15de3942be09de7 Mon Sep 17 00:00:00 2001 From: Proton local user Date: Wed, 3 May 2023 16:43:52 +0200 Subject: [PATCH] REG working --- .../itkDTRrecon/itkImageProcessor.cpp | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp index 8af1bf8..63925cc 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp @@ -1495,11 +1495,6 @@ void itkImageProcessor::InitializeRegistration( TransformType::Pointer CurrTransform; if(m_RTMetaInfo == NULL) { - - //AAAAAA TODOOOOO CERCA - ImageType3D::PointType pFakeIsoLPS = - m_DRTImage1MetaInfo->GetProjectionOriginLPS(); - CurrTransform = CalculateInternalTransformV2( ZeroPoint, @@ -1545,9 +1540,6 @@ void itkImageProcessor::InitializeRegistration( /********* BEGIN CALCULATION OF INTERNAL TRANSFORM FOR PROJ2 *********/ if(m_RTMetaInfo == NULL) { - ImageType3D::PointType pFakeIsoLPS = - m_DRTImage2MetaInfo->GetProjectionOriginLPS(); - CurrTransform = CalculateInternalTransformV2( ZeroPoint, @@ -1743,10 +1735,20 @@ int itkImageProcessor::StartRegistration(std::string extraInfo) m_OptmizerValue = optimizer->GetValue(); + auto finalParameters = transform1->GetParameters(); - optimizer->GetCurrentPosition(); + //optimizer->GetCurrentPosition(); finalParameters = finalParameters - startParameters; + std::cout<<"startParameters "<GetCenter()<GetTranslation()<GetCenter()<GetTranslation()<SetParameters(finalParameters); @@ -1784,6 +1786,7 @@ void itkImageProcessor::InitializeProjector() m_DRTGeometryMetaInfo == NULL || m_TransformMetaInfo == NULL ){ //TODO + return; } const double dtr = (atan(1.0) * 4.0) / 180.0; @@ -2181,7 +2184,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ this->CalcProjectionAngleLPS( m_CTMetaInfo->GetPatientOrientation(), m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ), - //m_DRTGeometryMetaInfo->GetProjectionAngle1IEC(),// m_DRTImage1MetaInfo->GetProjectionAngleLPS(), Std_DRT2LPS ) @@ -2192,7 +2194,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ this->CalcProjectionAngleLPS( m_CTMetaInfo->GetPatientOrientation(), m_DRTGeometryMetaInfo->GetProjectionAngle1IEC()), - //m_DRTGeometryMetaInfo->GetProjectionAngle1IEC(),//m_DRTImage1MetaInfo->GetProjectionAngleLPS(), Std_DRT2LPS) ); @@ -2260,7 +2261,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ this->CalcProjectionAngleLPS( m_CTMetaInfo->GetPatientOrientation(), m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) , - //m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(), Std_DRT2LPS )); @@ -2273,7 +2273,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ this->CalcProjectionAngleLPS( m_CTMetaInfo->GetPatientOrientation(), m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) , - //m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(), Std_DRT2LPS ) @@ -2284,7 +2283,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ this->CalcProjectionAngleLPS( m_CTMetaInfo->GetPatientOrientation(), m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) , - //m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(), Std_DRT2LPS) ); @@ -2326,6 +2324,7 @@ void itkImageProcessor::GetProjectionImages(){ m_DRTGeometryMetaInfo == NULL || m_TransformMetaInfo == NULL ){ //TODO + return; } const double dtr = (atan(1.0) * 4.0) / 180.0;