Skip to content

Commit

Permalink
Resolve model references even if annotations are not populated
Browse files Browse the repository at this point in the history
This should fix #12093.
  • Loading branch information
melissalinkert committed Mar 17, 2014
1 parent c9ae085 commit 0ed2658
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,12 @@ public Hashtable getOriginalMetadata(OMEXMLMetadata omexmlMeta) {
public void populateOriginalMetadata(OMEXMLMetadata omexmlMeta,
Hashtable<String, Object> metadata)
{
omexmlMeta.resolveReferences();

if (metadata.size() == 0) {
return;
}

omexmlMeta.resolveReferences();
OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) omexmlMeta.getRoot();
StructuredAnnotations annotations = root.getStructuredAnnotations();
if (annotations == null) annotations = new StructuredAnnotations();
Expand Down Expand Up @@ -862,15 +863,15 @@ public boolean isEqual(OMEXMLMetadata src1, OMEXMLMetadata src2) {

public void addModuloAlong(OMEXMLMetadata meta, CoreMetadata core, int imageIdx)
{
meta.resolveReferences();

if (core.moduloZ.length() == 1 && core.moduloC.length() == 1 &&
core.moduloT.length() == 1)
{
// nothing to populate
return;
}

meta.resolveReferences();

OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) meta.getRoot();
Image image;
try {
Expand Down

0 comments on commit 0ed2658

Please sign in to comment.