Solved bug that would cause crash when trying to change parameters of regEngine with CT not yet loaded (example loading Scout LONG in DataView). Minor changes in UI functionalities to adjust for this new behaviour. Now loading of scouts is automatically followed by visualisation

This commit is contained in:
Proton local user
2023-05-08 17:54:16 +02:00
parent 2d9d3d97bd
commit 2a6a8d4922

View File

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