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

Method isDicomTag

ij/src/main/java/ij/ImagePlus.java:1572–1582  ·  view source on GitHub ↗
(String key)

Source from the content-addressed store, hash-verified

1570 }
1571
1572 private boolean isDicomTag(String key) {
1573 if (key.length()!=9 || key.charAt(4)!=',')
1574 return false;
1575 key = key.toLowerCase();
1576 for (int i=0; i<9; i++) {
1577 char c = i!=4?key.charAt(i):'0';
1578 if (!(Character.isDigit(c)||(c=='a'||c=='b'||c=='c'||c=='d'||c=='e'||c=='f')))
1579 return false;
1580 }
1581 return true;
1582 }
1583
1584 /** Returns the numeric value from the "Info" property string
1585 * associated with 'key', or NaN if the key is not found or the

Callers 1

getStringPropertyMethod · 0.95

Calls 2

charAtMethod · 0.80
lengthMethod · 0.65

Tested by

no test coverage detected