Page 1 of 1

Scaling bone geometry

Posted: Thu Apr 05, 2018 7:27 am
by 00ocai
I'm having an issue scaling the bone geometry of my model. I want the torso i.e. spine to adjust it's length accordingly to the marker pair 'T10 & C7'. Likewise I would also like the rib cage to adjust in depth accordingly to the marker pair 'T10 & Xiphoid' and for the shoulder width dependent on the 'R_Acromium & L_Acromium'. I've adjusted the code for the scale set-up file as shown below:

Code: Select all

<Measurement name="torso">
						<!--Flag to turn on and off scaling for this measurement.-->
						<apply> true </apply>
						<!--Set of marker pairs used to determine the scale factors.-->
						<MarkerPairSet name="">
							<objects>
								<MarkerPair name="">
									<!--Names of two markers, the distance between which is used to compute a
									    body scale factor.-->
									<markers> T10 C7 </markers>
								</MarkerPair>
                                <MarkerPair name="">
                                    <markers> RightAcromium LeftAcromium </markers>
                                </MarkerPair>
                                <MarkerPair name="">
                                    <markers> T10 Sternum </markers>
                                </MarkerPair>
							</objects>
							<groups/>
						</MarkerPairSet>
						<!--Set of bodies to be scaled by this measurement.-->
						<BodyScaleSet name="">
							<objects>
								<BodyScale name="torso">
									<!--Axes (X Y Z) along which to scale a body. For example, 'X Y Z' scales
									    along all three axes, and 'Y' scales just along the Y axis.-->
									<axes> Y </axes>
								</BodyScale>
                                    <BodyScale name="torso">
                                        <!--Axes (X Y Z) along which to scale a body. For example, 'X Y Z' scales
									    along all three axes, and 'Y' scales just along the Y axis.-->
                                        <axes> Z </axes>
                                </BodyScale>
                                    <BodyScale name="torso">
                                        <!--Axes (X Y Z) along which to scale a body. For example, 'X Y Z' scales
									    along all three axes, and 'Y' scales just along the Y axis.-->
                                        <axes> X </axes>
                                </BodyScale>
							</objects>
							<groups/>
						</BodyScaleSet>
					</Measurement>
Unfortunately the bone geometry does not appear to change drastically and a considerable difference between my virtual and experimental markers still remains. If the model scaled the bone geometry correctly, then I can't see any reason to start increasing the weights of the markers. Does anyone have any suggestions or see problems with the code? I would assume that this would be possible to do in order to generate models with greater subject specificity?

Re: Scaling bone geometry

Posted: Tue Apr 10, 2018 9:41 am
by jimmy
The issue is occurring because of the way you have set up the measurement. You have three markerpairs (T10 C7, RightAcromium LeftAcromium,nT10 Sternum) for a single measurement; you are computing the average measurement using all three, NOT three independent measurements. You are then applying this to each axis of the Torso. The XML Code should look something like this;

Code: Select all

<Measurement name="torso_Y">
	<!--Flag to turn on and off scaling for this measurement.-->
	<apply> true </apply>
	<!--Set of marker pairs used to determine the scale factors.-->
	<MarkerPairSet name="">
	 <objects>
	    <MarkerPair name="">
	       <!--Names of two markers, the distance between which is used to compute a
	           body scale factor.-->
	       <markers> T10 C7 </markers>
	    </MarkerPair>
	 </objects>
	 <groups/>
	</MarkerPairSet>
	<!--Set of bodies to be scaled by this measurement.-->
	<BodyScaleSet name="">
	 <objects>
	    <BodyScale name="torso">
	       <axes> Y </axes>
		</BodyScale>
	 </objects>
	 <groups/>
	</BodyScaleSet>
</Measurement>
<Measurement name="torso_X">
	<!--Flag to turn on and off scaling for this measurement.-->
	<apply> true </apply>
	<!--Set of marker pairs used to determine the scale factors.-->
	<MarkerPairSet name="">
	 <objects>
	    <MarkerPair name="">
	        <markers> T10 Sternum </markers>
	    </MarkerPair>
	 </objects>
	 <groups/>
	</MarkerPairSet>
	<!--Set of bodies to be scaled by this measurement.-->
	<BodyScaleSet name="">
	 <objects>
	    <BodyScale name="torso">
	        <axes> X </axes>
		</BodyScale>
	 </objects>
	 <groups/>
	</BodyScaleSet>
</Measurement>
<Measurement name="torso_Z">
	<!--Flag to turn on and off scaling for this measurement.-->
	<apply> true </apply>
	<!--Set of marker pairs used to determine the scale factors.-->
	<MarkerPairSet name="">
	 <objects>
	    <MarkerPair name="">
	        <markers> RightAcromium LeftAcromium </markers>
	    </MarkerPair>
	 </objects>
	 <groups/>
	</MarkerPairSet>
	<!--Set of bodies to be scaled by this measurement.-->
	<BodyScaleSet name="">
	 <objects>
	    <BodyScale name="torso">
	        <axes> Z </axes>
		</BodyScale>
	 </objects>
	 <groups/>
	</BodyScaleSet>
</Measurement>
In the GUI, in 'Edit Measurement Set', you need to make independent measurement objects for each of the X,Y, and Z axes. You will then apply each of these independent measurements to the each of the X,Y, and Z axes of the Torso.