Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert ASTRA geometry to TIGRE geometry? #383

Open
sjmgarnier opened this issue Jul 18, 2022 · 7 comments
Open

Convert ASTRA geometry to TIGRE geometry? #383

sjmgarnier opened this issue Jul 18, 2022 · 7 comments

Comments

@sjmgarnier
Copy link

Hello! This is more a question than an issue. Is there a way to convert ASTRA geometries into TIGRE geometries easily? Thanks in advance for your help.

@AnderBiguri
Copy link
Member

Hi! there isn't a function to do so (if you find one, please do commit it to TIGRE!), but unless you have a particularly weird geometry, it should be easy to create it or just fill the geometries by hand using ASTRA values.
Give it a shot, I also have a little experience with ASTRA so I may be able to help if you get stuck.

@sjmgarnier
Copy link
Author

@AnderBiguri Thanks for your very quick reply! We do have a bit of a weird geometry, that's why I'm looking for something that'll do the work for me :-) Long story short, we're using a "homemade" CT scanner in semi-fieldwork conditions in the tropical forest (you can read about an earlier work of ours here if that is of interest to you: https://arxiv.org/abs/2110.09017). We can't guarantee that the axis of rotation is always perfectly aligned with the source-detector axis, so we rely on posthoc calibration with fiducial markers for estimating the position of the source-detector couple relative to the axis of rotation. As a result, we have a different configuration for each angle.

@AnderBiguri
Copy link
Member

@sjmgarnier Oh, that is quite interesting!

Depends on how you obtain this parameters, adding them directly to TIGRE may be fairly easy. Most parameters (except detector/image sizes) can be given per-projection as an array in TIGRE, so given a variable DSD / DSO you can just input it as an array. Similarly, uCT machines tend to have a Axis/center of rotation (COR) error, so as you say, they are posthoc estimated and corrected for that. You can do that with the (somehow redundant but convenient) geometry parameter geo.cor. It basically translates to a horizontal shift on the axis of rotation from the source-detector line. This parameter can also be an array, per projection.

I think adding these in ASTRA can be a bit more complicated, so maybe your best go is to directly put them into TIGRE from whichever code you have that estimates them, as TIGRE geometry is slightly more user intuitive (for a standard scan, at least).

@sjmgarnier
Copy link
Author

@AnderBiguri Thanks, I'll look into that direction. We're using the standard estimateWorldCameraPose from Matlab for the calibration.

@AnderBiguri
Copy link
Member

@sjmgarnier let me know how it goes. I am trying to get a vector2tigre (i.e. 3 vectors with location and orientation for detector+image+source) version working, but I am struggling with it lately, so if you need something like that I may either have it coded soon, or could use help!

@sjmgarnier
Copy link
Author

@AnderBiguri I can try to use my very modest coding abilities to help, yes. Hopefully, I don't end up messing things up :-)

@AnderBiguri
Copy link
Member

This is already done for Python in #515, available in master. MATLAB is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants