[vtkusers] Re: Problem Interpreting z-buffer data. -- how to convert z-buffer values to quantitative measurements

Abdalmajeid Alyassin alyassin at yu.edu.jo
Sun Dec 11 03:46:22 EST 2005


A possible solution ...
Although the the two planes don't constitue a closed surface, there is a
volume enclosed along of the three major axes between these two planes.
Therefore, you still can measure the volume using vtkMassProperties class.
This class gives you four volume estimates; the final volume, and three
volumes along the three major axes volume(x), volume(y), volume(z).  By
looking at latter three volumes, you're see two unrealistic volumes, but the
third one should be what you're looking for.


Abdalmajeid Alyassin
p.s.  make sure the triangulate the surface ...


>    1. Re: Problem Interpreting z-buffer data. -- how to convert
>       z-buffer values to quantitative measurements !!!!!! (Clinton
Stimpson)
> Message: 1
> Date: Thu, 08 Dec 2005 12:12:32 -0700
> From: Clinton Stimpson <clinton at elemtech.com>
> Subject: Re: [vtkusers] Problem Interpreting z-buffer data. -- how to
> convert z-buffer values to quantitative measurements !!!!!!
> To: vtkusers at vtk.org, cdeepakroy at yahoo.com
> Message-ID: <439885A0.7010703 at elemtech.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> You can look at the code in vtkSelectVisiblePoints to see how to
> transform between z-buffer data to world coordinates.
> You'd also have to take samples to find the width & height in world
> coordiantes of a screen pixel.
>
> To find the volume enclosed in a set of triangulated surfaces, one can
> walk each triangle and sum the volumes of imaginary tetrahedrons where
> each tetrahedron is composed of three points of a triangle and the
> origin (0,0,0).
>
> vtkRenderer::ParallelProjectionOn is all you need for orthographic
> projection.
>
> Clint
>
> >Date: Thu, 8 Dec 2005 08:55:41 -0800 (PST)
> >From: Deepak Roy <cdeepakroy at yahoo.com>
> >Subject: [vtkusers] Problem Interpreting z-buffer data. -- how to
> > convert z-buffer values to quantitative measurements !!!!!!
> >To: vtkusers at vtk.org
> >
> >hello,
> >
> >  I am trying to compute the volume enclosed between two surface by
subtracting the z-buffers of the two surfaces. I am using parallel
projection for the computation.
> >
> >  I computed the z-buffer difference, This difference is relative to the
viewport size set up. I have no idea how to convert this difference to a
quantitative estimate of the voume. I have problems interpreting the
z-buffer data.
> >
> >  Firslty, how to set the orthographic projection in VTK ? i call
vtkRenderer::ParallelProjectionOn and then invoke vtkRenderer::ResetCamera.
Is this enough ? or is anything wrong.  Because when i looked through the
VTK code, i found glOrtho in vtkCamera::ComputePerspectiveTransform.
> >
> >  How can i transform the z-buffer values to quantitative z-values of the
geometry renderer ?
> >
> >  I tried multiplying it with the inverse of the
vrkCamera::GetViewTransformation matrix but it doesnt work.
> >
> >  I also tried doing vtkCamera::ViewToWorld on the final difference but
this still does not work.
> >
> >  Can anyone tell me, how to transform the z-buffer difference to a
quantitative estimate of the volume.
> >
> >  Please Help !!!!!!!!
> >
> >  Thanks in advance.
> >
> >  Regards,
> >
> >  Deepak
> >
> >
>
>
>> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest, Vol 20, Issue 9
> ***************************************




More information about the vtkusers mailing list