Changeset 2112


Ignore:
Timestamp:
01/17/07 10:53:44 (13 years ago)
Author:
melissa
Message:

Fixed bug that caused all Pixels elements to be placed under the first Image element.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/OMEXMLMetadataStore.java

    r2010 r2112  
    389389    int ndx = i == null ? 0 : i.intValue(); 
    390390    // TODO find a better way to specify which Dimensions we want 
    391     ImageNode image = (ImageNode) getChild(root, "Image", 0); 
     391    ImageNode image = (ImageNode) getChild(root, "Image", ndx); 
    392392    CustomAttributesNode ca = (CustomAttributesNode) 
    393393      getChild(image, "CustomAttributes", 0); 
    394394    DimensionsNode dimensions = 
    395       (DimensionsNode) getChild(ca, "Dimensions", ndx); 
     395      (DimensionsNode) getChild(ca, "Dimensions", 0); 
    396396    dimensions.setPixelSizeX(pixelSizeX); 
    397397    dimensions.setPixelSizeY(pixelSizeY); 
     
    411411    int ndx = i == null ? 0 : i.intValue(); 
    412412    // TODO find a better way to specify which DisplayROI we want 
    413     ImageNode image = (ImageNode) getChild(root, "Image", 0); 
     413    ImageNode image = (ImageNode) getChild(root, "Image", ndx); 
    414414    CustomAttributesNode ca = (CustomAttributesNode) 
    415415      getChild(image, "CustomAttributes", 0); 
    416416    DisplayROINode displayROI = (DisplayROINode) 
    417       getChild(ca, "DisplayROI", ndx); 
     417      getChild(ca, "DisplayROI", 0); 
    418418    displayROI.setX0(x0); 
    419419    displayROI.setY0(y0); 
     
    437437    int ndx = i == null ? 0 : i.intValue(); 
    438438    // TODO find a better way to specify which Pixels we want 
    439     ImageNode image = (ImageNode) getChild(root, "Image", 0); 
     439    ImageNode image = (ImageNode) getChild(root, "Image", ndx); 
    440440    CustomAttributesNode ca = (CustomAttributesNode) 
    441441      getChild(image, "CustomAttributes", 0); 
    442     PixelsNode pixels = (PixelsNode) getChild(ca, "Pixels", ndx); 
     442    PixelsNode pixels = (PixelsNode) getChild(ca, "Pixels", 0); 
    443443    pixels.setSizeX(sizeX); 
    444444    pixels.setSizeY(sizeY); 
     
    459459    int ndx = i == null ? 0 : i.intValue(); 
    460460    // TODO find a better way to specify which StageLabel we want 
    461     ImageNode image = (ImageNode) getChild(root, "Image", 0); 
     461    ImageNode image = (ImageNode) getChild(root, "Image", ndx); 
    462462    CustomAttributesNode ca = (CustomAttributesNode) 
    463463      getChild(image, "CustomAttributes", 0); 
    464464    StageLabelNode stageLabel = 
    465       (StageLabelNode) getChild(ca, "StageLabel", ndx); 
     465      (StageLabelNode) getChild(ca, "StageLabel", 0); 
    466466    stageLabel.setName(name); 
    467467    stageLabel.setX(x); 
     
    480480    int ndx = i == null ? 0 : i.intValue(); 
    481481    // TODO find a better way to specify which LogicalChannel we want 
    482     ImageNode image = (ImageNode) getChild(root, "Image", 0); 
     482    ImageNode image = (ImageNode) getChild(root, "Image", ndx); 
    483483    CustomAttributesNode ca = (CustomAttributesNode) 
    484484      getChild(image, "CustomAttributes", 0); 
    485485    LogicalChannelNode logicalChannel = 
    486       (LogicalChannelNode) getChild(ca, "LogicalChannel", ndx); 
     486      (LogicalChannelNode) getChild(ca, "LogicalChannel", 0); 
    487487    logicalChannel.setName(name); 
    488488    logicalChannel.setNDFilter(ndFilter); 
Note: See TracChangeset for help on using the changeset viewer.