diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp index c1d01e4..6ccc350 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp @@ -239,6 +239,7 @@ void itkImageProcessor::SetSCDOffset(double dOff1, double dOff2) { m_DRTGeometryMetaInfo->SetSCD1Offset(dOff1); m_DRTGeometryMetaInfo->SetSCD2Offset(dOff2); + } void itkImageProcessor::SetSCD(double dDist1, double dDist2) @@ -382,6 +383,9 @@ void itkImageProcessor::SetCustom_2Dsize(int nX1, int nY1,int nX2,int nY2) } void itkImageProcessor::SetCustom_UpdateMetaInfo(){ + + + this->UpdateProjectionGeometryMeta(); } @@ -852,6 +856,8 @@ void itkImageProcessor::SetProjectionAngleOffsetIEC(double dOff1, double dOff2) { m_DRTGeometryMetaInfo->SetProjectionAngle1OffsetIEC(dOff1); m_DRTGeometryMetaInfo->SetProjectionAngle2OffsetIEC(dOff2); + + std::cout << "SetProjectionAngleOffsetIEC " << dOff1 << " " << dOff2 << std::endl; } @@ -1106,6 +1112,27 @@ int itkImageProcessor::load2D(const char * pcFName){ } +int itkImageProcessor::query2DimageReconstructionDiameter(const char *pcFName){ + + /* Check if we can open the file */ + gdcm::Reader R; + R.SetFileName(pcFName); + if(!R.Read()) + { cerr<<"ERROR: cannot read file: "<SetProjectionAngleLPS( + this->CalcProjectionAngleLPS( + m_CTMetaInfo->GetPatientOrientation(), + m_DRTGeometryMetaInfo->GetProjectionAngle1IEC() + + m_DRTGeometryMetaInfo->GetProjectionAngle1OffsetIEC()) + ); + m_DRTImage1MetaInfo->SetSCD( + m_DRTGeometryMetaInfo->GetSCD1() + + m_DRTGeometryMetaInfo->GetSCD1Offset() + ); m_DRTImage1MetaInfo->SetProjectionOriginLPS( CalibratedIsocenterLPS); @@ -1781,6 +1818,17 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){ IsocenterOffsetLPS[2]; + m_DRTImage2MetaInfo->SetProjectionAngleLPS( + this->CalcProjectionAngleLPS( + m_CTMetaInfo->GetPatientOrientation(), + m_DRTGeometryMetaInfo->GetProjectionAngle2IEC() + + m_DRTGeometryMetaInfo->GetProjectionAngle2OffsetIEC()) + ); + + m_DRTImage2MetaInfo->SetSCD( + m_DRTGeometryMetaInfo->GetSCD2()+ + m_DRTGeometryMetaInfo->GetSCD2Offset() + ); m_DRTImage2MetaInfo->SetProjectionOriginLPS( diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.h b/reg23Topograms/itkDTRrecon/itkImageProcessor.h index 079e33a..4ae4bbe 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.h +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.h @@ -76,6 +76,7 @@ public: int load3DSerieFromFiles( std::vector ); int load2D(const char *); + int query2DimageReconstructionDiameter(const char*); void loadRTPlanInfo(double, double, double, double, double ,double);