I have a set of projections from 0° to 210°, take one image at 1°. And I want use CudaParkerShortScanImageFilter
to reconstruction it. But there has artifacts because the warning like this:
WARNING: In C:\runner\_work\im\include\rtkParkerShortScanImageFilter.hxx, line 114
CudaParkerShortScanImageFilter (000001F2F6465970): You do not have enough data for proper Parker weighting (short scan) according to projection #0. Delta is 14.5 degrees and should be more than half the beam angle, i.e. 14.9738 degrees.
The lat image’s angle is 209° and the first is 0°, according to the calculation code of delta:
m_Delta = 0.5 * (lastAngle - m_FirstAngle - itk::Math::pi);
m_Delta = m_Delta - 2 * itk::Math::pi * floor(m_Delta / (2 * itk::Math::pi)); // between -2*PI and 2*PI
The delta is 14.5°, but actually the delta should be 15°?
I cropped the image to make this warning no longer appear, and the artifacts were greatly reduced. However the reconstruction result is a bit distorted:
The original should be square in shape. My code is like this:
if flag:
PSSFType = itk.RTK.CudaParkerShortScanImageFilter
else:
PSSFType = itk.RTK.ParkerShortScanImageFilter[ImageType]
pssf = PSSFType.New()
if flag:
pssf.SetInput(projections)
else:
pssf.SetInput(reader)
pssf.SetGeometry(geometry)
pssf.InPlaceOff()
# pssf.Update()
if flag:
FDKCPUType = itk.RTK.CudaFDKConeBeamReconstructionFilter
else:
FDKCPUType = itk.RTK.FDKConeBeamReconstructionFilter[ImageType]
feldkamp = FDKCPUType.New()
feldkamp.SetInput(0, constantImageSource2.GetOutput())
feldkamp.SetInput(1, pssf.GetOutput())
feldkamp.SetGeometry(geometry)
feldkamp.GetRampFilter().SetTruncationCorrection(0.5)
feldkamp.GetRampFilter().SetRamLakCutFrequency(0.5) #
# feldkamp.Update()
StreamerType = itk.StreamingImageFilter[ImageType, ImageType]
streamerBP = StreamerType.New()
streamerBP.SetInput(feldkamp.GetOutput())
streamerBP.SetNumberOfStreamDivisions(2)
splitter = itk.ImageRegionSplitterDirection.New()
splitter.SetDirection(2)
streamerBP.SetRegionSplitter(splitter)
Is there an error in my settings? Any reply will be appreciate!