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

Method s2d

ij/src/main/java/ij/plugin/DICOM.java:953–964  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

951 }
952
953 double s2d(String s) {
954 if (s==null) return 0.0;
955 if (s.startsWith("\\"))
956 s = s.substring(1);
957 Double d;
958 try {d = Double.valueOf(s);}
959 catch (NumberFormatException e) {d = null;}
960 if (d!=null)
961 return(d.doubleValue());
962 else
963 return(0.0);
964 }
965
966 void getSpatialScale(FileInfo fi, String scale) {
967 double xscale=0, yscale=0;

Callers 2

getFileInfoMethod · 0.95
getSpatialScaleMethod · 0.95

Calls 3

startsWithMethod · 0.80
substringMethod · 0.80
valueOfMethod · 0.80

Tested by

no test coverage detected