Changeset 4095
- Timestamp:
- 06/04/08 11:09:25 (12 years ago)
- Location:
- trunk/loci/formats
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/loci/formats/FileStitcher.java
r4048 r4095 1193 1193 posT[0] < readers[sno][fno].getSizeT()) 1194 1194 { 1195 if (readers[sno][fno].isRGB()) posC[0] /= lenC[sno][0];1196 1195 ino = FormatTools.getIndex(readers[sno][fno], posZ[0], posC[0], posT[0]); 1197 1196 } -
trunk/loci/formats/in/FluoviewReader.java
r4094 r4095 446 446 String com = TiffTools.getComment(ifd); 447 447 if (com == null) com = ""; 448 if (ifd == null) return false; 448 449 return com.indexOf(FLUOVIEW_MAGIC_STRING) != -1 && 449 450 ifd.containsKey(new Integer(MMHEADER)) || -
trunk/loci/formats/in/ZeissZVIReader.java
r4074 r4095 71 71 private float pixelSizeX, pixelSizeY, pixelSizeZ; 72 72 private String microscopeName; 73 private Vector emWave, exWave, channelNames; 73 private Vector emWave, exWave; 74 private Hashtable channelNames; 74 75 private Vector whiteValue, blackValue, gammaValue, exposureTime, timestamps; 75 76 private String userName, userCompany, mag, na; … … 256 257 emWave = new Vector(); 257 258 exWave = new Vector(); 258 channelNames = new Vector();259 channelNames = new Hashtable(); 259 260 whiteValue = new Vector(); 260 261 blackValue = new Vector(); … … 417 418 core.sizeT[0] = tIndices.size(); 418 419 419 int min = Integer.MAX_VALUE; 420 int max = Integer.MIN_VALUE; 421 for (int i=0; i<cIndices.size(); i++) { 422 int v = ((Integer) cIndices.get(i)).intValue(); 423 if (v < min) min = v; 424 if (v > max) max = v; 425 } 426 427 int cSize = max - min + 1; 428 if (cSize > cIndices.size()) cSize = cIndices.size() - 1; 429 430 core.sizeC[0] *= cSize; 420 if (channelNames.size() > 0) core.sizeC[0] *= channelNames.size(); 421 else core.sizeC[0] *= cIndices.size(); 431 422 432 423 core.imageCount[0] = core.sizeZ[0] * core.sizeT[0] * … … 449 440 450 441 while (tileRows * tileColumns > totalTiles) { 451 //if (core.sizeC[0] > 1) core.sizeC[0]--;452 442 totalTiles = 453 443 offsets.size() / (core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]); … … 571 561 } 572 562 573 s = (String[]) channelNames.toArray(new String[0]); 574 channelNames.clear(); 575 for (int i=0; i<s.length; i++) { 576 if (!s[i].trim().equals("")) channelNames.add(s[i]); 577 } 563 String[] channelNumbers = 564 (String[]) channelNames.keySet().toArray(new String[0]); 565 Arrays.sort(channelNumbers); 578 566 579 567 for (int i=0; i<core.sizeC[0]; i++) { … … 594 582 store.setLogicalChannelExWave(new Integer(ex), 0, idx); 595 583 } 596 if (idx < channelNames.size()) { 597 store.setLogicalChannelName((String) channelNames.get(idx), 0, idx); 584 if (idx < channelNumbers.length) { 585 store.setLogicalChannelName( 586 (String) channelNames.get(channelNumbers[idx]), 0, idx); 598 587 } 599 588 … … 936 925 else if (key.startsWith("Channel Name")) { 937 926 if (cIndex != -1) { 938 while (cIndex >= channelNames.size()) channelNames.add(""); 939 channelNames.setElementAt(value, cIndex); 927 channelNames.put(String.valueOf(cIndex), value); 940 928 } 941 929 }
Note: See TracChangeset
for help on using the changeset viewer.