<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>      &quot;&lt;%=request.getScheme()%&gt;://&lt;%=request.getServerName()%&gt;:&lt;%=request.getServerPort()%&gt;/PWService&quot;;</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(&quot;3D Cell Vis&quot;, &quot;Colored rendering&quot;, &quot;default&quot;);    </div>
<div>      var view = pv.CreateIfNeededRenderView();          </div><div>      </div><div><br></div><div>     var reader = pv.OpenDataFile({filename:&quot;data.mhd&quot;});</div><div>      var lut  = pv.GetLookupTableForArray({</div>
<div>      arrayname:&#39;MetaImage&#39;, </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:&#39;Magnitude&#39;, </div><div>      ColorSpace:&#39;Diverging&#39;, </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:&#39;MetaImage&#39;,</div>
<div>      ColorArrayName:&#39;MetaImage&#39;,</div><div>      ScalarOpacityUnitDistance:0.7,</div><div>      LookupTable:lut, </div><div>      Representation:&#39;Volume&#39;,</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(&quot;javaRenderer&quot;, serverUrl);</div><div>      rendererJava.init(pv.sessionId, view.__selfid__);</div><div>      rendererJava.setSize(&#39;500&#39;,&#39;500&#39;);</div>
<div>      rendererJava.bindToElementId(&quot;java-http-container&quot;);</div><div>      rendererJava.start();</div><div>      </div><div>      // ---- For JavaScript ----</div><div>      var rendererJs = new JavaScriptRenderer(&quot;jsRenderer&quot;, serverUrl);</div>
<div>      rendererJs.init(pv.sessionId, view.__selfid__);</div><div>      rendererJs.setSize(&#39;500&#39;,&#39;500&#39;);</div><div>      rendererJs.bindToElementId(&quot;javascript-container&quot;);</div><div>      rendererJs.start();</div>
<div><br></div><div>      // ---- For WebGL ----</div><div>      var rendererWebGL = new WebGLRenderer(&quot;webglRenderer&quot;, serverUrl);</div><div>      pv.updateConfiguration(true, &quot;JPEG&quot;, &quot;WebGL&quot;);</div>
<div>      rendererWebGL.init(pv.sessionId, view.__selfid__);</div><div>      rendererWebGL.setSize(500,500);</div><div>      rendererWebGL.bindToElementId(&quot;webgl-container&quot;);</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>