Good to know, thank you Seb. Cagatay
On Fri, Jun 1, 2012 at 10:18 AM, Sebastien Jourdain < sebastien.jourd...@kitware.com> wrote: > Hi Cagatay, > > the webgl renderer of paraview does not support volume rendering. If > you want to do volume rendering, you will have to use any other image > based renderer available in ParaViewWeb. (JavaScript, Java, Flash) > > Seb > > On Fri, Jun 1, 2012 at 1:08 PM, Cagatay Bilgin <bilgi...@gmail.com> wrote: > > I need an application that shows the 3D > > input using volume rendering on one side > > and the segmented image on the other side. > > I got the later part working, given a segmented > > image paraview and webgl renders the surface > > without a problem. I am having problems with > > the first part though, doing the volume rendering > > on the input image. > > > > When I try volume rendering on the input image, > > I see the orientation axes at the webgl > > section. I can rotate the scene but the object > > does not appear on the scene. JS and Java on > > the other hand does the rendering as expected. > > When I changethe representation to surface, webgl > > starts working as well without problem. > > > > The following code illustrates the problem. > > > > var serverUrl = > > > > > "<%=request.getScheme()%>://<%=request.getServerName()%>:<%=request.getServerPort()%>/PWService"; > > > > // ---------------- Session 1 ------------------- > > > > // Create a paraview proxy > > var pv = new Paraview(serverUrl); > > pv.createSession("3D Cell Vis", "Colored rendering", "default"); > > var view = pv.CreateIfNeededRenderView(); > > > > > > var reader = pv.OpenDataFile({filename:"data.mhd"}); > > var lut = pv.GetLookupTableForArray({ > > arrayname:'MetaImage', > > num_components : 1, > > NanColor:[0.25, 0.0, 0.0], > > RGBPoints:[97.9033203125, 0.23, 0.299, 0.754, 28376.271484375, > 0.706, > > 0.016, 0.15], > > VectorMode:'Magnitude', > > ColorSpace:'Diverging', > > ScalarRangeInitialized:1.0 > > }); > > > > var sof = pv.CreatePiecewiseFunction( {Points:[97.9033203125, 0.0, > > 0.5, 0.0, 28376.271484375, 1.0, 0.5, 0.0] }); > > > > pv.Show(); > > pv.SetDisplayProperties({proxy:reader, > > view:view, > > EdgeColor : [0.0, 0.0, 0.5], > > SelectionPointFieldDataArrayName:'MetaImage', > > ColorArrayName:'MetaImage', > > ScalarOpacityUnitDistance:0.7, > > LookupTable:lut, > > Representation:'Volume', > > ScaleFactor:10, > > ScalarOpacityFunction:sof}); > > > > > > var render = pv.Render(); > > pv.ResetCamera(); > > view.setCenterOfRotation(view.getCameraFocalPoint()); > > > > // Create and bind renderer > > // ---- For Java ---- > > var rendererJava = new HttpAppletRenderer("javaRenderer", > serverUrl); > > rendererJava.init(pv.sessionId, view.__selfid__); > > rendererJava.setSize('500','500'); > > rendererJava.bindToElementId("java-http-container"); > > rendererJava.start(); > > > > // ---- For JavaScript ---- > > var rendererJs = new JavaScriptRenderer("jsRenderer", serverUrl); > > rendererJs.init(pv.sessionId, view.__selfid__); > > rendererJs.setSize('500','500'); > > rendererJs.bindToElementId("javascript-container"); > > rendererJs.start(); > > > > // ---- For WebGL ---- > > var rendererWebGL = new WebGLRenderer("webglRenderer", serverUrl); > > pv.updateConfiguration(true, "JPEG", "WebGL"); > > rendererWebGL.init(pv.sessionId, view.__selfid__); > > rendererWebGL.setSize(500,500); > > rendererWebGL.bindToElementId("webgl-container"); > > rendererWebGL.start(); > > > > Any ideas what might be going wrong ? > > > > Thank you, > > Cagatay > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the ParaView Wiki at: > > http://paraview.org/Wiki/ParaView > > > > Follow this link to subscribe/unsubscribe: > > http://www.paraview.org/mailman/listinfo/paraview > > >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview