Changeset 4876


Ignore:
Timestamp:
03/02/09 16:31:06 (11 years ago)
Author:
curtis
Message:

Flesh out readme file with build instructions and current status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/native/itk-plugin/readme.txt

    r4851 r4876  
    44This package provides an ImageIO plugin for ITK that uses Bio-Formats 
    55to read and write supported life sciences file formats. 
     6 
     7The initial plugin implementation is complete. However, there are a number of 
     8symbol lookup errors at runtime, so portions of the functionality are currently 
     9commented out to avoid them. 
     10 
     11 
     12BUILDING AND TESTING THE PLUGIN ON LINUX 
     13 
     141) Download and build the Insight Toolkit source code from: 
     15 
     16  http://www.itk.org/ITK/resources/software.html 
     17 
     182) Follow the directions in components/native/bf-cpp to build the Bio-Formats 
     19   C++ bindings. 
     20 
     213) Change to this directory (components/native/itk-plugin). 
     22 
     234) Run the (lame, temporary) build script: 
     24 
     25  ITK_DIR=/path/to/itk/build sh build.sh 2> /dev/null 
     26 
     275) After the build succeeds, the script will copy dependent libraries 
     28   (libjace.so, libbfjace.so, jace-runtime.jar and loci_tools.jar) into the ITK 
     29   binaries directory, then suggest some commands to proceed in testing. These 
     30   commands boil down to: a) set ITK_AUTOLOAD_PATH; b) run ImageHistogram1 
     31   example program on a TIFF file; c) optionally, clear ITK_AUTOLOAD_PATH and 
     32   rerun to compare against the results with ITK's built-in TIFF reader. 
     33 
     34If you get this far, you will have noticed that the histogram is always filled 
     35with 255s. This is because the plugin does not currently copy the planar data 
     36between data structures, due to one of the symbol lookup errors. 
     37 
     38 
     39SYMBOL LOOKUP ERRORS 
     40 
     41As a rule of thumb, anything labeled "NB:" or "TEMP" in the 
     42itkBioFormatsImageIO.cxx source file documents a known problem and/or 
     43associated workaround at the moment, the most show-stopping of which are the 
     44symbol lookup errors. 
     45 
     46For example, from lines 260-2 of itkBioFormatsImageIO.cxx: 
     47 
     48  // NB: Using brackets with a JArray causes a symbol lookup error on: 
     49  //     _ZN4jace6helper12newGlobalRefEP10_Jv_JNIEnvP9__jobject 
     50  //for (int i=0; i<bytesPerSubPlane; i++) data[p++] = buf[i]; 
     51 
     52Uncommenting the for loop and rerunning the build script yields: 
     53 
     54  $ ./ImageHistogram1 image.tif 
     55  *snip output* 
     56  Reading image plane 1/1 
     57  ./ImageHistogram1: symbol lookup error: libBioFormatsIO.so: undefined symbol: _ZN4jace6helper12newGlobalRefEP10_Jv_JNIEnvP9__jobject 
     58 
     59Dumping the relevant symbols from libjace.so yields: 
     60 
     61  $ nm libjace.so | grep newGlobalRef 
     62  00025621 T _ZN4jace6helper12newGlobalRefEP7JNIEnv_P8_jobject 
     63 
     64So the symbol is essentially there, but slightly different... 
Note: See TracChangeset for help on using the changeset viewer.