REG working

This commit is contained in:
Proton local user
2023-05-03 16:43:52 +02:00
parent 97674c6b4b
commit b0beda81b8

View File

@ -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 "<<startParameters<<std::endl;
std::cout<<"finalParameters "<<finalParameters<<std::endl;
std::cout<<"finalParametersDelta "<<finalParameters<<std::endl;
std::cout<<"transform1 "<<transform1->GetCenter()<<std::endl;
std::cout<<"transform1 "<<transform1->GetTranslation()<<std::endl;
std::cout<<"transform2 "<<transform2->GetCenter()<<std::endl;
std::cout<<"transform2 "<<transform2->GetTranslation()<<std::endl;
TransformType::Pointer offsetTransform = TransformType::New();
offsetTransform->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;