REG working
This commit is contained in:
@ -1495,11 +1495,6 @@ void itkImageProcessor::InitializeRegistration(
|
|||||||
TransformType::Pointer CurrTransform;
|
TransformType::Pointer CurrTransform;
|
||||||
if(m_RTMetaInfo == NULL)
|
if(m_RTMetaInfo == NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
//AAAAAA TODOOOOO CERCA
|
|
||||||
ImageType3D::PointType pFakeIsoLPS =
|
|
||||||
m_DRTImage1MetaInfo->GetProjectionOriginLPS();
|
|
||||||
|
|
||||||
CurrTransform =
|
CurrTransform =
|
||||||
CalculateInternalTransformV2(
|
CalculateInternalTransformV2(
|
||||||
ZeroPoint,
|
ZeroPoint,
|
||||||
@ -1545,9 +1540,6 @@ void itkImageProcessor::InitializeRegistration(
|
|||||||
/********* BEGIN CALCULATION OF INTERNAL TRANSFORM FOR PROJ2 *********/
|
/********* BEGIN CALCULATION OF INTERNAL TRANSFORM FOR PROJ2 *********/
|
||||||
if(m_RTMetaInfo == NULL)
|
if(m_RTMetaInfo == NULL)
|
||||||
{
|
{
|
||||||
ImageType3D::PointType pFakeIsoLPS =
|
|
||||||
m_DRTImage2MetaInfo->GetProjectionOriginLPS();
|
|
||||||
|
|
||||||
CurrTransform =
|
CurrTransform =
|
||||||
CalculateInternalTransformV2(
|
CalculateInternalTransformV2(
|
||||||
ZeroPoint,
|
ZeroPoint,
|
||||||
@ -1743,10 +1735,20 @@ int itkImageProcessor::StartRegistration(std::string extraInfo)
|
|||||||
|
|
||||||
m_OptmizerValue = optimizer->GetValue();
|
m_OptmizerValue = optimizer->GetValue();
|
||||||
|
|
||||||
|
|
||||||
auto finalParameters = transform1->GetParameters();
|
auto finalParameters = transform1->GetParameters();
|
||||||
optimizer->GetCurrentPosition();
|
//optimizer->GetCurrentPosition();
|
||||||
finalParameters = finalParameters - startParameters;
|
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();
|
TransformType::Pointer offsetTransform = TransformType::New();
|
||||||
offsetTransform->SetParameters(finalParameters);
|
offsetTransform->SetParameters(finalParameters);
|
||||||
|
|
||||||
@ -1784,6 +1786,7 @@ void itkImageProcessor::InitializeProjector()
|
|||||||
m_DRTGeometryMetaInfo == NULL ||
|
m_DRTGeometryMetaInfo == NULL ||
|
||||||
m_TransformMetaInfo == NULL ){
|
m_TransformMetaInfo == NULL ){
|
||||||
//TODO
|
//TODO
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double dtr = (atan(1.0) * 4.0) / 180.0;
|
const double dtr = (atan(1.0) * 4.0) / 180.0;
|
||||||
@ -2181,7 +2184,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
|||||||
this->CalcProjectionAngleLPS(
|
this->CalcProjectionAngleLPS(
|
||||||
m_CTMetaInfo->GetPatientOrientation(),
|
m_CTMetaInfo->GetPatientOrientation(),
|
||||||
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
||||||
//m_DRTGeometryMetaInfo->GetProjectionAngle1IEC(),// m_DRTImage1MetaInfo->GetProjectionAngleLPS(),
|
|
||||||
Std_DRT2LPS
|
Std_DRT2LPS
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2192,7 +2194,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
|||||||
this->CalcProjectionAngleLPS(
|
this->CalcProjectionAngleLPS(
|
||||||
m_CTMetaInfo->GetPatientOrientation(),
|
m_CTMetaInfo->GetPatientOrientation(),
|
||||||
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC()),
|
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC()),
|
||||||
//m_DRTGeometryMetaInfo->GetProjectionAngle1IEC(),//m_DRTImage1MetaInfo->GetProjectionAngleLPS(),
|
|
||||||
Std_DRT2LPS)
|
Std_DRT2LPS)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2260,7 +2261,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
|||||||
this->CalcProjectionAngleLPS(
|
this->CalcProjectionAngleLPS(
|
||||||
m_CTMetaInfo->GetPatientOrientation(),
|
m_CTMetaInfo->GetPatientOrientation(),
|
||||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
||||||
//m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(),
|
|
||||||
Std_DRT2LPS
|
Std_DRT2LPS
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -2273,7 +2273,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
|||||||
this->CalcProjectionAngleLPS(
|
this->CalcProjectionAngleLPS(
|
||||||
m_CTMetaInfo->GetPatientOrientation(),
|
m_CTMetaInfo->GetPatientOrientation(),
|
||||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
||||||
//m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(),
|
|
||||||
Std_DRT2LPS
|
Std_DRT2LPS
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2284,7 +2283,6 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
|||||||
this->CalcProjectionAngleLPS(
|
this->CalcProjectionAngleLPS(
|
||||||
m_CTMetaInfo->GetPatientOrientation(),
|
m_CTMetaInfo->GetPatientOrientation(),
|
||||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
||||||
//m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(),
|
|
||||||
Std_DRT2LPS)
|
Std_DRT2LPS)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2326,6 +2324,7 @@ void itkImageProcessor::GetProjectionImages(){
|
|||||||
m_DRTGeometryMetaInfo == NULL ||
|
m_DRTGeometryMetaInfo == NULL ||
|
||||||
m_TransformMetaInfo == NULL ){
|
m_TransformMetaInfo == NULL ){
|
||||||
//TODO
|
//TODO
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double dtr = (atan(1.0) * 4.0) / 180.0;
|
const double dtr = (atan(1.0) * 4.0) / 180.0;
|
||||||
|
Reference in New Issue
Block a user