[vtkusers] Voxels

Jothy jothybasu at gmail.com
Tue Jul 5 10:23:43 EDT 2011


You could use vtkCutter to cut the mesh to get its outer coordinates, then
use your method to determine the voxel is inside or our.

Jothy

On Tue, Jul 5, 2011 at 3:11 PM, Alex Southern <mrapsouthern at gmail.com>wrote:

> Thanks for your reply,
>
> Yes I understand the basic idea, I already have an efficient method to
> identify if an infinite line in any direction will first intersect the plane
> of an arbitrary triangle in 3D space, if so it then projects the triangle
> onto one of the 3 co-ordinate planes, then determines if the point of
> intersection with the plane lies inside the triangle.
>
> I have this in MATLAB it works great, Im happy to share it with anyone.
>
> After an initial attempt, I am not sure of the best way to use this
> algorithim to make a robust voxelization.
>
> Thanks
> Alex
>
>
>
> On 5.7.2011 16:57, Dominik Szczerba wrote:
>
>> You will basically need a test routine to tell you if a given point
>> lies inside your triangular surface or outside. There is such a test
>> in VTK, but should you want to write your own one again, this is about
>> shooting rays and counting intersections. Sounds simple, but it is not
>> so to do efficiently and robustly.
>>
>> Dominik
>>
>> On Tue, Jul 5, 2011 at 3:47 PM, Alex Southern<mrapsouthern at gmail.**com<mrapsouthern at gmail.com>>
>>  wrote:
>>
>>> Hi,
>>>
>>> I have a closed triangular surface mesh, that I would like to represent
>>> as a
>>> volume of identically sized cubes. I understand this is known as
>>> voxelization where a single cube is referred to as a voxel.
>>>
>>> I am aware that VTK will probably do this for me. Though, for various
>>> reasons, I would like to implement this algorithm myself, can anyone give
>>> me
>>> a clue as to how to tackle this problem from the ground up? References
>>> would
>>> be great.
>>>
>>> Thanks
>>> Alex
>>>
>>>
>>>
>>>
>>> ______________________________**_________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/**opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_**FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>>
>>>
>>>
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_**FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110705/eb326554/attachment.htm>


More information about the vtkusers mailing list