Re: [Paraview] 3D contour smoothness
Hi Cory, you are correct. This tiny change solves the problem! I hope that our discussion will also allow others to review their output code with respect to this change. Thank you very much for clarification and your help (and your great software as well). Best regards Philipp Engels On 10/10/2014 07:20 PM, Cory Quammen wrote: Hi Philipp, I looked into this more, and it turns out it isn't a bug, but a new feature in ParaView/VTK that lets provides more flexibility in the numeric type of the point positions. By default, most filters will set the numeric type of the output points to the numeric type of their inputs. In the data set you sent me, the points are set to have type int (specified on line 7), which means that the points in the output of the Contour filter will be cast to ints. This explains the jagged appearance of your surfaces. The change in VTK that brings about this behavior is: commit f830ef4cd79b1e7c8af2fae6ed1dd02ffa2cd670 Author: Paul Edwards paul.edwar...@rolls-royce.com Date: Thu Jan 10 10:01:47 2013 -0500 Fixing loss of point-precision in certain filters. Certain filters tend to loose point precision and end up converting double point arrays to flot arrays. This patch address the issue for a few filters using the API added to vtkAlgorithm by commit 49d1f124. Change-Id: I8740e4e4bfdd9944fbadb45744038e42eff04830 Now, how to fix your problem? If you change the type of points from int to double in your data file so that it reads POINTS 6823544 double instead of POINTS 6823544 int all should work as expected. Please let me know if that doesn't solve the problem for you. Best regards, Cory On Wed, Oct 8, 2014 at 7:47 AM, Cory Quammen cory.quam...@kitware.com wrote: Philipp, I apologize, but I haven't had time to look more into this problem. I'll have another look soon. Thanks, Cory On Wed, Oct 8, 2014 at 3:11 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory, can you report any updates for this issue? Best regards and thanks for your efforts Philipp On 09/19/2014 07:17 PM, Cory Quammen wrote: Just a little more info on this. The problem starts with 3.98. On Fri, Sep 19, 2014 at 12:08 PM, Philipp E. pspeac...@gmail.com wrote: Sorry Cory, you are right. The cell number is the same. Regards Philipp Am 19.09.2014 um 17:46 schrieb Cory Quammen: Philipp, I can confirm what you see with a pre 4.2 version of ParaView. However, the number of produced cells is the same. I will try to track down why this changed. Thanks, Cory On Fri, Sep 19, 2014 at 11:17 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory I managed to compress the data set to a fair size and attached it to this mail. The data set is pressure, contour value is 0.55. By looking again at the data (contour - information), I just found that the old version (3.14.1) uses 148432 cells , while the the new one employs 75232 cells. Hope that helps. Kind regards Philipp Errata: I meant 4.2.0RC1 in the previous mails. On 09/19/2014 04:59 PM, Cory Quammen wrote: Phillipp, Do you have a data set similar to the one you've shown that you can share? Thanks, Cory On Fri, Sep 19, 2014 at 10:48 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory, thank you for your fast feedback. a) Compute normal is checked. (Without normals, the contour is completely stepped) b) Contour values are the same. Regards Philipp On 09/19/2014 04:40 PM, Cory Quammen wrote: Philipp, In the contour filter, is the option Compute Normals checked in 4.0 RC1? Also, are the contour values the same between the two versions? Thanks, Cory On Fri, Sep 19, 2014 at 10:25 AM, Philipp E pspeac...@gmail.com wrote: Hello everyone, after extensive search I was desperate enough to post on this list: It appears that the surface smoothing algorithm of the contour filter does not work as aggressive as in older version (3.14.1 was the last one we found to do so). As an example I prepared this two screenshots, VTK data are scalars on a structured grid (200x100x100), legacy format. (An additional call of the smooth filter does not help.) 3.14.1 http://s7.directupload.net/images/140919/euadfvko.png 4.0.RC1 http://s14.directupload.net/images/140919/84y689mi.png Both versions are running with the shipped settings. Since the effect could be reproduced on several workstations, we are wondering whether there has been an (undocumented?) change in the filter mechanism or some option we/setting/data problem we are not aware of. Kind regards and thanks in advance Philipp Engels. ___ 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:
Re: [Paraview] 3D contour smoothness
Philipp, Great, I'm glad to hear it is working again as you expect. - Cory On Mon, Oct 13, 2014 at 3:17 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory, you are correct. This tiny change solves the problem! I hope that our discussion will also allow others to review their output code with respect to this change. Thank you very much for clarification and your help (and your great software as well). Best regards Philipp Engels On 10/10/2014 07:20 PM, Cory Quammen wrote: Hi Philipp, I looked into this more, and it turns out it isn't a bug, but a new feature in ParaView/VTK that lets provides more flexibility in the numeric type of the point positions. By default, most filters will set the numeric type of the output points to the numeric type of their inputs. In the data set you sent me, the points are set to have type int (specified on line 7), which means that the points in the output of the Contour filter will be cast to ints. This explains the jagged appearance of your surfaces. The change in VTK that brings about this behavior is: commit f830ef4cd79b1e7c8af2fae6ed1dd02ffa2cd670 Author: Paul Edwards paul.edwar...@rolls-royce.com Date: Thu Jan 10 10:01:47 2013 -0500 Fixing loss of point-precision in certain filters. Certain filters tend to loose point precision and end up converting double point arrays to flot arrays. This patch address the issue for a few filters using the API added to vtkAlgorithm by commit 49d1f124. Change-Id: I8740e4e4bfdd9944fbadb45744038e42eff04830 Now, how to fix your problem? If you change the type of points from int to double in your data file so that it reads POINTS 6823544 double instead of POINTS 6823544 int all should work as expected. Please let me know if that doesn't solve the problem for you. Best regards, Cory On Wed, Oct 8, 2014 at 7:47 AM, Cory Quammen cory.quam...@kitware.com wrote: Philipp, I apologize, but I haven't had time to look more into this problem. I'll have another look soon. Thanks, Cory On Wed, Oct 8, 2014 at 3:11 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory, can you report any updates for this issue? Best regards and thanks for your efforts Philipp On 09/19/2014 07:17 PM, Cory Quammen wrote: Just a little more info on this. The problem starts with 3.98. On Fri, Sep 19, 2014 at 12:08 PM, Philipp E. pspeac...@gmail.com wrote: Sorry Cory, you are right. The cell number is the same. Regards Philipp Am 19.09.2014 um 17:46 schrieb Cory Quammen: Philipp, I can confirm what you see with a pre 4.2 version of ParaView. However, the number of produced cells is the same. I will try to track down why this changed. Thanks, Cory On Fri, Sep 19, 2014 at 11:17 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory I managed to compress the data set to a fair size and attached it to this mail. The data set is pressure, contour value is 0.55. By looking again at the data (contour - information), I just found that the old version (3.14.1) uses 148432 cells , while the the new one employs 75232 cells. Hope that helps. Kind regards Philipp Errata: I meant 4.2.0RC1 in the previous mails. On 09/19/2014 04:59 PM, Cory Quammen wrote: Phillipp, Do you have a data set similar to the one you've shown that you can share? Thanks, Cory On Fri, Sep 19, 2014 at 10:48 AM, Philipp E pspeac...@gmail.com wrote: Hi Cory, thank you for your fast feedback. a) Compute normal is checked. (Without normals, the contour is completely stepped) b) Contour values are the same. Regards Philipp On 09/19/2014 04:40 PM, Cory Quammen wrote: Philipp, In the contour filter, is the option Compute Normals checked in 4.0 RC1? Also, are the contour values the same between the two versions? Thanks, Cory On Fri, Sep 19, 2014 at 10:25 AM, Philipp E pspeac...@gmail.com wrote: Hello everyone, after extensive search I was desperate enough to post on this list: It appears that the surface smoothing algorithm of the contour filter does not work as aggressive as in older version (3.14.1 was the last one we found to do so). As an example I prepared this two screenshots, VTK data are scalars on a structured grid (200x100x100), legacy format. (An additional call of the smooth filter does not help.) 3.14.1 http://s7.directupload.net/images/140919/euadfvko.png 4.0.RC1 http://s14.directupload.net/images/140919/84y689mi.png Both versions are running with the shipped settings. Since the effect could be reproduced on several workstations, we are wondering whether there has been an (undocumented?) change in the filter mechanism or some option we/setting/data problem we are not aware of. Kind regards and thanks in advance Philipp Engels. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep
Re: [Paraview] ParaView 4.2.0 client/server execution error on SGI UV System (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Thanks JB. I will dig into the compilation process and see if there is anything I missed. Thanks -simon -Original Message- From: Biddiscombe, John A. [mailto:biddi...@cscs.ch] Sent: Friday, October 10, 2014 6:10 PM To: Su, Simon M CTR USARMY ARL (US); paraview@paraview.org Subject: Re: [Paraview] ParaView 4.2.0 client/server execution error on SGI UV System (UNCLASSIFIED) The client has created the representation glyph3d, but the server hasn’t got it compiled in by the looks of it, so the create representation fails. Does it get skipped when using osmesa (and hence doesn’t exist on the server)? I’m not certain of this, but it happens all the time with the same error when one of my plugins that create a representation is loaded on the client - but not on the server. JB On 10/10/14 20:31, Su, Simon M CTR USARMY ARL (US) simon.m.su@mail.mil wrote: Classification: UNCLASSIFIED Caveats: NONE Hello, We are wondering if someone can point us in the right direction to track down the issue we are getting. We managed to get ParaView OSMESA compile on our SGI UV System. But in a client/server execution mode, although we are able to connect and paraview starts up on the HPC side, as soon as we try to draw something, we get a segmentation fault error - please see error message at the bottom of this email. ParaView 4.2.0 osmesa is configure with the following options. -DCMAKE_BUILD_TYPE=Release \ -DParaView_FROM_GIT=ON \ -DENABLE_boost=ON \ -DENABLE_cgns=OFF \ -DENABLE_ffmpeg=ON \ -DENABLE_fontconfig=ON \ -DENABLE_freetype=ON \ -DENABLE_hdf5=ON \ -DENABLE_libxml2=ON \ -DENABLE_matplotlib=ON \ -DENABLE_mesa=OFF \ -DENABLE_mpi=ON \ -DENABLE_numpy=ON \ -DENABLE_osmesa=ON \ -DENABLE_paraview=ON \ -DENABLE_png=ON \ -DENABLE_python=ON \ -DENABLE_qhull=ON \ -DENABLE_qt=OFF \ -DENABLE_silo=ON \ -DENABLE_szip=ON \ -DENABLE_visitbridge=ON \ -DMPI_CXX_LIBRARIES:STRING=/opt/sgi/mpt/mpt-2.08/lib/libmpi++.so \ -DMPI_C_LIBRARIES:STRING=/opt/sgi/mpt/mpt-2.08/lib/libmpi.so \ -DMPI_LIBRARY:FILEPATH=/opt/sgi/mpt/mpt-2.08/lib/libmpi++.so \ -DMPI_CXX_INCLUDE_PATH:STRING=/opt/sgi/mpt/mpt-2.08/include \ -DMPI_C_INCLUDE_PATH:STRING=/opt/sgi/mpt/mpt-2.08/include \ -DUSE_SYSTEM_mpi=ON \ -DUSE_SYSTEM_python=OFF \ -DUSE_SYSTEM_zlib=OFF \ And pvserver is invoked with the following arguments mpiexec_mpt -np ${NUM_MPITASKS} pvserver --use-offscreen-rendering --server-port=1486 --client-host=${HOSTNAME} --reverse-connection --timeout=00:10:00 --connect-id=43826 Any suggestion on what/where we can start to track this segmentation fault issue down is much appreciated. Thanks -simon === client/server execution error mpiexec_mpt -np ${NUM_MPITASKS} pvserver --use-offscreen-rendering --server-port=1486 --client-host=predator --reverse-connection --timeout=00:10:00 --connect-id=43826 Accepting connection(s): phineas.arl.army.mil:55816 ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Rele ase - Python27/paraview/src/paraview/ParaViewCore/ServerImplementation/Core/v tkP V SessionCore.cxx, line 390 vtkPVSessionCore (0x7f8f85b63810): Object type: vtkGlyph3DRepresentation, could not find requested method: SetTriangulate or the method was called with incorrect arguments. while processing Message 0 = Invoke Argument 0 = vtk_object_pointer {vtkGlyph3DRepresentation (0x7f8f8833fe90)} Argument 1 = string_value {SetTriangulate} Argument 2 = int32_value {0} ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Rele ase - Python27/paraview/src/paraview/ParaViewCore/ServerImplementation/Core/v tkP V SessionCore.cxx, line 391 vtkPVSessionCore (0x7f8f85b63810): Aborting execution for debugging purposes. ABORT # ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Rele ase - Python27/paraview/src/paraview/ParaViewCore/ServerImplementation/Core/v tkS I Proxy.cxx, line 487 vtkSISourceProxy (0x7f8f8833fc10): Could not parse property: Triangulate ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Rele ase - Python27/paraview/src/paraview/ParaViewCore/ClientServerCore/Core/vtkPV Alg o rithmPortsInformation.cxx, line 56 vtkPVAlgorithmPortsInformation (0x7f8f88367ee0): Could not downcast vtkAlgorithm. ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Rele ase - Python27/paraview/src/paraview/ParaViewCore/ServerImplementation/Core/v tkP V SessionCore.cxx, line 390 vtkPVSessionCore (0x7f8f85b63810): Wrapper function not found for class (vtk object is NULL). while processing Message 0 = Invoke Argument 0 = stream_value { Message 0 = Invoke Argument 0 = id_value {1} Argument 1 = string_value {GetVTKObject} Argument 2 = uint32_value {4525} } Argument 1 = string_value {Initialize} Argument 2 = uint32_value {4525} Argument 3 = uint32_value
Re: [Paraview] ParaView superbuild git question (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Hi Cory, Thanks for the info. I will update my build script. Thanks -simon -Original Message- From: Cory Quammen [mailto:cory.quam...@kitware.com] Sent: Saturday, October 11, 2014 6:04 PM To: Su, Simon M CTR USARMY ARL (US) Cc: paraview@paraview.org Subject: Re: [Paraview] ParaView superbuild git question (UNCLASSIFIED) Hi Simon, What you are doing as a workaround is indeed how production builds should be created. The ParaView superbuild is now set up to check out the master branch of ParaView, which varies day to day. In 4.1 and prior to that, it was set up to check out out the release branch, which was far more static. If you disable ParaView_FROM_GIT in CMake, it will download the release source tar ball and build from that, essentially what you have been doing. I'll update the superbuild wiki instructions to note this. Best regards, Cory On Fri, Oct 10, 2014 at 4:09 PM, Su, Simon M CTR USARMY ARL (US) simon.m.su@mail.mil wrote: Classification: UNCLASSIFIED Caveats: NONE Hello, http://www.paraview.org/Wiki/ParaView/Superbuild mentioned, if I want to build a specific version, I will do git clone git://paraview.org/ParaViewSuperbuild.git cd ParaViewSuperbuild git checkout v4.1.0 That has always worked for me for v4.1.0 tag But with v4.2.0 release, if I do the following on different days, git clone git://paraview.org/ParaViewSuperbuild.git cd ParaViewSuperbuild git checkout v4.2.0 I am getting v4.2.0-${SOME HASH NUMBER} that is different every time. Am I missing something? This is causing me problem when I am trying to get the same version of ParaView mesa and osmesa build for client/server mode. I end up doing a -DParaView_URL=../paraview/ParaView-v4.2.0-source.tar.gz To get around the problem. Thoughts? Thanks -simon Classification: UNCLASSIFIED Caveats: NONE ___ 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 Classification: UNCLASSIFIED Caveats: NONE smime.p7s Description: S/MIME cryptographic signature ___ 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
Re: [Paraview] BOX - volume?
You can create a wavelet source and then display it as a volume. On Fri, Oct 10, 2014 at 3:45 PM, B.W.H. van Beest b...@xs4all.nl wrote: Can perhaps somebody point me how to address the following. When I create a new source (say: a box) I get an a box that can be displayed via its surfaces, its constituing points, or wireframe representation. But I need a volume rendering (so that I can add e.g. a clipping plane) How do I get that? Regards, Bertwim ___ 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 -- *| Aashish Chaudhary | Technical Leader | Kitware Inc.* *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* ___ 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
Re: [Paraview] Disappearing volume rendering?
Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ 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 ___ 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
Re: [Paraview] Disappearing volume rendering?
No, it doesn't work. The filter creates tets, which are visible in the wireframe representation, but when I select Volume representation the image disappears. I can't imagine it is so difficult to render a volume in Paraview. I must be doing something wrong Regards, Bertwim On 10/13/2014 05:36 PM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ 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 ___ 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
Re: [Paraview] Disappearing volume rendering?
do you have any scalars? those are not optional for volume rendering. Additionally you may need to adjust the transfer function, On 10/13/2014 10:22 AM, B.W.H. van Beest wrote: No, it doesn't work. The filter creates tets, which are visible in the wireframe representation, but when I select Volume representation the image disappears. I can't imagine it is so difficult to render a volume in Paraview. I must be doing something wrong Regards, Bertwim On 10/13/2014 05:36 PM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ 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 ___ 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 ___ 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
Re: [Paraview] BOX - volume?
Aashish, Thanks for the suggestion. However, doing this gives me all kinds of opengl errors (invalid instruction). Besides that, the wavelet gives me a cube indeed, but I need to understand when I can have a volume rendering. I created new Source's (e.g. tri-prism, a wedge, a box with boundaries of finite thickness etc.). But I cannot get volume rendering to work, grr. (See other thread) Kind Regards, Bertwim On 10/13/2014 05:28 PM, Aashish Chaudhary wrote: You can create a wavelet source and then display it as a volume. On Fri, Oct 10, 2014 at 3:45 PM, B.W.H. van Beest b...@xs4all.nl mailto:b...@xs4all.nl wrote: Can perhaps somebody point me how to address the following. When I create a new source (say: a box) I get an a box that can be displayed via its surfaces, its constituing points, or wireframe representation. But I need a volume rendering (so that I can add e.g. a clipping plane) How do I get that? Regards, Bertwim ___ Powered by www.kitware.com http://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 -- /| Aashish Chaudhary | Technical Leader | Kitware Inc. / /| http://www.kitware.com/company/team/chaudhary.html/ ___ 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
Re: [Paraview] BOX - volume?
So when you created a wavelet source and change the representation to volume you got the errors? Can you post those errors? Thanks, On Mon, Oct 13, 2014 at 1:33 PM, B.W.H. van Beest b...@xs4all.nl wrote: Aashish, Thanks for the suggestion. However, doing this gives me all kinds of opengl errors (invalid instruction). Besides that, the wavelet gives me a cube indeed, but I need to understand when I can have a volume rendering. I created new Source's (e.g. tri-prism, a wedge, a box with boundaries of finite thickness etc.). But I cannot get volume rendering to work, grr. (See other thread) Kind Regards, Bertwim On 10/13/2014 05:28 PM, Aashish Chaudhary wrote: You can create a wavelet source and then display it as a volume. On Fri, Oct 10, 2014 at 3:45 PM, B.W.H. van Beest b...@xs4all.nl wrote: Can perhaps somebody point me how to address the following. When I create a new source (say: a box) I get an a box that can be displayed via its surfaces, its constituing points, or wireframe representation. But I need a volume rendering (so that I can add e.g. a clipping plane) How do I get that? Regards, Bertwim ___ 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 -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* -- *| Aashish Chaudhary | Technical Leader | Kitware Inc.* *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* ___ 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
Re: [Paraview] Disappearing volume rendering?
Yes, I do set a scalar for each cell. I left them out in the example, as also with a scalar I couldn't get a volume display. I'm not sure what you mean by adjusting the transfer function. Regards, Bertwim On 10/13/2014 07:28 PM, Burlen Loring wrote: do you have any scalars? those are not optional for volume rendering. Additionally you may need to adjust the transfer function, On 10/13/2014 10:22 AM, B.W.H. van Beest wrote: No, it doesn't work. The filter creates tets, which are visible in the wireframe representation, but when I select Volume representation the image disappears. I can't imagine it is so difficult to render a volume in Paraview. I must be doing something wrong Regards, Bertwim On 10/13/2014 05:36 PM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ 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 ___ 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 ___ 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
Re: [Paraview] BOX - volume?
Hi Aashish, This is what I do: 1. start paraview 2. Sources - Wavelet - Apply. A cube is displayed (Outline representation). 3. Select 'Volume representation cube disappears. Then: = Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation = On 10/13/2014 07:35 PM, Aashish Chaudhary wrote: So when you created a wavelet source and change the representation to volume you got the errors? Can you post those errors? Thanks, On Mon, Oct 13, 2014 at 1:33 PM, B.W.H. van Beest b...@xs4all.nl mailto:b...@xs4all.nl wrote: Aashish, Thanks for the suggestion. However, doing this gives me all kinds of opengl errors (invalid instruction). Besides that, the wavelet gives me a cube indeed, but I need to understand when I can have a volume rendering. I created new Source's (e.g. tri-prism, a wedge, a box with boundaries of finite thickness etc.). But I cannot get volume rendering to work, grr. (See other thread) Kind Regards, Bertwim On 10/13/2014 05:28 PM, Aashish Chaudhary wrote: You can create a wavelet source and then display it as a volume. On Fri, Oct 10, 2014 at 3:45 PM, B.W.H. van Beest b...@xs4all.nl mailto:b...@xs4all.nl wrote: Can perhaps somebody point me how to address the following. When I create a new source (say: a box) I get an a box that can be displayed via its surfaces, its constituing points, or wireframe representation. But I need a volume rendering (so that I can add e.g. a clipping plane) How do I get that? Regards, Bertwim ___ Powered by www.kitware.com http://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 -- /| Aashish Chaudhary | Technical Leader | Kitware Inc. / /| http://www.kitware.com/company/team/chaudhary.html/ -- /| Aashish Chaudhary | Technical Leader | Kitware Inc. / /| http://www.kitware.com/company/team/chaudhary.html/ ___ 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
Re: [Paraview] BOX - volume?
What graphics card / graphics driver version / OS this system has? - Aashish On Mon, Oct 13, 2014 at 1:41 PM, B.W.H. van Beest b...@xs4all.nl wrote: Hi Aashish, This is what I do: 1. start paraview 2. Sources - Wavelet - Apply. A cube is displayed (Outline representation). 3. Select 'Volume representation cube disappears. Then: = Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 487 failed at glBindTexture 1 OpenGL errors detected 0 : (1282) Invalid operation = On 10/13/2014 07:35 PM, Aashish Chaudhary wrote: So when you created a wavelet source and change the representation to volume you got the errors? Can you post those errors? Thanks, On Mon, Oct 13, 2014 at 1:33 PM, B.W.H. van Beest b...@xs4all.nl wrote: Aashish, Thanks for the suggestion. However, doing this gives me all kinds of opengl errors (invalid instruction). Besides that, the wavelet gives me a cube indeed, but I need to understand when I can have a volume rendering. I created new Source's (e.g. tri-prism, a wedge, a box with boundaries of finite thickness etc.). But I cannot get volume rendering to work, grr. (See other thread) Kind Regards, Bertwim On 10/13/2014 05:28 PM, Aashish Chaudhary wrote: You can create a wavelet source and then display it as a volume. On Fri, Oct 10, 2014 at 3:45 PM, B.W.H. van Beest b...@xs4all.nl wrote: Can perhaps somebody point me how to address the following. When I create a new source (say: a box) I get an a box that can be displayed via its surfaces, its constituing points, or wireframe representation. But I need a volume rendering (so that I can add e.g. a clipping plane) How do I get that? Regards, Bertwim ___ 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 -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* -- *| Aashish Chaudhary | Technical Leader | Kitware Inc.* *| http://www.kitware.com/company/team/chaudhary.html http://www.kitware.com/company/team/chaudhary.html* ___ 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
Re: [Paraview] Disappearing volume rendering?
Aashish, I do see errors in the wavelet example, but not in the other cases. If ok with you , I'll send the full code (it is not much, ~100K) as a zipped tar file by email. There is no other data. Regards, Bertwim On 10/13/2014 07:43 PM, Aashish Chaudhary wrote: Bertwim, If you are seeing errors (like you mentioned in other email), I am afraid that you won't see any volume. Would it be possible for you to upload your data somewhere? - Aashish On Mon, Oct 13, 2014 at 1:35 PM, B.W.H. van Beest b...@xs4all.nl mailto:b...@xs4all.nl wrote: Yes, I do set a scalar for each cell. I left them out in the example, as also with a scalar I couldn't get a volume display. I'm not sure what you mean by adjusting the transfer function. Regards, Bertwim On 10/13/2014 07:28 PM, Burlen Loring wrote: do you have any scalars? those are not optional for volume rendering. Additionally you may need to adjust the transfer function, On 10/13/2014 10:22 AM, B.W.H. van Beest wrote: No, it doesn't work. The filter creates tets, which are visible in the wireframe representation, but when I select Volume representation the image disappears. I can't imagine it is so difficult to render a volume in Paraview. I must be doing something wrong Regards, Bertwim On 10/13/2014 05:36 PM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl mailto:b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ Powered by www.kitware.com http://www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please
Re: [Paraview] Disappearing volume rendering?
Cory, Bertwin, et al.; The exact volume of an arbitrarily oriented, arbitrary 8-vertex hexahedron can be computed with a very elementary construct. First, place an average-coordinate point at the center of the hexahedron; this point will be a common vertex point for a set of tetrahedrons whose construction follows. Second, visiting the six faces of the hexahedron, place an average-coordinate point at the center of the quadrilateral polygonal face. For each of the four triangles, construct the four tetrahedrons using the center point above of the parent hexahedron. The only limitation is that the arbitrary 8-vertex hexhedron must be star-convex with respect to the hexaheron's average-coordinate center point. This construct works for triangular prisms and pyramids with a quadrilateral base. Once one has the coordinates of four vertex nodes defining a tetrahedron, the volume calculation of a tetrahedron is straight forward. Clearly, the total volume of the hexahedron is the sum of its 24 tetrahedral decomposition volumes. If an n-vertex polyhedron finite element's mean quadrature gradient operator is constructed the same way as above, then the above construct works for the n-vertex polyhedron. If an iso-surface transects the edges of an 8-node hexahedron and the resulting two sibling n-vertex polyhedrons are used as individual finite elements (which has been done), then the the above construct also provides exact volume fractions with respect to the two sibling n-vertex polyhedrons. The polygonal intersection surface need not be planar surface. If multiple, non-intersecting iso-surfaces transect a hexahedron, then the respective volume fractions within the hexahedron can exactly be calculated inductively. Cory, If you want to follow up off-line, I can provide a more lengthy write up with references plus example coding. Because of computational costs, I don't recommend this algorithm except in a user-invoked filter. Samuel W Key FMA Development, LLC 1005 39th Ave NE Great Falls, Montana 59404 On 10/13/2014 9:36 AM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell Topology vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; umesh-InsertNextCell( VTK_HEXAHEDRON, 8, vtx ); return 1; } ___ 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
Re: [Paraview] Disappearing volume rendering?
Samuel, Thanks for taking the efforts to dive into this. In fact, it is a good reminder to me to try a single tetraeder first. My primary problem seems to be that I cannot get volume rendering to work. Kind Regards, Bertwim On 10/13/2014 07:17 PM, Samuel Key wrote: Cory, Bertwin, et al.; The exact volume of an arbitrarily oriented, arbitrary 8-vertex hexahedron can be computed with a very elementary construct. First, place an average-coordinate point at the center of the hexahedron; this point will be a common vertex point for a set of tetrahedrons whose construction follows. Second, visiting the six faces of the hexahedron, place an average-coordinate point at the center of the quadrilateral polygonal face. For each of the four triangles, construct the four tetrahedrons using the center point above of the parent hexahedron. The only limitation is that the arbitrary 8-vertex hexhedron must be star-convex with respect to the hexaheron's average-coordinate center point. This construct works for triangular prisms and pyramids with a quadrilateral base. Once one has the coordinates of four vertex nodes defining a tetrahedron, the volume calculation of a tetrahedron is straight forward. Clearly, the total volume of the hexahedron is the sum of its 24 tetrahedral decomposition volumes. If an n-vertex polyhedron finite element's mean quadrature gradient operator is constructed the same way as above, then the above construct works for the n-vertex polyhedron. If an iso-surface transects the edges of an 8-node hexahedron and the resulting two sibling n-vertex polyhedrons are used as individual finite elements (which has been done), then the the above construct also provides exact volume fractions with respect to the two sibling n-vertex polyhedrons. The polygonal intersection surface need not be planar surface. If multiple, non-intersecting iso-surfaces transect a hexahedron, then the respective volume fractions within the hexahedron can exactly be calculated inductively. Cory, If you want to follow up off-line, I can provide a more lengthy write up with references plus example coding. Because of computational costs, I don't recommend this algorithm except in a user-invoked filter. Samuel W Key FMA Development, LLC 1005 39th Ave NE Great Falls, Montana 59404 On 10/13/2014 9:36 AM, Cory Quammen wrote: Bertwim, I'm not sure that the volume renderer can handle VTK_HEXAHEDRON elements. Try the Tetrahedralize filter on your source and see if the Volume representation works. Thanks, Cory On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest b...@xs4all.nl wrote: Hi, I'm struggling to get a proper 3D view of my model system (yes, embarrassing!) but must admit my defeat. After stripping almost everything, keeping the minimum to exhibit the issue, I'm left with the following: I have created a simple box source. To get a 3D representation, I sub-classed the code for this Source from vtkUnstructuredGridAlgorithm. In the RequestData method, I define the 8 point of the unit cube. I added the points to the underlying unstructed grid, and I specified the cell topology. This all seems to work: when instantiating this box Source, I *do* get the expected cube in the representations (Surface, wireframe, Points). However, when I select the Volume representation, *the image disappears* What am I doing wrong? As the code is not too long and very simple, I take the freedom to paste it below. Kind regards. Bertwim = int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) { // Get the info object vtkInformation *outInfo = outputVector-GetInformationObject(0); vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast( outInfo-Get( vtkDataObject::DATA_OBJECT() ) ); // Pre-allocate some memory umesh-Allocate( 1024 ); // Specify points. double r0[] = { 0.0, 0.0, 0.0 }; double r1[] = { 1.0, 0.0, 0.0 }; double r2[] = { 0.0, 1.0, 0.0 }; double r3[] = { 1.0, 1.0, 0.0 }; double r4[] = { 0.0, 0.0, 1.0 }; double r5[] = { 1.0, 0.0, 1.0 }; double r6[] = { 0.0, 1.0, 1.0 }; double r7[] = { 1.0, 1.0, 1.0 }; // Collect the points in a vtk data structures. { vtkSmartPointervtkPoints points = vtkSmartPointervtkPoints::New(); points-SetDataType( VTK_DOUBLE ); points-InsertNextPoint( r0 ); points-InsertNextPoint( r1 ); points-InsertNextPoint( r2 ); points-InsertNextPoint( r3 ); points-InsertNextPoint( r4 ); points-InsertNextPoint( r5 ); points-InsertNextPoint( r6 ); points-InsertNextPoint( r7 ); // Transfer points to umesh. umesh-SetPoints( points ); } // Cell
Re: [Paraview] BOX - volume?
OS: OpenSuSe 13.1 # lspci | grep -i vga 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] # glxinfo name of display: :0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.4 server glx extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_multisample, GLX_EXT_create_context_es2_profile, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_swap_control client glx vendor string: Mesa Project and SGI client glx version string: 1.4 client glx extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync GLX version: 1.4 GLX extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_create_context_es2_profile, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.3 OpenGL core profile shading language version string: 1.40 OpenGL core profile context flags: (none) OpenGL core profile extensions: GL_3DFX_texture_compression_FXT1, GL_AMD_draw_buffers_blend, GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, GL_APPLE_object_purgeable, GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility, GL_ARB_base_instance, GL_ARB_blend_func_extended, GL_ARB_copy_buffer, GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, GL_ARB_explicit_attrib_location, GL_ARB_fragment_coord_conventions, GL_ARB_fragment_shader, GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, GL_ARB_instanced_arrays, GL_ARB_internalformat_query, GL_ARB_invalidate_subdata, GL_ARB_map_buffer_range, GL_ARB_occlusion_query2, GL_ARB_pixel_buffer_object, GL_ARB_point_sprite, GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map, GL_ARB_shader_bit_encoding, GL_ARB_shader_objects, GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing, GL_ARB_sync, GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map_array, GL_ARB_texture_float, GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_storage, GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, GL_ARB_timer_query, GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object, GL_ARB_vertex_shader, GL_ARB_vertex_type_2_10_10_10_rev, GL_ATI_blend_equation_separate, GL_ATI_texture_float, GL_EXT_abgr, GL_EXT_blend_equation_separate, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_sRGB, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_pixel_buffer_object, GL_EXT_provoking_vertex, GL_EXT_texture_array, GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode,
Re: [Paraview] XMLUnstructuredGridWriter and VTK_POLYHEDRON elements
Hi Joe, I've seen this before and there is a bug report in mantis here: http://www.paraview.org/Bug/view.php?id=13382 There has also been a patch posted to the vtk-developers list a while back although I haven't tested it: http://markmail.org/message/zg3damrg27p5sgue Regards, Paul On 10 October 2014 00:32, Insley, Joseph A. ins...@anl.gov wrote: Hi, I have a serial vtu dataset provided by one of my users. Their current code can produce this in either ascii or inline binary. I am currently trying to convert this to appended binary (ultimately to pvtu with appended binary). I'm having trouble, which I now believe may stem from the data containing VTK_POLYHEDRON. I have a simple python script that I use with pvbatch to do this conversion, but I see the same results when I load the original data set with ParaView (4.1.0, in client/server mode), and use the Save Data option and save as vtu. I get the same results for each input format (ascii or inline binary), and output format (ascii, binary, appended). The first few lines of the original vtu file look like this: ?xml version=1.0? VTKFile type=UnstructuredGrid version=0.1 byte_order=BigEndian UnstructuredGrid Piece NumberOfPoints=1699427 NumberOfCells=384126 The first few lines of the converted file look like this: offset=177748206ructuredGrid version=0.1 byte_order=LittleEndian UnstructuredGrid Piece NumberOfPoints=1699427 NumberOfCells=384126 Something is clearly getting jumbled at the beginning of the converted file. If I manually edit the header of the file to read VTKFile type=UnstructuredGrid, there are still problems with the file. In that case the info tab in ParaView reports the correct number of points and cells, but no geometry is drawn. I have successfully converted other vtu files using this same method. The primary difference that I've been able to identify is that the files that are not converting happily contain VTK_POLYHEDRON elements. Has anyone else seen similar behavior? Thanks, joe === joseph a. insley ins...@anl.gov argonne leadership computing facility (630) 252-5649 argonne national laboratory ___ 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 ___ 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