ITK Release 4/Microscopy/File Formats/Bio-Formats: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 79: Line 79:
   BIOFORMATS_INCLUDE_PATH:PATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/include
   BIOFORMATS_INCLUDE_PATH:PATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/include
   BIOFORMATS_JACE_LIB:FILEPATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/build/libjace.so
   BIOFORMATS_JACE_LIB:FILEPATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/build/libjace.so
Once these settings have been provided, you can hit the "c" key to configure again, and the "g" key to generate the final Makefiles.


= Build ITK adaptors =
= Build ITK adaptors =
You can now quit CMake and simply do
  make
(at this point, with JACE -r39 a significant amount of warnings are generated during the build process. They are unrelated to ITK, and can be ignored by now. We anticipate that future releases of JACE will address this problem).

Revision as of 22:15, 11 February 2011

This page describes the process of building the ITK adaptors to the Bio-Format library.

Download JACE

Check out the Jace source code:

   svn co -r 39 https://jace.svn.sourceforge.net/svnroot/jace/trunk /path/to/jace

Where

   /path/to/jace 

is the desired location of your Jace source code checkout.

The "-r 39" matters, since Jace revisions 40 and later may not work with bf-cpp. As of this writing, the most recent revision was 52, and it does not compile on some systems. We currently recommend revision 39.

Download Bio-Formats

Download the bio-formats code according to the instructions in

  http://www.loci.wisc.edu/bio-formats/source-code

Essentially

  git clone git://dev.loci.wisc.edu/bio-formats.git

Build Bio-Formats and Its C++ Bindings

go to the top directory of the bio-formats source tree and type

   ant tools

then go to the directory "components/native/bf-cpp"

   cd components/native/bf-cpp 

and type

   ant   -Djace.home=/path/to/jace

where "/path/to/jace" is the path to the directory where you checked out the code of JACE.

This will produce C++ libraries that wrap the functionalities of the Bio-Formats Java library.

Configure ITK

Go to the binary tree where you have build ITK and rerun CMake

For example, in Linux do

     make   edit_cache

Go to the Advanced mode by hitting the "t" key.

Search for the CMake option

    ITKIO_SUPPORTS_BIOFORMATS_IMAGEIO

and turn it ON

reconfigure by hitting the "c" key.

At this point, new options will be displayed.

In particular:

 BIOFORMATS_CPP_LIB
 BIOFORMATS_JACE_LIB
 BIOFORMATS_INCLUDE_PATH

They should respectively point to

the libbfcpp.so library, the libjace.so and the "include" directory of the bf-cpp binding code.

For example, in a typical case, they will be:

 BIOFORMATS_CPP_LIB:FILEPATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/build/libbfcpp.so
 BIOFORMATS_INCLUDE_PATH:PATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/include
 BIOFORMATS_JACE_LIB:FILEPATH=/home/ibanez/src/bio-formats/components/native/bf-cpp/build/libjace.so


Once these settings have been provided, you can hit the "c" key to configure again, and the "g" key to generate the final Makefiles.


Build ITK adaptors

You can now quit CMake and simply do

  make

(at this point, with JACE -r39 a significant amount of warnings are generated during the build process. They are unrelated to ITK, and can be ignored by now. We anticipate that future releases of JACE will address this problem).