42 #if defined __cplusplus
47 static int nlab_Str = 0, nCOM_Str = 0;
48 static char lab_Str[] =
"lab", COM_Str[] =
"centerOfMass";
80 if( dimension > tpia_maxNumberOfFrames ) {
81 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"dimension argument = %d is greater than tpia_maxNumberOfFrames = %d", dimension,
82 tpia_maxNumberOfFrames );
85 for( i = 0, e = value; ( i < dimension ) && ( *e != 0 ); i++ ) {
86 if( strstr( e, lab_Str ) ==
e ) {
89 else if( strstr( e, COM_Str ) == e ) {
93 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"bad frame '%s' for %s", value, forItem );
98 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"bad separater for frame '%s' for %s", value, forItem );
105 if( i == dimension ) {
109 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"extra values for frame '%s' for %s", value, forItem );
112 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"missing values for frame '%s' for %s", value, forItem );
123 int i, dimension = 0;
127 if( ( value & 3 ) == 0 )
break;
140 char *str = NULL, *
p;
142 if( nlab_Str == 0 ) {
143 nlab_Str = strlen( lab_Str );
144 nCOM_Str = strlen( COM_Str );
146 for( i = 0; i <
n; i++ ) {
149 nStr += nCOM_Str + 1; }
151 nStr += nlab_Str + 1; }
157 if( nStr == 0 ) nStr = 1;
159 if( ( str = (
char*)
xData_malloc2( smr, nStr, 1,
"str" ) ) == NULL )
return( NULL );
160 for( i = 0, p = str - 1; i <
n; i++ ) {
164 strcpy( p, COM_Str );
167 strcpy( p, lab_Str );
183 for( i = 0; i < nColumns; i++ )
if(
tpia_frame_setColumn( smr, frame, i, values[i] ) != 0 )
return( 1 );
199 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"bad frame value = %d for column = %d", value, column );
202 i = 3 << ( 2 * column );
204 value = value << ( 2 * column );
221 value = frame->
frames >> ( 2 * column );
223 return( (
int) ( value & 3 ) );
226 #if defined __cplusplus