RTK ProjectionsReader Blank Images

Hello,

Thanks in advance for any help with this issue.

I have been trying to reconstruct a series of 2D CBCT projections stored in TIFFs using RTK FDK. I started with the Python first reconstruction example and got it working fine but my attempt to swap the 2nd image source with my own projections kept resulting in blank reconstructions (all voxels have a value of 0).

I added a itk imwrite to verify the import of the projections but it outputs blank images as well. I think I am understanding the coordinate system based on documentation but perhaps I am misunderstanding something still and this may be an easy fix.

My code is copied below and I can supply my data. The raw projections are acquired with a detector with 1.5 m SDD at angles between 243 degrees and 86 degrees, 500 projections at approximately 0.4 degree spacing.

Really appreciate any advice on this, thank you.

import itk
from itk import RTK as rtk
import os

ImageType = itk.Image[itk.F,3] ## Defines the image type

geometry = rtk.ThreeDCircularProjectionGeometry.New() ## Defines the RTK geometry object

TIFF_folder_path = "C:/Users/x/Downloads/Folder" #folder containing TIFF projections

fileNameList = []
for TIFF in os.listdir(TIFF_folder_path): 
    TIFF_path = os.path.join(TIFF_folder_path, TIFF)
    fileNameList.append(TIFF_path) #Append TIFF paths to file list
    angle = os.path.splitext(os.path.basename(TIFF))[0] #TIFF files are named with the angle of acquisition
    geometry.AddProjection(750, 1500, float(angle))

print("Projections found:", len(fileNameList))

#create tiff object
tiffio = itk.TIFFImageIO.New()


ProjectionsReaderType = rtk.ProjectionsReader[ImageType]
projectionsSource = ProjectionsReaderType.New()
projectionsSource.SetImageIO(tiffio)
projectionsSource.SetFileNames(fileNameList)
projOrigin = [ -0.388*(1024-1)/2, -0.388*(774-1)/2, 0 ]  # detector at iso is x = 1024, y = 774 with pixel size 0.388 mm
projSpacing = [ 0.388, 0.388, 0.388 ]
projectionsSource.SetOrigin( projOrigin )
projectionsSource.SetSpacing( projSpacing )

#write tiffs to verify the correct import of the projections
itk.imwrite(projectionsSource.GetOutput(), "C:/Users/x/Downloads/Projection_Output.tiff" )

@simon.rit might want to answer this.

rtk::ProjectionsReader is a pipeline which aims at reading and converting projection data to line integrals. You can check the drawing of the mini-pipeline on the online Doxygen documentation. There can be many reasons for having blank images so I would first suggest to check whether itk::ImageSeriesReader produces a meaningful result? If yes, can you check the output image type?