[vtkusers] picking a voxel in a MIP volume

John Biddiscombe biddisco at cscs.ch
Fri Feb 2 03:47:41 EST 2007


It is actually much easier to use a LineSource and a ProbeFilter, Make a 
line with adequat resolution (points) which has the geometry of the ray 
from the screen through the picked {x,y}. Use vtkProbeFilter on the 
volume using the line as source and this will give you intensity values 
along the ray. Iterate over the points and find the largest, you can 
then work out the coordinates of the MIP value from that. This approach 
saves you hacking the mappers.

JB

> Hi Ahmed,
>
> Thanks for the ideas. For #2, wouldn't I cast a ray parallel to the
> view (not perpendicular?). Everything else makes sense to me - just
> need to figure out how to do it with VTK!!!
>
> Thanks,
> Mark
>
> On 2/1/07, ahmed saad <ahmedalysaad2004 at yahoo.com> wrote:
>>
>> Hi,
>>     I think I solved this problem before.
>> Some Hints:
>> 1) take the nearest point on the bounding box around the volume rendered
>> object (vtkCellPicker)
>> 2) shot a ray from this point perpendicular to the view direction.
>> 3) get the intersection points along this ray to the volume data.
>> 4) get the location (x,y,z) for the maximum intensity point(s).
>> 5) if you have more than one point with maximum intensity. Choose the
>> nearest one with respect to the viewer.
>>
>> Best regards,
>> Ahmed Saad
>>
>>
>> ----- Original Message ----
>> From: Mark Wyszomierski <markww at gmail.com>
>> To: David E DeMarle <dave.demarle at kitware.com>
>> Cc: vtkusers at public.kitware.com
>> Sent: Thursday, February 1, 2007 6:52:54 AM
>> Subject: Re: [vtkusers] picking a voxel in a MIP volume
>>
>> hmm ok looks like i have to hack into the mapper then,
>>
>> thanks,
>> mark
>>
>> On 1/31/07, David E DeMarle <dave.demarle at kitware.com> wrote:
>> > I do not believe there is anything built in to do that. vtkCellPicker
>> > will obtain the closest cell along the ray for that pixel (the one on
>> > the near face) not the one that has the maximum value that you see
>> > there.
>> >
>> > Dave DeMarle
>> >
>> >
>> > On 1/31/07, Mark Wyszomierski <markww at gmail.com> wrote:
>> > > Hi,
>> > >
>> > > I'm doing a MIP rendering. Is there a way to 'pick' a voxel in the
>> > > rendered volume? I was thinking that the user could click a voxel in
>> > > the MIP volume, then I could display the picked voxel's x,y,z
>> > > location. Is this possible?
>> > >
>> > > Thanks,
>> > > Mark
>> > > _______________________________________________
>> > > This is the private VTK discussion list.
>> > > Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> > > Follow this link to subscribe/unsubscribe:
>> > > http://www.vtk.org/mailman/listinfo/vtkusers
>> > >
>> >
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>> ________________________________
>> Be a PS3 game guru.
>> Get your game face on with the latest PS3 news and previews at Yahoo! 
>> Games.
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82





More information about the vtkusers mailing list