<div dir="ltr"><div>Hi,</div><div><br></div>I have a 3D-CT volume and want to obtain the DRR projection by adjusting the machine parameters as shown in the image below.<div><br>Here's my code, and I didn't get the expected DRRs with the limited FOV. Is there anything missing from the parameter setup?</div><div><br>Could you please assist me in resolving this issue? Any code level assistance or advice would be greatly appreciated.<br></div><div><br></div><div><span style="background-color:rgb(159,197,232)"># Loading 3D CT image<br>CT = itk.imread("./ct.nii.gz", pixel_type=itk.F)<br><br># Defines the image type<br>Dimension_CT = 3<br>PixelType = itk.F<br>ImageType = itk.Image[PixelType, Dimension_CT]<br><br>origin_x, origin_y, origin_z = CT.GetOrigin()<br>space_x, space_y, space_z = CT.GetSpacing()<br><br># Define origin, sizeOutput and spacing (still need to change these)<br>origin = [origin_x, origin_y, origin_z]<br>spacing = [space_x, space_y, space_z]<br><br>sizeOutput = [ 512, 512, 1]<br><br># Create a stack of empty projection images<br>ConstantImageSourceType = rtk.ConstantImageSource[ImageType]<br>constantImageSource = ConstantImageSourceType.New()<br><br>constantImageSource.SetOrigin( origin )<br>constantImageSource.SetSpacing( spacing )<br>constantImageSource.SetSize( sizeOutput )<br>constantImageSource.SetConstant(0.)<br><br># Defines the RTK geometry object<br>geometry = rtk.ThreeDCircularProjectionGeometry.New()<br>firstAngle = 0.<br>angularArc = 360.<br>sid = 1000 # source to isocenter distance<br>sdd = 1536 # source to detector distance<br>gantryAngle = 0. # rot around y-axis<br>projOffsetX = 0.<br>projOffsetY = 0.<br>outOfPlaneAngle = 90. # rot around x-axis<br>inPlaneAngle = 0. # rot around z-axis<br>sourceOffsetX = 0.<br>sourceOffsetY = 0.<br>geometry.AddProjection(sid, sdd, gantryAngle)<br>    <br>REIType = rtk.JosephForwardProjectionImageFilter[ImageType, ImageType]<br>rei = REIType.New()<br><br>rei.SetGeometry( geometry )<br>rei.SetInput(0, constantImageSource.GetOutput())<br>rei.SetInput(1, CT)<br>rei.Update()<br><br>Dimension = 3<br>OutputPixelType = itk.UC<br>OutputImageType = itk.Image[OutputPixelType, Dimension]<br><br>RescaleType = itk.RescaleIntensityImageFilter[ImageType, OutputImageType]<br>rescaler = RescaleType.New()<br>rescaler.SetOutputMinimum(0)<br>rescaler.SetOutputMaximum(255)<br>rescaler.SetInput(rei.GetOutput())<br>rescaler.Update()<br><br>WriteType = itk.ImageFileWriter[OutputImageType]<br>writer = WriteType.New()<br>writer.SetFileName('./drr_0.png')<br>writer.SetInput(rescaler.GetOutput())<br>writer.Update()</span><br></div><div><span style="background-color:rgb(159,197,232)"><br></span></div><div><span style="background-color:rgb(159,197,232)"><br></span></div></div>