Changes between Version 1 and Version 2 of ossimTraceDebug

Apr 9, 2009, 11:16:04 AM (14 years ago)



  • ossimTraceDebug

    v1 v2  
    22== Using trace in ossim for debugging: ==
     5To enable trace in an ossim application it is a simple matter of doing an ossim initialize.  Code snip:
     8#include <ossim/init/ossimInit.h>
     9int main(int argc, char* argv[])
     11   // Adding the call to initialize will enable your application to use trace.
     12   ossimInit::instance()->initialize(argc, argv);
     14   // the rest of your application main:
     16   return 0;
     20To use trace in a trace enabled application use the -T option followed by some regular expression. [[BR]]
     24// A call to image_info with no trace.  The -d option is to tell image_info to do a "dump" on the file.[[BR]]
     25image_info -d image.tif[[BR]]
     28// This will turn trace on for anything that starts with "ossim".  Note the '-T ossim' option is being used.[[BR]]
     29// Note: Since almost all classes in ossim start with "ossim" this will dump a LOT of stuff.[[BR]]
     31image_info -d -T ossim image.tif[[BR]]
     33// This will turn trace on for anything matching ossimTiffInfo.[[BR]]
     34image_info -d -T ossimTiffInfo image.tif[[BR]]
     36// This will turn trace on for anything matching ossimTiffInfo.[[BR]]
     37image_info -d -T ossimTiffInfo image.tif[[BR]]
     40// The ossimTiffInfo class has two separate traces "ossimTiffInfo:debug" and "ossimTiffInfo:dump"[[BR]]
     41// This will turn on just "debug"[[BR]]
     43image_info -d -T ossimTiffInfo:debug image.tif[[BR]]
     46// This will turn on trace for ossimTiffInfo AND ossimGeoTiff:[[BR]]
     47// Note: The OR bar '|' and also the regular expression is quoted.  Also the -i and -p options[[BR]]
     48// were added so that the code would go into the ossimGeoTiff class for this example.[[BR]]
     50image_info -i -p -d -T "ossimTiffInfo|ossimGeoTiff" image.tif[[BR]]
     53// This is a snip of a real image_info output turning trace on for ossimTiffInfo and ossimGeoTiff.[[BR]]
     54// Note:  This is not the whole dump just pieces for demo purposes.[[BR]]
     57$ image_info -i -p -d -T "ossimTiffInfo|ossimGeoTiff" imagery_HH.tif[[BR]]
     58DEBUG ossimGeoTiff::ossimGeoTiff: Entered...[[BR]]
     59DEBUG ossimGeoTiff::ossimGeoTiff: OSSIM_ID =  $Id: ossimGeoTiff.cpp 14039 2009-0[[BR]]
     602-26 23:35:49Z dburken $[[BR]]
     61DEBUG ossimGeoTiff::setOssimDatumName: theDatumName:  WGE[[BR]]
     62Need to add double param support for projection = ossimEquDistCylProjection[[BR]]
     64theScale is empty...[[BR]]
     65ossimGeoTiff::addImageGeometry: Creating a bilinear projection[[BR]]
     66tiff.version: 42(classic)[[BR]]
     67tiff.byte_order: big_endian[[BR]]
     68system_byte_order: little_endian[[BR]]
     69DEBUG ossimTiffInfo::readTags: Offset to first ifd:  212115324[[BR]]
     70tiff.directory_offset: 212115324[[BR]]
     71DEBUG ossimTiffInfo::readTags:[[BR]]
     72ifd:  212115324[[BR]]
     73tags in directory:  20[[BR]]
     74DEBUG ossimTiffInfo::print DEBUG:[[BR]]
     76type:                3[[BR]]
     77count:        1[[BR]]
     78array size in bytes: 2[[BR]]
     79tiff.image0.image_width: 10507[[BR]]