Changeset 6618


Ignore:
Timestamp:
07/01/10 07:32:46 (9 years ago)
Author:
callan
Message:

Restoring MIAS reader overlay support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/MIASReader.java

    r6531 r6618  
    968968    int nOverlays = 0; 
    969969    for (int i=0; i<3; i++) { 
    970       String id = MetadataTools.createLSID("Mask", series, roi + nOverlays, 0); 
    971       overlayFiles.put(id, overlayTiff); 
    972       overlayPlanes.put(id, new Integer(i)); 
     970      String roiId = MetadataTools.createLSID("ROI", series, roi + nOverlays); 
     971      String maskId = MetadataTools.createLSID("Mask", series, roi + nOverlays, 0); 
     972      overlayFiles.put(maskId, overlayTiff); 
     973      overlayPlanes.put(maskId, new Integer(i)); 
    973974 
    974975      boolean validMask = populateMaskPixels(series, roi + nOverlays, 0); 
    975976      if (validMask) { 
     977        store.setROIID(roiId, roi + nOverlays); 
    976978        store.setMaskX(new Double(0), roi + nOverlays, 0); 
    977979        store.setMaskY(new Double(0), roi + nOverlays, 0); 
    978         // TODO 
    979         //store.setMaskWidth(getSizeX(), roi + nOverlays, 0); 
    980         //store.setMaskHeight(getSizeY(), roi + nOverlays, 0); 
    981         //store.setMaskBinDataBigEndian( 
    982         //  new Boolean(!isLittleEndian()), roi + nOverlays, 0, 0); 
    983         //store.setMaskPixelsSizeX( 
    984         //  new Integer(getSizeX()), roi + nOverlays, 0); 
    985         //store.setMaskPixelsSizeY( 
    986         //  new Integer(getSizeY()), roi + nOverlays, 0); 
    987         //store.setMaskPixelsExtendedPixelType("bit", roi + nOverlays, 0); 
    988  
    989         //String color = String.valueOf(0xff000000 | (0xff << (8 * (2 - i)))); 
    990         //store.setShapeStrokeColor(color, roi + nOverlays, 0); 
     980        store.setMaskWidth(new Double(getSizeX()), roi + nOverlays, 0); 
     981        store.setMaskHeight(new Double(getSizeY()), roi + nOverlays, 0); 
     982 
     983        int color = 0xff000000 | (0xff << (8 * (2 - i))); 
     984        store.setMaskStroke(color, roi + nOverlays, 0); 
     985        store.setImageROIRef(roiId, series, roi + nOverlays); 
    991986        nOverlays++; 
    992987      } 
     
    10671062    if (validMask) { 
    10681063      MetadataStore store = makeFilterMetadata(); 
    1069       // TODO 
    1070       //store.setMaskPixelsBinData(bits.toByteArray(), roiIndex, shapeIndex); 
     1064      store.setMaskBinData(bits.toByteArray(), roiIndex, shapeIndex); 
    10711065    } 
    10721066    else LOGGER.debug("Did not populate MaskPixels.BinData for {}", id); 
Note: See TracChangeset for help on using the changeset viewer.