Changeset 4167


Ignore:
Timestamp:
07/08/08 07:53:07 (12 years ago)
Author:
melissa
Message:

Fixed Windows path name bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/FV1000Reader.java

    r4147 r4167  
    233233 
    234234    if (isOIB) { 
    235       RandomAccessStream ras = poi.getDocumentStream("Root Entry/OibInfo.txt"); 
     235      String infoFile = null; 
     236      Vector list = poi.getDocumentList(); 
     237      for (int i=0; i<list.size(); i++) { 
     238        String name = (String) list.get(i); 
     239        if (name.endsWith("OibInfo.txt")) { 
     240          infoFile = name; 
     241          break; 
     242        } 
     243      } 
     244      if (infoFile == null) { 
     245        throw new FormatException("OibInfo.txt not found in " + id); 
     246      } 
     247      RandomAccessStream ras = poi.getDocumentStream(infoFile); 
    236248 
    237249      oibMapping = new Hashtable(); 
     
    260272            if (checkSuffix(value, OIF_SUFFIX)) oifName = value; 
    261273            if (directoryKey != null) { 
    262               oibMapping.put(value, "Root Entry/" + directoryKey + "/" + key); 
     274              oibMapping.put(value, "Root Entry" + File.separator + 
     275                directoryKey + File.separator + key); 
    263276            } 
    264             else oibMapping.put(value, "Root Entry/" + key); 
     277            else oibMapping.put(value, "Root Entry" + File.separator + key); 
    265278          } 
    266279          else if (key.startsWith("Storage")) { 
     
    416429          if (key.equals("AxisCode")) code[ndx] = value; 
    417430          else if (key.equals("MaxSize")) size[ndx] = value; 
    418           else if (key.equals("Interval")) pixelSize[ndx] = value; 
    419         } 
     431                else if (key.equals("Interval")) pixelSize[ndx] = value; 
     432              } 
    420433        else if ((prefix + key).equals( 
    421434          "[Reference Image Parameter] - ImageDepth")) 
     
    585598      int ss = Integer.parseInt(size[i]); 
    586599      if (pixelSize[i] == null) pixelSize[i] = "1.0"; 
     600      pixelSize[i] = pixelSize[i].replaceAll("\"", ""); 
    587601      Float pixel = new Float(pixelSize[i]); 
    588602      code[i] = code[i].substring(1, code[i].length() - 1); 
Note: See TracChangeset for help on using the changeset viewer.