Changeset 7105


Ignore:
Timestamp:
10/21/10 11:02:53 (9 years ago)
Author:
hinerm
Message:

Adjusted canDoDirect to be true if the image is interleaved (avoiding unnecessary reordering of pixel data). Corrected off-by-one error in image plane debug statements. Correctly print out effective size c in debug statements. Added interleaving information to debug statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/native/bf-itk/itkBioFormatsImageIO.cxx

    r7050 r7105  
    250250        << "\tSizeT = " << sizeT << std::endl 
    251251        << "\tRGB Channel Count = " << rgbChannelCount << std::endl 
    252         << "\tEffective SizeC = " << rgbChannelCount << std::endl 
     252        << "\tEffective SizeC = " << effSizeC << std::endl 
    253253        << "\tImage Count = " << imageCount); 
    254254 
     
    375375      } 
    376376      int bytesPerPlane = xCount * yCount * bpp * rgbChannelCount; 
     377      bool isInterleaved = reader->isInterleaved(); 
    377378 
    378379      itkDebugMacro("Region extents:" << std::endl 
     
    383384        << "\tT: start = " << tStart << ", count = " << tCount << std::endl 
    384385        << "\tC: start = " << cStart << ", count = " << cCount << std::endl 
    385         << "\tBytes per plane = " << bytesPerPlane); 
     386        << "\tBytes per plane = " << bytesPerPlane << std::endl 
     387        << "\tIsInterleaved = " << isInterleaved); 
     388 
    386389 
    387390      int imageCount = reader->getImageCount(); 
    388391 
    389392      // allocate temporary array 
    390       bool canDoDirect = rgbChannelCount == 1; 
     393      bool canDoDirect = (rgbChannelCount == 1 || isInterleaved); 
    391394      jbyte* tmpData = NULL; 
    392395      if (!canDoDirect) tmpData = new jbyte[bytesPerPlane]; 
     
    398401          for (int z=zStart; z<zStart+zCount; z++) { 
    399402            int no = reader->getIndex(z, c, t); 
    400             itkDebugMacro("Reading image plane " << no 
     403            itkDebugMacro("Reading image plane " << no + 1 
    401404              << " (Z=" << z << ", T=" << t << ", C=" << c << ")" 
    402405              << " of " << imageCount << " available planes)"); 
Note: See TracChangeset for help on using the changeset viewer.