Page 1 of 1

.vtp geometry file visualization tool

Posted: Tue Apr 22, 2008 2:41 am
by fristoker
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

RE: .vtp geometry file visualization tool

Posted: Tue Apr 22, 2008 6:24 am
by danielleib
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

RE: .vtp geometry file visualization tool

Posted: Tue Apr 22, 2008 10:17 am
by aymanh
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

RE: .vtp geometry file visualization tool

Posted: Wed Apr 23, 2008 4:58 pm
by twdorn
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

RE: .vtp geometry file visualization tool

Posted: Mon Apr 28, 2008 10:21 am
by danielleib
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

RE: .vtp geometry file visualization tool

Posted: Mon Apr 28, 2008 5:03 pm
by twdorn
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


RE: .vtp geometry file visualization tool

Posted: Tue Jul 15, 2008 8:54 pm
by alston
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

Re: RE: .vtp geometry file visualization tool

Posted: Wed Dec 31, 2014 12:16 am
by richardbaker
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.

Re: .vtp geometry file visualization tool

Posted: Fri Mar 20, 2015 9:26 pm
by zeomkean
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)).