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

Fix Bio-Formats ITK plugin compilation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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(); 
Note: See TracChangeset for help on using the changeset viewer.