diff --git a/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java b/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java index 1e71c08557b..14ec8f9fe76 100644 --- a/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java +++ b/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java @@ -1406,14 +1406,9 @@ else if (positions == 1) { } } } - else if (extraIndex == 0) { - store.setImageName("label image", i); - } - else if (extraIndex == 1) { - store.setImageName("macro image", i); - } - else { - store.setImageName("thumbnail image", i); + else if (extraIndex >= 0 && extraIndex < extraImages.size()) { + AttachmentEntry entry = extraImages.get(extraIndex).attachment; + store.setImageName(entry.getNormalizedName(), i); } // remaining acquisition settings (esp. channels) do not apply to @@ -3392,7 +3387,8 @@ private void translateExperiment(Element root) throws FormatException { platePositions.add(value); } String name = well.getAttribute("Name"); - for (int f=0; f