diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp index 17e53c8..c1c6b8c 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp @@ -694,13 +694,13 @@ int itkImageProcessor::fill3DVolumeMeta( } if(m_DRTImage2MetaInfo != NULL){ - std::cout << "NEVER HERE m_DRTImage2MetaInfo" << std::endl; - m_DRTImage2MetaInfo = NULL; + std::cout << "NEVER HERE m_DRTImage2MetaInfo" << std::endl; + m_DRTImage2MetaInfo = NULL; } if(m_RTMetaInfo != NULL){ - std::cout << "NEVER HERE m_RTMetaInfo" << std::endl; - m_RTMetaInfo = NULL; + std::cout << "NEVER HERE m_RTMetaInfo" << std::endl; + m_RTMetaInfo = NULL; } @@ -1122,7 +1122,6 @@ int itkImageProcessor::load2D(const char * pcFName){ //double* m_ImageIntensity; DuplicatorType::Pointer m_Duplicator; - bool* m_ImLoaded; TopogramImageMetaInformation::Pointer m_TImageMeta; switch (currProjOrientation) { @@ -1783,6 +1782,7 @@ void itkImageProcessor::InitializeProjector() m_DRTImage2MetaInfo == NULL || m_DRTGeometryMetaInfo == NULL || m_TransformMetaInfo == NULL ){ + return; //TODO } @@ -2076,18 +2076,22 @@ void itkImageProcessor::loadRTPlanInfo( void itkImageProcessor::UpdateProjectionGeometryMeta(){ if(m_CTMetaInfo == NULL){ + return; //TODO. } if(m_DRTGeometryMetaInfo == NULL){ + return; //TODO. } if(m_DRTImage1MetaInfo == NULL){ + return; //TODO. } if(m_DRTImage2MetaInfo == NULL){ + return; //TODO. } @@ -2325,6 +2329,7 @@ void itkImageProcessor::GetProjectionImages(){ m_DRTImage2MetaInfo == NULL || m_DRTGeometryMetaInfo == NULL || m_TransformMetaInfo == NULL ){ + return; //TODO } @@ -2697,6 +2702,14 @@ vtkImageData* itkImageProcessor::GetLocalizer2VTK() vtkImageData* itkImageProcessor::GetProjection1VTK() { + + if(m_DRTImage1MetaInfo == NULL || + m_DRTGeometryMetaInfo == NULL || + m_TransformMetaInfo == NULL ){ + return NULL; + //TODO + } + // Rescale the intensity of the projection images to 0-32768 for output. using RescaleFilterType = itk::RescaleIntensityImageFilter; @@ -2826,6 +2839,13 @@ vtkMatrix4x4 * itkImageProcessor::GetProjection2VTKTransform() vtkImageData* itkImageProcessor::GetProjection2VTK() { + if(m_DRTImage2MetaInfo == NULL || + m_DRTGeometryMetaInfo == NULL || + m_TransformMetaInfo == NULL ){ + return NULL; + //TODO + } + // Rescale the intensity of the projection images to 0-32768 for output. using RescaleFilterType = itk::RescaleIntensityImageFilter;