Looks good! I just added those global properties to a new class so can
read them in too. I pushed my changes to the OpenSurgSim repo:
https://www.assembla.com/code/OpenSurgSim/git/nodes/wip/VtkUnstructuredReader/Modules/VtkUnstructuredFEMReader
I think the other side of this, using this in an Fem3DRepresentation,
will be pretty straight forward. Either I, or Ryan K, will take a look
at this.
BTW, I hope you don't mind, but I am pushing this conversation to the
mailing list for others to see.
-Paul
On Fri, 2015-05-29 at 23:30 +0000, Ricardo Ortiz wrote:
> Paul, Julien, Ryan -
>
> I wrote a function that can read vtk unstructured meshes with additional
> field data for boundary conditions and material properties. I was able to
> populate the TetrahedronMesh data structure as well. I used a data-less
> TetrahedronMesh and I did not add the boundary condition indices nor the
> material properties to the data structure. I did, however, showed how to
> extract the data from the vtu file. I can also write an example showing how
> to populate a vtu file with the field data as well. The test vtu mesh gets
> written by cmake (TestMesh.vtu) in the test binary directory.
>
>
https://www.assembla.com/code/ricortiz-OpenSurgSim-fork/git/nodes/wip/VtkUnstructuredReader/Modules
>
> Have a great weekend!
>
> /Ricardo
>
> On Thu, May 28, 2015 at 5:55 PM Ricardo Ortiz <
ricard...@kitware.com>
> wrote:
>
> > Hi Paul,
> >
> > Sounds like a good plan.
> > I will let you know if I have any questions.
> >
> > Thank you!
> >
> > /Ricardo
> >
> >
> >
> > On Thu, May 28, 2015 at 10:22 AM, Paul Novotny <
pnov...@simquest.com>
> > wrote:
> >
> >> Hi Ricardo,
> >>
> >> I wanted to get back to you about loading FEMs from VTK's unstructured
> >> data. The easiest way to do this is to make a "Module". If you look at
> >> the Modules directory in OpenSurgSim, any subdirectory put there will
> >> get added to the build by enabling BUILD_MODULE_<DirectoryName> in
> >> cmake. This is an easy way to extend OSS, and isolate a VTK dependency.
> >> To keep things simple, you can just write a free function
> >> "loadVtkUnstructuredData" or something, that returns the FEM. We haven't
> >> finalized and integrated the "FEM" into OSS, but you could get started
> >> by loading your information in a TetraheadronMesh
> >> (SurgSim/DataStructures/TetraheadronMesh.h). The FEM structure will be
> >> similar to this, we could actually handle it from there.
> >>
> >> Hope this helps, and of course, let me know if you have any questions.
> >>
> >> -Paul
> >>
> >>
> >