// File: StandardBodySegmentMassProperties.h // Portions copyright (c) 2007 Stanford University and Paul Mitiguy // Contributors: Paul Mitiguy and Jeff Reinbolt //-------------------------------------------------------------------------- // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject // to the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //-------------------------------------------------------------------------- #ifndef _STANDARDBODYSEGMENTMASSPROPERTIES_H_ #define _STANDARDBODYSEGMENTMASSPROPERTIES_H_ //---------------------------------------------------- #include "SimTKcommon.h" using namespace SimTK; //-------------------------------------------------------------------------- // Source: ADJUSTMENTS TO ZATSIORSKY-SELUYANOV'S SEGMENT INERTIA PARAMETERS // Paolo de Leva, Kinesiology Department, Indiana University, Bloomington, IN, 47405, USA // Journal of Biomechanics, Vol. 29, No. 9. pp. 1223 - 1230, 1996. // Note: The order of the columns on pg. 228 was changed to the following convention: // X-direction is what de Leva calls "Sagittal" // Y-direction is what de Leva calls "Longitudinal" // Z-direction is what de Leva calls "Traverse" // Note: The Foot's longitudinal and sagittal radii of gyration are // also transposed from the one's reported in the paper. //-------------------------------------------------------------------------- // Human body segment names: Head, Trunk, UpperArm, ForeArm, Hand, Thigh, Shank, Foot // segmentLengthInMM is measured in milli-meters and is the longest dimension (called "longitudinal" by de Leva) // massRatio is the body segment mass divided by the standard body's total mass // massCenterRatio is the body segment mass center distance from the origin bony marker divided by segmentLength // XRadiusOfGyrationRatio is the body segment radius of gyration about its mass center divided by segmentLength (called "Sagittal" by de Leva) // YRadiusOfGyrationRatio is the body segment radius of gyration about its mass center divided by segmentLength (called "Longitudinal" by de Leva) // ZRadiusOfGyrationRatio is the body segment radius of gyration about its mass center divided by segmentLength (called "Transverse" by de Leva) //-------------------------------------------------------------------------- class StandardBodySegmentMassProperties { public: // Constructor StandardBodySegmentMassProperties( const char *segmentName, Real segmentLengthInMM, Real massPercent, Real massCenterPercent, Real xRadiusOfGyrationPercent, Real yRadiusOfGyrationPercent, Real zRadiusOfGyrationPercent, Real standardBodyTotalHeightInMM ) { strcpy( mySegmentName, segmentName ); mySegmentLengthInMM = segmentLengthInMM; myMassRatio = 0.01 * massPercent; myMassCenterRatio = 0.01 * massCenterPercent; myXRadiusOfGyrationRatio = 0.01 * xRadiusOfGyrationPercent; myYRadiusOfGyrationRatio = 0.01 * yRadiusOfGyrationPercent; myZRadiusOfGyrationRatio = 0.01 * zRadiusOfGyrationPercent; myStandardBodyTotalHeightInMM = standardBodyTotalHeightInMM; } // Get this body segment's name const char* getSegmentName( void ) const { return mySegmentName; } // Check if "name" is the same as this body segment's name (case-insensitive, e.g., "HEAD" and "head" are identical strings) bool isSegmentName( const char *segmentName ) const { return strcmpi( segmentName, mySegmentName ) == 0; } // Get this standard body's segment length (based on anatomical/bony markers) Real getSegmentLengthInMM( void ) const { return mySegmentLengthInMM; } // Get this standard body segment's mass ratio to the standard body's total mass Real getMassRatio( void ) const { return myMassRatio; } // Get this standard body segment's center of mass distance from the origin marker divided by segment length. // This is in the Y-direction for all body segments except the foot where it is in the X-direction. // In de Leva, this was always the "longitudinal" direction. Real getMassCenterRatio( void ) const { return myMassCenterRatio; } // Get this standard body segment's X radius of gyration divided by segment length (called "Sagittal" by de Leva) Real getXRadiusOfGyrationRatio( void ) const { return myXRadiusOfGyrationRatio; } // Get this standard body segment's Y radius of gyration divided by segment length (called "Longitudinal" by de Leva) Real getYRadiusOfGyrationRatio( void ) const { return myYRadiusOfGyrationRatio; } // Get this standard body segment's Z radius of gyration divided by segment length (called "Transverse" by de Leva) Real getZRadiusOfGyrationRatio( void ) const { return myZRadiusOfGyrationRatio; } // Returns standard body's total height in milli-meters Real getStandardBodyTotalHeightInMM( void ) const { return myStandardBodyTotalHeightInMM; } // Returns standard human (male or female) body segment for the following name (or NULL if none exists) static const StandardBodySegmentMassProperties* getStandardHumanBodySegmentMassProperties( bool subjectIsFemale, const char *segmentName ); private: // Returns standard body segment for the following name (or NULL if none exists) static const StandardBodySegmentMassProperties* getStandardHumanFemaleBodySegmentMassProperties( const char *segmentName ); static const StandardBodySegmentMassProperties* getStandardHumanMaleBodySegmentMassProperties( const char *segmentName ); char mySegmentName[64]; // Name of segment, e.g., Head, Trunk, UpperArm, ForeArm, Hand, Thigh, Shank, or Foot Real mySegmentLengthInMM; // Distance between two endpoint markers Real myMassRatio; // Ratio of body segment mass to total mass Real myMassCenterRatio; // Ratio of distance between origin marker and body segment mass center to segment length Real myXRadiusOfGyrationRatio; // Ratio of x-radius of gyration to segment length (called "Sagittal" by de Leva) Real myYRadiusOfGyrationRatio; // Ratio of y-radius of gyration to segment length (called "Longitudinal" by de Leva) Real myZRadiusOfGyrationRatio; // Ratio of z-radius of gyration to segment length (called "Transverse" by de Leva) Real myStandardBodyTotalHeightInMM; // Standard body's total height in milli-meters static const StandardBodySegmentMassProperties myStandardHumanFemaleHead; static const StandardBodySegmentMassProperties myStandardHumanFemaleTrunk; static const StandardBodySegmentMassProperties myStandardHumanFemaleUpperArm; static const StandardBodySegmentMassProperties myStandardHumanFemaleForeArm; static const StandardBodySegmentMassProperties myStandardHumanFemaleHand; static const StandardBodySegmentMassProperties myStandardHumanFemaleThigh; static const StandardBodySegmentMassProperties myStandardHumanFemaleShank; static const StandardBodySegmentMassProperties myStandardHumanFemaleFoot; static const StandardBodySegmentMassProperties myStandardHumanMaleHead; static const StandardBodySegmentMassProperties myStandardHumanMaleTrunk; static const StandardBodySegmentMassProperties myStandardHumanMaleUpperArm; static const StandardBodySegmentMassProperties myStandardHumanMaleForeArm; static const StandardBodySegmentMassProperties myStandardHumanMaleHand; static const StandardBodySegmentMassProperties myStandardHumanMaleThigh; static const StandardBodySegmentMassProperties myStandardHumanMaleShank; static const StandardBodySegmentMassProperties myStandardHumanMaleFoot; }; //----------------------------------------------- #endif /* __STANDARDBODYSEGMENTMASSPROPERTIES_H_ */ //-----------------------------------------------