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

SPECTUB: write warning if image radius is larger than detector radius #1275

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

KrisThielemans
Copy link
Collaborator

Fixes #567

@KrisThielemans
Copy link
Collaborator Author

@mastergari potentially there's a similar warning that could be written for the pinhole code, but I didn't immediately see where. In any case, it is not vitally important.

@mastergari
Copy link
Contributor

@KrisThielemans the pinhole-SPECT code checks if a voxel is located behind or within a pinhole. These are checked when looping over the holes during weight matrix calculation.

case 88: error( "\n\nError weight3d: Voxel located behind or within the hole.\nRevise volume settings or use cyl mask.\n" ); break;

bool check_xang_par( voxel_type * v, hole_type * h ){
bool ans = true;
//...vector voxel-hole, angles and distances...............................
float ux1 = h->x1 - v->x1 ;
float uy1 = h->y1 - v->y1 ;
if ( uy1 <= EPSILON ) error_weight3d ( 88, "" );

void voxel_projection_mph ( lor_type * l, voxel_type * v, hole_type * h, wmh_mph_type &wmh )
{
//...vector voxel-hole, angles and distances...............................
float ux1 = h->x1 - v->x1 ;
float uy1 = h->y1 - v->y1 ;
float uz1 = h->z1 - v->z ;
if ( uy1 <= EPSILON ) error_weight3d(88, "" );

@KrisThielemans KrisThielemans merged commit 562ea08 into UCL:master Oct 25, 2023
7 checks passed
@KrisThielemans KrisThielemans deleted the SPECTradiuswarning branch October 25, 2023 06:40
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

Successfully merging this pull request may close these issues.

SPECTUB matrix should check rotation radius etc
2 participants