A Quad is 2D while a Tetra is 3D. A Quad can be turned into a triangle with vtkTriangleFilter.<br><br><div class="gmail_quote">On Sun, Apr 10, 2011 at 11:21 AM, Liam Kurmos <span dir="ltr"><<a href="mailto:quantum.leaf@gmail.com">quantum.leaf@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Does vtk provide a way to turn quads into tetras?<br>
<font color="#888888"><br>
Liam<br>
</font><div><div></div><div class="h5"><br>
<br>
On Sat, Apr 9, 2011 at 11:52 AM, Liam Kurmos <<a href="mailto:quantum.leaf@gmail.com">quantum.leaf@gmail.com</a>> wrote:<br>
> Thanks David!<br>
><br>
> On Sat, Apr 9, 2011 at 11:27 AM, David E DeMarle<br>
> <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>> wrote:<br>
>> It produces voxel cells not tetrahedral cells, so the mapping is one to one.<br>
>><br>
>> David E DeMarle<br>
>> Kitware, Inc.<br>
>> R&D Engineer<br>
>> 28 Corporate Drive<br>
>> Clifton Park, NY 12065-8662<br>
>> Phone: <a href="tel:518-371-3971" value="+15183713971">518-371-3971</a> x109<br>
>><br>
>><br>
>><br>
>> On Sat, Apr 9, 2011 at 3:59 AM, Liam Kurmos <<a href="mailto:quantum.leaf@gmail.com">quantum.leaf@gmail.com</a>> wrote:<br>
>>> I've attempted to convert imagedata to unstructured data as you<br>
>>> suggested some time back using vtkthreshold.<br>
>>> In the code below vtkVol is a vtkImageData with scalar point data.<br>
>>> However when i query the number of cells in the output unstructured<br>
>>> grid i get the same as in the structured data. I would image there<br>
>>> should be twice as many unstructured tetrahedra as cells in the<br>
>>> structured data, can you comment on this?<br>
>>><br>
>>> Liam<br>
>>><br>
>>><br>
>>> vtkSmartPointer<vtkThreshold><br>
>>> threshold=vtkSmartPointer<vtkThreshold>::New();<br>
>>> threshold->SetInput(vtkVol);<br>
>>> threshold->ThresholdByUpper(0);//scalars are all postive so threshold all<br>
>>> vtkSmartPointer<vtkUnstructuredGrid> volumeMesh=threshold->GetOutput();<br>
>>> threshold->Update();<br>
>>> cout<<" vtkug num cells "<<volumeMesh->GetNumberOfCells()<<endl;<br>
>>> cout<<" imagedata num cells "<<vtkVol->GetNumberOfCells()<<endl;<br>
>>><br>
>>><br>
>>><br>
>>> On Wed, Feb 9, 2011 at 3:34 PM, David E DeMarle<br>
>>> <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>> wrote:<br>
>>>> Threshold and many other subsetting filters produce arbitrary sets of<br>
>>>> cells, thus by definition they can not produce structured data.<br>
>>>><br>
>>>> David E DeMarle<br>
>>>> Kitware, Inc.<br>
>>>> R&D Engineer<br>
>>>> 28 Corporate Drive<br>
>>>> Clifton Park, NY 12065-8662<br>
>>>> Phone: <a href="tel:518-371-3971" value="+15183713971">518-371-3971</a> x109<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Wed, Feb 9, 2011 at 10:05 AM, Liam Kurmos <<a href="mailto:quantum.leaf@gmail.com">quantum.leaf@gmail.com</a>> wrote:<br>
>>>>> Hi David,<br>
>>>>><br>
>>>>> Thanks for replying.<br>
>>>>><br>
>>>>>> One way is to apply the threshold filter and set the threshold so that<br>
>>>>>> it includes the entire scalar range.<br>
>>>>><br>
>>>>> is it a side affect of the threshold filter that it will also produce<br>
>>>>> an unstructured grid from a structured one?<br>
>>>>><br>
>>>>> cheers,<br>
>>>>><br>
>>>>> Liam<br>
>>>>><br>
>>>><br>
>>><br>
>><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>