[vtkusers] Triangle prunning
Eduardo Suarez-Santana
esuarez at itccanarias.org
Mon Jan 31 05:26:23 EST 2011
This is the example I am running.
$ wget http://dl.dropbox.com/u/393132/marching%20test.tar.bz2
--2011-01-31 10:23:10--
http://dl.dropbox.com/u/393132/marching%20test.tar.bz2
Connecting to 10.141.188.10:3128... conectado.
Petición Proxy enviada, esperando respuesta... 200 OK
Longitud: 435105 (425K) [application/octet-stream]
Saving to: `marching test.tar.bz2'
100%[====================================>] 435.105 25,8K/s in
12s
2011-01-31 10:23:23 (35,9 KB/s) - `marching test.tar.bz2' saved
[435105/435105]
$ tar tjvf marching\ test.tar.bz2
drwx------ eduardo/eduardo 0 2011-01-26 13:37 marching test/
-rw------- eduardo/eduardo 314 2011-01-26 13:33 marching
test/input_data.mhd
-rw------- eduardo/eduardo 285684 2011-01-26 13:33 marching
test/output_mesh.stl
-rw------- eduardo/eduardo 172693 2011-01-26 13:33 marching
test/output_mesh.vtk
-rw------- eduardo/eduardo 106415 2011-01-26 13:35 marching test/mesh-2.png
-rw------- eduardo/eduardo 83409 2011-01-26 13:36 marching test/mesh-1.png
-rwxr-xr-x eduardo/eduardo 930 2011-01-26 13:33 marching
test/marchingcubes.tcl
-rw------- eduardo/eduardo 373248 2011-01-26 13:32 marching
test/input_data.raw
$ tar xjvf marching\ test.tar.bz2
marching test/
marching test/input_data.mhd
marching test/output_mesh.stl
marching test/output_mesh.vtk
marching test/mesh-2.png
marching test/mesh-1.png
marching test/marchingcubes.tcl
marching test/input_data.raw
$ cat marching\ test/marchingcubes.tcl
#!/bin/env vtk
set iname "input_data"
set oname "output_mesh"
package require vtk
# minus one
set X 35
set Y 35
set Z 71
vtkImageReader reader
reader SetDataExtent 0 $X 0 $Y 0 $Z
reader SetFileName "${iname}.raw"
reader SetDataByteOrderToLittleEndian
reader SetNumberOfScalarComponents 1
reader SetFileDimensionality 3
reader SetDataScalarTypeToFloat
reader SetDataSpacing 0.9375 0.9375 1
vtkMarchingCubes marcher
marcher SetNumberOfContours 1
marcher SetValue 0 4.0
marcher SetInput [reader GetOutput]
#vtkTriangleFilter triangler
# triangler SetInput [marcher GetOutput]
vtkPolyDataWriter pldw
# pldw SetInput [triangler GetOutput]
pldw SetInput [marcher GetOutput]
pldw SetFileName "${oname}.vtk"
pldw SetFileTypeToBinary
pldw Write
vtkSTLWriter stlw
# stlw SetInput [triangler GetOutput]
stlw SetInput [marcher GetOutput]
stlw SetFileName "${oname}.stl"
stlw SetFileTypeToBinary
stlw Write
exit
El 26/01/11 13:41, Eduardo Suarez-Santana escribió:
> Sorry for the late response.
>
> I'm having this issue just with Marching Cubes. You can test with this
> example (~500KB):
>
> http://dl.dropbox.com/u/393132/marching%20test.tar.bz2
>
> -Eduardo
>
>
> El 11/10/10 22:39, Bill Lorensen escribió:
>> This situation should not happen with Marching Cubes. Did you run a
>> decimation algorithm after Marching Cubes?
>>
>> On Mon, Oct 11, 2010 at 7:28 AM, Eduardo Suarez-Santana
>> <esuarez at itccanarias.org> wrote:
>>> I'm using a vtkMarchingCubes and a vtkTriangleFilter to get a
>>> triangular mesh from a 3-d image dataset.
>>>
>>> However, I get a triangular mesh with some extra-triangles on it. That
>>> is, I get a triangle sharing one edge (let's say edge X) with the mesh,
>>> and with its opposite vertex just belonging to this triangle. In other
>>> words, edge X belongs to three triangles, two from the correct mesh, one
>>> from an extra triangle.
>>>
>>> Is there a way to avoid the creation of these triangles, or to remove
>>> them? I tried vtkFeatureEdges with no success.
>>>
>>> Thanks,
>>> -Eduardo
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at 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
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> 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
>
> Please keep messages on-topic and check the VTK 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