Changes between Version 1 and Version 2 of ossimTraceDebug


Ignore:
Timestamp:
Apr 9, 2009, 11:16:04 AM (11 years ago)
Author:
dburken
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ossimTraceDebug

    v1 v2  
    11
    22== Using trace in ossim for debugging: ==
     3
     4
     5To enable trace in an ossim application it is a simple matter of doing an ossim initialize.  Code snip:
     6
     7{{{
     8#include <ossim/init/ossimInit.h>
     9int main(int argc, char* argv[])
     10{
     11   // Adding the call to initialize will enable your application to use trace.
     12   ossimInit::instance()->initialize(argc, argv);
     13
     14   // the rest of your application main:
     15
     16   return 0;
     17}
     18}}}
     19[[BR]]
     20To use trace in a trace enabled application use the -T option followed by some regular expression. [[BR]]
     21[[BR]]
     22Examples:[[BR]]
     23[[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]]
     26[[BR]]
     27//---[[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]]
     30//---[[BR]]
     31image_info -d -T ossim image.tif[[BR]]
     32
     33// This will turn trace on for anything matching ossimTiffInfo.[[BR]]
     34image_info -d -T ossimTiffInfo image.tif[[BR]]
     35
     36// This will turn trace on for anything matching ossimTiffInfo.[[BR]]
     37image_info -d -T ossimTiffInfo image.tif[[BR]]
     38
     39//---[[BR]]
     40// The ossimTiffInfo class has two separate traces "ossimTiffInfo:debug" and "ossimTiffInfo:dump"[[BR]]
     41// This will turn on just "debug"[[BR]]
     42//---[[BR]]
     43image_info -d -T ossimTiffInfo:debug image.tif[[BR]]
     44[[BR]]
     45//---[[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]]
     49//---[[BR]]
     50image_info -i -p -d -T "ossimTiffInfo|ossimGeoTiff" image.tif[[BR]]
     51[[BR]]
     52//---[[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]]
     55//---[[BR]]
     56[[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]]
     63ossimGeoTiff::print[[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]]
     75tag[0]:256[[BR]]
     76type:                3[[BR]]
     77count:        1[[BR]]
     78array size in bytes: 2[[BR]]
     79tiff.image0.image_width: 10507[[BR]]
     80
     81
     82
     83
     84
     85
     86