Personal tools
You are here: Home / cmgui / Wiki / How to change your xi directions if you got it wrong first time around...
Navigation
Log in


Forgot your password?
 

How to change your xi directions if you got it wrong first time around...

How to change your xi directions if you got it wrong first time around...

If you've developed your muscle models but have then gone to use them for mechanics or something and found your xi directions are not correct then this is how you can change them. I'm working through the leg and buttock muscles at the moment, changing their xi directions so they can be used for mechanics analysis at some stage.

  1. Create data points on the external faces of the fitted muscle that you currently have by manually selecting the faces in cmgui and putting these face numbers into the <a href="data_create.com">data_create.com</a> file. This needs to run on a local version of cm as there have been some changes made to some of the files for this to work properly (i.e. to put points on the correct faces). You can grab these modified files off me or kumar if you need to do this.
  2. Remove any versions/derivatives from the .exnode file of the fitted muscle. Also if you have central nodes in your current fitted model but don't need these then get rid of these from the .exnode file also.
  3. Using cmgui, load the modified .exnode file in and use the element creator to manually select nodes to create linear elements (as detailed "here":http://www.cmiss.org/cmgui/wiki/HowToCreateMusclesWithCorrectXiDirectionsForMechanics). Write out the nodes and elements and if you have used collapsed nodes then note down these node numbers.
  4. Run perl <a href="ex2ip.pl">ex2ip.pl</a> FILENAME

If you have collapsed nodes (nb: they can only have 2 versions) then do the next 2 steps, otherwise skip to fitting.

5. run perl <a href="addverions.pl">addverions.pl</a> NODE1,NODE2,NODE3,...,NODEn FILENAME where nodes 1 to n are the node numbers of your collapsed nodes

6. run perl <a href="ipmap.pl">ipmap.pl</a> NODE1,NODE2,NODE3,...,NODEn FILENAME where nodes 1 to n are the node numbers of your collapsed nodes

  1. run <a href="fit.com">fit.com</a> on cm. I have had to use an old version of cm as something was changed a wee while ago and it wouldn't let me do this anymore on the new version. You can try the normal cm, but if it doesn't work then grab the old_cm version off me. You will need these files to run the fit.com file: <a href="small.ippara">small.ippara</a>, <a href="threed.ipcoor">threed.ipcoor</a>, <a href="bicubic_linear_trilinear_pressure.ipbase">bicubic_linear_trilinear_pressure.ipbase</a>, and a .ipfit file (you can modify this one <a href="left_adductor_brevis.ipfit">left_adductor_brevis.ipfit</a>).