.vtp geometry file visualization tool

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Christopher Lee
Posts: 9
Joined: Thu Feb 14, 2008 5:55 am

.vtp geometry file visualization tool

Post by Christopher Lee » Tue Apr 22, 2008 2:41 am

Hi,

I have found a free simple tool to watch and change the .vtp geometry files of each bones that are in the folder /Geometry/...

"ParaView" is an opensource, multi-platform scientific visualization application. You can easily edit, transform, translate, watch the VTK polygonal Data.
I use it to have a look and to change the axis of rotation of the subtalar joint in the foot...

It may interest someone

Good luck,
Christopher

User avatar
Daniel Leib
Posts: 75
Joined: Mon Sep 11, 2006 6:44 am

RE: .vtp geometry file visualization tool

Post by Daniel Leib » Tue Apr 22, 2008 6:24 am

Thanks! I've been looking for something like this, I'm surprised it didn't show up in my google-hunting.

Have a good one,

Dan

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

RE: .vtp geometry file visualization tool

Post by Ayman Habib » Tue Apr 22, 2008 10:17 am

Christopher,

Thanks for sending this out.

One issue to be aware of however, is that Paraview comes with its own version of VTK that may or may not be consistent with the version of VTK used by OpenSim. So, be on the lookout if you see unexpected graphics behavior in OpenSim.

Actually you can also use Paraview to import .stl files from CAD systems and convert them to .vtp files.

-Ayman

User avatar
Tim Dorn
Posts: 125
Joined: Tue Feb 26, 2008 10:14 pm

RE: .vtp geometry file visualization tool

Post by Tim Dorn » Wed Apr 23, 2008 4:58 pm

Hi.

Actually when saving the vtp file in Paraview, you can choose 3 formats: appended, binary or ascii. Choosing ascii results in the saved file being fully compatible with OpenSim.

Tim

User avatar
Daniel Leib
Posts: 75
Joined: Mon Sep 11, 2006 6:44 am

RE: .vtp geometry file visualization tool

Post by Daniel Leib » Mon Apr 28, 2008 10:21 am

Hi Tim,

I took your advice from this thread and saved a tibia stl file as ascii then imported it in to the bothlegs.osim model. The file itself imported beautifully, but the scaling and position of the tibia in relation to everything else is quite a bit off. I imagine this is due to the file's orientation and size within the Paraview program when it's saved; I see the option to scale the file in Paraview, but do you have any insight on how to best make sure the orientation and scale of the stl match that of the rest of a my.osim model?

Thanks for any help you can provide,

Dan

User avatar
Tim Dorn
Posts: 125
Joined: Tue Feb 26, 2008 10:14 pm

RE: .vtp geometry file visualization tool

Post by Tim Dorn » Mon Apr 28, 2008 5:03 pm

Hey Daniel,

In my limited experience, there are two things that determine the location of the bone in the openSim workspace.

1) The location of the origin of the tibia in the vtp file (Paraview allows you to visualize this).

2) The translation & rotation values to get from one frame to another (this is defined as SimodyTranslationDof and SimbodyRotationDof)


So for opensim to place your new tibia bone in the workspace, it starts with the femur local coordinate system, then performs the translations/rotations defined by 2), then this is where the origin of the tibia bone in 1) is placed. Since the femur/tibia translations are defined as a function of knee_angle, there could be some discrepancy if your tibia geometry is of a different size to the default one provided.

It is a little difficult since you are changing only one bone, but if you only want the vtp geometry for animation purposes, a trial and error approach could be ok. Or perhaps work out the dimensions of the original tibia geometry and scale your one to that.

I use Rhinoceros NURBS modelling software to open stl files for placing the origin & scaling, then open it in paraview and save as a vtp file.

I'll be doing a similar thing with the tibia and femur very soon so let me know how you go.

Cheers,

Tim


User avatar
Joseph Alston
Posts: 26
Joined: Tue May 13, 2008 9:51 am

RE: .vtp geometry file visualization tool

Post by Joseph Alston » Tue Jul 15, 2008 8:54 pm

Tim,

Could you describe the capabilities of the Rhinoceros NURBS software some more? One of the thing that I'm interested in is how small of and increment does the Rhinoceros NURBS software allow you to move the bones? I ask this because I was trying to modify some geometry files in paraview, but it would only let me move things in increments of centimeters. And that is far too large of an increment.

Thank you,
Joseph Alston

User avatar
Richard Baker
Posts: 1
Joined: Thu Mar 22, 2012 12:11 pm

Re: RE: .vtp geometry file visualization tool

Post by Richard Baker » Wed Dec 31, 2014 12:16 am

twdorn wrote:Hi.

Actually when saving the vtp file in Paraview, you can choose 3 formats: appended, binary or ascii. Choosing ascii results in the saved file being fully compatible with OpenSim.

Tim
Don't know if things have changed since 2008 but I've found in saving simple shapes (sphere) to .vtp with Paraview I've had to select data mode as "ascii" and leave "Encode appended data" unchecked. I've also had to edit the resulting file so that the first two lines read:

<?xml version="1.0"?>
<VTKFile type="PolyData" version="0.1" byte_order="LittleEndian" header_type="UInt64">

i.e. add the first line and change the version from 1.0 to 0.1.

User avatar
ahsan wattoo
Posts: 1
Joined: Fri Mar 20, 2015 9:15 pm

Re: .vtp geometry file visualization tool

Post by ahsan wattoo » Fri Mar 20, 2015 9:26 pm

In trying to solve this issue I found out how to control the writing of the simulation results files (tool.setPrintResultFiles(true/false)), but not the information that goes to the screen. In the Doxygen I found setVerboseLevel under Tool, but I could not get that to work with the Forward Tool (seems it may not be intended to, based on methodsview(ForwardTool)).
We are the leading the world in providing best test-king ccna certification dumps toefl practice test prep solutions. Our incredible offers for arabiconline questions. surfacelanguages

POST REPLY