[vtkusers] Re: casting one ray

John Biddiscombe john.biddiscombe at mirada-solutions.com
Wed Aug 27 04:52:33 EDT 2003


Just use a probefilter and a linesource with plenty of samples on it, then loop over each probed value to find the max. You can set the line source based on camera view direction and pixel location of screen pixel in world space.

JB


> -----Original Message-----
> From: Nico Vermaas [mailto:vermaas at astron.nl]
> Sent: 27 August 2003 08:37
> To: vtkusers at vtk.org
> Subject: [vtkusers] Re: casting one ray
> 
> 
> Hi,
> 
> But then I am back to square 1 with my original problem for 
> which I am trying to find a solution. 
> Let me explain.
> 
> I am picking on a MIP raycasted volume, but the result is not 
> the maximum pixel along the ray, but a pixel somewhere in the 
> middle of the volume. I don't know where and why the ray 
> stops or why it takes that particular pixel.
> 
> Is there some way to configure the pick? To tell it to go on 
> until it finds some threshhold? Or to return the pixel with 
> the maximum/minimum/average value along the ray?
> 
> Or is there another way to cast one ray and get back the MIP result?
> 
> Nico
> 
> 
> -------------
> Date: Tue, 26 Aug 2003 17:49:22 +0200
> From: "Jean M. Favre" <jfavre at cscs.ch>
> Organization: CSCS
> To: Nico Vermaas <vermaas at astron.nl>
> Cc: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] casting one ray?
> 
> Nico Vermaas wrote:
> > 
> > How can I cast one ray from one screen location?
> > 
> 
> How about the following manual page:
> 
> virtual int vtkPicker::Pick(float selectionX, 
>                             float selectionY, 
>                             float selectionZ, 
>                             vtkRenderer *renderer) 
>        
>       Perform pick operation with selection point provided. 
> Normally the
> first two values for the selection point are x-y pixel coordinate, and
> the third value is =0. Return non-zero if something was successfully
> picked.
>  
> -- 
> Dr. Jean M. Favre,                            email:favre at cscs.ch
> http://www.cscs.ch/people/Favre.html
> CSCS, Swiss Center for Scientific Computing | Tel:  +41 (91) 610.82.40
> Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82
> 
> --__--__--
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 



More information about the vtkusers mailing list