Changeset 7014


Ignore:
Timestamp:
09/30/10 11:05:54 (9 years ago)
Author:
hinerm
Message:

Bug Fix: Converted logging functions from Log::getStackTrace to DebugTools::getStackTrace. Commented out unnecessary dimension variable decrements, as BFITK images are currently always 5D.

Location:
trunk/components/native/bf-itk
Files:
2 edited

Legend:

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

    r5726 r7014  
    8787      jace::OptionList list; 
    8888      list.push_back(jace::ClassPath( 
    89         "jace-runtime.jar:bio-formats.jar:loci_tools.jar" 
     89 
     90 // To solve issue where JARs must live in current working directory: 
     91 // somehow discover my own origin directory 
     92 // e.g.: I am part of libBioFormatsIOPlugin.dylib 
     93 // and I live in folder: 
     94 //   /Users/hinerm/loci/bioformats/components/native/bf-itk/build/dist/bf-itk 
     95 // so, we want a string variable "dir" containing that folder name. 
     96 // Then, can pass classpath elements with that prefix. 
     97 //        dir+"jace-runtime.jar:"+dir+"bio-formats.jar:"+dir+"loci_tools.jar" 
     98       "jace-runtime.jar:bio-formats.jar:loci_tools.jar" 
    9099      )); 
    91100      list.push_back(jace::CustomOption("-Xcheck:jni")); 
     
    105114      reader = new ChannelFiller; 
    106115      writer = new ImageWriter; 
     116       //reader = new ChannelSeparator(reader); 
     117       //reader = new ChannelMerger(reader); 
    107118      itkDebugMacro("Created reader and writer."); 
    108119    } 
    109120    catch (Exception& e) { 
    110       itkDebugMacro("A Java error occurred: " << Log::getStackTrace(e)); 
     121     itkDebugMacro("A Java error occurred: " << DebugTools::getStackTrace(e)); 
    111122    } 
    112123    catch (JNIException& jniException) { 
     
    140151    } 
    141152    catch (Exception& e) { 
    142       itkDebugMacro("A Java error occurred: " << Log::getStackTrace(e)); 
     153     itkDebugMacro("A Java error occurred: " << DebugTools::getStackTrace(e)); 
    143154    } 
    144155    catch (JNIException& jniException) { 
     
    259270      // CTR - avoid invalid memory access error on some systems (OS X 10.5) 
    260271      //MetadataRetrieve retrieve = MetadataTools::asRetrieve(omeMeta); 
    261       //physX = retrieve.getDimensionsPhysicalSizeX(0, 0).doubleValue(); 
    262       //physY = retrieve.getDimensionsPhysicalSizeY(0, 0).doubleValue(); 
     272      //physX = retrieve.getPixelsPhysicalSizeX(0).doubleValue(); 
     273      //physY = retrieve.getPixelsPhysicalSizeY(0).doubleValue(); 
    263274      m_Spacing[0] = physX; 
    264275      m_Spacing[1] = physY; 
     
    268279    } 
    269280    catch (Exception& e) { 
    270       itkDebugMacro("A Java error occurred: " << Log::getStackTrace(e)); 
     281      itkDebugMacro("A Java error occurred: " << DebugTools::getStackTrace(e)); 
    271282    } 
    272283    catch (JNIException& jniException) { 
     
    300311      int cStart = 0, cCount = 1; 
    301312 
    302       int sizeZ = reader->getSizeZ(); 
    303       int sizeT = reader->getSizeT(); 
    304       int effSizeC = reader->getEffectiveSizeC(); 
     313      //int sizeZ = reader->getSizeZ(); 
     314      //int sizeT = reader->getSizeT(); 
     315      //int effSizeC = reader->getEffectiveSizeC(); 
    305316 
    306317      int xIndex = 0, yIndex = 1, zIndex = 2, tIndex = 3, cIndex = 4; 
     318      /*  Currently unnecessary, as images are assumed to be 5D 
    307319      if (sizeZ == 1) { 
    308320        zIndex = -1; 
     
    317329        cIndex = -1; 
    318330      } 
     331      */ 
    319332      for (int dim = 0; dim < regionDim; dim++) { 
    320333        int index = region.GetIndex(dim); 
     
    377390    } 
    378391    catch (Exception& e) { 
    379       itkDebugMacro("A Java error occurred: " << Log::getStackTrace(e)); 
    380     } 
     392      itkDebugMacro("A Java error occurred: " << DebugTools::getStackTrace(e)); 
     393    }    
    381394    catch (JNIException& jniException) { 
    382395      itkDebugMacro( 
     
    406419    } 
    407420    catch (Exception& e) { 
    408       itkDebugMacro("A Java error occurred: " << Log::getStackTrace(e)); 
     421      itkDebugMacro("A Java error occurred: " << DebugTools::getStackTrace(e)); 
    409422    } 
    410423    catch (JNIException& jniException) { 
  • trunk/components/native/bf-itk/itkBioFormatsImageIO.h

    r5682 r7014  
    5656using jace::JNIException; 
    5757using jace::proxy::java::lang::Exception; 
    58 using jace::proxy::loci::common::Log; 
     58using jace::proxy::loci::common::DebugTools; 
    5959#include "bio-formats.h" 
    6060using jace::proxy::loci::formats::ChannelFiller; 
Note: See TracChangeset for help on using the changeset viewer.