CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
535 stars 180 forks source link

Consult about DSO and DSD implementation in SIRT #421

Closed lkccu closed 1 year ago

lkccu commented 1 year ago

Hi, author @duns . I have encountered a problem when using algo SIRT. When running the program in its normal configuration that DSD >DSO, The result image will be with a terrible ring artifact like this. 微信图片_20221224102908 When I fine-tuned the arguments that DSD < DSO, then the program will not run successfully. Could you help me with that?Thank you so much in advance. Regards. My geometry is as follows. `geo = tigre.geometry() geo.DSD = 842.178 # Distance Source Detector (mm) geo.DSO = 327.209 # Distance Source Origin (mm)

Image parameters

geo.nVoxel = np.array([390,1024,1024]) # number of voxels (vx) geo.sVoxel = np.array([39,102,102]) # total size of the image (mm) geo.dVoxel = geo.sVoxel / geo.nVoxel # size of each voxel (mm)

Detector parameters

geo.nDetector = np.array([1024,1024]) # number of pixels (px) geo.dDetector = np.array([geo.dVoxel[0], 0.8]) # size of each pixel (mm) geo.sDetector = geo.nDetector * geo.dDetector # total size of the detector (mm)

Offsets

geo.offOrigin = np.array([0, 0, 0]) # Offset of image from origin (mm) geo.offDetector = np.array([0, 0]) # Offset of Detector (mm)

MAKE SURE THAT THE DETECTOR PIXELS SIZE IN V IS THE SAME AS THE IMAGE!

geo.mode = "cone"`

lkccu commented 1 year ago

I wonder whether it happens with the original cbct TOO BIG or whatever else?

AnderBiguri commented 1 year ago

@lkccu hi!

I am not entirely sure what logic you used for the geometry parameters, but DSD/DSO and all the other parameters must be known to do recon. You can't try to guess them, the nature of CT recon means that you will not be able to do so.
In your first images however, I am not entirely sure that the issue is related to DSD/DSO at all! It may as well be a incorrect dDetector, or even a incorrect rotation angle direction. It is really hard to know.

My suggestion is to try from the start again, and use FDK to verify first that your geometry is correct. Once that, you can use iterative algorithms.

About DSD<DSO: this makes no sense. If the object is further than the detector, you can't detect it.

lkccu commented 1 year ago

Thank you!I will try to figure that out.

lkccu commented 1 year ago

@lkccu hi!

I am not entirely sure what logic you used for the geometry parameters, but DSD/DSO and all the other parameters must be known to do recon. You can't try to guess them, the nature of CT recon means that you will not be able to do so. In your first images however, I am not entirely sure that the issue is related to DSD/DSO at all! It may as well be a incorrect dDetector, or even a incorrect rotation angle direction. It is really hard to know.

My suggestion is to try from the start again, and use FDK to verify first that your geometry is correct. Once that, you can use iterative algorithms.

About DSD<DSO: this makes no sense. If the object is further than the detector, you can't detect it.

Hi,author.I figured that out in that issue.However, I have encountered a diffuculty in c-arm cbct recon.I tried algo d18 out but the result fell flat. Is that possible that I can recon a c-arm cbct image to a 3d matrix volume like normal CT image or there is another solution.

AnderBiguri commented 1 year ago

hi @lkccu:

Of course yoy can recon a c-arm cbct, that is what demo 18 is about. If it failed, it is likely that it is caused by the geometry not being the right one, but without more information there is nothing I can do to help!

lkccu commented 1 year ago

hi @lkccu:

Of course yoy can recon a c-arm cbct, that is what demo 18 is about. If it failed, it is likely that it is caused by the geometry not being the right one, but without more information there is nothing I can do to help!

I got stuck in the geometry configuration 'cause they sent me raw datas without any spatial information.The only I could tell from the image is the size.Can I contact with you through email so that I can send you the raw CT data.Many thanks in advance!

Regards.

AnderBiguri commented 1 year ago

@lkccu feel free to email me, of course, but without the geometry and anguler information, there will be nothing I can do. The ill-possedness of CT means that you can not infer the geometry from data, you must know it to reconstruct.

lkccu commented 1 year ago

@lkccu feel free to email me, of course, but without the geometry and anguler information, there will be nothing I can do. The ill-possedness of CT means that you can not infer the geometry from data, you must know it to reconstruct.

@AnderBiguri I am wondering which parameters should I know from the engineer or I can specify them.

TIGRE parameters

Geometry parameters Distance from source to detector (DSD) Distance from source to origin (DSO)

Detector parameters Number of pixels (nDetector) Size of each pixel (dDetector)
Total size of the detector (sDetector)

Image parameters Number of voxels (nVoxel) Total size of the image (sVoxel) Size of each voxel (dVoxel)

AnderBiguri commented 1 year ago

@lkccu except the image parameters, which you can chose to change, everything else you must know perfectly to do reconstruction. Often, systems will also have geo.offDetector. You must also know the angles for each projection perfectly, and make sure you convert them (if needed) to the reference frame of TIGRE. If you are using a C-arm with arbitrary rotations, then you need to know 3 angles, corresponding to Euler ZYZ rotations. Likely the machine won't give you this, it likely gives you the 2 angles corresponding to each gantry position, but they can be converted to ZYZ with a bit of geometry.

There is no universal solution for this, so it is imperative that you understand the geometry of TIGRE and of your machine, and that you learn how to translate from one to the other.

If you are using a comercial machne with standard data formats that are open and repeatable/common, I am willing to give a further hand reading this information from the files, as long as I am able to add a data loader to TIGRE using this information. If the way you are obtaining this information is a bit more custom though, I really am powerless to help as I don't have the information required.

lkccu commented 1 year ago

Thank you so much for your considerable instruction!That helps me a lot since I am a starter in the CT recon.I will figure that out.Thank you!