diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1d0ca..653de29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# v2.0.2 (2024-05-30) + +### Bugfixes/Maintenance: +* Updated component package versions + * bioformats 7.3.0 + * bioformats2raw 0.9.3 + * raw2ometiff 0.7.1 +* CreateNGFF has a new option to omit original metadata from METADATA.ome.xml within the .zarr file +* raw2ometiff now scans .zarr files much faster + +### Known issues: +* The underlying bioformats package is currently unable to read some formats on ARM-based MacOS systems. + # v2.0.1 (2024-05-02) ### Bugfixes/Maintenance: diff --git a/build.gradle b/build.gradle index d44f48b..68e7099 100644 --- a/build.gradle +++ b/build.gradle @@ -7,10 +7,10 @@ plugins { id "com.github.hierynomus.license-report" version "0.16.1" } -version = '2.0.1' -String bfversion = "7.2.0" -String b2rversion = "0.9.2" -String r2oversion = "0.7.0" +version = '2.0.2' +String bfversion = "7.3.0" +String b2rversion = "0.9.3" +String r2oversion = "0.7.1" mainClassName = 'com.glencoesoftware.convert.Launcher' applicationName = 'NGFF-Converter' diff --git a/src/main/java/com/glencoesoftware/convert/tasks/CreateNGFF.java b/src/main/java/com/glencoesoftware/convert/tasks/CreateNGFF.java index 9b5be89..e37f04e 100644 --- a/src/main/java/com/glencoesoftware/convert/tasks/CreateNGFF.java +++ b/src/main/java/com/glencoesoftware/convert/tasks/CreateNGFF.java @@ -57,7 +57,7 @@ public enum prefKeys {LOG_LEVEL, MAX_WORKERS, COMPRESSION, TILE_WIDTH, TILE_HEIG DIMENSION_ORDER, DOWNSAMPLING, MIN_IMAGE_SIZE, REUSE_RES, CHUNK_DEPTH, SCALE_FORMAT_STRING, SCALE_FORMAT_CSV, FILL_VALUE, BLOSC_CNAME, BLOSC_CLEVEL, BLOSC_BLOCKSIZE, BLOSC_SHUFFLE, ZLIB_LEVEL, MAX_CACHED_TILES, MIN_MAX, HCS, NESTED, OME_META, NO_ROOT, PYRAMID_NAME, KEEP_MEMOS, MEMO_DIR, - READER_OPTS, OUTPUT_OPTS, EXTRA_READERS + READER_OPTS, OUTPUT_OPTS, EXTRA_READERS, WRITE_METADATA } @@ -91,6 +91,7 @@ public enum prefKeys {LOG_LEVEL, MAX_WORKERS, COMPRESSION, TILE_WIDTH, TILE_HEIG private static final ToggleSwitch disableMinMax; private static final ToggleSwitch disableHCS; private static final ToggleSwitch nested; + private static final ToggleSwitch originalMeta; private static final ToggleSwitch noOMEMeta; private static final ToggleSwitch noRoot; private static final TextField pyramidName; @@ -175,6 +176,7 @@ public void prepareForDisplay() { disableMinMax.setSelected(converter.getCalculateOMEROMetadata()); disableHCS.setSelected(converter.getNoHCS()); nested.setSelected(converter.getNested()); + originalMeta.setSelected(converter.getOriginalMetadata()); noOMEMeta.setSelected(converter.getNoOMEMeta()); noRoot.setSelected(converter.getNoRootGroup()); pyramidName.setText(converter.getPyramidName()); @@ -263,6 +265,7 @@ public int applySettings() { converter.setNoHCS(disableHCS.isSelected()); converter.setUnnested(!nested.isSelected()); + converter.setNoOriginalMetadata(!originalMeta.isSelected()); converter.setNoOMEMeta(noOMEMeta.isSelected()); converter.setNoRootGroup(noRoot.isSelected()); if (pyramidName.getText() != null && !pyramidName.getText().isEmpty()) @@ -323,6 +326,7 @@ public void cloneValues(BaseTask sourceInstance) { converter.setCalculateOMEROMetadata(source.converter.getCalculateOMEROMetadata()); converter.setNoHCS(source.converter.getNoHCS()); converter.setUnnested(!source.converter.getNested()); + converter.setNoOriginalMetadata(!source.converter.getOriginalMetadata()); converter.setNoOMEMeta(source.converter.getNoOMEMeta()); converter.setNoRootGroup(source.converter.getNoRootGroup()); converter.setPyramidName(source.converter.getPyramidName()); @@ -652,6 +656,16 @@ Default value to fill in for missing tiles (0-255) """ )); + originalMeta = new ToggleSwitch(); + advancedSettings.add(getSettingContainer( + originalMeta, + "Write original metadata", + """ + Write original metadata key/values + into NGFF file OME-XML metadata. + """ + )); + noOMEMeta = new ToggleSwitch(); advancedSettings.add(getSettingContainer( noOMEMeta, @@ -890,6 +904,7 @@ public void setDefaults() throws BackingStoreException { taskPreferences.putBoolean(prefKeys.MIN_MAX.name(), converter.getCalculateOMEROMetadata()); taskPreferences.putBoolean(prefKeys.HCS.name(), converter.getNoHCS()); taskPreferences.putBoolean(prefKeys.NESTED.name(), converter.getNested()); + taskPreferences.putBoolean(prefKeys.WRITE_METADATA.name(), converter.getOriginalMetadata()); taskPreferences.putBoolean(prefKeys.OME_META.name(), converter.getNoOMEMeta()); taskPreferences.putBoolean(prefKeys.NO_ROOT.name(), converter.getNoRootGroup()); if (converter.getPyramidName() != null) { @@ -957,6 +972,8 @@ public void applyDefaults() { prefKeys.MIN_MAX.name(), converter.getCalculateOMEROMetadata())); converter.setNoHCS(taskPreferences.getBoolean(prefKeys.HCS.name(), converter.getNoHCS())); converter.setUnnested(!taskPreferences.getBoolean(prefKeys.NESTED.name(), converter.getNested())); + converter.setNoOriginalMetadata( + !taskPreferences.getBoolean(prefKeys.WRITE_METADATA.name(), converter.getOriginalMetadata())); converter.setNoOMEMeta(taskPreferences.getBoolean(prefKeys.OME_META.name(), converter.getNoOMEMeta())); converter.setNoRootGroup(taskPreferences.getBoolean(prefKeys.NO_ROOT.name(), converter.getNoRootGroup())); converter.setPyramidName(taskPreferences.get(prefKeys.PYRAMID_NAME.name(), converter.getPyramidName())); @@ -1064,6 +1081,8 @@ public void exportSettings(JsonGenerator generator) throws IOException { generator.writeBoolean(converter.getNoHCS()); generator.writeFieldName(prefKeys.NESTED.name()); generator.writeBoolean(converter.getNested()); + generator.writeFieldName(prefKeys.WRITE_METADATA.name()); + generator.writeBoolean(converter.getOriginalMetadata()); generator.writeFieldName(prefKeys.OME_META.name()); generator.writeBoolean(converter.getNoOMEMeta()); generator.writeFieldName(prefKeys.NO_ROOT.name()); @@ -1169,6 +1188,9 @@ public void importSettings(JsonNode mainNode) { subject = settings.get(prefKeys.NESTED.name()); if (subject != null) nested.setSelected(subject.booleanValue()); + subject = settings.get(prefKeys.WRITE_METADATA.name()); + if (subject != null) originalMeta.setSelected(subject.booleanValue()); + subject = settings.get(prefKeys.OME_META.name()); if (subject != null) noOMEMeta.setSelected(subject.booleanValue());