<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Palace Script MT";
panose-1:3 3 3 2 2 6 7 12 11 5;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Dear friends,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>here is my implementation for having 2D view along with 3D view for Volume Rendeing:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>$("#view_3d").bind("mousedown", function(){<o:p></o:p></p><p class=MsoNormal> if ($(this).hasClass("session_started")) {<o:p></o:p></p><p class=MsoNormal> pv.connection.session.call('vtk:load3DView', null);<o:p></o:p></p><p class=MsoNormal> return false;<o:p></o:p></p><p class=MsoNormal> }else{<o:p></o:p></p><p class=MsoNormal> $(this).addClass("session_started");<o:p></o:p></p><p class=MsoNormal> create3DView("#view_3d); <o:p></o:p></p><p class=MsoNormal> pv.connection.session.call('vtk:save3DView', null);<o:p></o:p></p><p class=MsoNormal> } <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>$(UI_AXIAL).bind("mouseup", function(){<o:p></o:p></p><p class=MsoNormal> pv.connection.session.call('vtk:save3DView', null);<o:p></o:p></p><p class=MsoNormal>});<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have the similar code for 2D. There are 2 viewports created to show loaded volume:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>pv.viewport_3D = vtkWeb.createViewport({<o:p></o:p></p><p class=MsoNormal> session: pv.connection.session<o:p></o:p></p><p class=MsoNormal> });<o:p></o:p></p><p class=MsoNormal> pv.viewport_3D.bind("#view_3d");<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>and same code for 2D.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></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:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> dp.Representation = 'Volume'<o:p></o:p></p><p class=MsoNormal> view = simple.GetRenderView()<o:p></o:p></p><p class=MsoNormal> view.InteractionMode = '3D'<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></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.<o:p></o:p></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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best regards,<o:p></o:p></p><p class=MsoNormal><a href="http://www.infovalley.net.my/"><span style='color:windowtext;text-decoration:none'><img border=0 width=68 height=38 id="Picture_x0020_1" src="cid:image001.jpg@01CFC691.747A6690" alt="cid:image007.jpg@01CE563F.6F03C710"></span></a> <a href="https://www.facebook.com/INFOVALLEY"><span style='color:windowtext;text-decoration:none'><img border=0 width=29 height=25 id="Picture_x0020_2" src="cid:image002.jpg@01CFC691.747A6690" alt="cid:image008.jpg@01CE563F.6F03C710"></span></a> <a href="http://www.youtube.com/user/INFOVALLEYART"><span style='color:windowtext;text-decoration:none'><img border=0 width=29 height=29 id="Picture_x0020_3" src="cid:image003.jpg@01CFC691.747A6690" alt="cid:image009.jpg@01CE563F.6F03C710"></span></a><a href="https://twitter.com/infovalleyco"><span style='color:windowtext;text-decoration:none'><img border=0 width=29 height=29 id="Picture_x0020_4" src="cid:image004.jpg@01CFC691.747A6690" alt="cid:image010.jpg@01CE563F.6F03C710"></span></a><a href="http://infovalleyart.blogspot.com/"><span style='color:windowtext;text-decoration:none'><img border=0 width=29 height=29 id="Picture_x0020_5" src="cid:image005.jpg@01CFC691.747A6690" alt="cid:image011.jpg@01CE563F.6F03C710"></span></a><i><o:p></o:p></i></p><p class=MsoNormal><b><span style='font-size:9.0pt;color:#002060'><o:p> </o:p></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><o:p></o:p></b></span></p><p class=MsoNormal><span style='font-size:9.0pt;color:#1F497D'>iGene® Sdn. Bhd.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;color:#1F497D'>INFOVALLEY® Group of Companies <o:p></o:p></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<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-MY style='font-size:9.0pt;color:#1F497D'>No.3, JalanTasik, MINES Resort City<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-MY style='font-size:9.0pt;color:#1F497D'>43300 Selangor, Malaysia<o:p></o:p></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'>+6 03 8941 5830</span><b><span style='font-size:9.0pt;color:#002060'>| Fax: </span></b><span style='font-size:9.0pt;color:#1F497D'>+6 03 8941 5970<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;color:#1F497D'><o:p> </o:p></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><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>