Merge branch 'ScoutRTUInewRender' into 'ScoutRTUIDevel'

Version of Test 10-12-2022

See merge request cpt_bioeng/drt!19
This commit is contained in:
2022-12-12 14:00:05 +00:00
2 changed files with 32 additions and 20 deletions

View File

@ -1576,8 +1576,6 @@ void itkImageProcessor::InitializeProjector()
imageDRT2In = filter2->GetOutput(); imageDRT2In = filter2->GetOutput();
// std::cout<< "itkImageProcessor::InitializeProjector() END" <<std::endl;
} }
@ -1695,11 +1693,11 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
IsocenterOffsetLPS = m_CTMetaInfo->ConvertIECPointToLPSPoint( IsocenterOffsetLPS = m_CTMetaInfo->ConvertIECPointToLPSPoint(
m_DRTGeometryMetaInfo->GetProjectionCenterOffset1()); m_DRTGeometryMetaInfo->GetProjectionCenterOffset1());
// 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 NominalIsocenter_wZcorrectionLPS "<<NominalIsocenter_wZcorrectionLPS<<std::endl;
// std::cout<<"CALIBRATION NominalIsocenterZero_wZcorrectionLPS "<<NominalIsocenterZero_wZcorrectionLPS<<std::endl; std::cout<<"CALIBRATION NominalIsocenterZero_wZcorrectionLPS "<<NominalIsocenterZero_wZcorrectionLPS<<std::endl;
// std::cout<<"CALIBRATION IsocenterOffsetLPS "<<IsocenterOffsetLPS<<std::endl; std::cout<<"CALIBRATION IsocenterOffsetLPS "<<IsocenterOffsetLPS<<std::endl;
ImageType3D::PointType CalibratedIsocenterLPS; ImageType3D::PointType CalibratedIsocenterLPS;
@ -1785,9 +1783,9 @@ void itkImageProcessor::UpdateProjectionGeometryMeta(){
Std_DRT2LPS) Std_DRT2LPS)
); );
// std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl; std::cout<<"IsocenterOffsetLPS"<< IsocenterOffsetLPS <<std::endl;
// std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl; std::cout<<"CalibratedIsocenterLPS"<< CalibratedIsocenterLPS <<std::endl;
// std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl; std::cout<<"CalibratedIsocenterZeroLPS"<< CalibratedIsocenterZeroLPS <<std::endl;
// std::cout<<"m_DRTImage1MetaInfo->GetSize()"<< m_DRTImage1MetaInfo->GetSize() <<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->GetSpacing()"<< m_DRTImage1MetaInfo->GetSpacing() <<std::endl;
// std::cout<<"m_DRTImage1MetaInfo->GetOrigin()"<< m_DRTImage1MetaInfo->GetOrigin() <<std::endl; // std::cout<<"m_DRTImage1MetaInfo->GetOrigin()"<< m_DRTImage1MetaInfo->GetOrigin() <<std::endl;
@ -2236,12 +2234,12 @@ void itkImageProcessor::Write2DImages(){
vtkImageData* itkImageProcessor::GetLocalizer1VTK() vtkImageData* itkImageProcessor::GetLocalizer1VTK()
{ {
// Rescale the intensity of the projection images to 0-255 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>;
RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New(); RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New();
rescaler1->SetOutputMinimum(0); rescaler1->SetOutputMinimum(0);
rescaler1->SetOutputMaximum(255); rescaler1->SetOutputMaximum(32768);
rescaler1->SetInput(m_PASourceDupli->GetOutput()); rescaler1->SetInput(m_PASourceDupli->GetOutput());
rescaler1->Update(); rescaler1->Update();
@ -2296,12 +2294,12 @@ vtkImageData* itkImageProcessor::GetLocalizer2VTK()
{ {
// Rescale the intensity of the projection images to 0-255 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>;
RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New(); RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New();
rescaler2->SetOutputMinimum(0); rescaler2->SetOutputMinimum(0);
rescaler2->SetOutputMaximum(255); rescaler2->SetOutputMaximum(32768);
rescaler2->SetInput(m_LATSourceDupli ->GetOutput()); rescaler2->SetInput(m_LATSourceDupli ->GetOutput());
rescaler2->Update(); rescaler2->Update();
@ -2356,16 +2354,30 @@ vtkImageData* itkImageProcessor::GetLocalizer2VTK()
vtkImageData* itkImageProcessor::GetProjection1VTK() vtkImageData* itkImageProcessor::GetProjection1VTK()
{ {
// Rescale the intensity of the projection images to 0-255 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>;
RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New(); RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New();
rescaler1->SetOutputMinimum(0); rescaler1->SetOutputMinimum(0);
rescaler1->SetOutputMaximum(255); rescaler1->SetOutputMaximum(32768);
rescaler1->SetInput( imageDRT1In ); rescaler1->SetInput( imageDRT1In );
rescaler1->Update(); rescaler1->Update();
// using ImageCalculatorFilterType = itk::MinimumMaximumImageCalculator<InternalImageType>;
// auto imageCalculatorFilter = ImageCalculatorFilterType::New();
// imageCalculatorFilter->SetImage(imageDRT1In);
// imageCalculatorFilter->Compute();
// std::cout<< "itkImageProcessor::imageDRT1In() " <<
// imageCalculatorFilter <<std::endl;
// using ImageCalculatorFilterType2 = itk::MinimumMaximumImageCalculator<OutputImageType>;
// auto imageCalculatorFilter2 = ImageCalculatorFilterType2::New();
// imageCalculatorFilter2->SetImage(rescaler1->GetOutput());
// imageCalculatorFilter2->Compute();
// std::cout<< "itkImageProcessor::imageDRT2In() " <<
// imageCalculatorFilter2 <<std::endl;
toVTK2D1->SetInput(rescaler1->GetOutput()); toVTK2D1->SetInput(rescaler1->GetOutput());
toVTK2D1->Update(); toVTK2D1->Update();
@ -2471,12 +2483,12 @@ vtkMatrix4x4 * itkImageProcessor::GetProjection2VTKTransform()
vtkImageData* itkImageProcessor::GetProjection2VTK() vtkImageData* itkImageProcessor::GetProjection2VTK()
{ {
// Rescale the intensity of the projection images to 0-255 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>;
RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New(); RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New();
rescaler2->SetOutputMinimum(0); rescaler2->SetOutputMinimum(0);
rescaler2->SetOutputMaximum(255); rescaler2->SetOutputMaximum(32768);
rescaler2->SetInput( imageDRT2In ); rescaler2->SetInput( imageDRT2In );
rescaler2->Update(); rescaler2->Update();

View File

@ -160,7 +160,7 @@ protected:
using InternalPixelType = float; using InternalPixelType = float;
using PixelType2D = short; using PixelType2D = short;
using PixelType3D = short; using PixelType3D = short;
using OutputPixelType = unsigned char; using OutputPixelType = unsigned short;
using ImageType3D = itk::Image<PixelType3D, Dimension>; using ImageType3D = itk::Image<PixelType3D, Dimension>;
using InternalImageType = itk::Image<InternalPixelType, Dimension>; using InternalImageType = itk::Image<InternalPixelType, Dimension>;