[vtkusers] volume rendering of medical data

Thomas Faust tf at thermoanalytics.com
Fri May 28 08:39:52 EDT 2004


Before you start writing code, you should take a look in Chapter 9 
(Contributing Code) in the VTK Users Guide. The knowledge about the software 
patterns that are used in VTK are basics when writing new classes.

If you have look in the class tree, you'll find the class histories for 
vtkAbstractPicker. I recommended, to derive your VolumePicker from vtkPicker. 
(Its Figure 14-12 Page 274 in the latest user guide) Get closer to the source 
of vtkPointPicker and when you understand, what it does, it shouldn't be 
problem to write your own picker that fits your needs.

The algorithm i used you'll find at:
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=%27voxel+traversal+algorithm%27&btnG=Google+Search
I chosed this algorithm, because its fast. I have to handle models with the 
size of 500 Million voxels and it works in a split of a second.

Tom


On Thursday 27 May 2004 09:25 pm, you wrote:
> hi,
> 	Thanx for replying. Can you tell me some resources from where I can get
> sample code that does sth similar. Being new to VTK I am still a bit
> confused on the implementation details.
>
> Regards
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]On
> Behalf Of Thomas Faust
> Sent: Thursday, May 27, 2004 6:17 PM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] volume rendering of medical data
>
>
>
> I did exactly the same thing. Picking in a 3D model ist quite tricky. To
> get a point on the boundary box of the volume is easy. But most likely, the
> first layers of your model are air and you want to select pickels on the
> surface of your model, right?
>
> Here is, what I did. Derivate a calss from vtkPicker and overwrite the
> function IntersectWithLine(). This function gets an ray form the camera to
> your picked point in space as input variables, which is already cut at the
> clipping ranges.
>
> >From now on its math, but straigth forward. Look for the entry point of
> > the
>
> ray in your volume. (this you can do by vtkCell::HitBBox or with
> vtkBox::IntersectBox in newer VTK versions)
> Then use an 'voxel traversal algorithm' to travel through the voxels and
> find the one that is part of your interest, store the value in your picker
> and 'mark as picked'
>
> That's about it. Have fun.
>
> On Thursday 27 May 2004 04:05 am, Chandna, Sandeep (Research, Non-ge) wrote:
> > Hi,
> > 	I am doing a project in the field of medical imaging in VTK . I am quiet
> > new to VTK . I have to render a volume (3d) and have to allow user to
> > select points in 3d space, ie user can see the rendered volume and click
> > anywhere and that point ( in near vicinity ) should be selected . I have
> > to get the 3d coordinates of that particular point from the 2d display.
> > The display can be rotated abt any axis so the selection is based on what
> > is visible at any point of time in 2d. Can somebody tell me what all
> > classes in VTK will be of help and where can I get a refrence manual for
> > them. The documentation for VTK generated by DOxygen is quiet complex to
> > understand , is there any other doc available on the web.
> >
> >
> > Regards
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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