Example 2184: Fit a rect cart mesh to catscan femur data


The comfile run by this example is as follows:

#Example 2184  Fit rect cart mesh to femur CATSCAN data.                                                                            
                                                                                                                                    
#Data are projected onto the element ensemble by radial lines passing thru                                                          
#the centroid of each data scan plane. After the fit the derivatives and                                                            
#scale factors are updates to preserve arc length scaling.                                                                          
                                                                                                                                    
fem de coor;r;femur                       #3D rect cart                                                                             
fem de bas;r;femur                        #bicubic Hermite, arc length s.f.                                                         
fem de nod;r;femur                        #112 nodes                                                                                
fem de elem;r;femur                       #104 elements                                                                             
fem de wind;c                                                                                                                       
fem de li;c                               #calculate scale factors                                                                  
fem de data;r;femur                       #head+shaft                                                                               
                                                                                                                                    
#following finds data xi coordinates                                                                                                
fem de bas;r;femur_bilin                  #change to bilinear basis                                                                 
#next command finds data projections onto bilinear elements using the centroids                                                     
#of each scan plane as origins for the projection                                                                                   
fem de da;c xi centroid new in 65..72 cluster 72                                                                                    
fem de bas;r;femur                        #change back to bilinear basis                                                            
#now take derivative info into account and use previous projection as start                                                         
fem de da;c xi centroid old in 65..72 cluster 72                                                                                    
#or else use                                                                                                                        
#fem de data;r;femur xi                   !predefined xi coords                                                                     
                                                                                                                                    
fe change da weight 0.01 in 1..8          #these elements should be governed...                                                     
fe change da weight 0.01 in 50,54,55,56   #by their neighbours                                                                      
                                                                                                                                    
# fit as three orthogonal fields                                                                                                    
fem de field;r;femur                                                                                                                
fe de fit;r;femur_1 geom   #some stiffness in certain elements                                                                      
                           #and node 1 derivs fixed                                                                                 
                           #and nodes 1,2,3,4,37,39,41,43 tied to node 1.                                                           
fem fit                    #fit x                                                                                                   
fem update node in 1       #overwrite x                                                                                             
fe de fit;r;femur_2 geom   #fit y                                                                                                   
fem fit                                                                                                                             
fem update node in 2       #overwrite y                                                                                             
fe de fit;r;femur_3 geom   #fit z                                                                                                   
fem fit                                                                                                                             
fem update node in 3       #overwrite z                                                                                             
                                                                                                                                    
fem update node deriv      #rescale derivatives so d(x,y,z)/ds is normalized                                                        
fem de li;c                #recalculate arc length scale factors                                                                    
fem de nod;w;femur_fit                                                                                                              
                                                                                                                                    
#new iteration...find orthogonal projections onto ensemble and fit again                                                            
#fem define data;c xi orthog old                                                                                                    
#fem list data error                                                                                                                
#...                                                                                                                                
fem quit                                                                                                                            

Files used by this example are:

Name              Modified     Size

example_2184.com 10-Apr-2000 6.6k

Download the entire example:

Name                           Modified     Size

examples_2_21_218_2184.tar.gz 19-Aug-2006 1.7k

Html last generated: Sun Mar 6 05:50:09 2016

Input last modified: Mon Apr 10 17:21:28 2000


CMISS Help / Examples / 2 / 21 / 218 / 2184