Changeset 11480
- Timestamp:
- 05/28/10 18:04:19 (2 years ago)
- Location:
- OpenSceneGraph/trunk/src/osgVolume
- Files:
-
- 8 modified
-
FixedFunctionTechnique.cpp (modified) (8 diffs)
-
Layer.cpp (modified) (10 diffs)
-
Locator.cpp (modified) (1 diff)
-
Property.cpp (modified) (4 diffs)
-
RayTracedTechnique.cpp (modified) (10 diffs)
-
Volume.cpp (modified) (2 diffs)
-
VolumeTechnique.cpp (modified) (3 diffs)
-
VolumeTile.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgVolume/FixedFunctionTechnique.cpp
r10135 r11480 99 99 void FixedFunctionTechnique::init() 100 100 { 101 osg::notify(osg::INFO)<<"FixedFunctionTechnique::init()"<<std::endl;101 OSG_INFO<<"FixedFunctionTechnique::init()"<<std::endl; 102 102 103 103 if (!_volumeTile) 104 104 { 105 osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl;105 OSG_NOTICE<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl; 106 106 return; 107 107 } … … 109 109 if (_volumeTile->getLayer()==0) 110 110 { 111 osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl;111 OSG_NOTICE<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl; 112 112 return; 113 113 } … … 115 115 if (_volumeTile->getLayer()->getImage()==0) 116 116 { 117 osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl;117 OSG_NOTICE<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl; 118 118 return; 119 119 } … … 153 153 { 154 154 masterLocator = _volumeTile->getLayer()->getLocator(); 155 osg::notify(osg::NOTICE)<<"assigning locator = "<<masterLocator<<std::endl;155 OSG_NOTICE<<"assigning locator = "<<masterLocator<<std::endl; 156 156 } 157 157 … … 162 162 } 163 163 164 osg::notify(osg::NOTICE)<<"Matrix = "<<matrix<<std::endl;164 OSG_NOTICE<<"Matrix = "<<matrix<<std::endl; 165 165 166 166 osg::Texture::FilterMode minFilter = osg::Texture::NEAREST; … … 258 258 void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* uv) 259 259 { 260 // osg::notify(osg::NOTICE)<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;260 // OSG_NOTICE<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl; 261 261 } 262 262 263 263 void FixedFunctionTechnique::cull(osgUtil::CullVisitor* cv) 264 264 { 265 // osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;265 //OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl; 266 266 if (_node.valid()) 267 267 { … … 272 272 void FixedFunctionTechnique::cleanSceneGraph() 273 273 { 274 osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::cleanSceneGraph()"<<std::endl;274 OSG_NOTICE<<"FixedFunctionTechnique::cleanSceneGraph()"<<std::endl; 275 275 } 276 276 277 277 void FixedFunctionTechnique::traverse(osg::NodeVisitor& nv) 278 278 { 279 // osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;279 // OSG_NOTICE<<"FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl; 280 280 if (!_volumeTile) return; 281 281 … … 306 306 if (_volumeTile->getDirty()) 307 307 { 308 osg::notify(osg::INFO)<<"******* Doing init ***********"<<std::endl;308 OSG_INFO<<"******* Doing init ***********"<<std::endl; 309 309 _volumeTile->init(); 310 310 } -
OpenSceneGraph/trunk/src/osgVolume/Layer.cpp
r10580 r11480 60 60 getLocator()->computeLocalBounds(left, right); 61 61 62 // osg::notify(osg::NOTICE)<<"left = "<<left<<std::endl;63 // osg::notify(osg::NOTICE)<<"right = "<<right<<std::endl;62 //OSG_NOTICE<<"left = "<<left<<std::endl; 63 //OSG_NOTICE<<"right = "<<right<<std::endl; 64 64 65 65 return osg::BoundingSphere((left+right)*0.5, (right-left).length()*0.5); … … 146 146 if (computeMinMax(minValue, maxValue)) 147 147 { 148 osg::notify(osg::NOTICE)<<"ImageLayer::offsetAndScaleImage("<<offset<<" and "<<scale<<")"<<std::endl;149 osg::notify(osg::NOTICE)<<" before _texelOffset "<<_texelOffset<<std::endl;150 osg::notify(osg::NOTICE)<<" before _texelScale "<<_texelScale<<std::endl;151 osg::notify(osg::NOTICE)<<" before minValue "<<minValue<<std::endl;152 osg::notify(osg::NOTICE)<<" before maxValue "<<maxValue<<std::endl;153 osg::notify(osg::NOTICE)<<" before minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;154 osg::notify(osg::NOTICE)<<" before maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;148 OSG_NOTICE<<"ImageLayer::offsetAndScaleImage("<<offset<<" and "<<scale<<")"<<std::endl; 149 OSG_NOTICE<<" before _texelOffset "<<_texelOffset<<std::endl; 150 OSG_NOTICE<<" before _texelScale "<<_texelScale<<std::endl; 151 OSG_NOTICE<<" before minValue "<<minValue<<std::endl; 152 OSG_NOTICE<<" before maxValue "<<maxValue<<std::endl; 153 OSG_NOTICE<<" before minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl; 154 OSG_NOTICE<<" before maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl; 155 155 } 156 156 #endif … … 178 178 if (computeMinMax(minValue, maxValue)) 179 179 { 180 osg::notify(osg::NOTICE)<<" after _texelOffset "<<_texelOffset<<std::endl;181 osg::notify(osg::NOTICE)<<" after _texelScale "<<_texelScale<<std::endl;182 osg::notify(osg::NOTICE)<<" after minValue "<<minValue<<std::endl;183 osg::notify(osg::NOTICE)<<" after maxValue "<<maxValue<<std::endl;184 osg::notify(osg::NOTICE)<<" after minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;185 osg::notify(osg::NOTICE)<<" after maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;180 OSG_NOTICE<<" after _texelOffset "<<_texelOffset<<std::endl; 181 OSG_NOTICE<<" after _texelScale "<<_texelScale<<std::endl; 182 OSG_NOTICE<<" after minValue "<<minValue<<std::endl; 183 OSG_NOTICE<<" after maxValue "<<maxValue<<std::endl; 184 OSG_NOTICE<<" after minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl; 185 OSG_NOTICE<<" after maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl; 186 186 } 187 187 #endif … … 190 190 void ImageLayer::rescaleToZeroToOneRange() 191 191 { 192 osg::notify(osg::INFO)<<"ImageLayer::rescaleToZeroToOneRange()"<<std::endl;192 OSG_INFO<<"ImageLayer::rescaleToZeroToOneRange()"<<std::endl; 193 193 194 194 osg::Vec4 minValue, maxValue; … … 208 208 float offset = -minComponent * scale; 209 209 210 osg::notify(osg::INFO)<<" scale "<<scale<<std::endl;211 osg::notify(osg::INFO)<<" offset "<<offset<<std::endl;210 OSG_INFO<<" scale "<<scale<<std::endl; 211 OSG_INFO<<" offset "<<offset<<std::endl; 212 212 213 213 offsetAndScaleImage(osg::Vec4(offset, offset, offset, offset), … … 292 292 osg::Image* osgVolume::createNormalMapTexture(osg::Image* image_3d) 293 293 { 294 osg::notify(osg::INFO)<<"Computing NormalMapTexture"<<std::endl;294 OSG_INFO<<"Computing NormalMapTexture"<<std::endl; 295 295 296 296 GLenum dataType = image_3d->getDataType(); … … 318 318 break; 319 319 default: 320 osg::notify(osg::NOTICE)<<"Source pixel format not support for normal map generation."<<std::endl;320 OSG_NOTICE<<"Source pixel format not support for normal map generation."<<std::endl; 321 321 return 0; 322 322 } … … 402 402 grad.normalize(); 403 403 404 // osg::notify(osg::NOTICE)<<"normal "<<grad<<std::endl;404 //OSG_NOTICE<<"normal "<<grad<<std::endl; 405 405 406 406 if (grad.x()==0.0f && grad.y()==0.0f && grad.z()==0.0f) … … 482 482 483 483 484 osg::notify(osg::INFO)<<"Created NormalMapTexture"<<std::endl;484 OSG_INFO<<"Created NormalMapTexture"<<std::endl; 485 485 486 486 return normalmap_3d.release(); … … 533 533 osg::Image* osgVolume::applyTransferFunction(osg::Image* image, osg::TransferFunction1D* transferFunction) 534 534 { 535 osg::notify(osg::INFO)<<"Applying transfer function"<<std::endl;535 OSG_INFO<<"Applying transfer function"<<std::endl; 536 536 537 537 osg::Image* output_image = new osg::Image; -
OpenSceneGraph/trunk/src/osgVolume/Locator.cpp
r10560 r11480 110 110 bool Locator::computeLocalBounds(osg::Vec3d& bottomLeft, osg::Vec3d& topRight) const 111 111 { 112 osg::notify(osg::NOTICE)<<"Locator::computeLocalBounds"<<std::endl;112 OSG_NOTICE<<"Locator::computeLocalBounds"<<std::endl; 113 113 114 114 typedef std::list<osg::Vec3d> Corners; -
OpenSceneGraph/trunk/src/osgVolume/Property.cpp
r9523 r11480 338 338 if (_updateAlphaCutOff && cpv._isoProperty.valid()) 339 339 { 340 osg::notify(osg::INFO)<<"Setting isoProperty to "<<v<<std::endl;340 OSG_INFO<<"Setting isoProperty to "<<v<<std::endl; 341 341 cpv._isoProperty->setValue(v); 342 342 } … … 344 344 if (_updateAlphaCutOff && cpv._afProperty.valid()) 345 345 { 346 osg::notify(osg::INFO)<<"Setting afProperty to "<<v2<<std::endl;346 OSG_INFO<<"Setting afProperty to "<<v2<<std::endl; 347 347 cpv._afProperty->setValue(v2); 348 348 } … … 350 350 if (_updateTransparency && cpv._transparencyProperty.valid()) 351 351 { 352 osg::notify(osg::INFO)<<"Setting transparency to "<<v2<<std::endl;352 OSG_INFO<<"Setting transparency to "<<v2<<std::endl; 353 353 cpv._transparencyProperty->setValue(v2); 354 354 } … … 356 356 if (_updateSampleDensity && cpv._sampleDensityProperty.valid()) 357 357 { 358 osg::notify(osg::INFO)<<"Setting sample density to "<<v4<<std::endl;358 OSG_INFO<<"Setting sample density to "<<v4<<std::endl; 359 359 cpv._sampleDensityProperty->setValue(v4); 360 360 } -
OpenSceneGraph/trunk/src/osgVolume/RayTracedTechnique.cpp
r10592 r11480 97 97 void RayTracedTechnique::init() 98 98 { 99 osg::notify(osg::INFO)<<"RayTracedTechnique::init()"<<std::endl;99 OSG_INFO<<"RayTracedTechnique::init()"<<std::endl; 100 100 101 101 if (!_volumeTile) 102 102 { 103 osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no volume tile assigned."<<std::endl;103 OSG_NOTICE<<"RayTracedTechnique::init(), error no volume tile assigned."<<std::endl; 104 104 return; 105 105 } … … 107 107 if (_volumeTile->getLayer()==0) 108 108 { 109 osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl;109 OSG_NOTICE<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl; 110 110 return; 111 111 } … … 113 113 if (_volumeTile->getLayer()->getImage()==0) 114 114 { 115 osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no image assigned to layer."<<std::endl;115 OSG_NOTICE<<"RayTracedTechnique::init(), error no image assigned to layer."<<std::endl; 116 116 return; 117 117 } … … 187 187 } 188 188 189 osg::notify(osg::INFO)<<"RayTracedTechnique::init() : geometryMatrix = "<<geometryMatrix<<std::endl;190 osg::notify(osg::INFO)<<"RayTracedTechnique::init() : imageMatrix = "<<imageMatrix<<std::endl;189 OSG_INFO<<"RayTracedTechnique::init() : geometryMatrix = "<<geometryMatrix<<std::endl; 190 OSG_INFO<<"RayTracedTechnique::init() : imageMatrix = "<<imageMatrix<<std::endl; 191 191 192 192 osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT; … … 272 272 #if 1 273 273 osgDB::writeImageFile(*(tf->getImage()),"tf.png"); 274 osg::notify(osg::NOTICE)<<"imageLayer->getTexelOffset()[3]="<<imageLayer->getTexelOffset()[3]<<std::endl;275 osg::notify(osg::NOTICE)<<"imageLayer->getTexelScale()[3]="<<imageLayer->getTexelScale()[3]<<std::endl;276 osg::notify(osg::NOTICE)<<"tfOffset="<<tfOffset<<std::endl;277 osg::notify(osg::NOTICE)<<"tfScale="<<tfScale<<std::endl;278 osg::notify(osg::NOTICE)<<"tf->getMinimum()="<<tf->getMinimum()<<std::endl;279 osg::notify(osg::NOTICE)<<"tf->getMaximum()="<<tf->getMaximum()<<std::endl;274 OSG_NOTICE<<"imageLayer->getTexelOffset()[3]="<<imageLayer->getTexelOffset()[3]<<std::endl; 275 OSG_NOTICE<<"imageLayer->getTexelScale()[3]="<<imageLayer->getTexelScale()[3]<<std::endl; 276 OSG_NOTICE<<"tfOffset="<<tfOffset<<std::endl; 277 OSG_NOTICE<<"tfScale="<<tfScale<<std::endl; 278 OSG_NOTICE<<"tf->getMinimum()="<<tf->getMinimum()<<std::endl; 279 OSG_NOTICE<<"tf->getMaximum()="<<tf->getMaximum()<<std::endl; 280 280 #endif 281 281 … … 350 350 if (fragmentShader) 351 351 { 352 osg::notify(osg::INFO)<<"Shader found"<<std::endl;352 OSG_INFO<<"Shader found"<<std::endl; 353 353 354 354 program->addShader(fragmentShader); … … 356 356 else 357 357 { 358 osg::notify(osg::INFO)<<"No Shader found"<<std::endl;358 OSG_INFO<<"No Shader found"<<std::endl; 359 359 360 360 #include "Shaders/volume_iso_frag.cpp" … … 539 539 void RayTracedTechnique::update(osgUtil::UpdateVisitor* uv) 540 540 { 541 // osg::notify(osg::NOTICE)<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;541 // OSG_NOTICE<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl; 542 542 } 543 543 544 544 void RayTracedTechnique::cull(osgUtil::CullVisitor* cv) 545 545 { 546 // osg::notify(osg::NOTICE)<<"RayTracedTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;546 //OSG_NOTICE<<"RayTracedTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl; 547 547 if (_transform.valid()) 548 548 { … … 553 553 void RayTracedTechnique::cleanSceneGraph() 554 554 { 555 osg::notify(osg::NOTICE)<<"RayTracedTechnique::cleanSceneGraph()"<<std::endl;555 OSG_NOTICE<<"RayTracedTechnique::cleanSceneGraph()"<<std::endl; 556 556 } 557 557 558 558 void RayTracedTechnique::traverse(osg::NodeVisitor& nv) 559 559 { 560 // osg::notify(osg::NOTICE)<<"RayTracedTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;560 // OSG_NOTICE<<"RayTracedTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl; 561 561 if (!_volumeTile) return; 562 562 … … 587 587 if (_volumeTile->getDirty()) 588 588 { 589 osg::notify(osg::INFO)<<"******* Doing init ***********"<<std::endl;589 OSG_INFO<<"******* Doing init ***********"<<std::endl; 590 590 _volumeTile->init(); 591 591 } -
OpenSceneGraph/trunk/src/osgVolume/Volume.cpp
r9494 r11480 95 95 if (_volumeTileSet.size() > s_maxNumVolumeTiles) s_maxNumVolumeTiles = _volumeTileSet.size(); 96 96 97 // osg::notify(osg::NOTICE)<<"Volume::registerVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;97 // OSG_NOTICE<<"Volume::registerVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl; 98 98 } 99 99 … … 111 111 _volumeTileSet.erase(volumeTile); 112 112 113 // osg::notify(osg::NOTICE)<<"Volume::unregisterVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;113 // OSG_NOTICE<<"Volume::unregisterVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl; 114 114 } -
OpenSceneGraph/trunk/src/osgVolume/VolumeTechnique.cpp
r9494 r11480 35 35 void VolumeTechnique::init() 36 36 { 37 osg::notify(osg::NOTICE)<<className()<<"::initialize(..) not implementated yet"<<std::endl;37 OSG_NOTICE<<className()<<"::initialize(..) not implementated yet"<<std::endl; 38 38 } 39 39 40 40 void VolumeTechnique::update(osgUtil::UpdateVisitor* uv) 41 41 { 42 osg::notify(osg::NOTICE)<<className()<<"::update(..) not implementated yet"<<std::endl;42 OSG_NOTICE<<className()<<"::update(..) not implementated yet"<<std::endl; 43 43 if (_volumeTile) _volumeTile->osg::Group::traverse(*uv); 44 44 } … … 46 46 void VolumeTechnique::cull(osgUtil::CullVisitor* cv) 47 47 { 48 osg::notify(osg::NOTICE)<<className()<<"::cull(..) not implementated yet"<<std::endl;48 OSG_NOTICE<<className()<<"::cull(..) not implementated yet"<<std::endl; 49 49 if (_volumeTile) _volumeTile->osg::Group::traverse(*cv); 50 50 } … … 52 52 void VolumeTechnique::cleanSceneGraph() 53 53 { 54 osg::notify(osg::NOTICE)<<className()<<"::cleanSceneGraph(..) not implementated yet"<<std::endl;54 OSG_NOTICE<<className()<<"::cleanSceneGraph(..) not implementated yet"<<std::endl; 55 55 } 56 56 -
OpenSceneGraph/trunk/src/osgVolume/VolumeTile.cpp
r9748 r11480 113 113 if (volume) 114 114 { 115 osg::notify(osg::INFO)<<"Assigning volume system "<<volume<<std::endl;115 OSG_INFO<<"Assigning volume system "<<volume<<std::endl; 116 116 setVolume(volume); 117 117 }
