[vtkusers] projection onto a plane

Lars Friedrich Lars lars-friedrich at gmx.net
Mon Jan 18 17:04:21 EST 2010


Hi,

what kind of objects do you have? Poly data or image data (volumetric data)?

If you had image data, you could simply set up a camera according to your projection requirements, and use a volume mapper to generate the desired projection (on a virtual image plane). E.g. a maximum intensity projection or something like that would generate the 'aperture'-like projection.

If you had poly data, the task might be a bit more complicated (at least to my knowledge) especially depending on whether you need the generated 2D-projection of the 3D-object as (A) a (closed) 2D-contour (poly data) or (B) 'for visualization only'.

regarding (B): Have a look at this posting http://old.nabble.com/3D-surface-to-2D-silhouette-to26642059.html#a26642059 where vtkPolyDataSilhouette is used for generating an aperture-like poly data representation. NOTE: this filter is more or less for visualization purposes only as it does not map (and logically connect) the extracted edge (~lines) onto the virtual plane. Moreover, this filter will produce edges that do not really conform to a traditional 'silhouette' - there will occur interesting artifacts which are intuitionally not part of the silhouette. Generating real silhouettes (or aperture shapes) from pure 3D poly data will in general be very difficult, I think.

regarding (A): Some weeks ago, I faced (and still do) this issue too. I did not write a pipeline to accomplish this, but I think the following approximate approach should be possible:
- Convert the 3D poly data to a 3D (most simple: binary) image, e.g. using vtkSampleFunction, vtkImplicitDataSet
- apply a volume mapper with the desired camera setup to the generated volume (e.g. with maximum intensity projection or a more efficient implementation - 'first voxel hit' or so)
- apply a vtkContourFilter to the generated 2D-projection (frame buffer image) and extract the 2D poly data contour(s)

regards,
lars


-------- Original-Nachricht --------
> Datum: Mon, 18 Jan 2010 15:15:17 +0000
> Von: KS Jothybasu <jothybasu at gmail.com>
> An: vtkusers at vtk.org
> Betreff: [vtkusers] projection onto a plane

> Hi all,
> 
> I am trying to projects the objects on to a plane that is at a known
> distance from the camera/ source.
> 
> Let me explain further
> 
> you have your eye at 0cm and you have an aperture before your eye at 50cm,
> if you view through the aperture the objects below the aperture will
> appear.
> I want to projeect these objects on to a plane lets say, 80 cm.
> 
> How to do that?
> 
> Thanks
> 
> Jothy

-- 
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02



More information about the vtkusers mailing list