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

Method getSpatialScale

ij/src/main/java/ij/plugin/DICOM.java:966–978  ·  view source on GitHub ↗
(FileInfo fi, String scale)

Source from the content-addressed store, hash-verified

964 }
965
966 void getSpatialScale(FileInfo fi, String scale) {
967 double xscale=0, yscale=0;
968 int i = scale.indexOf('\\');
969 if (i>0) {
970 yscale = s2d(scale.substring(0, i));
971 xscale = s2d(scale.substring(i+1));
972 }
973 if (xscale!=0.0 && yscale!=0.0) {
974 fi.pixelWidth = xscale;
975 fi.pixelHeight = yscale;
976 fi.unit = "mm";
977 }
978 }
979
980 boolean dicmFound() {
981 return dicmFound;

Callers 1

getFileInfoMethod · 0.95

Calls 3

s2dMethod · 0.95
substringMethod · 0.80
indexOfMethod · 0.45

Tested by

no test coverage detected