Changeset 4766


Ignore:
Timestamp:
01/30/09 16:47:23 (11 years ago)
Author:
curtis
Message:

Move Bio-Formats includes into separate header file.

Location:
trunk/components/bio-formats-jace
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats-jace/CMakeLists.txt

    r4760 r4766  
    1717find_package(Boost COMPONENTS thread) 
    1818 
    19 include_directories(jace/include proxies/include 
     19include_directories(include jace/include proxies/include 
    2020  ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${Boost_INCLUDE_DIR}) 
    2121 
  • trunk/components/bio-formats-jace/source/showinf.cpp

    r4761 r4766  
    22// showinf.cpp 
    33// 
     4 
     5// A C++ version of the Bio-Formats showinf command line utility. 
    46 
    57#include "jace/JNIHelper.h" 
     
    2325using jace::proxy::types::JByte; 
    2426 
    25 #include "jace/proxy/java/lang/String.h" 
    26 #include "jace/proxy/java/io/IOException.h" 
    27  
    28 using namespace jace::proxy::java::lang; 
    29 using namespace jace::proxy::java::io; 
    30  
    31 // TEMP - eventually want to automatically generate this list 
    32 #include "jace/proxy/loci/formats/AWTImageTools.h" 
    33 #include "jace/proxy/loci/formats/AxisGuesser.h" 
    34 #include "jace/proxy/loci/formats/ChannelFiller.h" 
    35 #include "jace/proxy/loci/formats/ChannelMerger.h" 
    36 #include "jace/proxy/loci/formats/ChannelSeparator.h" 
    37 #include "jace/proxy/loci/formats/ClassList.h" 
    38 //#include "jace/proxy/loci/formats/CoreMetadata.h" 
    39 #include "jace/proxy/loci/formats/DimensionSwapper.h" 
    40 #include "jace/proxy/loci/formats/FilePattern.h" 
    41 #include "jace/proxy/loci/formats/FileStitcher.h" 
    42 #include "jace/proxy/loci/formats/FormatException.h" 
    43 #include "jace/proxy/loci/formats/FormatHandler.h" 
    44 #include "jace/proxy/loci/formats/FormatReader.h" 
    45 #include "jace/proxy/loci/formats/FormatTools.h" 
    46 #include "jace/proxy/loci/formats/FormatWriter.h" 
    47 #include "jace/proxy/loci/formats/IFormatHandler.h" 
    48 #include "jace/proxy/loci/formats/IFormatReader.h" 
    49 #include "jace/proxy/loci/formats/IFormatWriter.h" 
    50 #include "jace/proxy/loci/formats/ImageReader.h" 
    51 #include "jace/proxy/loci/formats/ImageTools.h" 
    52 #include "jace/proxy/loci/formats/ImageWriter.h" 
    53 #include "jace/proxy/loci/formats/Index16ColorModel.h" 
    54 #include "jace/proxy/loci/formats/LegacyQTTools.h" 
    55 #include "jace/proxy/loci/formats/MetadataTools.h" 
    56 #include "jace/proxy/loci/formats/MinMaxCalculator.h" 
    57 #include "jace/proxy/loci/formats/NetcdfTools.h" 
    58 #include "jace/proxy/loci/formats/NumberFilter.h" 
    59 #include "jace/proxy/loci/formats/POITools.h" 
    60 #include "jace/proxy/loci/formats/ReaderWrapper.h" 
    61 #include "jace/proxy/loci/formats/SignedColorModel.h" 
    62 #include "jace/proxy/loci/formats/StatusEvent.h" 
    63 #include "jace/proxy/loci/formats/StatusListener.h" 
    64 #include "jace/proxy/loci/formats/StatusReporter.h" 
    65 #include "jace/proxy/loci/formats/TiffIFDEntry.h" 
    66 #include "jace/proxy/loci/formats/TiffRational.h" 
    67 #include "jace/proxy/loci/formats/TiffTools.h" 
    68 #include "jace/proxy/loci/formats/TwoChannelColorSpace.h" 
    69 #include "jace/proxy/loci/formats/UnknownTagException.h" 
    70 #include "jace/proxy/loci/formats/XMLTools.h" 
    71 #include "jace/proxy/loci/formats/cache/BufferedImageSource.h" 
    72 #include "jace/proxy/loci/formats/cache/ByteArraySource.h" 
    73 #include "jace/proxy/loci/formats/cache/CacheConsole.h" 
    74 #include "jace/proxy/loci/formats/cache/CacheEvent.h" 
    75 #include "jace/proxy/loci/formats/cache/CacheException.h" 
    76 #include "jace/proxy/loci/formats/cache/Cache.h" 
    77 #include "jace/proxy/loci/formats/cache/CacheListener.h" 
    78 #include "jace/proxy/loci/formats/cache/CacheReporter.h" 
    79 #include "jace/proxy/loci/formats/cache/CacheSource.h" 
    80 #include "jace/proxy/loci/formats/cache/CacheStrategy.h" 
    81 #include "jace/proxy/loci/formats/cache/CacheUpdater.h" 
    82 #include "jace/proxy/loci/formats/cache/CrosshairStrategy.h" 
    83 #include "jace/proxy/loci/formats/cache/ICacheSource.h" 
    84 #include "jace/proxy/loci/formats/cache/ICacheStrategy.h" 
    85 #include "jace/proxy/loci/formats/cache/RectangleStrategy.h" 
    86 #include "jace/proxy/loci/formats/codec/Base64Codec.h" 
    87 #include "jace/proxy/loci/formats/codec/BaseCodec.h" 
    88 #include "jace/proxy/loci/formats/codec/BitBuffer.h" 
    89 #include "jace/proxy/loci/formats/codec/BitWriter.h" 
    90 #include "jace/proxy/loci/formats/codec/ByteVector.h" 
    91 #include "jace/proxy/loci/formats/codec/Codec.h" 
    92 #include "jace/proxy/loci/formats/codec/CodecOptions.h" 
    93 #include "jace/proxy/loci/formats/codec/JPEG2000Codec.h" 
    94 #include "jace/proxy/loci/formats/codec/JPEGCodec.h" 
    95 #include "jace/proxy/loci/formats/codec/LuraWaveCodec.h" 
    96 #include "jace/proxy/loci/formats/codec/LZOCodec.h" 
    97 #include "jace/proxy/loci/formats/codec/LZWCodec.h" 
    98 #include "jace/proxy/loci/formats/codec/MJPBCodec.h" 
    99 #include "jace/proxy/loci/formats/codec/MJPBCodecOptions.h" 
    100 #include "jace/proxy/loci/formats/codec/MSRLECodec.h" 
    101 #include "jace/proxy/loci/formats/codec/MSVideoCodec.h" 
    102 #include "jace/proxy/loci/formats/codec/NikonCodec.h" 
    103 #include "jace/proxy/loci/formats/codec/NikonCodecOptions.h" 
    104 #include "jace/proxy/loci/formats/codec/PackbitsCodec.h" 
    105 #include "jace/proxy/loci/formats/codec/QTRLECodec.h" 
    106 #include "jace/proxy/loci/formats/codec/RPZACodec.h" 
    107 #include "jace/proxy/loci/formats/codec/ZlibCodec.h" 
    108 #include "jace/proxy/loci/formats/gui/CacheComponent.h" 
    109 #include "jace/proxy/loci/formats/gui/CacheIndicator.h" 
    110 #include "jace/proxy/loci/formats/gui/ComboFileFilter.h" 
    111 #include "jace/proxy/loci/formats/gui/DataConverter.h" 
    112 #include "jace/proxy/loci/formats/gui/ExtensionFileFilter.h" 
    113 #include "jace/proxy/loci/formats/gui/FormatFileFilter.h" 
    114 #include "jace/proxy/loci/formats/gui/GUITools.h" 
    115 #include "jace/proxy/loci/formats/gui/ImageViewer.h" 
    116 #include "jace/proxy/loci/formats/gui/NoExtensionFileFilter.h" 
    117 #include "jace/proxy/loci/formats/gui/PreviewPane.h" 
    118 #include "jace/proxy/loci/formats/gui/XMLCellRenderer.h" 
    119 #include "jace/proxy/loci/formats/gui/XMLWindow.h" 
    120 #include "jace/proxy/loci/formats/in/AliconaReader.h" 
    121 #include "jace/proxy/loci/formats/in/APLReader.h" 
    122 #include "jace/proxy/loci/formats/in/APNGReader.h" 
    123 #include "jace/proxy/loci/formats/in/AVIReader.h" 
    124 #include "jace/proxy/loci/formats/in/BaseTiffReader.h" 
    125 #include "jace/proxy/loci/formats/in/BioRadReader.h" 
    126 #include "jace/proxy/loci/formats/in/BMPReader.h" 
    127 #include "jace/proxy/loci/formats/in/DeltavisionReader.h" 
    128 #include "jace/proxy/loci/formats/in/DicomReader.h" 
    129 #include "jace/proxy/loci/formats/in/EPSReader.h" 
    130 #include "jace/proxy/loci/formats/in/FEIReader.h" 
    131 #include "jace/proxy/loci/formats/in/FitsReader.h" 
    132 #include "jace/proxy/loci/formats/in/FlexReader.h" 
    133 #include "jace/proxy/loci/formats/in/FluoviewReader.h" 
    134 #include "jace/proxy/loci/formats/in/FV1000Reader.h" 
    135 #include "jace/proxy/loci/formats/in/GatanReader.h" 
    136 #include "jace/proxy/loci/formats/in/GelReader.h" 
    137 #include "jace/proxy/loci/formats/in/GIFReader.h" 
    138 #include "jace/proxy/loci/formats/in/ICSReader.h" 
    139 #include "jace/proxy/loci/formats/in/ImageIOReader.h" 
    140 #include "jace/proxy/loci/formats/in/ImarisHDFReader.h" 
    141 #include "jace/proxy/loci/formats/in/ImarisReader.h" 
    142 #include "jace/proxy/loci/formats/in/ImarisTiffReader.h" 
    143 #include "jace/proxy/loci/formats/in/ImprovisionTiffReader.h" 
    144 #include "jace/proxy/loci/formats/in/InCellReader.h" 
    145 #include "jace/proxy/loci/formats/in/IPLabReader.h" 
    146 #include "jace/proxy/loci/formats/in/IPWReader.h" 
    147 #include "jace/proxy/loci/formats/in/JPEGReader.h" 
    148 #include "jace/proxy/loci/formats/in/KhorosReader.h" 
    149 #include "jace/proxy/loci/formats/in/L2DReader.h" 
    150 #include "jace/proxy/loci/formats/in/LegacyND2Reader.h" 
    151 #include "jace/proxy/loci/formats/in/LegacyQTReader.h" 
    152 #include "jace/proxy/loci/formats/in/LeicaHandler.h" 
    153 #include "jace/proxy/loci/formats/in/LeicaReader.h" 
    154 #include "jace/proxy/loci/formats/in/LIFReader.h" 
    155 #include "jace/proxy/loci/formats/in/LIMReader.h" 
    156 #include "jace/proxy/loci/formats/in/MDBParser.h" 
    157 #include "jace/proxy/loci/formats/in/MetamorphHandler.h" 
    158 #include "jace/proxy/loci/formats/in/MetamorphReader.h" 
    159 #include "jace/proxy/loci/formats/in/MetamorphTiffReader.h" 
    160 #include "jace/proxy/loci/formats/in/MicromanagerReader.h" 
    161 #include "jace/proxy/loci/formats/in/MINCReader.h" 
    162 #include "jace/proxy/loci/formats/in/MinimalTiffReader.h" 
    163 #include "jace/proxy/loci/formats/in/MNGReader.h" 
    164 #include "jace/proxy/loci/formats/in/MRCReader.h" 
    165 #include "jace/proxy/loci/formats/in/MRWReader.h" 
    166 #include "jace/proxy/loci/formats/in/NAFReader.h" 
    167 #include "jace/proxy/loci/formats/in/ND2Reader.h" 
    168 #include "jace/proxy/loci/formats/in/NikonReader.h" 
    169 #include "jace/proxy/loci/formats/in/NRRDReader.h" 
    170 #include "jace/proxy/loci/formats/in/OMETiffReader.h" 
    171 #include "jace/proxy/loci/formats/in/OMEXMLReader.h" 
    172 #include "jace/proxy/loci/formats/in/OpenlabRawReader.h" 
    173 #include "jace/proxy/loci/formats/in/OpenlabReader.h" 
    174 #include "jace/proxy/loci/formats/in/PCIReader.h" 
    175 #include "jace/proxy/loci/formats/in/PCXReader.h" 
    176 #include "jace/proxy/loci/formats/in/PerkinElmerReader.h" 
    177 #include "jace/proxy/loci/formats/in/PGMReader.h" 
    178 #include "jace/proxy/loci/formats/in/PictReader.h" 
    179 #include "jace/proxy/loci/formats/in/PrairieReader.h" 
    180 #include "jace/proxy/loci/formats/in/PSDReader.h" 
    181 #include "jace/proxy/loci/formats/in/QTReader.h" 
    182 #include "jace/proxy/loci/formats/in/SDTInfo.h" 
    183 #include "jace/proxy/loci/formats/in/SDTReader.h" 
    184 #include "jace/proxy/loci/formats/in/SEQReader.h" 
    185 #include "jace/proxy/loci/formats/in/SlidebookReader.h" 
    186 #include "jace/proxy/loci/formats/in/SVSReader.h" 
    187 #include "jace/proxy/loci/formats/in/TCSReader.h" 
    188 #include "jace/proxy/loci/formats/in/TiffReader.h" 
    189 #include "jace/proxy/loci/formats/in/TillVisionReader.h" 
    190 #include "jace/proxy/loci/formats/in/VisitechReader.h" 
    191 #include "jace/proxy/loci/formats/in/ZeissLSMReader.h" 
    192 #include "jace/proxy/loci/formats/in/ZeissZVIReader.h" 
    193 #include "jace/proxy/loci/formats/meta/AggregateMetadata.h" 
    194 #include "jace/proxy/loci/formats/meta/DummyMetadata.h" 
    195 #include "jace/proxy/loci/formats/meta/FilterMetadata.h" 
    196 #include "jace/proxy/loci/formats/meta/IMetadata.h" 
    197 #include "jace/proxy/loci/formats/meta/IMinMaxStore.h" 
    198 #include "jace/proxy/loci/formats/meta/MetadataConverter.h" 
    199 #include "jace/proxy/loci/formats/meta/MetadataRetrieve.h" 
    200 #include "jace/proxy/loci/formats/meta/MetadataStore.h" 
    201 #include "jace/proxy/loci/formats/ome/OmeisException.h" 
    202 #include "jace/proxy/loci/formats/ome/OmeisImporter.h" 
    203 #include "jace/proxy/loci/formats/ome/OMEXML2003FCMetadata.h" 
    204 #include "jace/proxy/loci/formats/ome/OMEXML200706Metadata.h" 
    205 #include "jace/proxy/loci/formats/ome/OMEXML200802Metadata.h" 
    206 #include "jace/proxy/loci/formats/ome/OMEXML200809Metadata.h" 
    207 #include "jace/proxy/loci/formats/ome/OMEXMLMetadata.h" 
    208 #include "jace/proxy/loci/formats/out/APNGWriter.h" 
    209 #include "jace/proxy/loci/formats/out/AVIWriter.h" 
    210 #include "jace/proxy/loci/formats/out/EPSWriter.h" 
    211 #include "jace/proxy/loci/formats/out/ICSWriter.h" 
    212 #include "jace/proxy/loci/formats/out/ImageIOWriter.h" 
    213 #include "jace/proxy/loci/formats/out/JPEG2000Writer.h" 
    214 #include "jace/proxy/loci/formats/out/JPEGWriter.h" 
    215 #include "jace/proxy/loci/formats/out/LegacyQTWriter.h" 
    216 #include "jace/proxy/loci/formats/out/OMETiffWriter.h" 
    217 #include "jace/proxy/loci/formats/out/OMEXMLWriter.h" 
    218 #include "jace/proxy/loci/formats/out/QTWriter.h" 
    219 #include "jace/proxy/loci/formats/out/TiffWriter.h" 
    220 #include "jace/proxy/loci/formats/tools/EditTiffG.h" 
    221 #include "jace/proxy/loci/formats/tools/ImageConverter.h" 
    222 #include "jace/proxy/loci/formats/tools/ImageInfo.h" 
    223 #include "jace/proxy/loci/formats/tools/TiffComment.h" 
    224 #include "jace/proxy/loci/formats/tools/XMLIndent.h" 
    225 #include "jace/proxy/loci/formats/tools/XMLValidate.h" 
    226 using namespace jace::proxy::loci::formats; 
    227 using namespace jace::proxy::loci::formats::cache; 
    228 using namespace jace::proxy::loci::formats::codec; 
    229 using namespace jace::proxy::loci::formats::gui; 
    230 using namespace jace::proxy::loci::formats::in; 
    231 using namespace jace::proxy::loci::formats::meta; 
    232 using namespace jace::proxy::loci::formats::ome; 
    233 using namespace jace::proxy::loci::formats::out; 
    234 using namespace jace::proxy::loci::formats::tools; 
     27#include "bioformats.h" 
    23528 
    23629#include <string> 
     
    24437using std::endl; 
    24538 
    246 /** A C++ wrapped version of the showinf command line utility. */ 
    24739int main(int argc, const char *argv[]) { 
    24840  try { 
     41    // initialize the Java virtual machine 
    24942    cout << "Creating JVM..." << endl; 
    25043    StaticVmLoader loader(JNI_VERSION_1_4); 
     
    25851    cout << "JVM created." << endl; 
    25952 
     53    // output command line arguments 
    26054    cout << "Arguments:" << endl; 
    26155    for (int i=0; i<argc; i++) cout << "\t#" << i << ": " << argv[i] << endl; 
    26256 
     57    /* 
    26358    typedef JArray<String> StringArray; 
    26459    StringArray args(argc - 1); 
    26560    for (int i=1; i<argc; i++) args[i - 1] = argv[i]; 
    26661    JBoolean result = ImageInfo::testRead(args); 
     62    */ 
    26763 
    26864    if (argc < 2) { 
     
    27268      String id = argv[1]; 
    27369      cout << "Initializing " << id << endl; 
    274       //ImageReader r(); 
    275       //r.setId(id); 
    276       //int w = r.getWidth(); 
    277       //int h = r.getHeight(); 
    278       //cout << "Image planes are " << w << " x " << h << endl; 
    279       //r.openBytes(0); 
    280       //JBoolean result = ImageInfo::testRead(r, args); 
     70      ImageReader reader; 
     71      reader.setId(id); 
     72      int w = reader.getSizeX(); 
     73      int h = reader.getSizeY(); 
     74      cout << "Image planes are " << w << " x " << h << endl; 
     75      reader.openBytes(0); 
     76      //JBoolean result = ImageInfo::testRead(reader, args); 
    28177 
    28278      //return result ? 0 : 1; 
Note: See TracChangeset for help on using the changeset viewer.