[vtkusers] The VTK Journal-New Submission

Alexandre GOUAILLARD agouaillard at gmail.com
Mon Feb 1 01:59:57 EST 2010


dear mike,

STL is not a scene format, it never includes cameras, objects, ect

You could find STL specs, but here is a simple wikipedia extract
(http://en.wikipedia.org/wiki/STL_(file_format)) for your convenience:
"""
STL files describe only the surface geometry of a three dimensional
object without any representation of color, texture or other common
CAD model attributes.
[...]
An STL file describes a raw unstructured triangulated surface by the
unit normal and vertices (ordered by the right-hand rule) of the
triangles using a three-dimensional Cartesian coordinate system.
"""

VRML and OBJ were defined to include much more than that and the VTK
implementation rightfully reflects that. Without even entering into
NURBs and other free forms surfaces, or the group-smoothing, LOD
algorithms that OBJ format supports, rendering and material
informations are inherently part of the graphic scene.

again, an extract of the .obj specs, for your convenience:
"""
Display/render attributes

o       bevel interpolation (bevel)
o       color interpolation (c_interp)
o       dissolve interpolation (d_interp)
o       level of detail (lod)
o       material name (usemtl)
o       material library (mtllib)
o       shadow casting (shadow_obj)
o       ray tracing (trace_obj)
o       curve approximation technique (ctech)
o       surface approximation technique (stech)
"""

Of course,
1. if you are dealing with an explicit discrete surface (let's say a
triangulation)
2. If you are only interested in the discrete geometry and topology
(as in cells, as you are gonna loose the topological information that
is explicit written as grouping in the obj file),
3. assuming that you are dealing with only one surface with a unique
connected component,

You could write an OBJ file directly from a polydata.

Converting a stack of image to a surface is off topic.

You are right, vtkRendering windows might not be an option on some
platform. Should you consider another file format to save your model
to then?

regards.

alex.


On Sat, Jan 30, 2010 at 9:21 PM, Mike Jackson
<mike.jackson at bluequartz.net> wrote:
> <sarcasm>
> Because polydata => mapper => actor => renderer => renderWindows =>
> OBJexporter is MUCH more intuitive and easy to figure out than
> polydata=>objWriter.
> </sarcasm>
>
> There are many times where I setup a "conversion" pipeline in order to
> read in some data (stack of images) and convert those to surface
> meshes. A vtkRenderWindow is not an option on some systems.
>
>  There are other Writers (such as STL and others) that do NOT need a
> vtkRenderWindow in order to write the file. Why would the same be
> needed for obj?
> _________________________________________________________
> Mike Jackson                  mike.jackson at bluequartz.net
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
>
>
>
> On Sat, Jan 30, 2010 at 3:39 AM, Alexandre GOUAILLARD
> <agouaillard at gmail.com> wrote:
>> hi david,
>>
>> obj, as vrml is supposed to handle complete scenes. That explain the
>> original difference between Reader/Writer of objects and
>> Importer/Exporter of scenes.
>>
>> I know that obj is often used to store mesh objects only, but was it
>> really necessary to add a class that somehow duplicate existing
>> feature? I say that naively without having read your paper first, feel
>> free to throw a stone at me :-)
>>
>> Basically you would have this:
>> polydata => objwriter
>>
>> instead of that:
>> polydata => mapper => actor => renderer => renderWindows => OBJexporter
>>
>> and it would only be interesting in the case where you only have a
>> single polydata, and/or when you have a polydata processing pipeline
>> that would not otherwise require a graphic pipeline,
>>
>> correct?
>>
>> alex.
>>
>> On Fri, Jan 29, 2010 at 11:01 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>>> On Fri, Jan 29, 2010 at 9:57 AM, Francois Bertel
>>> <francois.bertel at kitware.com> wrote:
>>>> Hello,
>>>>
>>>> How is it different from VTK/Rendering/vtkOBJExporter ?
>>>>
>>>> On Fri, Jan 29, 2010 at 9:49 AM, VTK Journal
>>>> <webmaster at insightsoftwareconsortium.org> wrote:
>>>>> Hello,
>>>>> A new submission has been added to the VTK Journal.
>>>>>
>>>>> Title: A Wavefront OBJ Writer for VTK
>>>>> Author(s): Doria D.
>>>>> Abstract:
>>>>> The Wavefront OBJ format is a common file format for storing mesh data. It is convenient to be able to write VTK data structures out into this format, as the data can then be used in software that can read OBJ files.
>>>>>
>>>>> Download and Review the paper at: http://www.midasjournal.org/browse/publication/711
>>>>>
>>>>> Generated by the VTK Journal
>>>>> You are receiving this email because you asked to be informed by the VTK Journal for new submissions.
>>>>>
>>>>> To change your email preference go to http://www.midasjournal.org .
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>
>>> It takes a vtkPolyData instead of a vtkRenderWindow.
>>>
>>> Thanks,
>>>
>>> David
>>> _______________________________________________
>>> 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