Calculation of offset in PAT and rework of signals to approval.
- offset calc is verified against outside script. To be careful now in case we want to exclude the rotations from import offset. For PAT calc we need the complete matrix, therefore we may need to filter the rotations somewhere else. - initial work on signal of current transform. was based on readout of spin box. i would use internal storage and check it against spin. - i leave it broken so that we know where to continue
This commit is contained in:
@ -204,12 +204,36 @@ itkImageProcessor::~itkImageProcessor()
|
||||
}
|
||||
|
||||
void itkImageProcessor::SetNumberOfWorkingUnits(int iN){
|
||||
if(iN>0){
|
||||
if(iN>0 && iN<50){
|
||||
iNWUnits = iN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const CTVolumeImageMetaInformation::Pointer
|
||||
itkImageProcessor::GetCTMetaInfo(
|
||||
){
|
||||
|
||||
return m_CTMetaInfo;
|
||||
|
||||
}
|
||||
|
||||
const RTGeometryMetaInformation::Pointer
|
||||
itkImageProcessor::GetRTMetaInfo(
|
||||
){
|
||||
|
||||
return m_RTMetaInfo;
|
||||
|
||||
}
|
||||
|
||||
const DRTProjectionGeometryImageMetaInformation::Pointer
|
||||
itkImageProcessor::GetDRTGeoMetaInfo(){
|
||||
|
||||
return m_DRTGeometryMetaInfo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void itkImageProcessor::PrintSelf(std::ostream& os, Indent indent) const
|
||||
{
|
||||
Superclass::PrintSelf(os, indent);
|
||||
@ -262,7 +286,6 @@ double itkImageProcessor::GetPanelOffset2(){
|
||||
|
||||
void itkImageProcessor::SetDegreeOfFreedom(tDegreeOfFreedomEnum dof)
|
||||
{
|
||||
// m_TransformMetaInfo->SetDegreeOfFreedom(dof);
|
||||
m_r23MetaInfo->SetDegreeOfFreedom(dof);
|
||||
}
|
||||
|
||||
@ -271,7 +294,6 @@ itkImageProcessor::GetDegreeOfFreedom()
|
||||
{
|
||||
return
|
||||
m_r23MetaInfo->GetDegreeOfFreedom();
|
||||
//m_TransformMetaInfo->GetDegreeOfFreedom();
|
||||
}
|
||||
|
||||
void itkImageProcessor::SetCustom_ImportTransform(double dTx,
|
||||
@ -2697,24 +2719,24 @@ itkImageProcessor::GetCompleteIsocentricTransform
|
||||
|
||||
if(m_TransformMetaInfo == nullptr ||
|
||||
m_CTMetaInfo == nullptr){
|
||||
return regTransform;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::cout<<" --- GetCompleteIsocentricTransform --- "<<std::endl;
|
||||
// std::cout<<" --- GetCompleteIsocentricTransform --- "<<std::endl;
|
||||
|
||||
std::cout<< "R: "<<
|
||||
m_TransformMetaInfo->GetR()[0] <<" "<<
|
||||
m_TransformMetaInfo->GetR()[1] <<" "<<
|
||||
m_TransformMetaInfo->GetR()[2] <<" "<<std::endl;
|
||||
std::cout<< "T: "<<
|
||||
m_TransformMetaInfo->GetT()[0] <<" "<<
|
||||
m_TransformMetaInfo->GetT()[1] <<" "<<
|
||||
m_TransformMetaInfo->GetT()[2] <<" "<<std::endl;
|
||||
std::cout<< "Import Offset: "<<
|
||||
m_CTMetaInfo->GetImportOffset()[0]<<" "<<
|
||||
m_CTMetaInfo->GetImportOffset()[1]<<" "<<
|
||||
m_CTMetaInfo->GetImportOffset()[2]<<" "<<std::endl;
|
||||
std::cout<<" --- --- --- "<<std::endl;
|
||||
// std::cout<< "R: "<<
|
||||
// m_TransformMetaInfo->GetR()[0] <<" "<<
|
||||
// m_TransformMetaInfo->GetR()[1] <<" "<<
|
||||
// m_TransformMetaInfo->GetR()[2] <<" "<<std::endl;
|
||||
// std::cout<< "T: "<<
|
||||
// m_TransformMetaInfo->GetT()[0] <<" "<<
|
||||
// m_TransformMetaInfo->GetT()[1] <<" "<<
|
||||
// m_TransformMetaInfo->GetT()[2] <<" "<<std::endl;
|
||||
// std::cout<< "Import Offset: "<<
|
||||
// m_CTMetaInfo->GetImportOffset()[0]<<" "<<
|
||||
// m_CTMetaInfo->GetImportOffset()[1]<<" "<<
|
||||
// m_CTMetaInfo->GetImportOffset()[2]<<" "<<std::endl;
|
||||
// std::cout<<" --- --- --- "<<std::endl;
|
||||
|
||||
ImageType3D::PointType mISORTIEC =
|
||||
m_CTMetaInfo->GetLPS2IECDirections() * m_RTMetaInfo->GetIsocenterLPS();
|
||||
@ -2744,56 +2766,10 @@ itkImageProcessor::GetCompleteIsocentricTransform
|
||||
pZero.Fill(0.);
|
||||
mTransf->SetCenter(pZero);
|
||||
|
||||
std::cout<<"mTransf R"<< mTransf->GetMatrix().GetVnlMatrix() << std::endl;
|
||||
std::cout<<"mTransf T"<< mTransf->GetTranslation() << std::endl;
|
||||
|
||||
return mTransf;
|
||||
}
|
||||
|
||||
|
||||
// THIS IS READ FOR EXPORT. TO FIX.
|
||||
//double* itkImageProcessor::GetTransformParameters(){
|
||||
|
||||
// ImageType3D::PointType Translations;
|
||||
// ImageType3D::PointType Rotations;
|
||||
|
||||
|
||||
|
||||
// Translations = m_TransformMetaInfo->GetUserTranslations();
|
||||
// Rotations = m_TransformMetaInfo->GetUserRotations();
|
||||
|
||||
// dTransfParam[0] = Translations[0];
|
||||
// dTransfParam[1] = Translations[1];
|
||||
// dTransfParam[2] = Translations[2];
|
||||
|
||||
// dTransfParam[3] = Rotations[0];
|
||||
// dTransfParam[4] = Rotations[1];
|
||||
// dTransfParam[5] = Rotations[2];
|
||||
|
||||
// return dTransfParam;
|
||||
//}
|
||||
|
||||
//// THESE ARE CALLED AT THE END OF REG
|
||||
//void itkImageProcessor::GetFinalTranslations(double& dX, double& dY, double& dZ)
|
||||
//{
|
||||
// ImageType3D::PointType userTranslations = m_TransformMetaInfo->GetUserTranslations();
|
||||
|
||||
// dX = userTranslations[0];
|
||||
// dY = userTranslations[1];
|
||||
// dZ = userTranslations[2];
|
||||
//}
|
||||
|
||||
//// THESE ARE CALLED AT THE END OF REG
|
||||
//void itkImageProcessor::GetFinalRotations(double& dRX, double& dRY, double& dRZ)
|
||||
//{
|
||||
// ImageType3D::PointType userRotations = m_TransformMetaInfo->GetUserRotations();
|
||||
|
||||
// dRX = userRotations[0];
|
||||
// dRY = userRotations[1];
|
||||
// dRZ = userRotations[2];
|
||||
|
||||
//}
|
||||
|
||||
double itkImageProcessor::GetOptimizerValue()
|
||||
{
|
||||
return m_OptmizerValue;
|
||||
|
@ -140,7 +140,8 @@ public:
|
||||
void SetInitialTranslations(double, double, double);
|
||||
void SetInitialRotations(double, double, double);
|
||||
|
||||
|
||||
/** Returns user components only of the autoReg
|
||||
* */
|
||||
Optimizer::ParametersType
|
||||
GetFinalR23Parameters();
|
||||
|
||||
@ -166,6 +167,17 @@ public:
|
||||
Optimizer::ParametersType
|
||||
GetUserIsocentricTransform();
|
||||
|
||||
/** Return useful meta info for external use
|
||||
* Consumer should check for nullptr...
|
||||
*/
|
||||
const CTVolumeImageMetaInformation::Pointer
|
||||
GetCTMetaInfo();
|
||||
|
||||
const RTGeometryMetaInformation::Pointer
|
||||
GetRTMetaInfo();
|
||||
|
||||
const DRTProjectionGeometryImageMetaInformation::Pointer
|
||||
GetDRTGeoMetaInfo();
|
||||
|
||||
/** Initialize projection geometry */
|
||||
void InitializeProjector();
|
||||
|
Reference in New Issue
Block a user