[vtkusers] How to convert a triangular syrface mesh to a depth ( range ) image ???

David E DeMarle dave.demarle at kitware.com
Tue Feb 28 17:00:58 EST 2006


This is what was thinking:

* apply an elevation filter with the low point at y=x=z=0 to y=1,x=z=0
(adjust y start and end points and scalar range to correspond to your 
bounding box.)

* The output of the elevation filter is your poly data with the addition 
of a new array called "Elevation". At each point in the polydata the 
value of the Elevation array is the Y value.

* Apply a contour filter to contour on the Elevation array.

To get the other coordinates, use two more elevation filters. You'll 
have to find a different filter to change the names of "Elevation" to 
"X" "Y" and "Z" to avoid name collision.

hth,
Dave DeMarle


Deepak Roy wrote:

> Hello David,
>  
> Thanks for the reply.
>  
> I read the doc for vtkElevationFilter ( 
> http://www.vtk.org/doc/release/4.2/html/classvtkElevationFilter.html ).
>  
> It says it computes the projection ( probably perpendicular distance ) 
> of each point of my vtkPolyData onto the line.
>  
> But what would be helpful in my case is the projection onto the ( xy, 
> yz, zx ) coordinate planes.
>  
> How do i go about doing this ?
>  
> Let us simplify the problem....... Imaging for example we have a 
> hemisphere vtkPolyData --- facing towards the viewer and centered at 
> the origin ( 0 , 0 , 0 ).
>  
> Now, if i cut it with a plane "y = 0"  ---- i should get a curve -- a 
> circle of radius ( R ) equal to that of the hemisphere.
>  
> If i cut it with a plane "y = r / 2"  ---- i will get another circle 
> of a different radius.
>  
> How can i extract these contour curves ???
>  
> Thanks in advance.
>  
> Regrads,
>  
> Deepak
>  
> On 2/28/06, *David E DeMarle* <dave.demarle at kitware.com 
> <mailto:dave.demarle at kitware.com>> wrote:
>
>     It sounds like you want to run the surface through an elevation filter
>     or three along each axis. Then you get the X, Y, and Z values at each
>     point and to contour with.
>
>     hth,
>     Dave DeMarle
>
>
>     Deepak Roy wrote:
>
>     >
>     > hello everyone,
>     >
>     > I have a 3d surface scan of the front side a human body.
>     >
>     > I want to do some analysis on the "surface contour lines" about the
>     > y-axis ( the axis of symmetry for the human body ) and also the
>     x-axis.
>     >
>     > Which can be done approximately by converting the surface to a
>     depth (
>     > range ) image.
>     >
>     > Is there an easy way to achieve this in VTK ?
>     >
>     > Thanks in advance.
>     >
>     > Regards,
>     >
>     > Deepak Roy
>     >
>     >
>     >
>     >------------------------------------------------------------------------
>     >
>     >_______________________________________________
>     >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
>     >
>     >
>
>




More information about the vtkusers mailing list