diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp index 6ccc350..54ab2f0 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.cpp @@ -1576,8 +1576,6 @@ void itkImageProcessor::InitializeProjector() imageDRT2In = filter2->GetOutput(); -// std::cout<< "itkImageProcessor::InitializeProjector() END" <ConvertIECPointToLPSPoint( m_DRTGeometryMetaInfo->GetProjectionCenterOffset1()); -// std::cout<< "///////////////// PGEOM META BEG ///////////////" <GetProjectionCenter() <GetProjectionCenter() <GetSize()"<< m_DRTImage1MetaInfo->GetSize() <GetSpacing()"<< m_DRTImage1MetaInfo->GetSpacing() <GetOrigin()"<< m_DRTImage1MetaInfo->GetOrigin() <; RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New(); rescaler1->SetOutputMinimum(0); - rescaler1->SetOutputMaximum(255); + rescaler1->SetOutputMaximum(32768); rescaler1->SetInput(m_PASourceDupli->GetOutput()); 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; RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New(); rescaler2->SetOutputMinimum(0); - rescaler2->SetOutputMaximum(255); + rescaler2->SetOutputMaximum(32768); rescaler2->SetInput(m_LATSourceDupli ->GetOutput()); rescaler2->Update(); @@ -2356,16 +2354,30 @@ vtkImageData* itkImageProcessor::GetLocalizer2VTK() 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; RescaleFilterType::Pointer rescaler1 = RescaleFilterType::New(); rescaler1->SetOutputMinimum(0); - rescaler1->SetOutputMaximum(255); + rescaler1->SetOutputMaximum(32768); rescaler1->SetInput( imageDRT1In ); - rescaler1->Update(); +// using ImageCalculatorFilterType = itk::MinimumMaximumImageCalculator; +// auto imageCalculatorFilter = ImageCalculatorFilterType::New(); +// imageCalculatorFilter->SetImage(imageDRT1In); +// imageCalculatorFilter->Compute(); + +// std::cout<< "itkImageProcessor::imageDRT1In() " << +// imageCalculatorFilter <; +// auto imageCalculatorFilter2 = ImageCalculatorFilterType2::New(); +// imageCalculatorFilter2->SetImage(rescaler1->GetOutput()); +// imageCalculatorFilter2->Compute(); +// std::cout<< "itkImageProcessor::imageDRT2In() " << +// imageCalculatorFilter2 <SetInput(rescaler1->GetOutput()); toVTK2D1->Update(); @@ -2471,12 +2483,12 @@ vtkMatrix4x4 * itkImageProcessor::GetProjection2VTKTransform() 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; RescaleFilterType::Pointer rescaler2 = RescaleFilterType::New(); rescaler2->SetOutputMinimum(0); - rescaler2->SetOutputMaximum(255); + rescaler2->SetOutputMaximum(32768); rescaler2->SetInput( imageDRT2In ); rescaler2->Update(); diff --git a/reg23Topograms/itkDTRrecon/itkImageProcessor.h b/reg23Topograms/itkDTRrecon/itkImageProcessor.h index 4ae4bbe..5e2de92 100644 --- a/reg23Topograms/itkDTRrecon/itkImageProcessor.h +++ b/reg23Topograms/itkDTRrecon/itkImageProcessor.h @@ -160,7 +160,7 @@ protected: using InternalPixelType = float; using PixelType2D = short; using PixelType3D = short; - using OutputPixelType = unsigned char; + using OutputPixelType = unsigned short; using ImageType3D = itk::Image; using InternalImageType = itk::Image;