[vtkusers] Proxy class for vtkUnstructuredGrid

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Oct 20 08:03:32 EDT 2011


Sorry to catch up so late, but yes it is possible.
You will need to use the adaptor/generic framework of VTK and create a
bunch of classes that will literally wrap your data structure to the
generic vtk one, specially the way to iterate other the cells.
This framework was meant to support cells that have high order, but it
would be trivial to map any existing cell type and field
interpolation.

you may want to start looking at that:
http://markmail.org/message/armw2dss3x4vbro7

Seb


On Wed, Oct 19, 2011 at 1:26 PM, Serge Lalonde <serge at infolytica.com> wrote:
> No one has replied to this question. Is it because no one has done it or it
> is because it was a silly question?
>
> Thanks.
>
> On 10/4/2011 2:08 PM, Serge Lalonde wrote:
>>
>> Has anyone ever tried to create a vtkUnstructuredGrid proxy class to wrap
>> their own mesh class?
>>
>> We have our own code for meshes and would like to avoid converting the
>> data from our format to the vtkUnstructuredGrid and instead have a wrapper
>> class that uses aggregation to store an instance of our own mesh class (a
>> triangular or a tetrahedral mesh) when this is added as the starting point
>> of a pipeline. The APIs would be wrappers that would get our data and
>> convert it to VTK data types.
>> This would avoid duplicating memory and speed up the pipeline by avoiding
>> the potentially large amount of data translation from our format to VTK's.
>>
>> Is this possible and/or practical?
>
> --
> www.infolytica.com <http:://www.infolytica.com>
> 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3
> (514) 849-8752 x236, Fax: (514) 849-4239
> _______________________________________________
> 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