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

Start-point and end-point of rays #4

Open
relleums opened this issue Oct 16, 2019 · 2 comments
Open

Start-point and end-point of rays #4

relleums opened this issue Oct 16, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@relleums
Copy link
Contributor

Original request by Matteo Ravasi as discussed on scipy-dev mailing list:

Hi Sebastian,
I also looked into your package, ans I agree it would be a very nice
addition to scipy.

Just one question: in tomography it is common to know the start and
end points of a ray and they may lie somewhere inside the grid extent.
In your library I seem to be able to only have rays that cross
straight through the grid as they can only be parametrized by only
their support and angle. While this parametrization can be inferred
from start-end point, being able to have rays within (but not all the
way through the grid) would definitely make your routine more general
and applicable to various problems - then more suited to scipy.

Am I missing anything? Or do you think this feature could be easily
added without changing the current code base too much?

Thank you!

@relleums relleums added the enhancement New feature or request label Oct 16, 2019
@relleums
Copy link
Contributor Author

Hi Matteo,

you got it right. There is no start-point, and end-point in ray_voxel_overlap. I would have to write a unit-test to figure out if one has control over the start-point using the support-vector, but I did not implement the concept of an end-point. So this is a feature-request. I will put in on git-hub.

Cheers,
Sebastian

@relleums
Copy link
Contributor Author

For the interface what shall we use?

  • Proposal 1
    support-vector (3-D),
    direction-vector (3-D),
    start-parameter (1-D scalar),
    end-parameter (1-D scalar).

These are 8 floats in total.
start-point = support-vector + start-parameter * direction-vector
end-point = support-vector + end-parameter * direction-vector

Possible defaults might be
start-parameter = -inf,
end-parameter = +inf

Now it should behave as before.
Advantage: Not much change in interface.

  • Proposal 2
    start-vector,
    end-vector,

Only 6 floats in total.
User might have to separate the start-vector and end-vector manually in order to approximate an infinite ray in case the user does not want start-points, and end-points.

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

No branches or pull requests

1 participant