komeil | 2 Sep 03:37 2014
Picon

Toggling between 2D & 3D view Issue

Dear friends,

 

here is my implementation for having 2D view along with 3D view for Volume Rendeing:

 

$("#view_3d").bind("mousedown", function(){

                                  if ($(this).hasClass("session_started")) {

                                                pv.connection.session.call('vtk:load3DView', null);

                                                return false;

       }else{

                                 $(this).addClass("session_started");

                                  create3DView("#view_3d);                                      

                                 pv.connection.session.call('vtk:save3DView', null);

                }             

 

$(UI_AXIAL).bind("mouseup", function(){

                                pv.connection.session.call('vtk:save3DView', null);

});

 

I have the similar code for 2D. There are 2 viewports created to show loaded volume:

 

pv.viewport_3D = vtkWeb.createViewport({

                                                                session: pv.connection.session

                                                });

                                                pv.viewport_3D.bind("#view_3d");

 

and same code for 2D.

 

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:

 

                dp.Representation = 'Volume'

                view = simple.GetRenderView()

                view.InteractionMode = '3D'

 

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.

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.

 

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.

 

 

Best regards,

   

 

Komeil | Software Developer

iGene® Sdn. Bhd.

INFOVALLEY® Group of Companies

Unit 1.1, Level 1, Block B, MINES Waterfront Business Park

No.3, JalanTasik, MINES Resort City

43300 Selangor, Malaysia

Tel: +6 03 8941 5830| Fax: +6 03 8941 5970

 

“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."

 

<div><div class="WordSection1">
<p class="MsoNormal">Dear friends,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">here is my implementation for having 2D view along with 3D view for Volume Rendeing:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">$("#view_3d").bind("mousedown", function(){<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if ($(this).hasClass("session_started")) {<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.connection.session.call('vtk:load3DView', null);<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else{<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;$(this).addClass("session_started");<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;create3DView("#view_3d);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;pv.connection.session.call('vtk:save3DView', null);<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">$(UI_AXIAL).bind("mouseup", function(){<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.connection.session.call('vtk:save3DView', null);<p></p></p>
<p class="MsoNormal">});<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I have the similar code for 2D. There are 2 viewports created to show loaded volume:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">pv.viewport_3D = vtkWeb.createViewport({<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session: pv.connection.session<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.viewport_3D.bind("#view_3d");<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">and same code for 2D.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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 &amp; render view for representing appropriate view. For example for loading 3D:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dp.Representation = 'Volume'<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view = simple.GetRenderView()<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view.InteractionMode = '3D'<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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.<p></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.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Best regards,<p></p></p>
<p class="MsoNormal"><a href="http://www.infovalley.net.my/"><span></span></a>&nbsp; <a href="https://www.facebook.com/INFOVALLEY"><span></span></a>&nbsp;<a href="http://www.youtube.com/user/INFOVALLEYART"><span></span></a><a href="https://twitter.com/infovalleyco"><span></span></a><a href="http://infovalleyart.blogspot.com/"><span></span></a><p></p></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Komeil</span><span> </span><span>| Software Developer<p></p></span></p>
<p class="MsoNormal"><span>iGene&reg; Sdn. Bhd.<p></p></span></p>
<p class="MsoNormal"><span>INFOVALLEY&reg; Group of Companies <p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">Unit 1.1, Level 1, Block B, MINES Waterfront Business Park<p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">No.3, JalanTasik, MINES Resort City<p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">43300 Selangor, Malaysia<p></p></span></p>
<p class="MsoNormal"><span>Tel: </span><span>+6 03 8941 5830</span><span>| Fax: </span><span>+6 03 8941 5970<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&ldquo;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><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div></div>
komeil | 2 Sep 03:04 2014
Picon

Toggling between 2D & 3D view Issue

Dear friends,

 

here is my implementation for having 2D view along with 3D view:

 

$("#view_3d").bind("mousedown", function(){

                                  if ($(this).hasClass("session_started")) {

                                                pv.connection.session.call('vtk:load3DView', null);

                                                return false;

       }else{

                                 $(this).addClass("session_started");

                                  create3DView("#view_3d);                                      

                                 pv.connection.session.call('vtk:save3DView', null);

                }             

 

$(UI_AXIAL).bind("mouseup", function(){

                                pv.connection.session.call('vtk:save3DView', null);

});

 

I have the similar code for 2D. There are 2 viewports created to show loaded volume:

 

pv.viewport_3D = vtkWeb.createViewport({

                                                                session: pv.connection.session

                                                });

                                                pv.viewport_3D.bind("#view_3d");

 

and same code for 2D.

 

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:

 

                dp.Representation = 'Volume'

                view = simple.GetRenderView()

                view.InteractionMode = '3D'

 

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.

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.

 

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.

 

 

Best regards,

 

   

 

Komeil | Software Developer

iGene® Sdn. Bhd.

INFOVALLEY® Group of Companies

Unit 1.1, Level 1, Block B, MINES Waterfront Business Park

No.3, JalanTasik, MINES Resort City

43300 Selangor, Malaysia

Tel: +6 03 8941 5830| Fax: +6 03 8941 5970

 

“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."

 

<div><div class="WordSection1">
<p class="MsoNormal">Dear friends,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">here is my implementation for having 2D view along with 3D view:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">$("#view_3d").bind("mousedown", function(){<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if ($(this).hasClass("session_started")) {<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.connection.session.call('vtk:load3DView', null);<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else{<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;$(this).addClass("session_started");<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;create3DView("#view_3d);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;pv.connection.session.call('vtk:save3DView', null);<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">$(UI_AXIAL).bind("mouseup", function(){<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.connection.session.call('vtk:save3DView', null);<p></p></p>
<p class="MsoNormal">});<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I have the similar code for 2D. There are 2 viewports created to show loaded volume:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">pv.viewport_3D = vtkWeb.createViewport({<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session: pv.connection.session<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv.viewport_3D.bind("#view_3d");<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">and same code for 2D.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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 &amp; render view for representing appropriate view. For example for loading 3D:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dp.Representation = 'Volume'<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view = simple.GetRenderView()<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view.InteractionMode = '3D'<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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.<p></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.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</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.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Best regards,<p></p></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><a href="http://www.infovalley.net.my/"><span></span></a>&nbsp; <a href="https://www.facebook.com/INFOVALLEY"><span></span></a>&nbsp;<a href="http://www.youtube.com/user/INFOVALLEYART"><span></span></a><a href="https://twitter.com/infovalleyco"><span></span></a><a href="http://infovalleyart.blogspot.com/"><span></span></a><p></p></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Komeil</span><span> </span><span>| Software Developer<p></p></span></p>
<p class="MsoNormal"><span>iGene&reg; Sdn. Bhd.<p></p></span></p>
<p class="MsoNormal"><span>INFOVALLEY&reg; Group of Companies <p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">Unit 1.1, Level 1, Block B, MINES Waterfront Business Park<p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">No.3, JalanTasik, MINES Resort City<p></p></span></p>
<p class="MsoNormal"><span lang="EN-MY">43300 Selangor, Malaysia<p></p></span></p>
<p class="MsoNormal"><span>Tel: </span><span>+6 03 8941 5830</span><span>| Fax: </span><span>+6 03 8941 5970<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&ldquo;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><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div></div>
Guillaume Jacquenot | 1 Sep 19:41 2014
Picon

Displaying wave elevation in time

Dear Paraview users,

I would like to display a wave elevation field in Paraview, that is a structured mesh with a scalar data (wave elevation). This mesh moves over time.
I came up with a solution based on CSV point files and a delaunay 2d filter in Paraview to represent wave elevation.

I ask myself some questions about the input file format, that could contain only points, or a mesh.
Is there a dedicated format to do so?
Ideally, this format would
- be a single file containing all results over time
- not repeat data (My CSV files contain repeatdly the same coordinates many many times)

I have looked at VTK format, but I can't figure out which one would answer my needs.
Can HDf5 file format help? (If it is possible to import hdf5 package in python interpreter)

My data could be represented like this

ti, y0, y1, y2, y3
x0,z00,z01,z02,z03
x1,z10,z11,z12,z13
x2,z20,z21,z22,z23
x3,z30,z31,z32,z33
x4,z40,z41,z42,z43
x5,z50,z51,z52,z53

where ti represents a timestep


Guillaume Jacquenot
Thanks
<div><div dir="ltr">
<div>
<div>
<div>
<div><span>Dear Paraview users,<br><br></span></div>
<span>I would like to display a wave elevation field in Paraview, that is a structured mesh with a scalar data (wave elevation). This mesh moves over time.<br></span>
</div>
<div><span>I came up with a solution based on CSV point files and a delaunay 2d filter in Paraview to represent wave elevation.<br></span></div>
<span><br>
I ask myself some questions about the input file format, that could contain only points, or a mesh.<br></span>
</div>
<div><span>Is there a dedicated format to do so?<br></span></div>
<div><span>Ideally, this format would <br></span></div>
<div><span>- be a single file containing all results over time<br></span></div>
<div>
<span>- not repeat data (My CSV files contain repeatdly the same coordinates many many times)<br><br></span>
</div>
<div><span>I have looked at VTK format, but I can't figure out which one would answer my needs. <br></span></div>
<div><span>Can HDf5 file format help? (If it is possible to import hdf5 package in python interpreter)<br></span></div>
<span><br></span>
</div>
<span>My data could be represented like this<br></span><div><span><br>ti, y0, y1, y2, y3<br>x0,z00,z01,z02,z03<br>x1,z10,z11,z12,z13<br>
x2,z20,z21,z22,z23<br>x3,z30,z31,z32,z33<br>x4,z40,z41,z42,z43<br>x5,z50,z51,z52,z53<br><br></span></div>
<div><span>where ti represents a timestep<br></span></div>
<div>
<span><br></span><br><div><span>Guillaume Jacquenot<br></span></div>
<span>Thanks</span>
</div>
</div></div>
Utkarsh Ayachit | 1 Sep 18:33 2014

ANN: ParaView 4.2.0-RC1 now available for download

Folks,

ParaView 4.2, RC 1 (release candidate) is now available for download [1] .

The detailed summary of the changes will follow. In the mean time,
check out the blog [2] for posts on several of the new features.

An exhaustive list of features implemented and bugs fixed in this
release can be found on the bug tracker [3].

The ParaView Team

[1] http://www.paraview.org/download/
[2] http://www.kitware.com/blog/home/browse/topic/13
[3] http://paraview.org/Bug/changelog_page.php
Amir Sohrabi Mollayousef | 29 Aug 22:49 2014
Picon

About changing size of the font in the legend label

Hi,

I like to change the font of a label in legend in paraview.
I found this nice article for customizing the legend:

http://www.kitware.com/blog/home/post/578

It does give information about how numbers in legend are formatted. However, it does not give instruction how to font size for the labels in legend.

Thanks
--
Amir Sohrabi, PhD Student
Mechanical Engineering Department
Texas A&M University
College Station, TX - 77843, USA
<div><div dir="ltr">Hi,<br><br>I like to change the font of a label in legend in paraview.<br>I found this nice article for customizing the legend:<br><br><a href="http://www.kitware.com/blog/home/post/578">http://www.kitware.com/blog/home/post/578</a><br><br clear="all"><div>It does give information about how numbers in legend are formatted. However, it does not give instruction how to font size for the labels in legend.</div>
<div><br></div>
<div>Thanks</div>-- <br>Amir Sohrabi, PhD Student<br>
Mechanical Engineering Department<br>Texas A&amp;M University<br>College Station, TX - 77843, USA
</div></div>
John Mangeri | 28 Aug 23:02 2014
Picon

How to call a specifc data set from a multi-block ExodusII data set?

I'm currently trying to do something simple. I have a ElementVariable q in my .e file.

I read them into the pipeline with

reader = ExodusIIReader(FileName = 'out.e')

I want to use

histogram = Histogram(q,BinCount=30)

but I recieve the following error:
Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'q' is not defined

What is going on here?

Thanks
John
<div><div dir="ltr">
<div>
<div>
<div>I'm currently trying to do something simple. I have a ElementVariable q in my .e file.<br><br>
</div>I read them into the pipeline with<br><br>reader = ExodusIIReader(FileName = 'out.e')<br><br>
</div>I want to use<br><br>histogram = Histogram(q,BinCount=30) <br><br>
</div>but I recieve the following error:<br><div>
<span class="">Traceback</span><span class=""> </span><span class="">(</span><span class="">most recent call last</span><span class="">):</span><span class="">
  </span><span class="">File</span><span class=""> </span><span class="">"&lt;console&gt;"</span><span class="">,</span><span class=""> line </span><span class="">1</span><span class="">,</span><span class=""> </span><span class="">in</span><span class=""> </span><span class="">&lt;</span><span class="">module</span><span class="">&gt;</span><span class="">
</span><span class="">NameError</span><span class="">:</span><span class=""> name </span><span class="">'q'</span><span class=""> </span><span class="">is</span><span class=""> </span><span class="">not</span><span class=""> defined<br><br></span><span class="">What is going on here?<br><br>Thanks<br></span><span class="">John<br></span>
</div>
</div></div>
Aurélien Marsan | 28 Aug 22:22 2014
Picon

Triangular prismatic cells not supported ?

Dear Paraview user's,

I work with an unstructured mesh, composed of tetrahedron, and prisms in the vicinity of the walls.
I would like to compute the gradient of different quantities.

This doesn't work, and it seems to me that this is due to the triangular prismatic cells.

Do triangular prismatic cells are supported in Paraview / VTK ?

Regards,

Aurélien
<div><div dir="ltr">
<div>
<div>Dear Paraview user's, <br><br>
</div>I work with an unstructured mesh, composed of tetrahedron, and prisms in the vicinity of the walls. <br>I would like to compute the gradient of different quantities. <br><br>
</div>
<div>This doesn't work, and it seems to me that this is due to the triangular prismatic cells. <br><br>
</div>
<div>Do triangular prismatic cells are supported in Paraview / VTK ? <br><br>
</div>
<div>Regards, <br><br>Aur&eacute;lien<br>
</div>
</div></div>

ParaView Web not compiling

Hello,

while compiling the latest ParaView for git (4.1.0-1560-gf37ec5f) - not superbuild, I am not able to make it through all the way if I don't disable ParaView web using  -DPARAVIEW_ENABLE_WEB:BOOL=OFF on my cmake line.

Is qt version (I am using qt version 4.8.5) an issue here? If so, what is the qt version that I should be using?  or this is just a temporary state that will eventually go away in the next PV release?

If I turn off ParaView web, what feature will not be available? Will catalyst be affected? I saw a demo once of catalyst via ParaView web.

thanks
-simon
<div>
<div>Hello,<br><br>
while compiling the latest ParaView for git (4.1.0-1560-gf37ec5f) - not superbuild, I am not able to make it through all the way if I don't disable ParaView web using&nbsp; -DPARAVIEW_ENABLE_WEB:BOOL=OFF on my cmake line.
<br><br>
Is qt version (I am using qt version 4.8.5) an issue here? If so, what is the qt version that I should be using?&nbsp; or this is just a temporary state that will eventually go away in the next PV release?<br><br>
If I turn off ParaView web, what feature will not be available? Will catalyst be affected? I saw a demo once of catalyst via ParaView web.
<br><br>
thanks<br>
-simon<br>
</div>
</div>
Ganesh Vijayakumar | 28 Aug 17:53 2014
Picon

Programmable filter works on Slice but not on original data set

Hello,


  My original dataset is an xdmf file that points to some hdf5 files. I have this piece of code in a programmable filter. It seems to work on a Slice of the original dataset, but won't work on the dataset as a whole. The original dataset is cell centered and I then pass it through a "CellDataToPointData" filter. Could anyone tell me why? I'm running Paraview 4.1 - 64 bit on a server-client mode with the server using 16 cores. I thought it might be related to the dataset being multiblock or something (I don't understand this very well). So I tried the piece of code here

http://www.paraview.org/Wiki/Python_Programmable_Filter#Dealing_with_Composite_Datasets

This also works on the slice.. but not on the whole dataset.


#Programmable filter code below

import numpy as np
from paraview import vtk
from  paraview.vtk.dataset_adapter import numpyTovtkDataArray
from scipy.interpolate import interp1d

initrLoc = array([0, 2.8667, 5.6, 8.3333, 11.75, 15.85, 19.95, 24.05, 28.15, 32.25, 36.35, 40.45, 44.55, 48.65, 52.75, 56.1667, 58.9, \
61.633, 62.9, 300.0])
initaeroTwist = array([13.308, 13.308, 13.308, 13.308, 13.308, 11.48, 10.162, 9.011, 7.795, 6.544, 5.361, 4.188, 3.125, 2.319, 1.526, \
0.863, 0.37, 0.106, 0, 0.0])
pitch = 8.7
aeroTwistInterp = interp1d(initrLoc, initaeroTwist+pitch)


uxym = np.loadtxt('uxym')
umeanInterp = interp1d(uxym[:,2], uxym[:,0]*cos(21.6*np.pi/180.
0) + uxym[:,1]*sin(21.6*np.pi/180.0))
vmeanInterp = interp1d(uxym[:,2], -uxym[:,0]*sin(21.6*np.pi/180.0) + uxym[:,1]*cos(21.6*np.pi/180.0))

input = self.GetInput()
output = self.GetOutput()
output.ShallowCopy(input)
points = inputs[0].Points[:,:]
nPoints = np.size(points,0)
vel = inputs[0].PointData['U']
uPrime = np.empty(np.shape(vel))
AoACyl = np.empty(np.size(vel,0))
omega = (12.0 * 2 * np.pi / 60.0) * array([1,0,0])
for i in range(nPoints):
    uPrime[i] = array([umeanInterp(points[i,2]),vmeanInterp(points[i,2]), 0.0])
    r = array([0, 15, 0])
    localTwist = aeroTwistInterp(15)
    newVel = vel[i] - np.cross(omega, r)
    AoACyl[i] = arctan2(newVel[0,1],-newVel[0,2])*180/np.pi - localTwist

uPrimeVTK = numpyTovtkDataArray(uPrime)
uPrimeVTK.SetName('uPrime')
output.GetPointData().AddArray(uPrimeVTK)

AoACylVTK = numpyTovtkDataArray(AoACyl)
AoACylVTK.SetName('AoACyl')
output.GetPointData().AddArray(AoACylVTK)


--
ganesh
<div><div dir="ltr">
<div>
<div>
<div>Hello,<br><br><br>
</div>&nbsp; My original dataset is an xdmf 
file that points to some hdf5 files. I have this piece of code in a 
programmable filter. It seems to work on a Slice of the original 
dataset, but won't work on the dataset as a whole. The original dataset 
is cell centered and I then pass it through a "CellDataToPointData" 
filter. Could anyone tell me why? I'm running Paraview 4.1 - 64 bit on a
 server-client mode with the server using 16 cores. I thought it might 
be related to the dataset being multiblock or something (I don't 
understand this very well). So I tried the piece of code here<br><br><a href="http://www.paraview.org/Wiki/Python_Programmable_Filter#Dealing_with_Composite_Datasets" target="_blank">http://www.paraview.org/Wiki/Python_Programmable_Filter#Dealing_with_Composite_Datasets</a><br><br>
</div>
This also works on the slice.. but not on the whole dataset.<br><br><br>
</div>#Programmable filter code below <br><br>import numpy as np<br>from paraview import vtk<br>from&nbsp; paraview.vtk.dataset_adapter import numpyTovtkDataArray<br>from scipy.interpolate import interp1d<br><br>initrLoc = array([0, 2.8667, 5.6, 8.3333, 11.75, 15.85, 19.95, 
24.05, 28.15, 32.25, 36.35, 40.45, 44.55, 48.65, 52.75, 56.1667, 58.9, \<br>61.633, 62.9, 300.0])<br>initaeroTwist
 = array([13.308, 13.308, 13.308, 13.308, 13.308, 11.48, 10.162, 9.011, 
7.795, 6.544, 5.361, 4.188, 3.125, 2.319, 1.526, \<br>
0.863, 0.37, 0.106, 0, 0.0])<br>pitch = 8.7<br>aeroTwistInterp = interp1d(initrLoc, initaeroTwist+pitch)<br><br><br>uxym = np.loadtxt('uxym')<br>umeanInterp = interp1d(uxym[:,2], uxym[:,0]*cos(21.6*np.pi/180.<div>
0) + uxym[:,1]*sin(21.6*np.pi/180.0))<br>
vmeanInterp = interp1d(uxym[:,2], -uxym[:,0]*sin(21.6*np.pi/180.0) + uxym[:,1]*cos(21.6*np.pi/180.0))<br><br>input = self.GetInput()<br>output = self.GetOutput()<br>output.ShallowCopy(input)<br>points = inputs[0].Points[:,:]<br>

nPoints = np.size(points,0)<br>vel = inputs[0].PointData['U']<br>uPrime = np.empty(np.shape(vel))<br>AoACyl = np.empty(np.size(vel,0))<br>omega = (12.0 * 2 * np.pi / 60.0) * array([1,0,0])<br>for i in range(nPoints):<br>

&nbsp;&nbsp;&nbsp; uPrime[i] = array([umeanInterp(points[i,2]),vmeanInterp(points[i,2]), 0.0])<br>&nbsp;&nbsp;&nbsp; r = array([0, 15, 0])<br>&nbsp;&nbsp;&nbsp; localTwist = aeroTwistInterp(15)<br>&nbsp;&nbsp;&nbsp; newVel = vel[i] - np.cross(omega, r)<br>&nbsp;&nbsp;&nbsp; AoACyl[i] = arctan2(newVel[0,1],-newVel[0,2])*180/np.pi - localTwist<br><br>uPrimeVTK = numpyTovtkDataArray(uPrime)<br>uPrimeVTK.SetName('uPrime')<br>output.GetPointData().AddArray(uPrimeVTK)<br><br>AoACylVTK = numpyTovtkDataArray(AoACyl)<br>AoACylVTK.SetName('AoACyl')<br>output.GetPointData().AddArray(AoACylVTK)</div>
<br clear="all"><br>-- <br>ganesh<br>
</div></div>
Utkarsh Ayachit | 28 Aug 07:14 2014

ParaView using Homebrew for OsX

Folks,

As an experiment, homebrew build script for ParaView available at

https://github.com/utkarshayachit/paraview-homebrew

Haven't really tested it throughly or added options like building the
SDK (which I think will be very useful) etc.

Figured I'd put it out there, have people test it and then update it
as needed before contributing it to homebrew-science.

Utkarsh
Utkarsh Ayachit | 27 Aug 17:23 2014

New blog posts for ParaView

Folks,

Since I'm not sure everyone here it tracking the blog, here're a few
new posts that talk about new features in ParaView  posted this past
month:

* Improvements to Python script editors (syntax coloring, and more) [1]
* ParaView technique: Curved and nicely spaced arrow glyphs [2]
* Histogram View and linked selections [3]
* Python Trace On-the-fly [4]
* VTK/ParaView NumPy Integration [5]-[11]

[1] http://www.kitware.com/blog/home/post/715
[2] http://www.kitware.com/blog/home/post/718
[3] http://www.kitware.com/blog/home/post/719
[4] http://www.kitware.com/blog/home/post/717
[5] http://www.kitware.com/blog/home/post/709
[6] http://www.kitware.com/blog/home/post/713
[7] http://www.kitware.com/blog/home/post/714
[8] http://www.kitware.com/blog/home/post/716
[9] http://www.kitware.com/blog/home/post/720
[10] http://www.kitware.com/blog/home/post/721
[11] http://www.kitware.com/blog/home/post/723

Utkarsh

Gmane