[Paraview] Toggling between 2D & 3D view Issue

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue Sep 2 10:54:25 EDT 2014


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.
Then on the client side, you just have to worry about which one is visible.

Seb


On Mon, Sep 1, 2014 at 7:37 PM, komeil <komeil at infovalley.net.my> wrote:

> 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,
>
> [image: cid:image007.jpg at 01CE563F.6F03C710]
> <http://www.infovalley.net.my/>  [image:
> cid:image008.jpg at 01CE563F.6F03C710] <https://www.facebook.com/INFOVALLEY> [image:
> cid:image009.jpg at 01CE563F.6F03C710]
> <http://www.youtube.com/user/INFOVALLEYART>[image:
> cid:image010.jpg at 01CE563F.6F03C710] <https://twitter.com/infovalleyco>[image:
> cid:image011.jpg at 01CE563F.6F03C710] <http://infovalleyart.blogspot.com/>
>
>
>
> *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."
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 904 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1036 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 925 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1314 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 848 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140902/108868c0/attachment-0004.jpg>


More information about the ParaView mailing list