Changeset 3397


Ignore:
Timestamp:
11/21/07 14:18:30 (12 years ago)
Author:
melissa
Message:

Fixed bug with slicing 12 channel data.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Colorizer.java

    r3371 r3397  
    9292    else { 
    9393      stackOrder = Macro.getValue(arg, "stack_order", "XYCZT"); 
    94       merge = Boolean.parseBoolean(Macro.getValue(arg, "merge", "true")); 
    95       color = Boolean.parseBoolean(Macro.getValue(arg, "colorize", "false")); 
     94      merge = new Boolean(Macro.getValue(arg, "merge", "true")).booleanValue(); 
     95      color = 
     96        new Boolean(Macro.getValue(arg, "colorize", "false")).booleanValue(); 
    9697      colorNdx = Integer.parseInt(Macro.getValue(arg, "ndx", "0")); 
    9798      mergeOption = Macro.getValue(arg, "merge_option", null); 
     
    207208 
    208209    newImp.setTitle(imp.getTitle()); 
    209     newImp.setDimensions(newImp.getStackSize() / (nSlices * nTimes), 
    210       nSlices, nTimes); 
     210    if (newImp instanceof CustomImage) { 
     211      newImp.setDimensions(nChannels, nSlices, nTimes); 
     212    } 
     213    else { 
     214      newImp.setDimensions(newImp.getStackSize() / (nSlices * nTimes), 
     215        nSlices, nTimes); 
     216    } 
    211217    newImp.show(); 
    212218    imp.close(); 
  • trunk/loci/plugins/Slicer.java

    r3353 r3397  
    100100    int sizeT = imp.getNFrames(); 
    101101 
    102     if (imp instanceof CustomImage) sliceC = false; 
    103  
    104102    int slicesPerStack = stack.getSize(); 
    105103    if (sliceZ) slicesPerStack /= sizeZ; 
     
    143141      p.setDimensions(sliceC ? 1 : sizeC, sliceZ ? 1 : sizeZ, 
    144142        sliceT ? 1 : sizeT); 
    145       if (imp instanceof CustomImage) { 
     143      if (imp instanceof CustomImage && !sliceC) { 
    146144        CustomImage c = new CustomImage(p, stackOrder, sliceZ ? 1 : sizeZ, 
    147145          sliceT ? 1 : sizeT, sliceC ? 1 : sizeC, true); 
Note: See TracChangeset for help on using the changeset viewer.