Changeset 6053


Ignore:
Timestamp:
03/19/10 13:54:10 (10 years ago)
Author:
melissa
Message:
  • Fixed compile errors in bf-cpp.
  • Fixed several bugs exposed by metadata-validator.
Location:
trunk/components
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/autogen/src/jace/header.vm

    r5682 r6053  
    4848 
    4949#ifndef $headerLabel 
    50 #define $headerLabel 
     50\#define $headerLabel 
    5151 
    5252\#include "jace.h" 
  • trunk/components/bf-ice/src/bio-formats.ice

    r6026 r6053  
    2525 * 
    2626 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    27  * Created by melissa via MetadataAutogen on Mar 15, 2010 2:19:27 PM CDT 
     27 * Created by melissa via MetadataAutogen on Mar 19, 2010 1:33:10 PM CDT 
    2828 * 
    2929 *----------------------------------------------------------------------------- 
  • trunk/components/bio-formats/src/loci/formats/MetadataTools.java

    r6041 r6053  
    259259  /** 
    260260   * @deprecated This method is not thread-safe; use 
     261   * {@link loci.formats.services.OMEXMLService#asRetrieve(MetadataStore)} 
     262   * instead. 
     263   */ 
     264  public static MetadataRetrieve asRetrieve(MetadataStore meta) { 
     265    if (omexmlService == null) return null; 
     266    return omexmlService.asRetrieve(meta); 
     267  } 
     268 
     269  /** 
     270   * @deprecated This method is not thread-safe; use 
    261271   * {@link loci.formats.services.OMEXMLService#getLatestVersion()} 
    262272   * instead. 
  • trunk/components/bio-formats/src/loci/formats/in/LegacyND2Reader.java

    r6026 r6053  
    173173      } 
    174174    } 
     175    catch (UnsatisfiedLinkError e) { 
     176      throw new MissingLibraryException(NO_NIKON_MSG, e); 
     177    } 
    175178    catch (Exception e) { 
    176179      throw new MissingLibraryException(NO_NIKON_MSG, e); 
  • trunk/components/bio-formats/src/loci/formats/services/MDBServiceImpl.java

    r6026 r6053  
    9191 
    9292      if (type == Constants.MDB_TABLE && !name.startsWith("MSys")) { 
    93         Vector<String[]> tableData = new Vector<String[]>();  
     93        Vector<String[]> tableData = new Vector<String[]>(); 
    9494        MdbTableDef table = Table.mdb_read_table((MdbCatalogEntry) entry); 
    9595        Table.mdb_read_columns(table); 
  • trunk/components/common/src/loci/common/NIOFileHandle.java

    r6050 r6053  
    467467        || newPosition > bufferStartPosition + bufferSize 
    468468        || buffer == null) { 
    469       bufferStartPosition = offset; 
     469      bufferStartPosition = Math.min(offset, length() - 1); 
    470470      long newSize = Math.min(length() - bufferStartPosition, bufferSize); 
    471471      if (newSize < size && newSize == bufferSize) newSize = size; 
     472      if (newSize + bufferStartPosition > length()) { 
     473        newSize = length() - bufferStartPosition; 
     474      } 
     475      offset = bufferStartPosition; 
    472476      ByteOrder byteOrder = buffer == null ? order : getOrder(); 
    473477      buffer = channel.map(mapMode, bufferStartPosition, newSize); 
    474478      if (byteOrder != null) setOrder(byteOrder); 
     479      // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5092131 
     480      // for an explanation of why the following is necessary 
     481      System.gc(); 
     482      System.runFinalization(); 
    475483    } 
    476484    buffer.position((int) (offset - bufferStartPosition)); 
  • trunk/components/common/src/loci/common/RandomAccessInputStream.java

    r6050 r6053  
    228228    char[] buf = new char[blockSize]; 
    229229    long loc = 0; 
    230     while (loc < maxLen) { 
     230    while (loc < maxLen && getFilePointer() < length()) { 
    231231      // if we're not saving the string, drop any old, unnecessary output 
    232232      if (!saveString) { 
  • trunk/components/native/bf-cpp/include/bio-formats.h

    r5885 r6053  
    4242 * 
    4343 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    44  * Created by curtis via JaceHeaderAutogen on Feb 4, 2010 3:31:07 PM CST 
     44 * Created by melissa via JaceHeaderAutogen on Mar 19, 2010 1:24:53 PM CDT 
    4545 * 
    4646 *----------------------------------------------------------------------------- 
     
    7777#include "jace/proxy/loci/formats/MinMaxCalculator.h" 
    7878#include "jace/proxy/loci/formats/MissingLibraryException.h" 
    79 #include "jace/proxy/loci/formats/NetcdfTools.h" 
    8079#include "jace/proxy/loci/formats/NumberFilter.h" 
    81 #include "jace/proxy/loci/formats/POITools.h" 
    8280#include "jace/proxy/loci/formats/ReaderWrapper.h" 
    83 #include "jace/proxy/loci/formats/StatusEvent.h" 
    84 #include "jace/proxy/loci/formats/StatusListener.h" 
    85 #include "jace/proxy/loci/formats/StatusReporter.h" 
    8681#include "jace/proxy/loci/formats/UnknownFormatException.h" 
    8782#include "jace/proxy/loci/formats/WriterWrapper.h" 
     
    126121#include "jace/proxy/loci/formats/codec/NikonCodecOptions.h" 
    127122#include "jace/proxy/loci/formats/codec/PackbitsCodec.h" 
     123#include "jace/proxy/loci/formats/codec/PassthroughCodec.h" 
    128124#include "jace/proxy/loci/formats/codec/QTRLECodec.h" 
    129125#include "jace/proxy/loci/formats/codec/RPZACodec.h" 
     
    191187 
    192188#include "jace/proxy/loci/formats/gui/AWTImageTools.h" 
    193 #include "jace/proxy/loci/formats/gui/AWTTiffTools.h" 
    194189#include "jace/proxy/loci/formats/gui/BufferedImageReader.h" 
    195190#include "jace/proxy/loci/formats/gui/BufferedImageSource.h" 
     
    224219#include "jace/proxy/loci/formats/in/AmiraReader.h" 
    225220#include "jace/proxy/loci/formats/in/AnalyzeReader.h" 
     221#include "jace/proxy/loci/formats/in/BDReader.h" 
    226222#include "jace/proxy/loci/formats/in/BIFormatReader.h" 
    227223#include "jace/proxy/loci/formats/in/BMPReader.h" 
    228224#include "jace/proxy/loci/formats/in/BaseTiffReader.h" 
    229225#include "jace/proxy/loci/formats/in/BioRadReader.h" 
     226#include "jace/proxy/loci/formats/in/BurleighReader.h" 
    230227#include "jace/proxy/loci/formats/in/CellomicsReader.h" 
    231228#include "jace/proxy/loci/formats/in/DeltavisionReader.h" 
     
    239236#include "jace/proxy/loci/formats/in/FluoviewReader.h" 
    240237#include "jace/proxy/loci/formats/in/GIFReader.h" 
     238#include "jace/proxy/loci/formats/in/GatanDM2Reader.h" 
    241239#include "jace/proxy/loci/formats/in/GatanReader.h" 
    242240#include "jace/proxy/loci/formats/in/GelReader.h" 
     241#include "jace/proxy/loci/formats/in/HISReader.h" 
    243242#include "jace/proxy/loci/formats/in/ICSReader.h" 
    244243#include "jace/proxy/loci/formats/in/IPLabReader.h" 
     
    252251#include "jace/proxy/loci/formats/in/InCellReader.h" 
    253252#include "jace/proxy/loci/formats/in/IvisionReader.h" 
     253#include "jace/proxy/loci/formats/in/JEOLReader.h" 
    254254#include "jace/proxy/loci/formats/in/JPEG2000Reader.h" 
    255255#include "jace/proxy/loci/formats/in/JPEGReader.h" 
     
    264264#include "jace/proxy/loci/formats/in/LeicaReader.h" 
    265265#include "jace/proxy/loci/formats/in/LiFlimReader.h" 
    266 #include "jace/proxy/loci/formats/in/MDBParser.h" 
    267266#include "jace/proxy/loci/formats/in/MIASReader.h" 
    268267#include "jace/proxy/loci/formats/in/MINCReader.h" 
     
    287286#include "jace/proxy/loci/formats/in/OpenlabRawReader.h" 
    288287#include "jace/proxy/loci/formats/in/OpenlabReader.h" 
     288#include "jace/proxy/loci/formats/in/OxfordInstrumentsReader.h" 
    289289#include "jace/proxy/loci/formats/in/PCIReader.h" 
    290290#include "jace/proxy/loci/formats/in/PCXReader.h" 
     
    292292#include "jace/proxy/loci/formats/in/PSDReader.h" 
    293293#include "jace/proxy/loci/formats/in/PerkinElmerReader.h" 
     294#include "jace/proxy/loci/formats/in/PhotoshopTiffReader.h" 
    294295#include "jace/proxy/loci/formats/in/PictReader.h" 
    295296#include "jace/proxy/loci/formats/in/PrairieReader.h" 
    296297#include "jace/proxy/loci/formats/in/QTReader.h" 
     298#include "jace/proxy/loci/formats/in/QuesantReader.h" 
    297299#include "jace/proxy/loci/formats/in/SDTInfo.h" 
    298300#include "jace/proxy/loci/formats/in/SDTReader.h" 
    299301#include "jace/proxy/loci/formats/in/SEQReader.h" 
     302#include "jace/proxy/loci/formats/in/SMCameraReader.h" 
    300303#include "jace/proxy/loci/formats/in/SVSReader.h" 
    301304#include "jace/proxy/loci/formats/in/ScanrReader.h" 
     305#include "jace/proxy/loci/formats/in/SeikoReader.h" 
    302306#include "jace/proxy/loci/formats/in/SlidebookReader.h" 
    303307#include "jace/proxy/loci/formats/in/TCSReader.h" 
     
    307311#include "jace/proxy/loci/formats/in/TiffReader.h" 
    308312#include "jace/proxy/loci/formats/in/TillVisionReader.h" 
     313#include "jace/proxy/loci/formats/in/TopometrixReader.h" 
     314#include "jace/proxy/loci/formats/in/UBMReader.h" 
     315#include "jace/proxy/loci/formats/in/UnisokuReader.h" 
     316#include "jace/proxy/loci/formats/in/VGSAMReader.h" 
    309317#include "jace/proxy/loci/formats/in/VisitechReader.h" 
     318#include "jace/proxy/loci/formats/in/WATOPReader.h" 
    310319#include "jace/proxy/loci/formats/in/ZeissLSMReader.h" 
    311320#include "jace/proxy/loci/formats/in/ZeissZVIReader.h" 
     
    323332//using namespace jace::proxy::loci::formats::meta; 
    324333 
     334#include "jace/proxy/loci/formats/ome/AbstractOMEXMLMetadata.h" 
    325335#include "jace/proxy/loci/formats/ome/OMEXML2003FCMetadata.h" 
    326336#include "jace/proxy/loci/formats/ome/OMEXML200706Metadata.h" 
     
    347357//using namespace jace::proxy::loci::formats::out; 
    348358 
     359#include "jace/proxy/loci/formats/services/JAIIIOService.h" 
     360#include "jace/proxy/loci/formats/services/JAIIIOServiceImpl.h" 
     361#include "jace/proxy/loci/formats/services/LuraWaveService.h" 
     362#include "jace/proxy/loci/formats/services/LuraWaveServiceImpl.h" 
     363#include "jace/proxy/loci/formats/services/MDBService.h" 
     364#include "jace/proxy/loci/formats/services/MDBServiceImpl.h" 
     365#include "jace/proxy/loci/formats/services/NetCDFService.h" 
     366#include "jace/proxy/loci/formats/services/NetCDFServiceImpl.h" 
     367#include "jace/proxy/loci/formats/services/OMEReaderWriterService.h" 
     368#include "jace/proxy/loci/formats/services/OMEXMLService.h" 
     369#include "jace/proxy/loci/formats/services/OMEXMLServiceImpl.h" 
     370#include "jace/proxy/loci/formats/services/POIService.h" 
     371#include "jace/proxy/loci/formats/services/POIServiceImpl.h" 
     372//using namespace jace::proxy::loci::formats::services; 
     373 
    349374#include "jace/proxy/loci/formats/tiff/IFD.h" 
    350375#include "jace/proxy/loci/formats/tiff/IFDList.h" 
     376#include "jace/proxy/loci/formats/tiff/IFDType.h" 
    351377#include "jace/proxy/loci/formats/tiff/PhotoInterp.h" 
    352378#include "jace/proxy/loci/formats/tiff/TiffCompression.h" 
     
    356382#include "jace/proxy/loci/formats/tiff/TiffRational.h" 
    357383#include "jace/proxy/loci/formats/tiff/TiffSaver.h" 
    358 #include "jace/proxy/loci/formats/tiff/TiffTools.h" 
    359384//using namespace jace::proxy::loci::formats::tiff; 
    360385 
     
    366391#include "jace/proxy/loci/formats/tools/PrintDomains.h" 
    367392#include "jace/proxy/loci/formats/tools/PrintFormatTable.h" 
    368 #include "jace/proxy/loci/formats/tools/StatusEchoer.h" 
    369393#include "jace/proxy/loci/formats/tools/TiffComment.h" 
    370394#include "jace/proxy/loci/formats/tools/XMLIndent.h" 
  • trunk/components/native/bf-cpp/include/flow-cytometry.h

    r5885 r6053  
    4242 * 
    4343 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    44  * Created by curtis via JaceHeaderAutogen on Feb 4, 2010 3:31:08 PM CST 
     44 * Created by melissa via JaceHeaderAutogen on Mar 19, 2010 1:24:54 PM CDT 
    4545 * 
    4646 *----------------------------------------------------------------------------- 
  • trunk/components/native/bf-cpp/include/loci-common.h

    r5885 r6053  
    4242 * 
    4343 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    44  * Created by curtis via JaceHeaderAutogen on Feb 4, 2010 3:31:08 PM CST 
     44 * Created by melissa via JaceHeaderAutogen on Mar 19, 2010 1:24:54 PM CDT 
    4545 * 
    4646 *----------------------------------------------------------------------------- 
     
    5252#include "jace.h" 
    5353 
     54#include "jace/proxy/loci/common/AbstractNIOHandle.h" 
    5455#include "jace/proxy/loci/common/BZip2Handle.h" 
    5556#include "jace/proxy/loci/common/ByteArrayHandle.h" 
    5657#include "jace/proxy/loci/common/CBZip2InputStream.h" 
    5758#include "jace/proxy/loci/common/CRC.h" 
    58 #include "jace/proxy/loci/common/CompressedRandomAccess.h" 
    5959#include "jace/proxy/loci/common/DataTools.h" 
    6060#include "jace/proxy/loci/common/DateTools.h" 
     
    6767#include "jace/proxy/loci/common/IniTable.h" 
    6868#include "jace/proxy/loci/common/Location.h" 
    69 #include "jace/proxy/loci/common/Log.h" 
    70 #include "jace/proxy/loci/common/LogTools.h" 
     69#include "jace/proxy/loci/common/NIOFileHandle.h" 
     70#include "jace/proxy/loci/common/NIOInputStream.h" 
    7171#include "jace/proxy/loci/common/RandomAccessInputStream.h" 
    7272#include "jace/proxy/loci/common/RandomAccessOutputStream.h" 
     
    7474#include "jace/proxy/loci/common/ReflectedUniverse.h" 
    7575#include "jace/proxy/loci/common/Region.h" 
     76#include "jace/proxy/loci/common/StreamHandle.h" 
    7677#include "jace/proxy/loci/common/URLHandle.h" 
    77 #include "jace/proxy/loci/common/XMLTools.h" 
    7878#include "jace/proxy/loci/common/ZipHandle.h" 
    7979//using namespace jace::proxy::loci::common; 
    8080 
     81#include "jace/proxy/loci/common/enumeration/CodedEnum.h" 
     82#include "jace/proxy/loci/common/enumeration/EnumException.h" 
     83//using namespace jace::proxy::loci::common::enumeration; 
     84 
     85#include "jace/proxy/loci/common/services/AbstractService.h" 
     86#include "jace/proxy/loci/common/services/DependencyException.h" 
     87#include "jace/proxy/loci/common/services/OMENotesService.h" 
     88#include "jace/proxy/loci/common/services/Service.h" 
     89#include "jace/proxy/loci/common/services/ServiceException.h" 
     90#include "jace/proxy/loci/common/services/ServiceFactory.h" 
     91//using namespace jace::proxy::loci::common::services; 
     92 
     93#include "jace/proxy/loci/common/xml/MetadataHandler.h" 
     94#include "jace/proxy/loci/common/xml/ValidationErrorHandler.h" 
     95#include "jace/proxy/loci/common/xml/ValidationSAXHandler.h" 
     96#include "jace/proxy/loci/common/xml/XMLTools.h" 
     97//using namespace jace::proxy::loci::common::xml; 
     98 
    8199#endif 
  • trunk/components/native/bf-cpp/source/showinf.cpp

    r6026 r6053  
    6666using jace::proxy::loci::formats::meta::MetadataRetrieve; 
    6767using jace::proxy::loci::formats::meta::MetadataStore; 
    68 using jace::proxy::loci::formats::tools::StatusEchoer; 
    6968 
    7069#include <iostream> 
     
    123122ChannelMerger* channelMerger = NULL; 
    124123DimensionSwapper* dimSwapper = NULL; 
    125  
    126 StatusEchoer* status = NULL; 
    127124 
    128125// -- Methods -- 
     
    255252  } 
    256253 
    257   status = new StatusEchoer; 
    258   reader->addStatusListener(*status); 
    259  
    260254  ((IFormatHandler*) reader)->close(); 
    261255  reader->setNormalized(normalize); 
     
    444438  if (reader->getSeriesCount() > 1) cout << " series #" << series; 
    445439  cout << " pixel data "; 
    446   status->setVerbose(false); 
    447440  int num = reader->getImageCount(); 
    448441  if (start < 0) start = 0; 
     
    464457  for (int i=start; i<=end; i++) { 
    465458    flush(cout); 
    466     status->setEchoNext(true); 
    467459    if (thumbs) reader->openThumbBytes(i); 
    468460    else reader->openBytes(i, xCoordinate, yCoordinate, width, height); 
     
    547539  delete dimSwapper; 
    548540  dimSwapper = NULL; 
    549  
    550   delete status; 
    551   status = NULL; 
    552541} 
    553542 
Note: See TracChangeset for help on using the changeset viewer.