Hello, I am faced with the task of adapting VolumePicker for vtk.js from vtk so that it is possible to select a point on the volume that is rendered using VolumeRendering. Please tell me where to start, namely, the following questions are of interest:

The VolumePicker logic for selecting a point is somehow tied to OpenGL shaders.

Have there already been attempts to do this and what difficulties the developers faced.

And also i dont’t understand about t1 and t2 variable in source code. What it is? (Bellow screenshot)
And also i dont’t understand why is this->GlobalTMin constant needed

I have a demo version and it performs almost like what I expected, here is the basic logic:

Get pick point on screen and calculate a ray with origin and normal based on the camera parallel projection;

Get intersect point of the ray and the volume bounding box, this count cound be 0, 1, 2, when it is 1, take the origin as the start and the intersect as the end ;

Set up sample distance and get sample points from the intersect points;

Get the ct value of the sample points, if it meet the demands (in my project it is the bone ct value), return the one you need.