FNNDSC / ami

AMI Medical Imaging (AMI) JS ToolKit
https://fnndsc.github.io/ami/#viewers_upload
MIT License
721 stars 213 forks source link

[Help] Building a reference line #344

Open MuriloSchaefer opened 6 years ago

MuriloSchaefer commented 6 years ago

Description

I'm trying to code a reference line which you can control one plane moving or rotating this line in the other views. I tried to use the orientation helper, but it uses the index position and then I can project a diagonal line, for example. Is it possible to do with ami js? What is the best approach?

Expected Results

The expected results are like the figure below, where I can control the plane using the line reference.

screenshot_20180915_131221

the bug with the slices is related to the issue #277

Versions

Best, Schaefer

NicolasRannou commented 6 years ago

Hi @MuriloSchaefer,

I think I would use the raycaster somehow -

You could raycast the cursor position into the slice, see where that intersects, then using the intersection point update the position on the plane?

MuriloSchaefer commented 6 years ago

hm, interesting

but first I need to develop the line itself, making the intersection between both slices. I tried using the quaternion Equation of each slice and making the intersection of it and also just rendering the oblique slice in the other views, but without success.

Actually, when I just render the oblique slice, it works, but then is not a line in the other views, therefore it does not have the expected results.