MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getResultString

Method getResultString

ij/src/main/java/ij/macro/Functions.java:1368–1397  ·  view source on GitHub ↗
(ResultsTable rt)

Source from the content-addressed store, hash-verified

1366 }
1367
1368 String getResultString(ResultsTable rt) {
1369 interp.getLeftParen();
1370 String column = getString();
1371 int row = -1;
1372 if (interp.nextToken()==',') {
1373 interp.getComma();
1374 row = (int)interp.getExpression();
1375 }
1376 if (interp.nextToken()==',') {
1377 interp.getComma();
1378 String title = getString();
1379 rt = getResultsTable(title);
1380 }
1381 interp.getRightParen();
1382 if (rt==null)
1383 rt = getResultsTable(true);
1384 int counter = rt.size();
1385 if (row==-1) row = counter-1;
1386 if (row<0 || row>=counter)
1387 interp.error("Row ("+row+") out of range");
1388 int col = rt.getColumnIndex(column);
1389 if (rt.columnExists(col))
1390 return rt.getStringValue(col, row);
1391 else {
1392 String label = null;
1393 if ("Label".equals(column))
1394 label = rt.getLabel(row);
1395 return label!=null?label:"null";
1396 }
1397 }
1398
1399 String getResultLabel() {
1400 int row = (int)getArg();

Callers 3

getStringFunctionMethod · 0.95
doTableMethod · 0.95
fitCurveMethod · 0.45

Calls 14

getStringMethod · 0.95
getResultsTableMethod · 0.95
getLeftParenMethod · 0.80
getCommaMethod · 0.80
getExpressionMethod · 0.80
getRightParenMethod · 0.80
getLabelMethod · 0.65
nextTokenMethod · 0.45
sizeMethod · 0.45
errorMethod · 0.45
getColumnIndexMethod · 0.45
columnExistsMethod · 0.45

Tested by

no test coverage detected