File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
components/formats-gpl/src/loci/formats/in Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 3434import ome .units .UNITS ;
3535import ome .units .quantity .Length ;
3636
37+ import org .slf4j .Logger ;
38+ import org .slf4j .LoggerFactory ;
39+
3740import org .xml .sax .Attributes ;
3841
3942/**
4548 */
4649public class MetamorphHandler extends BaseHandler {
4750
51+ private static final Logger LOGGER =
52+ LoggerFactory .getLogger (MetamorphHandler .class );
53+
4854 // -- Fields --
4955
5056 private Hashtable metadata ;
@@ -256,7 +262,15 @@ else if (key.equals("stage-position-y")) {
256262 }
257263 }
258264 if (key .equals ("wavelength" )) {
259- wavelengths .add (Integer .parseInt (value ));
265+ // usually this key represents an integer wavelength in nm
266+ // sometimes it can be a more descriptive string with no
267+ // usable value in nm
268+ try {
269+ wavelengths .add (Integer .parseInt (value ));
270+ }
271+ catch (NumberFormatException e ) {
272+ LOGGER .debug ("Could not parse wavelength value from {}" , value );
273+ }
260274 }
261275 else if (key .equals ("acquisition-time-local" )) {
262276 date = value ;
You can’t perform that action at this time.
0 commit comments