<div dir="ltr">Why don't you use two truly separate view on the server side. That way you won't have any rendering artifact. And you can easily show/hide the local one in the web browser.<div>Then on the client side, you just have to worry about which one is visible.</div>
<div><br></div><div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 1, 2014 at 7:37 PM, komeil <span dir="ltr"><<a href="mailto:komeil@infovalley.net.my" target="_blank">komeil@infovalley.net.my</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Dear friends,<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">here is my implementation for having 2D view along with 3D view for Volume Rendeing:<u></u><u></u></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
$("#view_3d").bind("mousedown", function(){<u></u><u></u></p><p class="MsoNormal"> if ($(this).hasClass("session_started")) {<u></u><u></u></p><p class="MsoNormal">
pv.connection.session.call('vtk:load3DView', null);<u></u><u></u></p><p class="MsoNormal"> return false;<u></u><u></u></p>
<p class="MsoNormal"> }else{<u></u><u></u></p><p class="MsoNormal"> $(this).addClass("session_started");<u></u><u></u></p><p class="MsoNormal"> create3DView("#view_3d); <u></u><u></u></p>
<p class="MsoNormal"> pv.connection.session.call('vtk:save3DView', null);<u></u><u></u></p><p class="MsoNormal"> } <u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">$(UI_AXIAL).bind("mouseup", function(){<u></u><u></u></p><p class="MsoNormal"> pv.connection.session.call('vtk:save3DView', null);<u></u><u></u></p>
<p class="MsoNormal">});<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have the similar code for 2D. There are 2 viewports created to show loaded volume:<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">pv.viewport_3D = vtkWeb.createViewport({<u></u><u></u></p><p class="MsoNormal"> session: pv.connection.session<u></u><u></u></p>
<p class="MsoNormal"> });<u></u><u></u></p><p class="MsoNormal"> pv.viewport_3D.bind("#view_3d");<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">and same code for 2D.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">By clicking on each view, RPC function 'vtk:save3DView' or 'vtk:save2DView' will be called. Each one changes the display properties & render view for representing appropriate view. For example for loading 3D:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"> dp.Representation = 'Volume'<u></u><u></u></p><p class="MsoNormal"> view = simple.GetRenderView()<u></u><u></u></p><p class="MsoNormal">
view.InteractionMode = '3D'<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I can expect that it takes time to render the scene when the user clicks on the other view, especially changing from 2D to 3D.<u></u><u></u></p>
<p class="MsoNormal">But, the issue is by clicking on the other view, the last view is shown before the completion of the rendering. For instance, if the current view is 2D, and user clicks on 3D, immediately, the last 2D scene is displayed in 3D view for a while, before having the rendered 3D view from the server.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">My question is how to prevent system to show the 2D view in 3D view, and just wait for the server to send rendered 3D scene.<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Best regards,<u></u><u></u></p><p class="MsoNormal"><a href="http://www.infovalley.net.my/" target="_blank"><span style="color:windowtext;text-decoration:none"><img border="0" width="68" height="38" src="cid:image001.jpg@01CFC691.747A6690" alt="cid:image007.jpg@01CE563F.6F03C710"></span></a> <a href="https://www.facebook.com/INFOVALLEY" target="_blank"><span style="color:windowtext;text-decoration:none"><img border="0" width="29" height="25" src="cid:image002.jpg@01CFC691.747A6690" alt="cid:image008.jpg@01CE563F.6F03C710"></span></a> <a href="http://www.youtube.com/user/INFOVALLEYART" target="_blank"><span style="color:windowtext;text-decoration:none"><img border="0" width="29" height="29" src="cid:image003.jpg@01CFC691.747A6690" alt="cid:image009.jpg@01CE563F.6F03C710"></span></a><a href="https://twitter.com/infovalleyco" target="_blank"><span style="color:windowtext;text-decoration:none"><img border="0" width="29" height="29" src="cid:image004.jpg@01CFC691.747A6690" alt="cid:image010.jpg@01CE563F.6F03C710"></span></a><a href="http://infovalleyart.blogspot.com/" target="_blank"><span style="color:windowtext;text-decoration:none"><img border="0" width="29" height="29" src="cid:image005.jpg@01CFC691.747A6690" alt="cid:image011.jpg@01CE563F.6F03C710"></span></a><i><u></u><u></u></i></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;color:#002060"><u></u> <u></u></span></b></p><p class="MsoNormal"><b><span style="font-size:28.0pt;font-family:"Palace Script MT";color:#002060">Komeil</span></b><b><span style="font-size:9.0pt;color:#002060"> </span></b><span style="font-size:9.0pt;color:#1f497d">| Software Developer<b><u></u><u></u></b></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:#1f497d">iGene® Sdn. Bhd.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;color:#1f497d">INFOVALLEY® Group of Companies <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-MY" style="font-size:9.0pt;color:#1f497d">Unit 1.1, Level 1, Block B, MINES Waterfront Business Park<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-MY" style="font-size:9.0pt;color:#1f497d">No.3, JalanTasik, MINES Resort City<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-MY" style="font-size:9.0pt;color:#1f497d">43300 Selangor, Malaysia<u></u><u></u></span></p><p class="MsoNormal"><b><span style="font-size:9.0pt;color:#002060">Tel: </span></b><span style="font-size:9.0pt;color:#1f497d"><a href="tel:%2B6%2003%208941%205830" value="+60389415830" target="_blank">+6 03 8941 5830</a></span><b><span style="font-size:9.0pt;color:#002060">| Fax: </span></b><span style="font-size:9.0pt;color:#1f497d"><a href="tel:%2B6%2003%208941%205970" value="+60389415970" target="_blank">+6 03 8941 5970</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;color:#1f497d">“This mail (including any attachments) may contain confidential, proprietary or legally privileged information belonging to INFOVALLEY Group of Companies. In case you are not the original intended recipient of the message; you must not directly or indirectly, use, disclose, distribute, print, or copy any part of this message. You are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. We have taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus inadvertently transmitted by this email."</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>