From 3593bad3f39442a16beeb110a48c54e1cbabd2fd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 May 2010 17:15:47 +0000 Subject: [PATCH] Converted osg::notify to OSG_INFO etc. --- src/osgPlugins/gdal/DataSetLayer.cpp | 12 +- src/osgPlugins/gdal/ReaderWriterGDAL.cpp | 150 +++++++++++------------ 2 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/osgPlugins/gdal/DataSetLayer.cpp b/src/osgPlugins/gdal/DataSetLayer.cpp index 07e889374..9e7c15c3e 100644 --- a/src/osgPlugins/gdal/DataSetLayer.cpp +++ b/src/osgPlugins/gdal/DataSetLayer.cpp @@ -54,7 +54,7 @@ void DataSetLayer::open() if (getFileName().empty()) return; - osg::notify(osg::NOTICE)<<"DataSetLayer::open()"<(GDALOpen(getFileName().c_str(),GA_ReadOnly)); @@ -63,7 +63,7 @@ void DataSetLayer::open() void DataSetLayer::close() { - osg::notify(osg::NOTICE)<<"DataSetLayer::close()"<GetGCPCount()>0 && _dataset->GetGCPProjection()) { - osg::notify(osg::NOTICE) << " Using GCP's"<< std::endl; + OSG_NOTICE << " Using GCP's"<< std::endl; /* -------------------------------------------------------------------- */ @@ -180,7 +180,7 @@ void DataSetLayer::setUpLocator() if ( hTransformArg == NULL ) { - osg::notify(osg::NOTICE)<<" failed to create transformer"<(const_cast(options)); if (imageOptions) { - osg::notify(osg::INFO)<<"Got ImageOptions"<_sourceImageWindowMode) @@ -169,7 +169,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter ((double)(windowY+windowHeight) -(desiredY+desiredHeight))/(double)windowHeight, (desiredWidth)/(double)windowWidth, (desiredHeight)/(double)windowHeight); - osg::notify(osg::INFO)<<"tex coord range "<_x<<" "<_y<<" "<_w<<" "<_h<_x<<" "<_y<<" "<_w<<" "<_h<GetRasterCount()<GetProjectionRef()<GetRasterCount()<GetProjectionRef()<GetGeoTransform(geoTransform)==CE_None) { - osg::notify(osg::INFO) << " GetGeoTransform "<< std::endl; - osg::notify(osg::INFO) << " Origin = "<GetRasterCount(); @@ -265,12 +265,12 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter GDALRasterBand* band = dataset->GetRasterBand(b); - osg::notify(osg::INFO) << " Band "<GetColorTable()->GetPaletteInterpretation()) << std::endl; + OSG_INFO << " Palette Interpretation: " << GDALGetPaletteInterpretationName(band->GetColorTable()->GetPaletteInterpretation()) << std::endl; } // int gotMin,gotMax; @@ -315,12 +315,12 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter // minmax[1] = band->GetMaximum(&gotMax); // if (!(gotMin && gotMax)) // { -// osg::notify(osg::INFO)<<" computing min max"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+0),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); bandGreen->RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+1),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); @@ -386,7 +386,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter pixelFormat = GL_RGB; internalFormat = GL_RGB; - osg::notify(osg::INFO) << "reading RGB"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+0),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); bandGreen->RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+1),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); @@ -406,7 +406,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter pixelFormat = GL_LUMINANCE_ALPHA; internalFormat = GL_LUMINANCE_ALPHA; - osg::notify(osg::INFO) << "reading grey + alpha"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+0),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); bandAlpha->RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+1),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); @@ -421,7 +421,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter pixelFormat = GL_LUMINANCE; internalFormat = GL_LUMINANCE; - osg::notify(osg::INFO) << "reading grey"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+0),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); } @@ -436,7 +436,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter pixelFormat = GL_ALPHA; internalFormat = GL_ALPHA; - osg::notify(osg::INFO) << "reading alpha"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(imageData+0),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); @@ -453,8 +453,8 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter pixelFormat = GL_RGBA; internalFormat = GL_RGBA; - osg::notify(osg::INFO) << "reading palette"<RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(rawImageData),destWidth,destHeight,targetGDALType,pixelSpace,lineSpace); @@ -467,7 +467,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter { //FIXME: What to do here? - //osg::notify(osg::INFO) << "NO COLOR ENTRY FOR COLOR " << rawImageData[i] << std::endl; + //OSG_INFO << "NO COLOR ENTRY FOR COLOR " << rawImageData[i] << std::endl; imageData[4*i+0] = 255; imageData[4*i+1] = 0; imageData[4*i+2] = 0; @@ -540,7 +540,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter } else { - osg::notify(osg::INFO) << "not found any usable bands in file."<(options); if (imageOptions) { - osg::notify(osg::INFO)<<"Got ImageOptions"<_sourceImageWindowMode) @@ -620,7 +620,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter ((double)(windowY+windowHeight) -(desiredY+desiredHeight))/(double)windowHeight, (desiredWidth)/(double)windowWidth, (desiredHeight)/(double)windowHeight); - osg::notify(osg::INFO)<<"tex coord range "<_x<<" "<_y<<" "<_w<<" "<_h<_x<<" "<_y<<" "<_w<<" "<_h<GetRasterCount()<GetProjectionRef()<GetRasterCount()<GetProjectionRef()<GetGeoTransform(geoTransform)<<" == CE_None"<GetGeoTransform(geoTransform)<<" == CE_None"<GetGCPCount()<GetGCPCount()<GetRasterCount(); @@ -721,21 +721,21 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter GDALRasterBand* band = dataset->GetRasterBand(b); - osg::notify(osg::INFO) << " Band "<GetColorInterpretation()==GCI_GrayIndex) bandGray = band; @@ -763,7 +763,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter bandSelected->RasterIO(GF_Read,windowX,windowY,windowWidth,windowHeight,(void*)(&(hf->getHeightList().front())),destWidth,destHeight,GDT_Float32,0,0); // now need to flip since the OSG's origin is in lower left corner. - osg::notify(osg::INFO)<<"flipping"<getNumRows()-1; for(unsigned int r=0;r