Changeset 6316


Ignore:
Timestamp:
05/14/10 10:15:53 (10 years ago)
Author:
melissa
Message:

Parse XY dimensions from IFD.PAGE_NAME entry, if present.

File:
1 edited

Legend:

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

    r6254 r6316  
    320320      lensNA = new String[getSizeC()]; 
    321321 
     322      parsePageName(); 
    322323      parseComment(); 
    323324      addGlobalMeta("Comment", comment); 
     
    493494    } 
    494495    return b; 
     496  } 
     497 
     498  private void parsePageName() { 
     499    String pageName = ifds.get(0).getIFDTextValue(IFD.PAGE_NAME); 
     500    if (pageName == null) return; 
     501    String[] lines = pageName.split("\n"); 
     502    for (String line : lines) { 
     503      if (line.startsWith("Resolution")) { 
     504        String[] resolutions = line.split("\t"); 
     505        if (resolutions.length > 1) { 
     506          voxelX = Double.parseDouble(resolutions[1].trim()); 
     507        } 
     508        if (resolutions.length > 2) { 
     509          voxelY = Double.parseDouble(resolutions[2].trim()); 
     510        } 
     511 
     512        break; 
     513      } 
     514    } 
    495515  } 
    496516 
Note: See TracChangeset for help on using the changeset viewer.