Merge branch 'DRRSavingAndErrorHandling' into 'OffRevRenderingAlternative'

Unsigned short checks + DICOM Savnign error handling

See merge request cpt_bioeng/drt!55
This commit is contained in:
2024-08-07 09:25:25 +02:00

View File

@ -2256,12 +2256,12 @@ vtkImageData* itkImageProcessor::GetProjection1VTK()
//TODO
}
// Rescale the intensity of the projection images to 0-32768 for output.
// Rescale the intensity of the projection images from float to unsigned short for output.
using RescaleFilterType = itk::RescaleIntensityImageFilter<InternalImageType, OutputImageType>;
RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New();
rescaler1->SetOutputMinimum(0);
rescaler1->SetOutputMaximum(32768);
rescaler1->SetOutputMaximum(USHRT_MAX);
rescaler1->SetInput( imageDRT1In );
rescaler1->Update();
@ -2387,12 +2387,12 @@ vtkImageData* itkImageProcessor::GetProjection2VTK()
//TODO
}
// Rescale the intensity of the projection images to 0-32768 for output.
// Rescale the intensity of the projection images from float to unsigned short for output.
using RescaleFilterType = itk::RescaleIntensityImageFilter<InternalImageType, OutputImageType>;
RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New();
rescaler2->SetOutputMinimum(0);
rescaler2->SetOutputMaximum(32768);
rescaler2->SetOutputMaximum(USHRT_MAX);
rescaler2->SetInput( imageDRT2In );
rescaler2->Update();