Re: vtk unstructured data

13 views
Skip to first unread message

Paul Novotny

unread,
Jun 1, 2015, 4:50:37 PM6/1/15
to Ricardo Ortiz, openSurgSim
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
> >>
> >>
> >


Ricardo Ortiz

unread,
Jun 2, 2015, 8:49:27 AM6/2/15
to Paul Novotny, openSurgSim
Paul -

That's great! Let me know how can I help.

Cheers,

/Ricardo

Paul Novotny

unread,
Jun 2, 2015, 3:10:58 PM6/2/15
to Ricardo Ortiz, openSurgSim
Ryan and I quickly pulled it all together. And pushed it to our
wip/VtkUnstructuredReader branch. I added a quick example, to get an
idea of how to put together a simple simulation:

https://www.assembla.com/code/OpenSurgSim/git/nodes/wip/VtkUnstructuredReader/Modules/VtkUnstructuredFEMReader/Test/scene.cpp

Let me know what you think.

-Paul

Ricardo Ortiz

unread,
Jun 16, 2015, 4:50:55 PM6/16/15
to Paul Novotny, openSurgSim
Hi Paul and others,

Sorry for the delay in responding to the thread...
This works great for me! I have been preoccupied with other tasks so I have not being able to play with it too much but I am looking forward to do so. 

Thank you,

/Ricardo
Reply all
Reply to author
Forward
0 new messages