Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Radius instead of diameter in voxel range calculations? #9

Open
lk251 opened this issue Feb 5, 2017 · 1 comment
Open

Radius instead of diameter in voxel range calculations? #9

lk251 opened this issue Feb 5, 2017 · 1 comment

Comments

@lk251
Copy link

lk251 commented Feb 5, 2017

Forgive me if I've misunderstood, but shouldn't the radius be added and subtracted in the calculations below, instead of the diameter, if we're trying to determine the voxel range of the nodule?
Also, am I wrong in assuming that the 5 voxels added to each end of the range is some sort of padding?
Thank you.

    v_center = (center-origin)/spacing
    v_diam = int(diam/spacing[0]+5) 
    v_xmin = np.max([0,int(v_center[0]-v_diam)-5])
    v_xmax = np.min([width-1,int(v_center[0]+v_diam)+5])
    v_ymin = np.max([0,int(v_center[1]-v_diam)-5]) 
    v_ymax = np.min([height-1,int(v_center[1]+v_diam)+5])

@hllcy
Copy link

hllcy commented May 6, 2017

I have the same doubt. And is the "diam/spacing[0]" an approximation?

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

No branches or pull requests

2 participants