Working on modeling panel offset:
- panel offset moved to gSiddon, output image w/ offset are available to reg23 - calibration in settings.ini is a mix of fitting and manual review in SRT - calibration images reviewed (all: short long AP PA) - Test with validation dataset is good. However only for IECS2CT2 w/ translations only. Import offset and hidden transform confuse the situation. Unclear if should be used or not when w/o resildual wrt LT is belo 0.3 - registration dialog is modal.'
This commit is contained in:
@ -752,7 +752,7 @@ int itkImageProcessor::fill3DVolumeMeta(
|
||||
|
||||
// std::cout<< "OriginLPS"<< m_CTMetaInfo->GetOriginLPS() <<std::endl;
|
||||
// std::cout<< "COV"<< m_CTMetaInfo->GetCOV() <<std::endl;
|
||||
// std::cout<< "ImportOffset"<< m_CTMetaInfo->GetImportOffset() <<std::endl;
|
||||
std::cout<< "ImportOffset"<< m_CTMetaInfo->GetImportOffset() <<std::endl;
|
||||
// std::cout<< "LPS2IEC"<< m_CTMetaInfo->GetLPS2IECDirections() <<std::endl;
|
||||
// std::cout<< "Size"<< m_CTMetaInfo->GetSize() <<std::endl;
|
||||
// std::cout<< "Spacing"<< m_CTMetaInfo->GetSpacing() <<std::endl;
|
||||
@ -1428,6 +1428,9 @@ itkImageProcessor::CalculateInternalTransform(
|
||||
m_OutputTransform->SetCenter(
|
||||
m_ProjectionTransformCenter);
|
||||
|
||||
|
||||
std::cout<<m_OutputTransform<<std::endl;
|
||||
|
||||
return
|
||||
m_OutputTransform;
|
||||
}
|
||||
@ -1892,6 +1895,12 @@ void itkImageProcessor::InitializeProjector()
|
||||
m_DRTImage1MetaInfo->GetSCD());
|
||||
interpolator1->SetThreshold(
|
||||
m_DRTGeometryMetaInfo->GetIntensityThreshold() );
|
||||
interpolator1->SetPanelOffset(
|
||||
m_DRTGeometryMetaInfo->GetPanel1Offset());
|
||||
std::cout<<
|
||||
"00000000000000 IP1 m_DRTGeometryMetaInfo->GetPanel2Offset()"
|
||||
<<m_DRTGeometryMetaInfo->GetPanel1Offset()<<std::endl;
|
||||
|
||||
interpolator1->SetTransform(transform1);
|
||||
interpolator1->Initialize();
|
||||
|
||||
@ -1962,6 +1971,12 @@ void itkImageProcessor::InitializeProjector()
|
||||
m_DRTImage2MetaInfo->GetSCD() );
|
||||
interpolator2->SetThreshold(
|
||||
m_DRTGeometryMetaInfo->GetIntensityThreshold() );
|
||||
interpolator2->SetPanelOffset(
|
||||
m_DRTGeometryMetaInfo->GetPanel2Offset());
|
||||
std::cout<<
|
||||
"00000000000000 IP2 m_DRTGeometryMetaInfo->GetPanel2Offset()"
|
||||
<<m_DRTGeometryMetaInfo->GetPanel2Offset()<<std::endl;
|
||||
|
||||
interpolator2->SetTransform(transform2);
|
||||
interpolator2->Initialize();
|
||||
|
||||
@ -2261,14 +2276,14 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
||||
//m_DRTGeometryMetaInfo->GetProjectionAngle1IEC(),// m_DRTImage1MetaInfo->GetProjectionAngleLPS(),
|
||||
Std_DRT2LPS
|
||||
) -
|
||||
) /*-
|
||||
CalcDRTImageOffset(
|
||||
PanelOffsetIEC1,
|
||||
this->CalcProjectionAngleLPS(
|
||||
m_CTMetaInfo->GetPatientOrientation(),
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
||||
Std_DRT2LPS
|
||||
)
|
||||
)*/
|
||||
|
||||
);
|
||||
std::cout<<"CALIBRATION GetOriginLPS "<<m_DRTImage1MetaInfo->GetOriginLPS()<<std::endl;
|
||||
@ -2290,15 +2305,15 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetSize()"<< m_DRTImage1MetaInfo->GetSize() <<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetSpacing()"<< m_DRTImage1MetaInfo->GetSpacing() <<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetOrigin()"<< m_DRTImage1MetaInfo->GetOrigin() <<std::endl;
|
||||
std::cout<<"CalcDRTImageOffset1"<< CalcDRTImageOffset(
|
||||
PanelOffsetIEC1,
|
||||
this->CalcProjectionAngleLPS(
|
||||
m_CTMetaInfo->GetPatientOrientation(),
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
||||
Std_DRT2LPS
|
||||
) <<std::endl;
|
||||
// std::cout<<"CalcDRTImageOffset1"<< CalcDRTImageOffset(
|
||||
// PanelOffsetIEC1,
|
||||
// this->CalcProjectionAngleLPS(
|
||||
// m_CTMetaInfo->GetPatientOrientation(),
|
||||
// m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() ),
|
||||
// Std_DRT2LPS
|
||||
// ) <<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetCOV()"<< m_DRTImage1MetaInfo->GetCOV() <<std::endl;
|
||||
std::cout<<"m_DRTImage1MetaInfo->GetOriginLPS()"<< m_DRTImage1MetaInfo->GetOriginLPS() <<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetOriginLPS()"<< m_DRTImage1MetaInfo->GetOriginLPS() <<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetProjectionAngleLPS()"<<m_DRTImage1MetaInfo->GetProjectionAngleLPS()<<std::endl;
|
||||
// std::cout<<"m_DRTImage1MetaInfo->GetImageDirectionsLPS()"<< m_DRTImage1MetaInfo->GetImageDirectionsLPS() <<std::endl;
|
||||
|
||||
@ -2401,14 +2416,14 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC()) ,
|
||||
//m_DRTGeometryMetaInfo->GetProjectionAngle2IEC(),//m_DRTImage2MetaInfo->GetProjectionAngleLPS(),
|
||||
Std_DRT2LPS
|
||||
) -
|
||||
) /*-
|
||||
CalcDRTImageOffset(
|
||||
PanelOffsetIEC2,
|
||||
this->CalcProjectionAngleLPS(
|
||||
m_CTMetaInfo->GetPatientOrientation(),
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC() ),
|
||||
Std_DRT2LPS
|
||||
)
|
||||
)*/
|
||||
|
||||
);
|
||||
|
||||
@ -2427,13 +2442,13 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetSize()"<< m_DRTImage2MetaInfo->GetSize() <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetSpacing()"<< m_DRTImage2MetaInfo->GetSpacing() <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetOrigin()"<< m_DRTImage2MetaInfo->GetOrigin() <<std::endl;
|
||||
std::cout<<"CalcDRTImageOffset2"<< CalcDRTImageOffset(
|
||||
PanelOffsetIEC2,
|
||||
this->CalcProjectionAngleLPS(
|
||||
m_CTMetaInfo->GetPatientOrientation(),
|
||||
m_DRTGeometryMetaInfo->GetProjectionAngle2IEC() ),
|
||||
Std_DRT2LPS
|
||||
) <<std::endl;
|
||||
// std::cout<<"CalcDRTImageOffset2"<< CalcDRTImageOffset(
|
||||
// PanelOffsetIEC2,
|
||||
// this->CalcProjectionAngleLPS(
|
||||
// m_CTMetaInfo->GetPatientOrientation(),
|
||||
// m_DRTGeometryMetaInfo->GetProjectionAngle2IEC() ),
|
||||
// Std_DRT2LPS
|
||||
// ) <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetCOV()"<< m_DRTImage2MetaInfo->GetCOV() <<std::endl;
|
||||
std::cout<<"m_DRTImage2MetaInfo->GetOriginLPS() - Offset "<< m_DRTImage2MetaInfo->GetOriginLPS() <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetProjectionAngleLPS()"<<m_DRTImage2MetaInfo->GetProjectionAngleLPS()<<std::endl;
|
||||
@ -2469,22 +2484,22 @@ itkImageProcessor::CalcDRTImageOrigin(
|
||||
NewOrigin;
|
||||
}
|
||||
|
||||
itkImageProcessor::ImageType3D::PointType
|
||||
itkImageProcessor::CalcDRTImageOffset(
|
||||
ImageType3D::PointType m_DRTOffset,
|
||||
double dAngle,
|
||||
InternalImageType::DirectionType stdDRT2LPS
|
||||
){
|
||||
//itkImageProcessor::ImageType3D::PointType
|
||||
//itkImageProcessor::CalcDRTImageOffset(
|
||||
// ImageType3D::PointType m_DRTOffset,
|
||||
// double dAngle,
|
||||
// InternalImageType::DirectionType stdDRT2LPS
|
||||
// ){
|
||||
|
||||
itkImageProcessor::InternalImageType::DirectionType DRT2LPS
|
||||
= this->CalcDRTImageDirections(dAngle, stdDRT2LPS);
|
||||
// itkImageProcessor::InternalImageType::DirectionType DRT2LPS
|
||||
// = this->CalcDRTImageDirections(dAngle, stdDRT2LPS);
|
||||
|
||||
ImageType3D::PointType NewOffset =
|
||||
DRT2LPS * (m_DRTOffset);
|
||||
// ImageType3D::PointType NewOffset =
|
||||
// DRT2LPS * (m_DRTOffset);
|
||||
|
||||
return
|
||||
NewOffset;
|
||||
}
|
||||
// return
|
||||
// NewOffset;
|
||||
//}
|
||||
|
||||
|
||||
void itkImageProcessor::GetProjectionImages(){
|
||||
|
@ -345,12 +345,12 @@ private:
|
||||
);
|
||||
|
||||
|
||||
ImageType3D::PointType
|
||||
CalcDRTImageOffset(
|
||||
ImageType3D::PointType m_DRTOffset,
|
||||
double dAngle,
|
||||
InternalImageType::DirectionType stdDRT2LPS
|
||||
);
|
||||
// ImageType3D::PointType
|
||||
// CalcDRTImageOffset(
|
||||
// ImageType3D::PointType m_DRTOffset,
|
||||
// double dAngle,
|
||||
// InternalImageType::DirectionType stdDRT2LPS
|
||||
// );
|
||||
|
||||
TransformType::Pointer
|
||||
MapTransformToNewOrigin(
|
||||
|
@ -182,6 +182,10 @@ public:
|
||||
itkSetMacro(Threshold, double);
|
||||
itkGetMacro(Threshold, double);
|
||||
|
||||
/** Set and get the Panel Offset */
|
||||
itkSetMacro(PanelOffset, double);
|
||||
itkGetMacro(PanelOffset, double);
|
||||
|
||||
/** Check if a point is inside the image buffer.
|
||||
* \warning For efficiency, no validity checking of
|
||||
* the input image pointer is done. */
|
||||
@ -232,6 +236,7 @@ protected:
|
||||
double m_Threshold;
|
||||
double m_FocalPointToIsocenterDistance; // Focal point to isocenter distance
|
||||
double m_ProjectionAngle; // Linac gantry rotation angle in radians
|
||||
double m_PanelOffset;
|
||||
|
||||
private:
|
||||
void
|
||||
|
@ -62,6 +62,7 @@ gSiddonJacobsRayCastInterpolateImageFunction<TInputImage, TCoordRep>::gSiddonJac
|
||||
m_FocalPointToIsocenterDistance = 1000.; // Focal point to isocenter distance in mm.
|
||||
m_ProjectionAngle = 0.; // Angle in radians betweeen projection central axis and reference axis
|
||||
m_Threshold = 0.; // Intensity threshold, below which is ignored.
|
||||
m_PanelOffset = 0.;
|
||||
|
||||
m_SourcePoint[0] = 0.;
|
||||
m_SourcePoint[1] = 0.;
|
||||
@ -148,14 +149,15 @@ gSiddonJacobsRayCastInterpolateImageFunction<TInputImage, TCoordRep>::Evaluate(c
|
||||
// m_SourceWorld = m_InverseTransform->TransformPoint(m_SourcePoint);
|
||||
}
|
||||
|
||||
PointType PointReq = point;
|
||||
PointReq[0] += m_PanelOffset;
|
||||
|
||||
drrPixelWorld = m_InverseTransform->TransformPoint(point);
|
||||
drrPixelWorld = m_InverseTransform->TransformPoint(PointReq);
|
||||
|
||||
PointType SlidingSourcePoint = m_SourcePoint;
|
||||
SlidingSourcePoint[0] = 0.;
|
||||
SlidingSourcePoint[1] = point[1];
|
||||
SlidingSourcePoint[2] = 0.;
|
||||
//PointType SourceWorld = m_InverseTransform->TransformPoint(m_SourcePoint);
|
||||
PointType SourceWorld = m_InverseTransform->TransformPoint(SlidingSourcePoint);
|
||||
|
||||
//std::cout<<"SourceWorld: "<<SourceWorld<<std::endl;
|
||||
|
Reference in New Issue
Block a user