Changeset 5649


Ignore:
Timestamp:
10/28/09 14:45:30 (10 years ago)
Author:
curtis
Message:

Fix Bio-Formats ITK plugin compilation.

Location:
trunk/components/native/itk-plugin
Files:
3 edited

Legend:

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

    r5183 r5649  
    154154  ITKIO 
    155155  jace 
    156   bfjace 
     156  bfcpp 
    157157  ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES} 
    158158) 
     
    189189  ${lib_name} 
    190190  jace 
    191   bfjace 
     191  bfcpp 
    192192  ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES} 
    193193) 
  • trunk/components/native/itk-plugin/itkBioFormatsImageIO.cxx

    r5513 r5649  
    6868    // initialize the Java virtual machine 
    6969    itkDebugMacro(<<"Creating JVM..."); 
    70     StaticVmLoader loader(JNI_VERSION_1_4); 
    71     OptionList list; 
     70    jace::StaticVmLoader loader(JNI_VERSION_1_4); 
     71    jace::OptionList list; 
    7272    list.push_back(jace::ClassPath( 
    7373      "jace-runtime.jar:bio-formats.jar:loci_tools.jar" 
     
    7575    list.push_back(jace::CustomOption("-Xcheck:jni")); 
    7676    list.push_back(jace::CustomOption("-Xmx256m")); 
     77    list.push_back(jace::CustomOption("-Djava.awt.headless=true")); 
    7778    //list.push_back(jace::CustomOption("-verbose")); 
    7879    //list.push_back(jace::CustomOption("-verbose:jni")); 
     
    205206 
    206207    // get physical resolution 
    207  
    208     // NB: Jace interface proxies do not inherit from superinterfaces. 
    209     //     E.g., IMetadata does not possess methods from MetadataRetrieve. 
    210     //     Need to find a way around this, or improve Jace. 
    211     //float physX = omeMeta.getDimensionsPhysicalSizeX(0, 0); 
    212     //float physY = omeMeta.getDimensionsPhysicalSizeY(0, 0); 
    213     //m_Spacing[0] = physX; 
    214     //m_Spacing[1] = physY; 
    215     //if (imageCount > 1) m_Spacing[2] = 1; 
    216  
    217     //itkDebugMacro(<<"\tPhysicalSizeX = " << physX); 
    218     //itkDebugMacro(<<"\tPhysicalSizeY = " << physY); 
     208    MetadataRetrieve retrieve = MetadataTools::asRetrieve(omeMeta); 
     209    double physX = retrieve.getDimensionsPhysicalSizeX(0, 0).doubleValue(); 
     210    double physY = retrieve.getDimensionsPhysicalSizeY(0, 0).doubleValue(); 
     211    m_Spacing[0] = physX; 
     212    m_Spacing[1] = physY; 
     213    if (imageCount > 1) m_Spacing[2] = 1; 
     214 
     215    itkDebugMacro(<<"\tPhysicalSizeX = " << physX); 
     216    itkDebugMacro(<<"\tPhysicalSizeY = " << physY); 
    219217  } 
    220218 
     
    224222    char* data = (char*) pData; 
    225223    itkDebugMacro(<<"BioFormatsImageIO::Read"); 
    226  
    227     typedef JArray<JByte> ByteArray; 
    228224 
    229225    int pixelType = reader->getPixelType(); 
  • trunk/components/native/itk-plugin/itkBioFormatsImageIO.h

    r5512 r5649  
    3535#define H_ITK_IMAGE_IO_H 
    3636 
     37// for Bio-Formats C++ bindings 
    3738#include "bio-formats.h" 
     39using jace::proxy::loci::formats::ChannelFiller; 
     40using jace::proxy::loci::formats::FormatTools; 
     41using jace::proxy::loci::formats::ImageWriter; 
     42using jace::proxy::loci::formats::MetadataTools; 
     43using jace::proxy::loci::formats::meta::IMetadata; 
     44using jace::proxy::loci::formats::meta::MetadataRetrieve; 
     45 
     46#undef Byte 
    3847 
    3948// STL includes 
Note: See TracChangeset for help on using the changeset viewer.