Working version of issue #32. Everything works fine. New settings.ini is noyt uploaded to repo has there is a minor inconsistency in settings on my MAC. Needs to double check modifications to itkImageProcessor (very minor)
This commit is contained in:
@ -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: "<<pcFName<<endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Check if it's a localizer image */
|
||||
const gdcm::File &file = R.GetFile();
|
||||
const gdcm::DataSet &ds = file.GetDataSet();
|
||||
|
||||
char* sTmpString = new char [255];
|
||||
strcpy( sTmpString,gGetStringValueFromTag(gdcm::Tag(0x0018,0x1100), ds));
|
||||
|
||||
return std::atoi(sTmpString);
|
||||
}
|
||||
|
||||
|
||||
double itkImageProcessor::GetLocalizerDisplayWindowLevel(int iImg)
|
||||
{
|
||||
|
||||
@ -1694,7 +1721,17 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
IsocenterOffsetLPS[2];
|
||||
|
||||
|
||||
m_DRTImage1MetaInfo->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(
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
int load3DSerieFromFiles( std::vector<std::string> );
|
||||
|
||||
int load2D(const char *);
|
||||
int query2DimageReconstructionDiameter(const char*);
|
||||
|
||||
void loadRTPlanInfo(double, double, double, double, double ,double);
|
||||
|
||||
|
Reference in New Issue
Block a user