[vtkusers] stl to Ensite dif conversion
Bill Lorensen
bill.lorensen at gmail.com
Mon Sep 28 14:04:40 EDT 2015
Is there a specification of the DIF model format.
Bill
On Mon, Sep 28, 2015 at 1:42 PM, Sebastian Hilbert
<sebastian.hilbert at gmx.net> wrote:
> Hi,
>
> I have a stl file which get produced by a medical software. I need to convert
> this to another formal which is very similar to the vtk ascii format with
> polygonal dataset.
>
> The target format is like this:
>
> <DIFBody>
> <Volumes number="1">
> <Volume name="Left Atrium" color="eae0b2">
> <Vertices number="3984">
> 32.4603 6.0825 -40.3249
> 13.9858 7.9016 -41.0501
> 16.6287 7.6514 -40.4356
> 30.7806 7.9503 -41.1414
> </Vertices>
> <Normals number="3984">
> 0.220882 -0.586701 -0.779098
> -0.082953 -0.169572 -0.982021
> 0.393210 -0.647443 -0.652842
> -0.106461 -0.248735 -0.962703
> </Normals>
> <Polygons number="7968">
> 3 40 8
> 17 10 13
> 41 13 42
> 4 36 43
> </Polygons>
> </Volume>
> </Volumes>
> <Labels number="0">
> </Labels>
> </DIFBody>
> </DIF>
>
>
> What would be the best way to go about converting stl to Ensite dif ?
>
> I have a sample target file and converted it to stl and vtk with a tool called
> 3D object converter (http://3doc.i3dconverter.com/formats.html) which seems to
> be the only tool able to load Einsite dif files.
>
> Looking at the vtk file the polygons are different from the ones in the xml
> (dif) file. Looking at the stl file (ascii) I can see some vertex lines that
> match a line in the vertices section of the xml (dif) file but there are a lot
> more vertex lines in the stl file then there are in the xml (dif file).
>
> I would prefer to use python if that is an option.
>
> Any help is appreciated.
>
> Sebastian
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list