Closing issue #23. The crash is caused by calling render in when the ui handler receives a DRT. As to why this is happening a little more work is required. In general the pipeline needs improvement
This commit is contained in:
@ -331,6 +331,11 @@ void itkImageProcessor::SetCustom_ProjectionCenterFixedAxes_IEC(
|
||||
void itkImageProcessor::SetCustom_2Dres(double nX1,double nY1,double nX2,double nY2)
|
||||
{
|
||||
|
||||
std::cout << "SetCustom_2Dres "
|
||||
<< nX1 << " "
|
||||
<< nY1 << " "
|
||||
<< nX2 << " "
|
||||
<< nY2 << std::endl;
|
||||
|
||||
if(m_DRTGeometryMetaInfo == NULL) {
|
||||
// todo
|
||||
@ -352,6 +357,12 @@ void itkImageProcessor::SetCustom_2Dres(double nX1,double nY1,double nX2,double
|
||||
void itkImageProcessor::SetCustom_2Dsize(int nX1, int nY1,int nX2,int nY2)
|
||||
{
|
||||
|
||||
std::cout << "SetCustom_2Dsize "
|
||||
<< nX1 << " "
|
||||
<< nY1 << " "
|
||||
<< nX2 << " "
|
||||
<< nY2 << std::endl;
|
||||
|
||||
if(m_DRTGeometryMetaInfo == NULL) {
|
||||
// todo
|
||||
}
|
||||
@ -370,6 +381,10 @@ void itkImageProcessor::SetCustom_2Dsize(int nX1, int nY1,int nX2,int nY2)
|
||||
//TODO UPDATE TO FOLLOW
|
||||
}
|
||||
|
||||
void itkImageProcessor::SetCustom_UpdateMetaInfo(){
|
||||
this->UpdateProjectionGeometryMeta();
|
||||
}
|
||||
|
||||
int itkImageProcessor::load3DSerieFromFiles( std::vector<std::string> v_fnames){
|
||||
|
||||
tPatOrientation m_PatOrientation
|
||||
@ -460,7 +475,7 @@ int itkImageProcessor::load3DSerieFromFiles( std::vector<std::string> v_fnames){
|
||||
}
|
||||
catch (itk::ExceptionObject & ex)
|
||||
{
|
||||
std::cout << ex << std::endl;
|
||||
// std::cout << ex << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@ -668,22 +683,22 @@ int itkImageProcessor::fill3DVolumeMeta(
|
||||
m_DRTGeometryMetaInfo->GetSCD2Offset()
|
||||
);
|
||||
|
||||
std::cout<< "///////////////// 3D VOLUME BEG ///////////////" <<std::endl;
|
||||
// std::cout<< "///////////////// 3D VOLUME BEG ///////////////" <<std::endl;
|
||||
|
||||
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<< "LPS2IEC"<< m_CTMetaInfo->GetLPS2IECDirections() <<std::endl;
|
||||
std::cout<< "Size"<< m_CTMetaInfo->GetSize() <<std::endl;
|
||||
std::cout<< "Spacing"<< m_CTMetaInfo->GetSpacing() <<std::endl;
|
||||
// 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<< "LPS2IEC"<< m_CTMetaInfo->GetLPS2IECDirections() <<std::endl;
|
||||
// std::cout<< "Size"<< m_CTMetaInfo->GetSize() <<std::endl;
|
||||
// std::cout<< "Spacing"<< m_CTMetaInfo->GetSpacing() <<std::endl;
|
||||
|
||||
std::cout<< "pAngleLPS1"<< m_DRTImage1MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
std::cout<< "SCD1"<< m_DRTImage1MetaInfo->GetSCD() <<std::endl;
|
||||
// std::cout<< "pAngleLPS1"<< m_DRTImage1MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
// std::cout<< "SCD1"<< m_DRTImage1MetaInfo->GetSCD() <<std::endl;
|
||||
|
||||
std::cout<< "pAngleLPS2"<< m_DRTImage2MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
std::cout<< "SCD2"<< m_DRTImage2MetaInfo->GetSCD() <<std::endl;
|
||||
// std::cout<< "pAngleLPS2"<< m_DRTImage2MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
// std::cout<< "SCD2"<< m_DRTImage2MetaInfo->GetSCD() <<std::endl;
|
||||
|
||||
std::cout<< "///////////////// 3D VOLUME END ///////////////" <<std::endl;
|
||||
// std::cout<< "///////////////// 3D VOLUME END ///////////////" <<std::endl;
|
||||
|
||||
this->UpdateProjectionGeometryMeta();
|
||||
|
||||
@ -860,7 +875,7 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
strcpy( sTmpString,gGetStringValueFromTag( gdcm::Tag(0x0008,0x0008), ds));
|
||||
std::string sLocalizerString = "LOCALIZER";
|
||||
if (std::string(sTmpString).find(sLocalizerString) != std::string::npos) {
|
||||
std::cout << "Loading Localizer: "<<pcFName << '\n';
|
||||
// std::cout << "Loading Localizer: "<<pcFName << '\n';
|
||||
} else {
|
||||
cerr << "ERROR: the image "<<pcFName <<" is not a LOCALIZER" << '\n';
|
||||
free (sTmpString);
|
||||
@ -896,7 +911,7 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
}
|
||||
tokens.clear();
|
||||
|
||||
std::cout<<"Intensity window center and width: "<< dIntensityWindow[0] <<" "<< dIntensityWindow[1] <<std::endl;
|
||||
// std::cout<<"Intensity window center and width: "<< dIntensityWindow[0] <<" "<< dIntensityWindow[1] <<std::endl;
|
||||
|
||||
/* Image orientation */
|
||||
eImageOrientationType
|
||||
@ -905,10 +920,10 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
*std::remove(sTmpString, sTmpString + strlen(sTmpString), ' ') = 0;
|
||||
|
||||
if(!strcmp(sTmpString,ImageOrientationStrings[eImageOrientationType::HFS])){
|
||||
std::cout<<"Image orientation: HFS"<<std::endl;
|
||||
// std::cout<<"Image orientation: HFS"<<std::endl;
|
||||
currImgOrient = eImageOrientationType::HFS;
|
||||
} else if(!strcmp(sTmpString,ImageOrientationStrings[eImageOrientationType::FFS])){
|
||||
std::cout<<"Image orientation: FFS"<<std::endl;
|
||||
// std::cout<<"Image orientation: FFS"<<std::endl;
|
||||
currImgOrient = eImageOrientationType::FFS;
|
||||
} else {
|
||||
std::cerr<< "Image Orientation: unrecognised"<< sTmpString <<std::endl;
|
||||
@ -940,7 +955,7 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
ImageDirectionType3D LocalizerImagDirectionDCM =
|
||||
imageReader2D->GetOutput()->GetDirection();
|
||||
|
||||
std::cout<<"LocalizerImagDirectionDCM " <<LocalizerImagDirectionDCM <<std::endl;
|
||||
// std::cout<<"LocalizerImagDirectionDCM " <<LocalizerImagDirectionDCM <<std::endl;
|
||||
|
||||
|
||||
InternalImageType::DirectionType toIECDirection;
|
||||
@ -984,10 +999,10 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
/* dot shoudl be 1 or -1 if the normal is parallel */
|
||||
if(dSumPA == 1 || dSumPA == -1){
|
||||
currProjOrientation = PA;
|
||||
std::cout<<"It's a PA image"<<std::endl;
|
||||
// std::cout<<"It's a PA image"<<std::endl;
|
||||
} else if (dSumLAT == 1 || dSumLAT == -1){
|
||||
currProjOrientation = LAT;
|
||||
std::cout<<"It's a LAT image"<<std::endl;
|
||||
// std::cout<<"It's a LAT image"<<std::endl;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
@ -1047,14 +1062,14 @@ int itkImageProcessor::load2D(const char * pcFName){
|
||||
m_Duplicator->Update();
|
||||
|
||||
|
||||
std::cout<< " ////////////// 2D Topo BEG " <<std::endl;
|
||||
// std::cout<< " ////////////// 2D Topo BEG " <<std::endl;
|
||||
|
||||
std::cout<<"GetDirection()"<<m_Duplicator->GetOutput()->GetDirection()<<std::endl;
|
||||
std::cout<<"GetOrigin()"<<m_Duplicator->GetOutput()->GetOrigin()<<std::endl;
|
||||
std::cout<<"GetSpacing()"<<m_Duplicator->GetOutput()->GetSpacing()<<std::endl;
|
||||
std::cout<<"GetSize()"<<m_Duplicator->GetOutput()->GetLargestPossibleRegion().GetSize()<<std::endl;
|
||||
// std::cout<<"GetDirection()"<<m_Duplicator->GetOutput()->GetDirection()<<std::endl;
|
||||
// std::cout<<"GetOrigin()"<<m_Duplicator->GetOutput()->GetOrigin()<<std::endl;
|
||||
// std::cout<<"GetSpacing()"<<m_Duplicator->GetOutput()->GetSpacing()<<std::endl;
|
||||
// std::cout<<"GetSize()"<<m_Duplicator->GetOutput()->GetLargestPossibleRegion().GetSize()<<std::endl;
|
||||
|
||||
std::cout<< " ////////////// 2D Topo END " <<std::endl;
|
||||
// std::cout<< " ////////////// 2D Topo END " <<std::endl;
|
||||
|
||||
return
|
||||
(int) currProjOrientation;
|
||||
@ -1256,7 +1271,7 @@ itkImageProcessor::CalculateInternalTransform(
|
||||
void itkImageProcessor::InitializeProjector()
|
||||
{
|
||||
|
||||
std::cout<< "itkImageProcessor::InitializeProjector()" <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::InitializeProjector()" <<std::endl;
|
||||
if(m_DRTImage1MetaInfo == NULL ||
|
||||
m_DRTImage2MetaInfo == NULL ||
|
||||
m_DRTGeometryMetaInfo == NULL ||
|
||||
@ -1334,7 +1349,7 @@ void itkImageProcessor::InitializeProjector()
|
||||
|
||||
transform1->SetCenter(
|
||||
m_DRTImage1MetaInfo->GetProjectionOriginLPSZero() );
|
||||
transform1->Print(std::cout);
|
||||
// transform1->Print(std::cout);
|
||||
|
||||
// 2D Image 1
|
||||
interpolator1->SetProjectionAngle(
|
||||
@ -1496,7 +1511,7 @@ void itkImageProcessor::InitializeProjector()
|
||||
filter1->ChangeOriginOn();
|
||||
filter1->UpdateOutputInformation();
|
||||
|
||||
std::cout<< "itkImageProcessor::InitializeProjector() " <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::InitializeProjector() " <<std::endl;
|
||||
|
||||
|
||||
|
||||
@ -1519,7 +1534,7 @@ void itkImageProcessor::InitializeProjector()
|
||||
imageDRT2In = filter2->GetOutput();
|
||||
|
||||
|
||||
std::cout<< "itkImageProcessor::InitializeProjector() END" <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::InitializeProjector() END" <<std::endl;
|
||||
|
||||
}
|
||||
|
||||
@ -1589,8 +1604,8 @@ void itkImageProcessor::loadRTPlanInfo(
|
||||
)
|
||||
);
|
||||
|
||||
std::cout<< "m_CTMetaInfo->GetImportOffset() "
|
||||
<<m_CTMetaInfo->GetImportOffset() <<std::endl;
|
||||
// std::cout<< "m_CTMetaInfo->GetImportOffset() "
|
||||
// <<m_CTMetaInfo->GetImportOffset() <<std::endl;
|
||||
|
||||
this->UpdateProjectionGeometryMeta();
|
||||
this->InitializeProjector();
|
||||
@ -1632,12 +1647,12 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
m_DRTGeometryMetaInfo->GetProjectionCenter()
|
||||
);
|
||||
|
||||
std::cout<< "///////////////// PGEOM META BEG ///////////////" <<std::endl;
|
||||
// std::cout<< "///////////////// PGEOM META BEG ///////////////" <<std::endl;
|
||||
|
||||
std::cout<<"NominalIsocenter IEC"<< m_DRTGeometryMetaInfo->GetProjectionCenter() <<std::endl;
|
||||
// std::cout<<"NominalIsocenter IEC"<< m_DRTGeometryMetaInfo->GetProjectionCenter() <<std::endl;
|
||||
|
||||
std::cout<<"CALIBRATION NominalIsocenter_wZcorrectionLPS "<<NominalIsocenter_wZcorrectionLPS<<std::endl;
|
||||
std::cout<<"CALIBRATION NominalIsocenterZero_wZcorrectionLPS "<<NominalIsocenterZero_wZcorrectionLPS<<std::endl;
|
||||
// std::cout<<"CALIBRATION NominalIsocenter_wZcorrectionLPS "<<NominalIsocenter_wZcorrectionLPS<<std::endl;
|
||||
// std::cout<<"CALIBRATION NominalIsocenterZero_wZcorrectionLPS "<<NominalIsocenterZero_wZcorrectionLPS<<std::endl;
|
||||
|
||||
|
||||
ImageType3D::PointType IsocenterOffsetLPS;
|
||||
@ -1680,13 +1695,13 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
NominalIsocenter_wZcorrectionLPS//m_DRTImage1MetaInfo->GetProjectionOriginLPS()
|
||||
);
|
||||
|
||||
std::cout<<"Bounds1: "
|
||||
<<vBounds.data()[0]<<" "
|
||||
<<vBounds.data()[1]<<" "
|
||||
<<vBounds.data()[2]<<" "
|
||||
<<vBounds.data()[3]<<" "
|
||||
<<vBounds.data()[4]<<" "
|
||||
<<vBounds.data()[5]<<std::endl;
|
||||
// std::cout<<"Bounds1: "
|
||||
// <<vBounds.data()[0]<<" "
|
||||
// <<vBounds.data()[1]<<" "
|
||||
// <<vBounds.data()[2]<<" "
|
||||
// <<vBounds.data()[3]<<" "
|
||||
// <<vBounds.data()[4]<<" "
|
||||
// <<vBounds.data()[5]<<std::endl;
|
||||
|
||||
m_DRTImage1MetaInfo->SetSizeWithBounds(
|
||||
vBounds.data(),
|
||||
@ -1720,16 +1735,16 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
Std_DRT2LPS)
|
||||
);
|
||||
|
||||
std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl;
|
||||
std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl;
|
||||
std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl;
|
||||
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<<"m_DRTImage1MetaInfo->GetCOV()"<< m_DRTImage1MetaInfo->GetCOV() <<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;
|
||||
// std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl;
|
||||
// std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl;
|
||||
// std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl;
|
||||
// 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<<"m_DRTImage1MetaInfo->GetCOV()"<< m_DRTImage1MetaInfo->GetCOV() <<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;
|
||||
|
||||
// SECOND
|
||||
|
||||
@ -1772,13 +1787,13 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
NominalIsocenter_wZcorrectionLPS//m_DRTImage2MetaInfo->GetProjectionOriginLPS()
|
||||
);
|
||||
|
||||
std::cout<<"Bounds2: "
|
||||
<<vBounds.data()[0]<<" "
|
||||
<<vBounds.data()[1]<<" "
|
||||
<<vBounds.data()[2]<<" "
|
||||
<<vBounds.data()[3]<<" "
|
||||
<<vBounds.data()[4]<<" "
|
||||
<<vBounds.data()[5]<<std::endl;
|
||||
// std::cout<<"Bounds2: "
|
||||
// <<vBounds.data()[0]<<" "
|
||||
// <<vBounds.data()[1]<<" "
|
||||
// <<vBounds.data()[2]<<" "
|
||||
// <<vBounds.data()[3]<<" "
|
||||
// <<vBounds.data()[4]<<" "
|
||||
// <<vBounds.data()[5]<<std::endl;
|
||||
|
||||
m_DRTImage2MetaInfo->SetSizeWithBounds(
|
||||
vBounds.data(),
|
||||
@ -1808,16 +1823,16 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
|
||||
Std_DRT2LPS)
|
||||
);
|
||||
|
||||
std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl;
|
||||
std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl;
|
||||
std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl;
|
||||
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<<"m_DRTImage2MetaInfo->GetCOV()"<< m_DRTImage2MetaInfo->GetCOV() <<std::endl;
|
||||
std::cout<<"m_DRTImage2MetaInfo->GetOriginLPS()"<< m_DRTImage2MetaInfo->GetOriginLPS() <<std::endl;
|
||||
std::cout<<"m_DRTImage2MetaInfo->GetProjectionAngleLPS()"<<m_DRTImage2MetaInfo->GetProjectionAngleLPS()<<std::endl;
|
||||
std::cout<<"m_DRTImage2MetaInfo->GetImageDirectionsLPS()"<< m_DRTImage2MetaInfo->GetImageDirectionsLPS() <<std::endl;
|
||||
// std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl;
|
||||
// std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl;
|
||||
// std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl;
|
||||
// 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<<"m_DRTImage2MetaInfo->GetCOV()"<< m_DRTImage2MetaInfo->GetCOV() <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetOriginLPS()"<< m_DRTImage2MetaInfo->GetOriginLPS() <<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetProjectionAngleLPS()"<<m_DRTImage2MetaInfo->GetProjectionAngleLPS()<<std::endl;
|
||||
// std::cout<<"m_DRTImage2MetaInfo->GetImageDirectionsLPS()"<< m_DRTImage2MetaInfo->GetImageDirectionsLPS() <<std::endl;
|
||||
|
||||
|
||||
|
||||
@ -1852,7 +1867,7 @@ itkImageProcessor::CalcDRTImageOrigin(
|
||||
|
||||
void itkImageProcessor::GetProjectionImages(){
|
||||
|
||||
std::cout<< "itkImageProcessor::GetProjectionImages" <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::GetProjectionImages" <<std::endl;
|
||||
if(m_DRTImage1MetaInfo == NULL ||
|
||||
m_DRTImage2MetaInfo == NULL ||
|
||||
m_DRTGeometryMetaInfo == NULL ||
|
||||
@ -1885,7 +1900,7 @@ void itkImageProcessor::GetProjectionImages(){
|
||||
//m_CTMetaInfo->GetProjectionOriginLPS(
|
||||
// m_DRTGeometryMetaInfo->GetProjectionCenter());
|
||||
|
||||
std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
// std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
|
||||
CurrTransform =
|
||||
CalculateInternalTransform(
|
||||
@ -1927,20 +1942,20 @@ void itkImageProcessor::GetProjectionImages(){
|
||||
CurrTransform->GetAngleZ()
|
||||
);
|
||||
|
||||
std::cout<< "itkImageProcessor::GetProjectionImages" <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::GetProjectionImages" <<std::endl;
|
||||
|
||||
// AAAAAAA TODOOO CERCAA
|
||||
transform1 ->SetCenter(
|
||||
m_DRTImage1MetaInfo->GetProjectionOriginLPSZero());
|
||||
|
||||
std::cout<<"Angle1 "<<m_DRTImage1MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
std::cout<< "Origin1LPSZERO: "<<
|
||||
m_DRTImage1MetaInfo->GetProjectionOriginLPSZero() <<std::endl;
|
||||
std::cout<<"Origin1LPS: "<< m_DRTImage1MetaInfo->GetProjectionOriginLPS()<<std::endl;
|
||||
std::cout<<"Angle2 "<<m_DRTImage2MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
std::cout<< "Origin2LPSZERO: "<<
|
||||
m_DRTImage2MetaInfo->GetProjectionOriginLPSZero() <<std::endl;
|
||||
std::cout<<"Origin2LPS: "<< m_DRTImage2MetaInfo->GetProjectionOriginLPS()<<std::endl;
|
||||
// std::cout<<"Angle1 "<<m_DRTImage1MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
// std::cout<< "Origin1LPSZERO: "<<
|
||||
// m_DRTImage1MetaInfo->GetProjectionOriginLPSZero() <<std::endl;
|
||||
// std::cout<<"Origin1LPS: "<< m_DRTImage1MetaInfo->GetProjectionOriginLPS()<<std::endl;
|
||||
// std::cout<<"Angle2 "<<m_DRTImage2MetaInfo->GetProjectionAngleLPS() <<std::endl;
|
||||
// std::cout<< "Origin2LPSZERO: "<<
|
||||
// m_DRTImage2MetaInfo->GetProjectionOriginLPSZero() <<std::endl;
|
||||
// std::cout<<"Origin2LPS: "<< m_DRTImage2MetaInfo->GetProjectionOriginLPS()<<std::endl;
|
||||
|
||||
|
||||
//transform1 ->Print(std::cout);
|
||||
@ -1968,7 +1983,7 @@ void itkImageProcessor::GetProjectionImages(){
|
||||
//m_CTMetaInfo->GetProjectionOriginLPS(
|
||||
// m_DRTGeometryMetaInfo->GetProjectionCenter());
|
||||
|
||||
std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
// std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
|
||||
CurrTransform =
|
||||
CalculateInternalTransform(
|
||||
@ -1982,7 +1997,7 @@ void itkImageProcessor::GetProjectionImages(){
|
||||
IECtoLPS_Directions
|
||||
);
|
||||
|
||||
std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
// std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
|
||||
} else {
|
||||
|
||||
@ -2028,14 +2043,14 @@ void itkImageProcessor::GetProjectionImages(){
|
||||
interpolator2->SetTransform(transform2); //finalTransform);
|
||||
interpolator2->Initialize();
|
||||
|
||||
std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
// std::cout<<"pFakeIsoLPS: "<<std::endl;
|
||||
|
||||
filter1->Update();
|
||||
filter2->Update();
|
||||
|
||||
imageDRT1In = filter1->GetOutput();
|
||||
imageDRT2In = filter2->GetOutput();
|
||||
std::cout<< "itkImageProcessor::GetProjectionImages END" <<std::endl;
|
||||
// std::cout<< "itkImageProcessor::GetProjectionImages END" <<std::endl;
|
||||
|
||||
// std::cout<<"MMMMM: "<<
|
||||
// interpolator1->GetInverseTransform()->GetMatrix()<<std::endl;
|
||||
@ -2194,22 +2209,22 @@ vtkImageData* itkImageProcessor::GetLocalizer1VTK()
|
||||
ImageType3D::PointType LastVoxelPosition =
|
||||
origin3D + (imagDirection * Dest);
|
||||
|
||||
std::cout<<" -------- Localizer 1 ITK --------"<<std::endl;
|
||||
std::cout<<"size3D " <<size3D <<std::endl;
|
||||
std::cout<<"resolution3D " <<resolution3D <<std::endl;
|
||||
std::cout<<"imagDirection " <<imagDirection <<std::endl;
|
||||
std::cout<<"First Voxel position " <<origin3D <<std::endl;
|
||||
std::cout<<"Last Voxel position: "<<LastVoxelPosition<<std::endl;
|
||||
// std::cout<<" -------- Localizer 1 ITK --------"<<std::endl;
|
||||
// std::cout<<"size3D " <<size3D <<std::endl;
|
||||
// std::cout<<"resolution3D " <<resolution3D <<std::endl;
|
||||
// std::cout<<"imagDirection " <<imagDirection <<std::endl;
|
||||
// std::cout<<"First Voxel position " <<origin3D <<std::endl;
|
||||
// std::cout<<"Last Voxel position: "<<LastVoxelPosition<<std::endl;
|
||||
|
||||
|
||||
|
||||
double* dBounds = toVTKLocalizer1->GetOutput()->GetBounds();
|
||||
|
||||
std::cout<< "-------- Localizer 1 VTK --------" <<std::endl;
|
||||
std::cout<<"Bounds: "<<dBounds[0]<<" "<<dBounds[1]<<" "
|
||||
<<dBounds[2]<<" "<<dBounds[3]<<" "
|
||||
<<dBounds[4]<<" "<<dBounds[5]<<std::endl;
|
||||
std::cout<< "-------- -------- --------" <<std::endl;
|
||||
// std::cout<< "-------- Localizer 1 VTK --------" <<std::endl;
|
||||
// std::cout<<"Bounds: "<<dBounds[0]<<" "<<dBounds[1]<<" "
|
||||
// <<dBounds[2]<<" "<<dBounds[3]<<" "
|
||||
// <<dBounds[4]<<" "<<dBounds[5]<<std::endl;
|
||||
// std::cout<< "-------- -------- --------" <<std::endl;
|
||||
}
|
||||
|
||||
return
|
||||
@ -2479,7 +2494,7 @@ void itkImageProcessor::WriteProjectionImages()
|
||||
|
||||
try
|
||||
{
|
||||
std::cout << "Writing image 1 " << std::endl;
|
||||
// std::cout << "Writing image 1 " << std::endl;
|
||||
writer1->Update();
|
||||
}
|
||||
catch (itk::ExceptionObject & err)
|
||||
@ -2493,7 +2508,7 @@ void itkImageProcessor::WriteProjectionImages()
|
||||
|
||||
try
|
||||
{
|
||||
std::cout << "Writing image 2" << std::endl;
|
||||
// std::cout << "Writing image 2" << std::endl;
|
||||
writer2->Update();
|
||||
}
|
||||
catch (itk::ExceptionObject & err)
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
void SetCustom_2Dsize(int,int,int,int);
|
||||
void SetCustom_ImportTransform(double, double, double,
|
||||
double, double, double);
|
||||
void SetCustom_UpdateMetaInfo();
|
||||
|
||||
|
||||
/** Set transform parameters for 3D Volume */
|
||||
|
Reference in New Issue
Block a user