Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adjusting set_rampFilter() does not affect filtering #199

ChrisJD-VMC started this conversation in General
Discussion options

I suspect this is a bug of some sort. But I'm far from convinced it's not an issue with my code. Basically the set_rampFilter function has no noticeable effect on my reconstructed images. I'm using the 1.26 DLL from the Releases page via the Python wrapper. I couldn't find any existing issues matching what I am seeing after searching "ramp" and "filter".

I'd like to confirm, A. the way I'm attempting to use it is correct, and B. if no, what the correct usage is. Or if it's a bug and I should make an issue from this discussion.

I'm trying to replicate a similar reconstruction I currently currently perform using TIGRE, but with LEAP. With the difference being that in TIGRE I'm reconstructing an Axial (step-and-shoot) scan, whereas in LEAP I'm trying to reconstruct a Helical scan (of the same phantom using the same projection simulation process). The projections are simulated using a process that is basically the same as that used by GVXR. The CT simulation is configured as a 64 row detector and is using a cone beam projection.

Example image below showing the issue. The two images on the left are reconstructed with LEAP. Ignoring the fact I didn't manage to window them exactly the same in the viewer, they are identical. The two on the right show the kind of difference I am expecting, those two images were reconstructed with TIGRE using the filters noted. The first is clearly smoother and the second sharper.

image

I've tried using set_rampFilter with d01_standard_geometries.py as well and it has no effect on the image generated by that demo either. In that demo the only modification I made was adding leapct.set_rampFilter(12) immediately after #leapct.set_projector('VD').

My process when using TIGRE is:

  1. Simulate projections
  2. ln conversion projections
  3. Distance weight projections
  4. Filter projections
  5. FBP for reconstruction

The projections I'm using with LEAP are from immediately after step 2.

I'm using an Nvidia GPU and CUDA Toolkit 12.9 is installed.

======== Processing Settings ========
GPU processing on device 0
GPU with least amount of memory: 6.258691 GB

My code (minus texture loading)

import sys
sys.path.append("C:/3rdParty/LEAP/src")
from PIL import Image
from leapctype import *
leapct = tomographicModels()
leapct.about()
projections_path = r"C:\Projections"
projections_per_rotation = 1000
rotations = 5
scan_length = 200
projection_count = projections_per_rotation * rotations
rows = 64
columns = 271
angles = leapct.setAngleArray(projection_count, 360*rotations)
leapct.set_conebeam(
 numAngles=projection_count,
 numRows=rows,
 numCols=columns,
 pixelHeight=1,
 pixelWidth=1,
 centerRow=0.5*(rows-1),
 centerCol=0.5*(columns-1),
 phis=angles,
 sod=570,
 sdd=1040
)
leapct.set_normalizedHelicalPitch(1)
#leapct.set_volume(512,512,192, voxelWidth=0.4382208, voxelHeight=0.625, offsetZ=0.0)
leapct.set_default_volume()
# 'SF' has the same result as 'VD' for this test
leapct.set_projector('VD')
def load_projection_data(projections_path, num_projections_per_rotation, detector_rows, detector_cols, num_rotations=3):
 # ommitted as just loading data from tiff files
 
g_loaded = load_projection_data(projections_path, projections_per_rotation, rows, columns, num_rotations=rotations)
g = np.ascontiguousarray(g_loaded, dtype=np.float32)
leapct.set_rampFilter(12)
f = leapct.allocate_volume() # shape is numZ, numY, numX
f[:] = 0.0
leapct.FBP(g, f)
leapct.display(f)
You must be logged in to vote

Replies: 2 comments

Comment options

I'm sorry, I should have made it clear that the ramp filter does not apply to helical FBP. Helical FBP does not use a ramp filter. The filtering step is a derivative across parallel rays and a Hilbert filter along the columns of the detector.

You must be logged in to vote
0 replies
Comment options

That would explain it, thanks. Rebinning the data to parallel then reconstructing seems to use the ramp filter, that works well enough for my purposes for now.

Out of curiosity, I did a bit of reading, and making some naive leaps based on the technical documentation I guess it would be possible to derive different filters that would work with the helical reconstruction? Something like, design a ramp + high pass filter then decompose into Hilbert and difference? Assuming that's possible, I'm sure it's more complicated than it sounds, and I may be talking non-sense (I'm a computer science person and pretty weak on Math).

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /