Merge branch 'ScoutRTUIDevel' into 'scoutRTUIDevelREG'

Added Check on Scouts Station Name and Manual Correction Steps in config....

See merge request cpt_bioeng/drt!25
This commit is contained in:
2023-05-11 09:43:15 +02:00
2 changed files with 30 additions and 8 deletions

View File

@ -471,7 +471,7 @@ int itkImageProcessor::load3DSerieFromFiles( std::vector<std::string> v_fnames){
imageSeriesReader3D->SetImageIO(dicomIO); imageSeriesReader3D->SetImageIO(dicomIO);
imageSeriesReader3D->SetFileNames(v_sortedFnames); imageSeriesReader3D->SetFileNames(v_sortedFnames);
//imageSeriesReader3D->SetNumberOfWorkUnits(8); imageSeriesReader3D->SetNumberOfWorkUnits(8);
imageSeriesReader3D->ForceOrthogonalDirectionOff(); // properly read CTs with gantry tilt imageSeriesReader3D->ForceOrthogonalDirectionOff(); // properly read CTs with gantry tilt
//imageSeriesReader3D->SetSpacingWarningRelThreshold(); //imageSeriesReader3D->SetSpacingWarningRelThreshold();
@ -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) {
@ -1785,6 +1784,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
return; return;
} }
@ -2079,18 +2079,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.
} }
@ -2323,6 +2327,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
return; return;
} }
@ -2703,6 +2708,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>;
@ -2832,6 +2845,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>;

View File

@ -237,7 +237,6 @@ private:
using ResampleFilterType = itk::ResampleImageFilter<InternalImageType, InternalImageType>; using ResampleFilterType = itk::ResampleImageFilter<InternalImageType, InternalImageType>;
/** Optimizer which tries to find the minimn (Powell Optimizer)*/ /** Optimizer which tries to find the minimn (Powell Optimizer)*/
// using OptimizerType = itk::PowellOptimizer;
using AmoebaOptimizerType = itk::AmoebaOptimizer; using AmoebaOptimizerType = itk::AmoebaOptimizer;
/** Optimizer which samples the whol space */ /** Optimizer which samples the whol space */
using ExhaustiveOptimizerType = itk::ExhaustiveOptimizer; using ExhaustiveOptimizerType = itk::ExhaustiveOptimizer;
@ -266,7 +265,9 @@ private:
using ITKtoVTKFilterType = itk::ImageToVTKImageFilter<OutputImageType>; using ITKtoVTKFilterType = itk::ImageToVTKImageFilter<OutputImageType>;
void void
CalculateExternalUserTransform(TransformType::Pointer transform, DRTImageMetaInformation::Pointer imageMetaInfo); CalculateExternalUserTransform(
TransformType::Pointer transform,
DRTImageMetaInformation::Pointer imageMetaInfo);
// TransformType::Pointer // TransformType::Pointer
// CalculateInternalTransform( // CalculateInternalTransform(
@ -294,6 +295,7 @@ private:
); );
TransformType::Pointer TransformType::Pointer
transform1, transform1,
transform2; transform2;