Re: [osg-users] ReaderWriterDICOM : build error
Hi Robert, Your fix builds fine. I hope it also works, but i don't check against DICOM yet. /adrian 2009/11/27 Robert Osfield robert.osfi...@gmail.com Hi Adrian, The code looks it's been copy and pasted from elsewhere where the result variable is defined. I've attempted a fix and checked this in. I don't have ITK installed right now so can't test it. Could you do an svn update and then test it? FYI, the DCMTK pathway is much more sophisticated and feature rich so is the best route for importing dicoms. Robert. On Fri, Nov 27, 2009 at 5:20 PM, Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com wrote: Hi Robert, I tried to fix the ReaderWriterDicom.cpp , if USE_ITK is set the the virtual ReadResult readImage(const std::string file, const osgDB::ReaderWriter::Options* options) const cause a build error \ Error1error C2065: 'result' : undeclared identifier f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp 316 Error2error C2228: left of '.getImage' must have class/struct/union f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp 316 Error3error C2227: left of '-getUserData' must point to class/struct/union/generic type f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp 316 Error4error C2228: left of '.getImage' must have class/struct/union f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp 365 Error5error C2227: left of '-getUserData' must point to class/struct/union/generic type f:\dev\OpenSceneGraph\OpenSceneGraphSVN\src\osgPlugins\dicom\ReaderWriterDICOM.cpp 365 The problem is that i don't correct understand what you would like to get throught user data. But we need to define result . it's defined within a for loop. but how can we fix it? /adrian MSVC 2005 -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple Loading Tutorial
Hi, Thanks Paul, just a question - where you are loading cow.osg - how do i define where this is kept? Ive just got the pdf you linked so will have a read. ... Thank you! Cheers, Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20514#20514 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] How to configure VPB to start compiling database at random tiles.
Hi, My idea was a new parameter in vpbmaster like diskID number which describes for every source (DEM or textures) the execution of all geenrated taskfiles would be like: [code| for each DiskID: execute next task of this DiskID. if more processes than disks: run multiple processes on each disk [/code] I suppose all tiles are generated from sourcedata, so they should be independent runable, shouldn't they? So far, this was my idea... Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20515#20515 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Embedding HiRes-DEM into LowRes global DEM
Hi, I have a High resolution digital elevation model which I would like to integrate into a larger low resolution Dataset. Unfortunately my Hi-Res inlay has no rectangular shape, so all uncovered ereas are (or at least appeare as) black. If I compile my dataset, the black area of my HiRes inlay override the valid values of the LoRes Global DEM. This causes the area around my HiRes Inlay to be flat. Outside of this flat area the dem contains the valid LowRes Values. Is it possible to configure VPB or modify my HiRes Inlay only to use the inlay if it contains at that location valid data? Thank you for your help! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20516#20516 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] normal vectors aren't causing culling
normal vectors aren't causing culling I had a misunderstanding that a scene-graph would do back-face culling by normal vectors. OSG does NOT. Neither does OpenGL. So: geom-getOrCreateStateSet()-setMode( GL_CULL_FACE, osg::StateAttribute::ON ); glEnable( GL_CULL_FACE ); GL_CULL_FACE does back-face culling by VERTEX ORDER (without normal vectors). Sorry, nevermind. -- Jim Brooks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] normal vectors aren't causing culling
Jim Brooks wrote: normal vectors aren't causing culling I had a misunderstanding that a scene-graph would do back-face culling by normal vectors. OSG does NOT. Right. OSG does not do _face_ culling (culling of individual primitives) based on the normal. However, OSG can do _Drawable_ culling based on a normal. This is how VPB databases cull away the back half of the planet. There is a custom cull callback (in osgTerrain, I think) that does this. You need to explicitly attach it; OSG doesn't use it by default. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple Loading Tutorial
Sam Gidding wrote: Hi, Thanks Paul, just a question - where you are loading cow.osg - how do i define where this is kept? Ive just got the pdf you linked so will have a read. There is an OSG_FILE_PATH variable, but of course you can always just specify the full path. FYI, in addition to the Quick Start Guide, there is also a FAQ on the OSG wiki that you might want to read through. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple Loading Tutorial
Thanks for that- I have tried to get the osg wiki FAQ/tutorials but the site has been down since Wednesday so having trouble getting to them at the moment. When I run the code to load a simple object (that you supplied above) with a direct path, I get no errors but osgviewer seems to load nothing, just the default blue background with no model. Ive tried different .osg and .obj files but no luck. Thanks for your help to a newbie! Sam. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20520#20520 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems with TBO Texture Buffer Object's
Hi, i want to use texture buffer objects within my program. At the beginning i managed to get tbo's to work within a pure opengl application. This is what i did: 1. create tbo Code: // create buffer object glGenBuffers(1, tbo); glBindBuffer(GL_TEXTURE_BUFFER_EXT, *tbo); // initialize buffer object unsigned int size = mesh_width * mesh_height * 4 * sizeof(float); glBufferData(GL_TEXTURE_BUFFER_EXT, size, 0, GL_DYNAMIC_DRAW); //tex glGenTextures(1, tex); glBindTexture(GL_TEXTURE_BUFFER_EXT, *tex); glTexBufferEXT(GL_TEXTURE_BUFFER_EXT, GL_RGBA32F_ARB, *tbo); glBindBuffer(GL_TEXTURE_BUFFER_EXT, 0); 2. set data of the tbo Code: glBindBuffer(GL_TEXTURE_BUFFER_EXT, tbo); p = (float4*) glMapBuffer(GL_TEXTURE_BUFFER_EXT, GL_WRITE_ONLY); for (int u = 0; u mesh_height; u++) { for (int v = 0; v mesh_width; v++) { p[u + (v * mesh_width)][0] = ((float) u / mesh_height) * 2 - (1.0); p[u + (v * mesh_width)][1] = ((float) v / mesh_width) * 2 - (1.0); p[u + (v * mesh_width)][2] = 0.0f; p[u + (v * mesh_width)][3] = 1.0f; } } glUnmapBuffer(GL_TEXTURE_BUFFER_EXT); glBindBuffer(GL_TEXTURE_BUFFER_EXT, 0); 3. set uniform Code: glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_BUFFER_EXT, displacementTex); And now i wanted to port this into osg. I have no idea how to create the tbo. I managed to get as far as: Code: osg::BufferObject::Extensions* ext = osg::BufferObject::getExtensions( _gc-getState()-getContextID(), true); ext-glBindBuffer(GL_TEXTURE_BUFFER_EXT, tbo); unsigned int size = mesh_width * mesh_height * 4 * sizeof(float); ext-glBufferData(GL_TEXTURE_BUFFER_EXT, size, 0, GL_DYNAMIC_DRAW); Do i have to create a osg::Texture::TextureObject Object to bind it to the BufferObject? I do not know how to port these calls: Code: glBindTexture(GL_TEXTURE_BUFFER_EXT, *tex); glTexBufferEXT(GL_TEXTURE_BUFFER_EXT, GL_RGBA32F_ARB, *tbo); My goal is to create a float buffer object by that i can access a huge amount of floats within my shader. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20521#20521 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgterrain example and camera position
Hi, I am calling the osgterrain example only with the argument --image land_shallow_topo_2048.jpg. The earth is now displayed on the left edge of my window/screen. If I am adding lines parallel to the coordinate axes x, y and z with a length of 10e6 the whole scene is centered. From my understanding this does not make sense as the earth with or without the axes is symmetric with respect to all axes. Can anybody please explain what is going on? Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20522#20522 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgterrain example and camera position
Hi, sorry, I meant of course a length of 20e6 symmetric to (0, 0, 0). Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20523#20523 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL ES-2.0, OpenGL ES-1.1 and OpenGL 3.x support now ready for testing :-)
Hi More info on the IPhone viewer problem that might make the issue clearer. I set the notify level to DEBUG_FP and saw that the output between simulator and device were different, a summary is below -Simulator _threadingmode = DrawThreadPerContext Console output: draw() 0x42561b0 cull() cull() got SceneView 0x42563f0 end cull() 0x42561b0 draw() got SceneView 0x42563f0 end draw() 0x42561b0 -Device _threadingmode = singleThreads Console output: cull_draw() 0x1151380 end cull_draw() 0x1151380 These were the reults if I did not explicitly set the threading mode myself. Once I noticed this i set the threading mode to single and ran on the simulator, which also caused the updates to stop working. As a quick test I built a standard OSX example running in single threaded mode and that worked so cant be a problem with the mode itself. Could my graphicsWindow implementation be causing the problem? Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org