<div><div>I need an application that shows the 3D </div><div>input using volume rendering on one side</div><div>and the segmented image on the other side. </div><div>I got the later part working, given a segmented </div><div>
image paraview and webgl renders the surface </div><div>without a problem. I am having problems with </div><div>the first part though, doing the volume rendering </div><div>on the input image.</div></div><div><br></div><div>
When I try volume rendering on the input image, </div><div>I see the orientation axes at the webgl</div><div>section. I can rotate the scene but the object</div><div>does not appear on the scene. JS and Java on </div><div>
the other hand does the rendering as expected. </div><div>When I changethe representation to surface, webgl </div><div>starts working as well without problem. </div><div><br></div><div>The following code illustrates the problem. </div>
<div><br></div><div> var serverUrl = </div><div> "<%=request.getScheme()%>://<%=request.getServerName()%>:<%=request.getServerPort()%>/PWService";</div><div> </div><div> // ---------------- Session 1 -------------------</div>
<div> </div><div> // Create a paraview proxy</div><div> var pv = new Paraview(serverUrl);</div><div> pv.createSession("3D Cell Vis", "Colored rendering", "default"); </div>
<div> var view = pv.CreateIfNeededRenderView(); </div><div> </div><div><br></div><div> var reader = pv.OpenDataFile({filename:"data.mhd"});</div><div> var lut = pv.GetLookupTableForArray({</div>
<div> arrayname:'MetaImage', </div><div> num_components : 1,</div><div> NanColor:[0.25, 0.0, 0.0],</div><div> RGBPoints:[97.9033203125, 0.23, 0.299, 0.754, 28376.271484375, 0.706, 0.016, 0.15],</div>
<div> VectorMode:'Magnitude', </div><div> ColorSpace:'Diverging', </div><div> ScalarRangeInitialized:1.0 </div><div> });</div><div> </div><div> var sof = pv.CreatePiecewiseFunction( {Points:[97.9033203125, 0.0, 0.5, 0.0, 28376.271484375, 1.0, 0.5, 0.0] });</div>
<div> </div><div> pv.Show();</div><div> pv.SetDisplayProperties({proxy:reader, </div><div> view:view, </div><div> EdgeColor : [0.0, 0.0, 0.5],</div><div> SelectionPointFieldDataArrayName:'MetaImage',</div>
<div> ColorArrayName:'MetaImage',</div><div> ScalarOpacityUnitDistance:0.7,</div><div> LookupTable:lut, </div><div> Representation:'Volume',</div><div> ScaleFactor:10,</div><div> ScalarOpacityFunction:sof});</div>
<div><br></div><div> </div><div> var render = pv.Render();</div><div> pv.ResetCamera();</div><div> view.setCenterOfRotation(view.getCameraFocalPoint());</div><div> </div><div> // Create and bind renderer</div>
<div> // ---- For Java ----</div><div> var rendererJava = new HttpAppletRenderer("javaRenderer", serverUrl);</div><div> rendererJava.init(pv.sessionId, view.__selfid__);</div><div> rendererJava.setSize('500','500');</div>
<div> rendererJava.bindToElementId("java-http-container");</div><div> rendererJava.start();</div><div> </div><div> // ---- For JavaScript ----</div><div> var rendererJs = new JavaScriptRenderer("jsRenderer", serverUrl);</div>
<div> rendererJs.init(pv.sessionId, view.__selfid__);</div><div> rendererJs.setSize('500','500');</div><div> rendererJs.bindToElementId("javascript-container");</div><div> rendererJs.start();</div>
<div><br></div><div> // ---- For WebGL ----</div><div> var rendererWebGL = new WebGLRenderer("webglRenderer", serverUrl);</div><div> pv.updateConfiguration(true, "JPEG", "WebGL");</div>
<div> rendererWebGL.init(pv.sessionId, view.__selfid__);</div><div> rendererWebGL.setSize(500,500);</div><div> rendererWebGL.bindToElementId("webgl-container");</div><div> rendererWebGL.start(); </div>
<div><br></div><div>Any ideas what might be going wrong ?</div><div><br></div><div>Thank you, </div><div>Cagatay</div>