From elvis.stansvik at orexplore.com Thu Sep 1 01:54:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 1 Sep 2016 07:54:25 +0200 Subject: [vtkusers] Interactively select segment of cylindrical volume Message-ID: Hi all, I have a setup where I have a long cylindrical volume centered around the Z axis, and the camera focal point is locked to the cylinder center line with the camera up vector always pointed in the positive Z direction ("up"). It's sort of like you're flying around the outside of a tower, with your feet always towards the ground. The camera uses parallel projection. What I need now is to make a tool where the user can drag with the mouse in the viewport to select a segment of the cylinder he/she is seeing on the screen. The feature should work like this: * User drags from one point in the view port to another. * During dragging, a semi-transparent rectangular overlay is shown, the overlay should be the full width of the viewport, but should start and end in the vertical direction at the start and end point of the area being selected. * Upon releasing the mouse, I need to get access to the Z coordinates of the press/release (start/end) points, projected onto the Z axis. I need this to use to show the selected cylindrical segment in another view (at higher resolution, so extracted from another set of images). Any tips/advice on how to go about this using VTK is much appreciated. Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 1 03:05:26 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 1 Sep 2016 09:05:26 +0200 Subject: [vtkusers] Memory not released when volumes are removed In-Reply-To: References: <001801d2039c$a94bbbe0$fbe333a0$@gmail.com> Message-ID: 2016-08-31 17:51 GMT+02:00 Elvis Stansvik : > HI Robert, > > Den 31 aug. 2016 5:30 em skrev "R?bert ?pir" : > > > > Hi Elvis, > > > > I noticed the same behavior before ( here is the topic > http://vtk.1045678.n5.nabble.com/memory-leak-in- > vtkStructuredPoints-or-am-I-doing-something-wrong-tt5738805.html ) > > > > Looks like it is the standard behavior of Linux (although very weird), > since this is not happening in Windows or OS X. > > Ah right, now I remember your post. I'll do some more testing to verify > that this is actually what's happening in my case, but it likely is. > I don't think this is the phenomenon I'm seeing. I tried opening the same dataset repeatedly in my app, and I got: 77 MB 368 MB 633 MB 860 MB 1003 MB 1171 MB 1345 MB 1518 MB 1691 MB 1858 MB 2029 MB 2201 MB 2371 MB 2543 MB So the memory usage just keeps growing, despite my attempts to clean up before loading the dataset. This is from the RES (resident) column of top, and I don't think this is memory which can be reclaimed by the OS? That would show up in the VIRT (virtual) column I think. So my question remains: Should I do something more to get a thorough cleanup, apart from removing the vtkVolume from the renderer and deleting it (by means of a smart pointer)? Elvis > Thanks, > Elvis > > > > > Best, > > > > Robert > > > > > > > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis > Stansvik > > Sent: Wednesday, August 31, 2016 5:19 PM > > To: VTK Users > > Subject: [vtkusers] Memory not released when volumes are removed > > > > > > > > Hi all, > > > > Before loading a new dataset into our app, I'd like to remove all > existing volumes from the renderer, which I believe should lead to them > being destroyed as well, since I have no other references to the volumes > (currently). > > > > What I tried was > > > > // Remove all existing volumes > > auto volumes = renderer()->GetVolumes(); > > volumes->InitTraversal(); > > for (int i = 0; i < volumes->GetNumberOfItems(); ++i) { > > qDebug() << "removing volume"; > > vtkSmartPointer volume = volumes->GetNextVolume(); > > qDebug() << "before:" << volume->GetReferenceCount(); > > renderer()->RemoveVolume(volume.GetPointer()); > > qDebug() << "after:" << volume->GetReferenceCount(); > > } > > > > The output I get each time I load a new dataset (actually the same, but > doing it repeatedly) and execution passes by this cleanup code is: > > > > removing volume > > before: 3 > > after: 1 > > removing volume > > before: 3 > > after: 1 > > removing volume > > before: 3 > > after: 1 > > > > Which sort of makes sense to me: Apparently the renderer holds two > references to the volume, since the refcount goes down by 2 when I remove > the volume from the renderer. The remaining reference is held by the > vtkSmartPointer I created inside the loop. > > > > But, what surprises me is that memory usage does not seem to go down > when this code is executed. I would expect that when the scope of the for > loop body is exited, the refcount will drop to zero, so the volume should > be deleted. And I guess it probably is. > > > > But looking at the memory usage when repeatedly loading datasets (and > thus clearing the previous), the resident memory used by the app > accumulates. > > > > Must I somehow remove the mapper / underlying image data as well? I'm > not holding any references to these, so I would have expected them to die > along with the volume. > > > > Helpful for any tips on why this cleanup is apparently not enough to > avoid memory accumulation. > > > > Thanks, > > > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From filippo.brogi at topic.nl Thu Sep 1 03:10:20 2016 From: filippo.brogi at topic.nl (FilippoBrogi) Date: Thu, 1 Sep 2016 00:10:20 -0700 (MST) Subject: [vtkusers] VTK 6.3 opengl2 Message-ID: <1472713820504-5740085.post@n5.nabble.com> Hello, OS: Windows 10 x64 CMAKE: 2.8.12.2 IDE: VS MS2013 x64 VTK: 6.3.0 VTK BUILD: Debug x64/Release x64 I can build successfully with opengl enabled. When I switch to openGl2 selecting VTK_RENDERING_BACKEND = Opengl2 VTK doesn't built anymore, because some inclusion file are missing Error 2 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 3 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 4 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 5 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 6 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 7 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 8 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 9 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 10 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 11 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 12 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 13 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 14 error C1083: Cannot open include file: 'vtkRenderingGL2PSModule.h': No such file or directory d:\vtk-6.3.0\io\export\vtkIOExportModule.h 40 1 vtkIOExport Error 1 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 15 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 16 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 17 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 18 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 19 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 20 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 21 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 22 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 23 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 24 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 25 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 26 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 27 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 28 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 29 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 30 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 31 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 32 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 33 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 34 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 35 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 36 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Error 37 error C1083: Cannot open include file: 'vtkRenderingOpenGLModule.h': No such file or directory d:\vtk-6.3.0\guisupport\qt\vtkGUISupportQtModule.h 37 1 vtkGUISupportQt Looks like when VTK_RENDERING_BACKEND = Opengl2 some modules are not included correctly in the build. I couldn't find any insight regarding this issue. Thanks a lot. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-3-opengl2-tp5740085.html Sent from the VTK - Users mailing list archive at Nabble.com. From spir.robert at gmail.com Thu Sep 1 03:31:15 2016 From: spir.robert at gmail.com (=?UTF-8?B?UsOzYmVydCDFoHBpcg==?=) Date: Thu, 1 Sep 2016 09:31:15 +0200 Subject: [vtkusers] Memory not released when volumes are removed In-Reply-To: References: <001801d2039c$a94bbbe0$fbe333a0$@gmail.com> Message-ID: <001c01d20422$d34a0b50$79de21f0$@gmail.com> try building vtk with VTK_DEBUG_LEAKS enabled and then you can use vtkDebugLeaks class PrintCurrentLeaks method to print all existing vtk objects. Here you can see whether the object count is increasing or decreasing From: Elvis Stansvik [mailto:elvis.stansvik at orexplore.com] Sent: Thursday, September 1, 2016 9:05 AM To: RobertS Cc: VTK Users Subject: Re: [vtkusers] Memory not released when volumes are removed 2016-08-31 17:51 GMT+02:00 Elvis Stansvik >: HI Robert, Den 31 aug. 2016 5:30 em skrev "R?bert ?pir" >: > > Hi Elvis, > > I noticed the same behavior before ( here is the topic http://vtk.1045678.n5.nabble.com/memory-leak-in-vtkStructuredPoints-or-am-I-doing-something-wrong-tt5738805.html ) > > Looks like it is the standard behavior of Linux (although very weird), since this is not happening in Windows or OS X. Ah right, now I remember your post. I'll do some more testing to verify that this is actually what's happening in my case, but it likely is. I don't think this is the phenomenon I'm seeing. I tried opening the same dataset repeatedly in my app, and I got: 77 MB 368 MB 633 MB 860 MB 1003 MB 1171 MB 1345 MB 1518 MB 1691 MB 1858 MB 2029 MB 2201 MB 2371 MB 2543 MB So the memory usage just keeps growing, despite my attempts to clean up before loading the dataset. This is from the RES (resident) column of top, and I don't think this is memory which can be reclaimed by the OS? That would show up in the VIRT (virtual) column I think. So my question remains: Should I do something more to get a thorough cleanup, apart from removing the vtkVolume from the renderer and deleting it (by means of a smart pointer)? Elvis Thanks, Elvis > > Best, > > Robert > > > > From: vtkusers [mailto:vtkusers-bounces at vtk.org ] On Behalf Of Elvis Stansvik > Sent: Wednesday, August 31, 2016 5:19 PM > To: VTK Users > > Subject: [vtkusers] Memory not released when volumes are removed > > > > Hi all, > > Before loading a new dataset into our app, I'd like to remove all existing volumes from the renderer, which I believe should lead to them being destroyed as well, since I have no other references to the volumes (currently). > > What I tried was > > // Remove all existing volumes > auto volumes = renderer()->GetVolumes(); > volumes->InitTraversal(); > for (int i = 0; i < volumes->GetNumberOfItems(); ++i) { > qDebug() << "removing volume"; > vtkSmartPointer volume = volumes->GetNextVolume(); > qDebug() << "before:" << volume->GetReferenceCount(); > renderer()->RemoveVolume(volume.GetPointer()); > qDebug() << "after:" << volume->GetReferenceCount(); > } > > The output I get each time I load a new dataset (actually the same, but doing it repeatedly) and execution passes by this cleanup code is: > > removing volume > before: 3 > after: 1 > removing volume > before: 3 > after: 1 > removing volume > before: 3 > after: 1 > > Which sort of makes sense to me: Apparently the renderer holds two references to the volume, since the refcount goes down by 2 when I remove the volume from the renderer. The remaining reference is held by the vtkSmartPointer I created inside the loop. > > But, what surprises me is that memory usage does not seem to go down when this code is executed. I would expect that when the scope of the for loop body is exited, the refcount will drop to zero, so the volume should be deleted. And I guess it probably is. > > But looking at the memory usage when repeatedly loading datasets (and thus clearing the previous), the resident memory used by the app accumulates. > > Must I somehow remove the mapper / underlying image data as well? I'm not holding any references to these, so I would have expected them to die along with the volume. > > Helpful for any tips on why this cleanup is apparently not enough to avoid memory accumulation. > > Thanks, > > Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 1 03:43:26 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 1 Sep 2016 09:43:26 +0200 Subject: [vtkusers] Memory not released when volumes are removed In-Reply-To: <001c01d20422$d34a0b50$79de21f0$@gmail.com> References: <001801d2039c$a94bbbe0$fbe333a0$@gmail.com> <001c01d20422$d34a0b50$79de21f0$@gmail.com> Message-ID: 2016-09-01 9:31 GMT+02:00 R?bert ?pir : > try building vtk with VTK_DEBUG_LEAKS enabled and then you can use > vtkDebugLeaks class PrintCurrentLeaks method to print all existing vtk > objects. Here you can see whether the object count is increasing or > decreasing > Ah yes, I'll do that. In the meantime I'm trying to debug with Valgrind Massif, and I have found some strangeness (have to debug further, but there's definitely real leaks going on). Thanks for the tips. Elvis > > > *From:* Elvis Stansvik [mailto:elvis.stansvik at orexplore.com] > *Sent:* Thursday, September 1, 2016 9:05 AM > *To:* RobertS > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Memory not released when volumes are removed > > > > 2016-08-31 17:51 GMT+02:00 Elvis Stansvik : > > HI Robert, > > Den 31 aug. 2016 5:30 em skrev "R?bert ?pir" : > > > > Hi Elvis, > > > > I noticed the same behavior before ( here is the topic > http://vtk.1045678.n5.nabble.com/memory-leak-in- > vtkStructuredPoints-or-am-I-doing-something-wrong-tt5738805.html ) > > > > Looks like it is the standard behavior of Linux (although very weird), > since this is not happening in Windows or OS X. > > Ah right, now I remember your post. I'll do some more testing to verify > that this is actually what's happening in my case, but it likely is. > > I don't think this is the phenomenon I'm seeing. I tried opening the same > dataset repeatedly in my app, and I got: > > 77 MB > 368 MB > 633 MB > 860 MB > 1003 MB > 1171 MB > 1345 MB > 1518 MB > 1691 MB > 1858 MB > 2029 MB > 2201 MB > 2371 MB > 2543 MB > > So the memory usage just keeps growing, despite my attempts to clean up > before loading the dataset. This is from the RES (resident) column of top, > and I don't think this is memory which can be reclaimed by the OS? That > would show up in the VIRT (virtual) column I think. > > So my question remains: Should I do something more to get a thorough > cleanup, apart from removing the vtkVolume from the renderer and deleting > it (by means of a smart pointer)? > > Elvis > > > > Thanks, > Elvis > > > > > Best, > > > > Robert > > > > > > > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis > Stansvik > > Sent: Wednesday, August 31, 2016 5:19 PM > > To: VTK Users > > Subject: [vtkusers] Memory not released when volumes are removed > > > > > > > > Hi all, > > > > Before loading a new dataset into our app, I'd like to remove all > existing volumes from the renderer, which I believe should lead to them > being destroyed as well, since I have no other references to the volumes > (currently). > > > > What I tried was > > > > // Remove all existing volumes > > auto volumes = renderer()->GetVolumes(); > > volumes->InitTraversal(); > > for (int i = 0; i < volumes->GetNumberOfItems(); ++i) { > > qDebug() << "removing volume"; > > vtkSmartPointer volume = volumes->GetNextVolume(); > > qDebug() << "before:" << volume->GetReferenceCount(); > > renderer()->RemoveVolume(volume.GetPointer()); > > qDebug() << "after:" << volume->GetReferenceCount(); > > } > > > > The output I get each time I load a new dataset (actually the same, but > doing it repeatedly) and execution passes by this cleanup code is: > > > > removing volume > > before: 3 > > after: 1 > > removing volume > > before: 3 > > after: 1 > > removing volume > > before: 3 > > after: 1 > > > > Which sort of makes sense to me: Apparently the renderer holds two > references to the volume, since the refcount goes down by 2 when I remove > the volume from the renderer. The remaining reference is held by the > vtkSmartPointer I created inside the loop. > > > > But, what surprises me is that memory usage does not seem to go down > when this code is executed. I would expect that when the scope of the for > loop body is exited, the refcount will drop to zero, so the volume should > be deleted. And I guess it probably is. > > > > But looking at the memory usage when repeatedly loading datasets (and > thus clearing the previous), the resident memory used by the app > accumulates. > > > > Must I somehow remove the mapper / underlying image data as well? I'm > not holding any references to these, so I would have expected them to die > along with the volume. > > > > Helpful for any tips on why this cleanup is apparently not enough to > avoid memory accumulation. > > > > Thanks, > > > > Elvis > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexanderpb at foxmail.com Thu Sep 1 04:32:08 2016 From: alexanderpb at foxmail.com (Alexander Pu) Date: Thu, 1 Sep 2016 01:32:08 -0700 (MST) Subject: [vtkusers] Query a vector value (say velocity) at an arbitrary position(coordinate:x, y, z) in unstructured polydata Message-ID: <1472718728629-5740089.post@n5.nabble.com> I have found solutions online for several days but unfortunately none is the answer. Does anyone know how to get the interpolated velocity vector value at a given coordinate of position (not the sample of my data). Thanks a lot!! -- View this message in context: http://vtk.1045678.n5.nabble.com/Query-a-vector-value-say-velocity-at-an-arbitrary-position-coordinate-x-y-z-in-unstructured-polydata-tp5740089.html Sent from the VTK - Users mailing list archive at Nabble.com. From carmenmanzulli at gmail.com Thu Sep 1 05:42:23 2016 From: carmenmanzulli at gmail.com (Carmen Manzulli) Date: Thu, 1 Sep 2016 11:42:23 +0200 Subject: [vtkusers] from vtkActor to Array Message-ID: Hi all, I need a way to obtain an array starting from a vtkActor.Can anyone help me please? Thanks in advance. Carmen -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 1 07:57:01 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 1 Sep 2016 13:57:01 +0200 Subject: [vtkusers] Memory not released when volumes are removed In-Reply-To: References: <001801d2039c$a94bbbe0$fbe333a0$@gmail.com> <001c01d20422$d34a0b50$79de21f0$@gmail.com> Message-ID: 2016-09-01 9:43 GMT+02:00 Elvis Stansvik : > 2016-09-01 9:31 GMT+02:00 R?bert ?pir : > >> try building vtk with VTK_DEBUG_LEAKS enabled and then you can use >> vtkDebugLeaks class PrintCurrentLeaks method to print all existing vtk >> objects. Here you can see whether the object count is increasing or >> decreasing >> > > Ah yes, I'll do that. In the meantime I'm trying to debug with Valgrind > Massif, and I have found some strangeness (have to debug further, but > there's definitely real leaks going on). Thanks for the tips. > > Elvis > > >> >> >> *From:* Elvis Stansvik [mailto:elvis.stansvik at orexplore.com] >> *Sent:* Thursday, September 1, 2016 9:05 AM >> *To:* RobertS >> *Cc:* VTK Users >> *Subject:* Re: [vtkusers] Memory not released when volumes are removed >> >> >> >> 2016-08-31 17:51 GMT+02:00 Elvis Stansvik : >> >> HI Robert, >> >> Den 31 aug. 2016 5:30 em skrev "R?bert ?pir" : >> > >> > Hi Elvis, >> > >> > I noticed the same behavior before ( here is the topic >> http://vtk.1045678.n5.nabble.com/memory-leak-in-vtkStructure >> dPoints-or-am-I-doing-something-wrong-tt5738805.html ) >> > >> > Looks like it is the standard behavior of Linux (although very weird), >> since this is not happening in Windows or OS X. >> >> Ah right, now I remember your post. I'll do some more testing to verify >> that this is actually what's happening in my case, but it likely is. >> >> I don't think this is the phenomenon I'm seeing. I tried opening the same >> dataset repeatedly in my app, and I got: >> >> 77 MB >> 368 MB >> 633 MB >> 860 MB >> 1003 MB >> 1171 MB >> 1345 MB >> 1518 MB >> 1691 MB >> 1858 MB >> 2029 MB >> 2201 MB >> 2371 MB >> 2543 MB >> >> So the memory usage just keeps growing, despite my attempts to clean up >> before loading the dataset. This is from the RES (resident) column of top, >> and I don't think this is memory which can be reclaimed by the OS? That >> would show up in the VIRT (virtual) column I think. >> >> So my question remains: Should I do something more to get a thorough >> cleanup, apart from removing the vtkVolume from the renderer and deleting >> it (by means of a smart pointer)? >> > I found the problem, and it was two silly mistakes by me. The first was plainly visible in the snippet in my first post: I can't use a call to GetNumberOfItems() in the loop condition, since when the vtkVolume is destroyed, the vtkVolumeCollection will observe this and remove the volume from the collection, thus reducing the number of items by one in each iteration. So with my test dataset (3 volumes), only two were destroyed. Saving the result of GetNumberOfItems() before starting the iteration solved that problem. The second mistake was that I was making use of QtConcurrent::mapped to load the volumes in parallel on the Qt thread pool, and then setting up a QFutureWatcher on the resulting QFuture, with a lambda connected to the finished() signal of the QFutureWatcher. In the lambda I set up the visualization parts of the pipeline and added the volumes to the renderer. I was reusing a single QFutureWatcher for this, which would have been fine if it wasn't for the fact that I connect()ed the lambda to its finished() signal each time I loaded a new dataset. So each time the number of connections increased by one, causing the lambda one extra time each time a new dataset was loaded. The solution I opted for was to instead create a new QFutureWatcher each time a data set is loaded, and then also make sure the QFutureWatcher is destroyed when it finishes by connecting finished() to deleteLater(). The memory use is no longer growing when I repeatedly load new datasets. Elvis > Elvis >> >> >> >> Thanks, >> Elvis >> >> > >> > Best, >> > >> > Robert >> > >> > >> > >> > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis >> Stansvik >> > Sent: Wednesday, August 31, 2016 5:19 PM >> > To: VTK Users >> > Subject: [vtkusers] Memory not released when volumes are removed >> > >> > >> > >> > Hi all, >> > >> > Before loading a new dataset into our app, I'd like to remove all >> existing volumes from the renderer, which I believe should lead to them >> being destroyed as well, since I have no other references to the volumes >> (currently). >> > >> > What I tried was >> > >> > // Remove all existing volumes >> > auto volumes = renderer()->GetVolumes(); >> > volumes->InitTraversal(); >> > for (int i = 0; i < volumes->GetNumberOfItems(); ++i) { >> > qDebug() << "removing volume"; >> > vtkSmartPointer volume = volumes->GetNextVolume(); >> > qDebug() << "before:" << volume->GetReferenceCount(); >> > renderer()->RemoveVolume(volume.GetPointer()); >> > qDebug() << "after:" << volume->GetReferenceCount(); >> > } >> > >> > The output I get each time I load a new dataset (actually the same, but >> doing it repeatedly) and execution passes by this cleanup code is: >> > >> > removing volume >> > before: 3 >> > after: 1 >> > removing volume >> > before: 3 >> > after: 1 >> > removing volume >> > before: 3 >> > after: 1 >> > >> > Which sort of makes sense to me: Apparently the renderer holds two >> references to the volume, since the refcount goes down by 2 when I remove >> the volume from the renderer. The remaining reference is held by the >> vtkSmartPointer I created inside the loop. >> > >> > But, what surprises me is that memory usage does not seem to go down >> when this code is executed. I would expect that when the scope of the for >> loop body is exited, the refcount will drop to zero, so the volume should >> be deleted. And I guess it probably is. >> > >> > But looking at the memory usage when repeatedly loading datasets (and >> thus clearing the previous), the resident memory used by the app >> accumulates. >> > >> > Must I somehow remove the mapper / underlying image data as well? I'm >> not holding any references to these, so I would have expected them to die >> along with the volume. >> > >> > Helpful for any tips on why this cleanup is apparently not enough to >> avoid memory accumulation. >> > >> > Thanks, >> > >> > Elvis >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 1 07:58:21 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 1 Sep 2016 13:58:21 +0200 Subject: [vtkusers] Memory not released when volumes are removed In-Reply-To: References: <001801d2039c$a94bbbe0$fbe333a0$@gmail.com> <001c01d20422$d34a0b50$79de21f0$@gmail.com> Message-ID: 2016-09-01 13:57 GMT+02:00 Elvis Stansvik : > 2016-09-01 9:43 GMT+02:00 Elvis Stansvik : > >> 2016-09-01 9:31 GMT+02:00 R?bert ?pir : >> >>> try building vtk with VTK_DEBUG_LEAKS enabled and then you can use >>> vtkDebugLeaks class PrintCurrentLeaks method to print all existing vtk >>> objects. Here you can see whether the object count is increasing or >>> decreasing >>> >> >> Ah yes, I'll do that. In the meantime I'm trying to debug with Valgrind >> Massif, and I have found some strangeness (have to debug further, but >> there's definitely real leaks going on). Thanks for the tips. >> >> Elvis >> >> >>> >>> >>> *From:* Elvis Stansvik [mailto:elvis.stansvik at orexplore.com] >>> *Sent:* Thursday, September 1, 2016 9:05 AM >>> *To:* RobertS >>> *Cc:* VTK Users >>> *Subject:* Re: [vtkusers] Memory not released when volumes are removed >>> >>> >>> >>> 2016-08-31 17:51 GMT+02:00 Elvis Stansvik >>> : >>> >>> HI Robert, >>> >>> Den 31 aug. 2016 5:30 em skrev "R?bert ?pir" : >>> > >>> > Hi Elvis, >>> > >>> > I noticed the same behavior before ( here is the topic >>> http://vtk.1045678.n5.nabble.com/memory-leak-in-vtkStructure >>> dPoints-or-am-I-doing-something-wrong-tt5738805.html ) >>> > >>> > Looks like it is the standard behavior of Linux (although very weird), >>> since this is not happening in Windows or OS X. >>> >>> Ah right, now I remember your post. I'll do some more testing to verify >>> that this is actually what's happening in my case, but it likely is. >>> >>> I don't think this is the phenomenon I'm seeing. I tried opening the >>> same dataset repeatedly in my app, and I got: >>> >>> 77 MB >>> 368 MB >>> 633 MB >>> 860 MB >>> 1003 MB >>> 1171 MB >>> 1345 MB >>> 1518 MB >>> 1691 MB >>> 1858 MB >>> 2029 MB >>> 2201 MB >>> 2371 MB >>> 2543 MB >>> >>> So the memory usage just keeps growing, despite my attempts to clean up >>> before loading the dataset. This is from the RES (resident) column of top, >>> and I don't think this is memory which can be reclaimed by the OS? That >>> would show up in the VIRT (virtual) column I think. >>> >>> So my question remains: Should I do something more to get a thorough >>> cleanup, apart from removing the vtkVolume from the renderer and deleting >>> it (by means of a smart pointer)? >>> >> I found the problem, and it was two silly mistakes by me. > > The first was plainly visible in the snippet in my first post: I can't use > a call to GetNumberOfItems() in the loop condition, since when the > vtkVolume is destroyed, the vtkVolumeCollection will observe this and > remove the volume from the collection, thus reducing the number of items by > one in each iteration. So with my test dataset (3 volumes), only two were > destroyed. Saving the result of GetNumberOfItems() before starting the > iteration solved that problem. > > The second mistake was that I was making use of QtConcurrent::mapped to > load the volumes in parallel on the Qt thread pool, and then setting up a > QFutureWatcher on the resulting QFuture, with a lambda connected to the > finished() signal of the QFutureWatcher. In the lambda I set up the > visualization parts of the pipeline and added the volumes to the renderer. > I was reusing a single QFutureWatcher for this, which would have been fine > if it wasn't for the fact that I connect()ed the lambda to its finished() > signal each time I loaded a new dataset. So each time the number of > connections increased by one, causing the lambda one extra time each time a > new dataset was loaded. > *causing the lambda to be called [...] Elvis > The solution I opted for was to instead create a new QFutureWatcher each > time a data set is loaded, and then also make sure the QFutureWatcher is > destroyed when it finishes by connecting finished() to deleteLater(). > > The memory use is no longer growing when I repeatedly load new datasets. > > Elvis > > >> Elvis >>> >>> >>> >>> Thanks, >>> Elvis >>> >>> > >>> > Best, >>> > >>> > Robert >>> > >>> > >>> > >>> > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis >>> Stansvik >>> > Sent: Wednesday, August 31, 2016 5:19 PM >>> > To: VTK Users >>> > Subject: [vtkusers] Memory not released when volumes are removed >>> > >>> > >>> > >>> > Hi all, >>> > >>> > Before loading a new dataset into our app, I'd like to remove all >>> existing volumes from the renderer, which I believe should lead to them >>> being destroyed as well, since I have no other references to the volumes >>> (currently). >>> > >>> > What I tried was >>> > >>> > // Remove all existing volumes >>> > auto volumes = renderer()->GetVolumes(); >>> > volumes->InitTraversal(); >>> > for (int i = 0; i < volumes->GetNumberOfItems(); ++i) { >>> > qDebug() << "removing volume"; >>> > vtkSmartPointer volume = volumes->GetNextVolume(); >>> > qDebug() << "before:" << volume->GetReferenceCount(); >>> > renderer()->RemoveVolume(volume.GetPointer()); >>> > qDebug() << "after:" << volume->GetReferenceCount(); >>> > } >>> > >>> > The output I get each time I load a new dataset (actually the same, >>> but doing it repeatedly) and execution passes by this cleanup code is: >>> > >>> > removing volume >>> > before: 3 >>> > after: 1 >>> > removing volume >>> > before: 3 >>> > after: 1 >>> > removing volume >>> > before: 3 >>> > after: 1 >>> > >>> > Which sort of makes sense to me: Apparently the renderer holds two >>> references to the volume, since the refcount goes down by 2 when I remove >>> the volume from the renderer. The remaining reference is held by the >>> vtkSmartPointer I created inside the loop. >>> > >>> > But, what surprises me is that memory usage does not seem to go down >>> when this code is executed. I would expect that when the scope of the for >>> loop body is exited, the refcount will drop to zero, so the volume should >>> be deleted. And I guess it probably is. >>> > >>> > But looking at the memory usage when repeatedly loading datasets (and >>> thus clearing the previous), the resident memory used by the app >>> accumulates. >>> > >>> > Must I somehow remove the mapper / underlying image data as well? I'm >>> not holding any references to these, so I would have expected them to die >>> along with the volume. >>> > >>> > Helpful for any tips on why this cleanup is apparently not enough to >>> avoid memory accumulation. >>> > >>> > Thanks, >>> > >>> > Elvis >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioana.barcan at ymail.com Thu Sep 1 10:48:10 2016 From: ioana.barcan at ymail.com (Ioana Barcan) Date: Thu, 1 Sep 2016 14:48:10 +0000 (UTC) Subject: [vtkusers] vtkSelectVisiblePoints output has 0 points References: <1291684734.3314914.1472741290850.ref@mail.yahoo.com> Message-ID: <1291684734.3314914.1472741290850@mail.yahoo.com> Hello, ? I?m trying to obtain a polyData with only the visible partof a 3D model. To that extent, I?m passing the original data through a vtkSelectVisiblePointsfilter. I?m using a mock renderer, mapper and actor because I want topost-process the visible points before displaying them. ? However, the output of the vtkSelectVisiblePoints filtercontains ?0? points for some reason? ? Using the following example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectVisiblePoints ? I came up with the following piece of code: ? ? // Render window andinteractor ? vtkSmartPointerrenderWindow = ???vtkSmartPointer::New(); ?renderWindow->SetSize(800, 800); ? ?vtkSmartPointer renderWindowInteractor= ???vtkSmartPointer::New(); ? ? renderWindowInteractor->SetRenderWindow(renderWindow); ? ? ? // Mock renderer,mapper and actor ?vtkSmartPointer mockRenderer = ??? vtkSmartPointer::New(); ? ?renderWindow->AddRenderer(mockRenderer); ? ?vtkSmartPointer mockMapper = ???vtkSmartPointer::New(); ?mockMapper->SetInput(reader->GetOutput()); ? ?vtkSmartPointer mockActor =vtkSmartPointer::New(); ?mockActor->SetMapper(mockMapper); ?mockRenderer->AddActor(mockActor); ? ? // Set camera to thecorrect position ?mockRenderer->GetActiveCamera()->SetPosition(0, -1, 0); ?mockRenderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); ?mockRenderer->GetActiveCamera()->SetViewUp(0, 1, 0); ?mockRenderer->ResetCamera(); ? ?vtkSmartPointer selectVisiblePoints = ???vtkSmartPointer::New(); ?selectVisiblePoints->SetInput(reader->GetOutput()); ?selectVisiblePoints->SetRenderer(mockRenderer); ?selectVisiblePoints->Update(); ? ? std::cout <<"Visible nr of points = " <GetOutput()->GetNumberOfPoints() << std::endl; ? renderWindow->RemoveRenderer(mockRenderer); ? ? prints 0. ? Is it anything that I?m missing? ? Thank you, Ioana -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Thu Sep 1 11:46:34 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Thu, 1 Sep 2016 08:46:34 -0700 (MST) Subject: [vtkusers] Shadow support on volume rendering Message-ID: <1472744794523-5740094.post@n5.nabble.com> Hi all, Does VTK support rendering of shadows when performing volume rendering (GPU or otherwise)? The following post piqued my interest http://vtk.1045678.n5.nabble.com/Time-for-some-more-OpenGL2-Polygonal-Updates-td5733719.html mentioning that it was as simple as setting UseShadowsOn. This doesn't seem to work for volumes, however - the title of the post mentioning Polygonal Updates may be the clue here! I did quite a lot of experimenting with lights not following the camera, etc using the 7.0 release and a build from master with no joy. If this is not supported, is it something that has been talked about for a future version? I imagine it is a fairly complex thing to support. -- View this message in context: http://vtk.1045678.n5.nabble.com/Shadow-support-on-volume-rendering-tp5740094.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Thu Sep 1 12:00:58 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 01 Sep 2016 16:00:58 +0000 Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: <1472744794523-5740094.post@n5.nabble.com> References: <1472744794523-5740094.post@n5.nabble.com> Message-ID: You are correct in assessment that shadows are not supported for volume rendering and it didn't come out as often since shadows could actual hinder the visualization in many ways. What would be your use case for shadows for volumes? pretty picture or something more than that? I would agree that it will make things pretty for PR work may be. - Aashish On Thu, Sep 1, 2016 at 11:47 AM ianl wrote: > Hi all, > > Does VTK support rendering of shadows when performing volume rendering (GPU > or otherwise)? > > The following post piqued my interest > > http://vtk.1045678.n5.nabble.com/Time-for-some-more-OpenGL2-Polygonal-Updates-td5733719.html > mentioning that it was as simple as setting UseShadowsOn. > > This doesn't seem to work for volumes, however - the title of the post > mentioning Polygonal Updates may be the clue here! I did quite a lot of > experimenting with lights not following the camera, etc using the 7.0 > release and a build from master with no joy. > > If this is not supported, is it something that has been talked about for a > future version? I imagine it is a fairly complex thing to support. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Shadow-support-on-volume-rendering-tp5740094.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From op.cairncross at gmail.com Thu Sep 1 23:32:24 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Fri, 2 Sep 2016 13:32:24 +1000 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) Message-ID: Hi, vtk 7, msvc 14, windows 10 I've had this problem before and thought it was something bad in my tool chain. But I've rebuild everything from scratch and it's still a problem. If I do something simple like string s1 = sourceFiles->GetFileNames()->GetValue(i); it runs fine in debug mode. When I compile in RelwithDebInfo it crashes with a bad allocation. When I have a look at the object the there is garbage where the string is supposed to be. As if it hasn't been initialised. I am calling an sourceFiles->Update() beforehand. Interestingly if I do cout << sourceFiles->GetFileNames()->GetValue(i); string s1 = sourceFiles->GetFileNames()->GetValue(i); it will print to console and then crash on the next line. Is anyone else having this problem? Cheers ollie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Sep 1 23:45:24 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 1 Sep 2016 23:45:24 -0400 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: Whatever your sourceFiles->GetFileNames object has uninitialized pointers. Debug mode initializes all values to 0, release does not (in order to save run time), but this leaves you with some pointer pointing to nonsense. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross wrote: > Hi, > > vtk 7, msvc 14, windows 10 > > I've had this problem before and thought it was something bad in my tool > chain. But I've rebuild everything from scratch and it's still a problem. > > If I do something simple like > > string s1 = sourceFiles->GetFileNames()->GetValue(i); > > it runs fine in debug mode. When I compile in RelwithDebInfo it crashes > with a bad allocation. > When I have a look at the object the there is garbage where the string is > supposed to be. As if it hasn't been initialised. I am calling an > sourceFiles->Update() beforehand. > > Interestingly if I do > > cout << sourceFiles->GetFileNames()->GetValue(i); > string s1 = sourceFiles->GetFileNames()->GetValue(i); > > it will print to console and then crash on the next line. > > Is anyone else having this problem? > > Cheers > ollie > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Fri Sep 2 03:59:29 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 2 Sep 2016 00:59:29 -0700 (MST) Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: References: <1472744794523-5740094.post@n5.nabble.com> Message-ID: <1472803169307-5740103.post@n5.nabble.com> Thanks for the quick reply - I suspected as much. It was more of a case of seeing that an easy way of turning shadows on was available and of trying it out to see what it looked like to determine whether it was something we could offer our customers as an option (and it looks good at shows!). I take your point that it probably makes the visualisation more 'busy' and may hide areas in shade that would otherwise be seen. I was interested in whether a subtle shadow made depth perception a bit easier. >From a quick google, examples of renders of medical data with shadows on are few and far between. This is a fairly nice example: http://medvis.org/wp-content/uploads/2011/10/example_03.png . This may well be due to quite a lot of them being based on VTK though! Ian -- View this message in context: http://vtk.1045678.n5.nabble.com/Shadow-support-on-volume-rendering-tp5740094p5740103.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Fri Sep 2 04:26:36 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 2 Sep 2016 10:26:36 +0200 Subject: [vtkusers] VTK algorithm to clamp vtkImageData and exclude Inf/NaN? Message-ID: I need a VTK algorithm that takes a float vtkImageData as input and gives as output the input image with Inf/NaN values replaced by 0 and all other values clamped to a given range. Is there a built-in filter I can use, or should I write my own? Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdpkrshnn at gmail.com Fri Sep 2 05:48:43 2016 From: sdpkrshnn at gmail.com (sdpkrshnn) Date: Fri, 2 Sep 2016 02:48:43 -0700 (MST) Subject: [vtkusers] how to get the other part from vtkclipclosedsurface Message-ID: <1472809723863-5740105.post@n5.nabble.com> Hi, I am Cutting a mesh using vtkClipClosedSurface but it is always keeping one part and i need get the other part which is cropped ,my code is here below quad = vtk.vtkSTLReader() quad.SetFileName(vtkFile) quad.Update() mesh = quad.GetOutput() clipPlane = vtk.vtkPlane() clipPlane.SetOrigin(0,0,-54.3772147817) clipPlane.SetNormal(0,0,1) centerFilter = vtk.vtkCenterOfMass() centerFilter.SetInput(mesh) centerFilter.SetUseScalarsAsWeights(False) centerFilter.Update() center = centerFilter.GetCenter() print center transform = vtk.vtkTransform() transform.Translate(-center[0], -center[1], -center[2]) transformFilter = vtk.vtkTransformPolyDataFilter() transformFilter.SetInput(mesh) transformFilter.SetTransform(transform) transformFilter.Update() centeredPolydata = transformFilter.GetOutput() clip = vtk.vtkClipClosedSurface() clip.SetInputConnection(transformFilter.GetOutputPort()) planes = vtk.vtkPlaneCollection() planes.AddItem(clipPlane) clip.SetTolerance(10e-3) clip.SetClippingPlanes(planes) clip.Update() mesh = clip.GetOutput() polyWriter = vtk.vtkSTLWriter() polyWriter.SetInput(mesh) polyWriter.SetFileName(vtkfile) polyWriter.Write() Can any one suggest any dolution -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-get-the-other-part-from-vtkclipclosedsurface-tp5740105.html Sent from the VTK - Users mailing list archive at Nabble.com. From chenjianyyzz at 163.com Fri Sep 2 05:34:58 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 2 Sep 2016 17:34:58 +0800 (CST) Subject: [vtkusers] Activiz with VTK6.3 compile error CS1577 In-Reply-To: <2016083014390841278799@gmail.com> References: <13fc13f6.a25c.156cca745c0.Coremail.chenjianyyzz@163.com>, <2016082815293237120318@gmail.com>, <6d071d8b.a483.156d9a7a425.Coremail.chenjianyyzz@163.com> <2016083014390841278799@gmail.com> Message-ID: <23a7123a.acc8.156ea404e07.Coremail.chenjianyyzz@163.com> Hi Maogui, thank you very much for your so detail building steps. with your help, I built 6.2 successfully. now I am facing some exception while using the built lib, such as : 1. ?????:?System.AccessViolationException????????????Kitware.VTK.dll ??? 2. ?????:?System.Exception?(?? Kitware.mummy.Runtime.dll ?) but I think that's no-related to the building of Activiz. BTW: have you successfully build the Activiz with VTK7.0? Thanks again. Best Regards James ? 2016-08-30 14:39:10?"maogui.hu" ??? Hi James, Here was my main build process, for your reference. Object: ActiViz.NET 6.3 for .net 4.0. 1. A new installed Win7 32-bit professional system in a vmware virtural machine. The building process was done in the virtual machine. 2. Install vs2008 trial, and vs2010 trial for .net framework 4.0 (maybe vs2010 is unnecessary if .net frame 4.0 runtime is available). 3. Install cmake-2.8.8-win32-x86.exe 4. Download CVS from http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/cvs-1-11-22.zip, unzipped and copy cvs.exe to C:\Windows\System32. Make sure the virtual machine can connet the network because it will download mummyExternalSourceTrees later. 5. Download the patched activiz.net and mummy source (thanks to Mark DeArman) https://onedrive.live.com/redir?resid=C21891647818579A!108957&authkey=!ADS9VLyqTef24FY&ithint=folder%2c Unzip the Kitware_Source.7z, you'll get activizdotnet, gccxml, mummy, and VTK-6.2.0 folders. Replace the VTK-6.2.0 with VTK-6.3 from http://www.vtk.org/download/. Folder tree, for example, C:\VTK\activizdotnet C:\VTK\gccxml C:\VTK\mummy C:\VTK\VTK-6.3.0 The following configure and build process can be found from http://www.vtk.org/Wiki/VTK/CSharp/ActiViz/Build#Visual_Studio_2005_or_2008_.28gccxml_does_not_yet_work_with_Visual_Studio_2010.29 6. Build gccxml (1) Configure gccxml, select Visual Studio 9 2008 compiler; (2) Build the generated gccxml.sln with VS 2008 (release ) and INSTALL it. (3) Run the gccxml_vcconfig.bat (can be found in the gccxml installation directory 'C:/Program Files/gccxml') in Visual Studio 2008 Command Prompt as adminstrator. 7. Build mummy (1) in Visual Studio 2008 Command Prompt or Visual Studio Command Prompt (2010), run the command: sn -k C:\VTK\mummy\Runtime\HUMG.mummy.Runtime.snk (2) open C:\VTK\mummy\Runtime\CMakeLists.txt, search "IF(NOT Mummy_SNKEYFILE)", and insert the following sentence above it. GET_FILENAME_COMPONENT(Mummy_SNKEYFILE "${CMAKE_CURRENT_SOURCE_DIR}/HUMG.mummy.Runtime.snk" ABSOLUTE) (3) open C:\VTK\mummy\CMakeLists.txt, insert the following block below the first line "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3 FATAL_ERROR)": SET(gccxml_compiler "${CMAKE_CXX_COMPILER}") IF(MSVC80) SET(gccxml_compiler "msvc8") ENDIF(MSVC80) IF(MSVC90) SET(gccxml_compiler "msvc9") ENDIF(MSVC90) SET (GCCXML_EXTRA_D_ARGS "_HAS_TR1=0") (4) open C:\VTK\mummy\Examples\Vehicles\wrappers\csharpmummy\CMakeLists.txt, find the block (near line 82) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header_fullpath} ${gccxml_EXECUTABLE} replace it with the following block: ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx -D${GCCXML_EXTRA_D_ARGS} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header_fullpath} ${gccxml_EXECUTABLE} ) (5) Configure the mummy in CMake with Visual Studio 9 2008 Change options: gccxml_EXECUTABLE='C:/Program Files/gccxml/bin/gccxml.exe' csc_EXECUTABLE='C:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe' (6) Build the Mummy.sln and INSTALL it. An error might occur when build the INSTALL project: 1> file INSTALL cannot find "C:/VTK/mummy/build/bin/x64/Release/Kitware.mummy.Runtime.dll". My solution is: copy all files from C:/VTK/mummy/build/bin/Release to C:/VTK/mummy/build/bin/x64/Release, and INSTALL again. Then delete the C:/VTK/mummy/build/bin/x64/Release. 8. Build VTK-6.3.0 with default. 9. Build activizdotnet (1) in Visual Studio 2008 Command Prompt or Visual Studio Command Prompt (2010), run the command: sn -k C:\VTK\activizdotnet\HUMG.VTK.snk (2) open C:\VTK\activizdotnet\CMakeLists.txt, search "if(AVDN_SNKEYFILE STREQUAL "")", and insert the following sentence above it. GET_FILENAME_COMPONENT(AVDN_SNKEYFILE "${CMAKE_CURRENT_SOURCE_DIR}/HUMG.VTK.snk" ABSOLUTE) (3) search the block set(gccxml_compiler "${CMAKE_CXX_COMPILER}") if(MSVC80) set(gccxml_compiler "msvc8") endif() if(MSVC90) set(gccxml_compiler "msvc9") endif() Insert the line below the block: SET (GCCXML_EXTRA_D_ARGS "_HAS_TR1=0") (4) search the block : add_custom_command( OUTPUT ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} -fxml=${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx DEPENDS ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header} ${gccxml_EXECUTABLE} ) Replace it with: ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx -D${GCCXML_EXTRA_D_ARGS} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header} ${gccxml_EXECUTABLE} ) (5) search "vtkRenderingFreeTypeOpenGL", delete it. (The library is removed from VTK 6.3) (6) Configure the activizdotnet with CMake with Visual Studio 9 2008 Change options: gccxml_EXECUTABLE='C:/Program Files/gccxml/bin/gccxml.exe' csc_EXECUTABLE='C:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe' AVDN_SNKEYFILE='C:/VTK/activizdotnet/HUMG.VTK.snk' AVDN_BUILD_CSHARP_DEBUG=OFF (7) Open the generated ActiVizDotNet.sln in VS 2008, changed to release mode. ALL_BUILD, then INSTALL. Some errors: 1) the following error occur for some projects: error LNK2019: unresolved external symbol "void __cdecl vtkRenderingContextOpenGL_AutoInit_Construct(void) SOLUTION: add "C:\VTK\VTK-6.3.0\build\lib\Release\vtkRenderingContextOpenGL-6.3.lib" to the project's C++ link list 2) "vtkOpenGLFreeTypeTextMapper" not found, double click the error to found the error position, then just comment out the sentences: using (Kitware.VTK.vtkOpenGLFreeTypeTextMapper o = Kitware.VTK.vtkOpenGLFreeTypeTextMapper.New()) { s = o.ToString(); } 3) vtkCommonEL_dll, vtkGraphicsEL_dll not found. Replace them with vtkCommonCoreEL_dll, vtkFiltersProgrammableEL_dll, respectively. That's ALL. If you use the VTK-6.2.0 instead of VTK-6.3.0, there might be less build errors. Good luck! Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research Chinese Academy of Sciences A11, Datun Road Beijing 100101, China Tel: +86 10-64889055 Fax: +86 10-64889630 Email: humg at Lreis.ac.cn ???? chenjianyyzz ????? 2016-08-30 12:14 ???? maogui.hu ??? vtkusers ??? Re:Re: [vtkusers] Activiz with VTK6.3 compile error CS1577 Hi Miaogui, thank you very much for your reply. using the link from your mail, I try to compile the mummy, but I meet the error as: 3>error CS1577: ??????? -- ?????????????????Kitware.mummy.Runtime.Unmanaged.dll? I think it's the problem of "strong name signed" .NET Framework binaries, but I cannot figure how to handle it. I have generated my own SNK and name it the same as the default one "Kitware.mummy.Runtime.pub.snk", and replace the default oone under the folder "mummy\Runtime", then I use cmake to generate the mummy solution, and compile it, then I got the error above. I spent quite a lot of time searching online but cannot figure it out, will you please be kind helping me how to handle this problem? Thanks James At 2016-08-28 15:29:34, "maogui.hu" wrote: James, I don't know the reason of your errors since it's incomplete. However, from my painful experience, a right CMake version might be one of the important thing in building ActiViz.. You must choose an older version rather than the newest! For example, CMake 2.8.8 works well for me. If you compile ActiViz.Net with .NET 4.0, the patched ActiViz.net and mummy source by Mark DeArman is suggested. They can be downloaded from: https://onedrive.live.com/redir?resid=C21891647818579A!108957&authkey=!ADS9VLyqTef24FY&ithint=folder%2c Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research Chinese Academy of Sciences A11, Datun Road Beijing 100101, China Tel: +86 10-64889055 Fax: +86 10-64889630 Email: humg at Lreis.ac.cn ???? chenjianyyzz ????? 2016-08-27 23:38 ???? vtkusers ??? [vtkusers] Activiz with VTK6.3 compile error CS1577 Hello, I try to compile Activiz with VTK6.3, using the activizdotnet from zamirkhan in GIt, unfortunately I meet the error of error CS1577, attached please see the screenshot, unfortunately some Chinese character insided, but from where you still can see what the error is. actually I have already generate myself snk, and I check the "Kitware.VTK.CscArgs.txt", where I am sure the snk file path is correct. can anyone help me to figure it out what's the problem and how to solve it? Thanks in advance. James -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Fri Sep 2 06:10:15 2016 From: josp.jorge at gmail.com (Jorge Perez) Date: Fri, 2 Sep 2016 12:10:15 +0200 Subject: [vtkusers] how to get the other part from vtkclipclosedsurface In-Reply-To: <1472809723863-5740105.post@n5.nabble.com> References: <1472809723863-5740105.post@n5.nabble.com> Message-ID: Hi, try inverting the normal of the plane clipPlane.SetNormal(0,0,-1) 2016-09-02 11:48 GMT+02:00 sdpkrshnn : > Hi, > I am Cutting a mesh using vtkClipClosedSurface but it is always keeping > one > part and i need get the other part which is cropped ,my code is here below > > quad = vtk.vtkSTLReader() > quad.SetFileName(vtkFile) > quad.Update() > mesh = quad.GetOutput() > > clipPlane = vtk.vtkPlane() > clipPlane.SetOrigin(0,0,-54.3772147817) > clipPlane.SetNormal(0,0,1) > > centerFilter = vtk.vtkCenterOfMass() > centerFilter.SetInput(mesh) > centerFilter.SetUseScalarsAsWeights(False) > centerFilter.Update() > center = centerFilter.GetCenter() > print center > > transform = vtk.vtkTransform() > transform.Translate(-center[0], -center[1], -center[2]) > transformFilter = vtk.vtkTransformPolyDataFilter() > transformFilter.SetInput(mesh) > transformFilter.SetTransform(transform) > transformFilter.Update() > centeredPolydata = transformFilter.GetOutput() > > clip = vtk.vtkClipClosedSurface() > clip.SetInputConnection(transformFilter.GetOutputPort()) > planes = vtk.vtkPlaneCollection() > planes.AddItem(clipPlane) > clip.SetTolerance(10e-3) > clip.SetClippingPlanes(planes) > clip.Update() > mesh = clip.GetOutput() > > polyWriter = vtk.vtkSTLWriter() > polyWriter.SetInput(mesh) > polyWriter.SetFileName(vtkfile) > polyWriter.Write() > > Can any one suggest any dolution > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/how-to-get-the-other-part-from-vtkclipclosedsurface-tp5740105.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 2 08:00:48 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 2 Sep 2016 14:00:48 +0200 Subject: [vtkusers] VTK algorithm to clamp vtkImageData and exclude Inf/NaN? In-Reply-To: References: Message-ID: 2016-09-02 10:26 GMT+02:00 Elvis Stansvik : > I need a VTK algorithm that takes a float vtkImageData as input and gives > as output the input image with Inf/NaN values replaced by 0 and all other > values clamped to a given range. Is there a built-in filter I can use, or > should I write my own? > Nevermind, I found vtkImageThreshold which does what I want. Elvis > > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 2 10:10:20 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 2 Sep 2016 16:10:20 +0200 Subject: [vtkusers] vtkImageHistogramStatistics but exclude values below a certain threshold? Message-ID: I'd like to use vtkImageHistogramStatistics to compute min, max, mean, std et.c, but exclude values in the input image that fall below a certain threshold. Is this possible somehow? Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 2 10:19:31 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 2 Sep 2016 08:19:31 -0600 Subject: [vtkusers] vtkImageHistogramStatistics but exclude values below a certain threshold? In-Reply-To: References: Message-ID: Hi Elvis, Yes, by using a stencil. It requires an extra step. First, you need to make a stencil with vtkImageToImageStencil. The API of this filter is similar to vtkImageThreshold, but instead of outputting a vtkImageData, it outputs a vtkImageStencilData. The vtkImageStencilData object is a run-length compressed binary image, i.e. it is a mask. Second, you need to pass the stencil to vtkImageHistogramStatistics via the SetStencilConnection() method or via the SetStencilData() method. The result: the stats are only computed for the voxels that are inside the stencil. - David On Fri, Sep 2, 2016 at 8:10 AM, Elvis Stansvik wrote: > I'd like to use vtkImageHistogramStatistics to compute min, max, mean, std > et.c, but exclude values in the input image that fall below a certain > threshold. Is this possible somehow? > > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.giord at gmail.com Fri Sep 2 10:21:45 2016 From: marco.giord at gmail.com (marco giordano) Date: Fri, 2 Sep 2016 16:21:45 +0200 Subject: [vtkusers] Build link error in VTK 7.0.0 with Python wrap Message-ID: Dear users, I try to build VTK with python wrap on Windows 7. My configuration is MS Visual Studio 2013, VTK 7.0.0, CMake 3.2.2, Release mode, Python 3.4 (also tried Python 2.7 but same story) I provided the following flags in Cmake: BUILD_SHARED_LIBS:BOOL=ON VTK_WRAP_PYTHON:BOOL=ON PYTHON_EXECUTABLE:FILEPATH=C:/Python34/python.exe PYTHON_INCLUDE_DIR:PATH=C:/Python34/include PYTHON_LIBRARY:FILEPATH=C:/Python34/libs/python34.lib but I get a series of link errors like these: Error 1 error LNK2001: unresolved external symbol __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\PythonCore\PyVTKMutableObject.obj vtkWrappingPythonCore Error 2 error LNK2001: unresolved external symbol __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\PythonCore\PyVTKObject.obj vtkWrappingPythonCore Error 3 error LNK2019: unresolved external symbol __imp_PyType_IsSubtype referenced in function "bool __cdecl vtkPythonGetLongLongValue<__int64>(struct _object *,__int64 &)" (??$vtkPythonGetLongLongValue at _J@@YA_NPEAU_object@@AEA_J at Z) D:\VTK-7.0.0\bin\Wrapping\PythonCore\vtkPythonArgs.obj vtkWrappingPythonCore Probably I am doing some very basic errors but after several tries I can't figure out what. Please any help is appreciated. Regards -- Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 2 10:40:01 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 2 Sep 2016 08:40:01 -0600 Subject: [vtkusers] Build link error in VTK 7.0.0 with Python wrap In-Reply-To: References: Message-ID: Could it be a 32-bit VTK build against a 64-bit Python or vice-versa? What Python package are you using? On Fri, Sep 2, 2016 at 8:21 AM, marco giordano wrote: > Dear users, > > I try to build VTK with python wrap on Windows 7. My configuration is MS > Visual Studio 2013, > VTK 7.0.0, CMake 3.2.2, Release mode, Python 3.4 (also tried Python 2.7 > but same story) > > I provided the following flags in Cmake: > > BUILD_SHARED_LIBS:BOOL=ON > VTK_WRAP_PYTHON:BOOL=ON > PYTHON_EXECUTABLE:FILEPATH=C:/Python34/python.exe > PYTHON_INCLUDE_DIR:PATH=C:/Python34/include > PYTHON_LIBRARY:FILEPATH=C:/Python34/libs/python34.lib > > but I get a series of link errors like these: > > Error 1 error LNK2001: unresolved external symbol > __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\ > PythonCore\PyVTKMutableObject.obj vtkWrappingPythonCore > Error 2 error LNK2001: unresolved external symbol > __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\PythonCore\PyVTKObject.obj > vtkWrappingPythonCore > Error 3 error LNK2019: unresolved external symbol > __imp_PyType_IsSubtype referenced in function "bool __cdecl > vtkPythonGetLongLongValue<__int64>(struct _object *,__int64 &)" > (??$vtkPythonGetLongLongValue at _J@@YA_NPEAU_object@@AEA_J at Z) > D:\VTK-7.0.0\bin\Wrapping\PythonCore\vtkPythonArgs.obj > vtkWrappingPythonCore > > > Probably I am doing some very basic errors but after several tries I can't > figure out what. > Please any help is appreciated. > > Regards > > -- > Marco > -------------- next part -------------- An HTML attachment was scrubbed... URL: From maogui.hu at gmail.com Fri Sep 2 10:54:27 2016 From: maogui.hu at gmail.com (maogui.hu) Date: Fri, 2 Sep 2016 22:54:27 +0800 Subject: [vtkusers] Activiz with VTK6.3 compile error CS1577 References: <13fc13f6.a25c.156cca745c0.Coremail.chenjianyyzz@163.com>, <2016082815293237120318@gmail.com>, <6d071d8b.a483.156d9a7a425.Coremail.chenjianyyzz@163.com>, <2016083014390841278799@gmail.com>, <23a7123a.acc8.156ea404e07.Coremail.chenjianyyzz@163.com> Message-ID: <201609022254239884477@gmail.com> Hi James, I'm very glad you build Activiz6.2 succesfully. For your exceptions, a simple reproducible code might be helpful to find the reason. I haven't try to build 7.0 yet. Maogui ???? chenjianyyzz ????? 2016-09-02 17:34 ???? maogui.hu ??? vtkusers ??? Re:Re: Re: [vtkusers] Activiz with VTK6.3 compile error CS1577 Hi Maogui, thank you very much for your so detail building steps. with your help, I built 6.2 successfully. now I am facing some exception while using the built lib, such as : 1. ?????:?System.AccessViolationException????????????Kitware.VTK.dll ??? 2. ?????:?System.Exception?(?? Kitware.mummy.Runtime.dll ?) but I think that's no-related to the building of Activiz. BTW: have you successfully build the Activiz with VTK7.0? Thanks again. Best Regards James ? 2016-08-30 14:39:10?"maogui.hu" ??? Hi James, Here was my main build process, for your reference. Object: ActiViz.NET 6.3 for .net 4.0. 1. A new installed Win7 32-bit professional system in a vmware virtural machine. The building process was done in the virtual machine. 2. Install vs2008 trial, and vs2010 trial for .net framework 4.0 (maybe vs2010 is unnecessary if .net frame 4.0 runtime is available). 3. Install cmake-2.8.8-win32-x86.exe 4. Download CVS from http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/cvs-1-11-22.zip, unzipped and copy cvs.exe to C:\Windows\System32. Make sure the virtual machine can connet the network because it will download mummyExternalSourceTrees later. 5. Download the patched activiz.net and mummy source (thanks to Mark DeArman) https://onedrive.live.com/redir?resid=C21891647818579A!108957&authkey=!ADS9VLyqTef24FY&ithint=folder%2c Unzip the Kitware_Source.7z, you'll get activizdotnet, gccxml, mummy, and VTK-6.2.0 folders. Replace the VTK-6.2.0 with VTK-6.3 from http://www.vtk.org/download/. Folder tree, for example, C:\VTK\activizdotnet C:\VTK\gccxml C:\VTK\mummy C:\VTK\VTK-6.3.0 The following configure and build process can be found from http://www.vtk.org/Wiki/VTK/CSharp/ActiViz/Build#Visual_Studio_2005_or_2008_.28gccxml_does_not_yet_work_with_Visual_Studio_2010.29 6. Build gccxml (1) Configure gccxml, select Visual Studio 9 2008 compiler; (2) Build the generated gccxml.sln with VS 2008 (release ) and INSTALL it. (3) Run the gccxml_vcconfig.bat (can be found in the gccxml installation directory 'C:/Program Files/gccxml') in Visual Studio 2008 Command Prompt as adminstrator. 7. Build mummy (1) in Visual Studio 2008 Command Prompt or Visual Studio Command Prompt (2010), run the command: sn -k C:\VTK\mummy\Runtime\HUMG.mummy.Runtime.snk (2) open C:\VTK\mummy\Runtime\CMakeLists.txt, search "IF(NOT Mummy_SNKEYFILE)", and insert the following sentence above it. GET_FILENAME_COMPONENT(Mummy_SNKEYFILE "${CMAKE_CURRENT_SOURCE_DIR}/HUMG.mummy.Runtime.snk" ABSOLUTE) (3) open C:\VTK\mummy\CMakeLists.txt, insert the following block below the first line "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3 FATAL_ERROR)": SET(gccxml_compiler "${CMAKE_CXX_COMPILER}") IF(MSVC80) SET(gccxml_compiler "msvc8") ENDIF(MSVC80) IF(MSVC90) SET(gccxml_compiler "msvc9") ENDIF(MSVC90) SET (GCCXML_EXTRA_D_ARGS "_HAS_TR1=0") (4) open C:\VTK\mummy\Examples\Vehicles\wrappers\csharpmummy\CMakeLists.txt, find the block (near line 82) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header_fullpath} ${gccxml_EXECUTABLE} replace it with the following block: ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx -D${GCCXML_EXTRA_D_ARGS} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header_fullpath} ${gccxml_EXECUTABLE} ) (5) Configure the mummy in CMake with Visual Studio 9 2008 Change options: gccxml_EXECUTABLE='C:/Program Files/gccxml/bin/gccxml.exe' csc_EXECUTABLE='C:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe' (6) Build the Mummy.sln and INSTALL it. An error might occur when build the INSTALL project: 1> file INSTALL cannot find "C:/VTK/mummy/build/bin/x64/Release/Kitware.mummy.Runtime.dll". My solution is: copy all files from C:/VTK/mummy/build/bin/Release to C:/VTK/mummy/build/bin/x64/Release, and INSTALL again. Then delete the C:/VTK/mummy/build/bin/x64/Release. 8. Build VTK-6.3.0 with default. 9. Build activizdotnet (1) in Visual Studio 2008 Command Prompt or Visual Studio Command Prompt (2010), run the command: sn -k C:\VTK\activizdotnet\HUMG.VTK.snk (2) open C:\VTK\activizdotnet\CMakeLists.txt, search "if(AVDN_SNKEYFILE STREQUAL "")", and insert the following sentence above it. GET_FILENAME_COMPONENT(AVDN_SNKEYFILE "${CMAKE_CURRENT_SOURCE_DIR}/HUMG.VTK.snk" ABSOLUTE) (3) search the block set(gccxml_compiler "${CMAKE_CXX_COMPILER}") if(MSVC80) set(gccxml_compiler "msvc8") endif() if(MSVC90) set(gccxml_compiler "msvc9") endif() Insert the line below the block: SET (GCCXML_EXTRA_D_ARGS "_HAS_TR1=0") (4) search the block : add_custom_command( OUTPUT ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} -fxml=${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx DEPENDS ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header} ${gccxml_EXECUTABLE} ) Replace it with: ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml COMMAND ${gccxml_EXECUTABLE} ARGS -fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml -fxml-start=_cable_ ${gccxml_include_args} -DCABLE_CONFIGURATION --gccxml-compiler ${gccxml_compiler} ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx -D${GCCXML_EXTRA_D_ARGS} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx ${header} ${gccxml_EXECUTABLE} ) (5) search "vtkRenderingFreeTypeOpenGL", delete it. (The library is removed from VTK 6.3) (6) Configure the activizdotnet with CMake with Visual Studio 9 2008 Change options: gccxml_EXECUTABLE='C:/Program Files/gccxml/bin/gccxml.exe' csc_EXECUTABLE='C:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe' AVDN_SNKEYFILE='C:/VTK/activizdotnet/HUMG.VTK.snk' AVDN_BUILD_CSHARP_DEBUG=OFF (7) Open the generated ActiVizDotNet.sln in VS 2008, changed to release mode. ALL_BUILD, then INSTALL. Some errors: 1) the following error occur for some projects: error LNK2019: unresolved external symbol "void __cdecl vtkRenderingContextOpenGL_AutoInit_Construct(void) SOLUTION: add "C:\VTK\VTK-6.3.0\build\lib\Release\vtkRenderingContextOpenGL-6.3.lib" to the project's C++ link list 2) "vtkOpenGLFreeTypeTextMapper" not found, double click the error to found the error position, then just comment out the sentences: using (Kitware.VTK.vtkOpenGLFreeTypeTextMapper o = Kitware.VTK.vtkOpenGLFreeTypeTextMapper.New()) { s = o.ToString(); } 3) vtkCommonEL_dll, vtkGraphicsEL_dll not found. Replace them with vtkCommonCoreEL_dll, vtkFiltersProgrammableEL_dll, respectively. That's ALL. If you use the VTK-6.2.0 instead of VTK-6.3.0, there might be less build errors. Good luck! Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research Chinese Academy of Sciences A11, Datun Road Beijing 100101, China Tel: +86 10-64889055 Fax: +86 10-64889630 Email: humg at Lreis.ac.cn ???? chenjianyyzz ????? 2016-08-30 12:14 ???? maogui.hu ??? vtkusers ??? Re:Re: [vtkusers] Activiz with VTK6.3 compile error CS1577 Hi Miaogui, thank you very much for your reply. using the link from your mail, I try to compile the mummy, but I meet the error as: 3>error CS1577: ??????? -- ?????????????????Kitware.mummy.Runtime.Unmanaged.dll? I think it's the problem of "strong name signed" .NET Framework binaries, but I cannot figure how to handle it. I have generated my own SNK and name it the same as the default one "Kitware.mummy.Runtime.pub.snk", and replace the default oone under the folder "mummy\Runtime", then I use cmake to generate the mummy solution, and compile it, then I got the error above. I spent quite a lot of time searching online but cannot figure it out, will you please be kind helping me how to handle this problem? Thanks James At 2016-08-28 15:29:34, "maogui.hu" wrote: James, I don't know the reason of your errors since it's incomplete. However, from my painful experience, a right CMake version might be one of the important thing in building ActiViz.. You must choose an older version rather than the newest! For example, CMake 2.8.8 works well for me. If you compile ActiViz.Net with .NET 4.0, the patched ActiViz.net and mummy source by Mark DeArman is suggested. They can be downloaded from: https://onedrive.live.com/redir?resid=C21891647818579A!108957&authkey=!ADS9VLyqTef24FY&ithint=folder%2c Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research Chinese Academy of Sciences A11, Datun Road Beijing 100101, China Tel: +86 10-64889055 Fax: +86 10-64889630 Email: humg at Lreis.ac.cn ???? chenjianyyzz ????? 2016-08-27 23:38 ???? vtkusers ??? [vtkusers] Activiz with VTK6.3 compile error CS1577 Hello, I try to compile Activiz with VTK6.3, using the activizdotnet from zamirkhan in GIt, unfortunately I meet the error of error CS1577, attached please see the screenshot, unfortunately some Chinese character insided, but from where you still can see what the error is. actually I have already generate myself snk, and I check the "Kitware.VTK.CscArgs.txt", where I am sure the snk file path is correct. can anyone help me to figure it out what's the problem and how to solve it? Thanks in advance. James -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentrivola at hotmail.com Fri Sep 2 11:06:04 2016 From: vincentrivola at hotmail.com (vincentrivola) Date: Fri, 2 Sep 2016 08:06:04 -0700 (MST) Subject: [vtkusers] How to compute streamline length? Message-ID: <1472828764666-5740114.post@n5.nabble.com> Dear all,I am looking for a simple (and as fast as possible) way to get the curvilinear / arc length of a streamline generated using the vtkStreamTracer filter.Is it it possible to get it directly as an output?So far I did an ugly workaround but I would like to get something faster. My current code uses vtkThreshold to select streamlines one by one and a sort filter in order to compute the length of each segment of each streamline and then sum them to get the curvilinear length of a streamline. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-compute-streamline-length-tp5740114.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 2 11:10:58 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 2 Sep 2016 17:10:58 +0200 Subject: [vtkusers] vtkImageHistogramStatistics but exclude values below a certain threshold? In-Reply-To: References: Message-ID: 2016-09-02 16:19 GMT+02:00 David Gobbi : > Hi Elvis, > > Yes, by using a stencil. It requires an extra step. > > First, you need to make a stencil with vtkImageToImageStencil. The API of > this filter is similar to vtkImageThreshold, but instead of outputting a > vtkImageData, it outputs a vtkImageStencilData. The vtkImageStencilData > object is a run-length compressed binary image, i.e. it is a mask. > > Second, you need to pass the stencil to vtkImageHistogramStatistics via > the SetStencilConnection() method or via the SetStencilData() method. > > The result: the stats are only computed for the voxels that are inside the > stencil. > Excellent, many thanks David. Elvis > > - David > > > > On Fri, Sep 2, 2016 at 8:10 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> I'd like to use vtkImageHistogramStatistics to compute min, max, mean, >> std et.c, but exclude values in the input image that fall below a certain >> threshold. Is this possible somehow? >> >> Thanks, >> Elvis >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Sep 2 11:54:13 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 2 Sep 2016 11:54:13 -0400 Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: <1472803169307-5740103.post@n5.nabble.com> References: <1472744794523-5740094.post@n5.nabble.com> <1472803169307-5740103.post@n5.nabble.com> Message-ID: We are working toward that via Rendering/OSPRay, stay tuned. It will be a few months probably. First we have to expose volumes, then OSPRay's volumes have to support shadows. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Sep 2, 2016 at 3:59 AM, ianl wrote: > Thanks for the quick reply - I suspected as much. > > It was more of a case of seeing that an easy way of turning shadows on was > available and of trying it out to see what it looked like to determine > whether it was something we could offer our customers as an option (and it > looks good at shows!). > > I take your point that it probably makes the visualisation more 'busy' and > may hide areas in shade that would otherwise be seen. I was interested in > whether a subtle shadow made depth perception a bit easier. > > From a quick google, examples of renders of medical data with shadows on > are > few and far between. This is a fairly nice example: > http://medvis.org/wp-content/uploads/2011/10/example_03.png . This may > well > be due to quite a lot of them being based on VTK though! > > Ian > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Shadow-support-on-volume-rendering-tp5740094p5740103.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hongzhi at stanford.edu Fri Sep 2 14:46:34 2016 From: hongzhi at stanford.edu (Hongzhi Lan) Date: Fri, 2 Sep 2016 18:46:34 +0000 Subject: [vtkusers] Z buffer issue of QVTKWidget in Linux Message-ID: Hi all, Recently I have an issue with QVTKWidget in my new dell computer. It didn't happen in any of my other computers. I think it's a z buffer issue? I combined two examples from http://www.vtk.org/Wiki/VTK/Examples/Cxx to reproduce the issue (see the attached image). The image slice is supposed to insert into the sphere but it doesn't render in this way in my case. The sphere looks not ok either. I know someone mentioned this issue before, but it's not solved yet, so I hope to get some help about it. I also tried to use QVTKWidget2 and was able to compile successfully, but when I ran it, I got the error below and a black renderwindow. I really want to get QVTKWidget or QVTKWidget work for my case. Any suggestions? My computer configurations are: ---------------------------------------------- Dell desktop OptiPlex 7040 CPU: Intel? Core? i7-6700 CPU @ 3.40GHz ? 8 Graphics: Intel? HD Graphics 530 (Skylake GT2) OS: Linux Ubuntu 14.04.5 64bit VTK: 6.2 Qt: 5.4.2 Thanks a lot! Hongzhi =========================== ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRepresentationPainter.cxx, line 128 vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 52 failed after ReleaseAllLists 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 127 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after ReleaseGraphicsResources 1 OpenGL errors detected 0 : (1280) Invalid enum -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 24307 bytes Desc: example.png URL: From hongzhi at stanford.edu Fri Sep 2 15:18:51 2016 From: hongzhi at stanford.edu (Hongzhi Lan) Date: Fri, 2 Sep 2016 19:18:51 +0000 Subject: [vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode Message-ID: Hi all, I recently tested the example RenderWindowNoUiFile from VTK in Mac ,and found the renderwindow only occupies the left-bottom quarter of the QVTKWidget (shown in the attached image). I know someone mentioned this issue and you can avoid it by using "Open in Low Resolution". But with a very good high(retina) resolution mac computer, you can only open a Qt-vtk-dependent application in "Low Resolution" and get a blurry GUI, which seems not ok to users who are using high resolution mac computer. I was wondering if vtk developers will fix this issue in the nearest future. By doing some web search, I know the reason is: In Hidpi (such as retina resolution in macbook pro), 1x1 pixel becomes 2x2 pixels. Qt can recognize it, so the widget size is right, but vtk can't, so vtkRenderWindow only occupies a quarter of the widget size. I tried to modify the source code of QVTKWidget class by doubling the size of vtkRenderingWindow in the QVTKWidget, but it did't change anything. So it's not so straightforward as I expected. Can anyone give me some suggestion about how to fix the issue and what classes I need to modify? Thanks a lot! Hongzhi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example2.png Type: image/png Size: 30395 bytes Desc: example2.png URL: From sean at rogue-research.com Fri Sep 2 15:44:48 2016 From: sean at rogue-research.com (Sean McBride) Date: Fri, 2 Sep 2016 15:44:48 -0400 Subject: [vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode In-Reply-To: References: Message-ID: <20160902194448.516800025@mail.rogue-research.com> On Fri, 2 Sep 2016 19:18:51 +0000, Hongzhi Lan said: >I recently tested the example RenderWindowNoUiFile from VTK in Mac ,and >found the renderwindow only occupies the left-bottom quarter of the >QVTKWidget (shown in the attached image). I know someone mentioned this >issue and you can avoid it by using "Open in Low Resolution". But with a >very good high(retina) resolution mac computer, you can only open a Qt- >vtk-dependent application in "Low Resolution" and get a blurry GUI, >which seems not ok to users who are using high resolution mac computer. >I was wondering if vtk developers will fix this issue in the nearest future. > > >By doing some web search, I know the reason is: In Hidpi (such as retina >resolution in macbook pro), 1x1 pixel becomes 2x2 pixels. Qt can >recognize it, so the widget size is right, but vtk can't, so >vtkRenderWindow only occupies a quarter of the widget size. I tried to >modify the source code of QVTKWidget class by doubling the size of >vtkRenderingWindow in the QVTKWidget, but it did't change anything. So >it's not so straightforward as I expected. Can anyone give me some >suggestion about how to fix the issue and what classes I need to modify? Can you try with this patch? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From hongzhi at stanford.edu Fri Sep 2 19:00:01 2016 From: hongzhi at stanford.edu (Hongzhi Lan) Date: Fri, 2 Sep 2016 23:00:01 +0000 Subject: [vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode In-Reply-To: <20160902194448.516800025@mail.rogue-research.com> References: ,<20160902194448.516800025@mail.rogue-research.com> Message-ID: Hi Sean, Thank for the advice. I tried the patch, but it doesn't work. The vtkrenderwindow still occupies the left-bottom quarter of widget. Best, Hongzhi ________________________________ From: Sean McBride Sent: Friday, September 2, 2016 12:44:48 PM To: Hongzhi Lan; vtkusers at vtk.org Subject: Re: [vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode On Fri, 2 Sep 2016 19:18:51 +0000, Hongzhi Lan said: >I recently tested the example RenderWindowNoUiFile from VTK in Mac ,and >found the renderwindow only occupies the left-bottom quarter of the >QVTKWidget (shown in the attached image). I know someone mentioned this >issue and you can avoid it by using "Open in Low Resolution". But with a >very good high(retina) resolution mac computer, you can only open a Qt- >vtk-dependent application in "Low Resolution" and get a blurry GUI, >which seems not ok to users who are using high resolution mac computer. >I was wondering if vtk developers will fix this issue in the nearest future. > > >By doing some web search, I know the reason is: In Hidpi (such as retina >resolution in macbook pro), 1x1 pixel becomes 2x2 pixels. Qt can >recognize it, so the widget size is right, but vtk can't, so >vtkRenderWindow only occupies a quarter of the widget size. I tried to >modify the source code of QVTKWidget class by doubling the size of >vtkRenderingWindow in the QVTKWidget, but it did't change anything. So >it's not so straightforward as I expected. Can anyone give me some >suggestion about how to fix the issue and what classes I need to modify? Can you try with this patch? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada -------------- next part -------------- An HTML attachment was scrubbed... URL: From libby.mccord at ceptontech.com Fri Sep 2 20:25:15 2016 From: libby.mccord at ceptontech.com (Libby McCord) Date: Sat, 3 Sep 2016 00:25:15 +0000 Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 Message-ID: I have recently downloaded vtk 7.0. I'm a newbie, and my ultimate goal is to be able to use QT with the Point Cloud Visualizer. (Point Cloud 1.8) I'm on a windows 64 bit 10.0 system and will be building on msvc 2015, but haven't made it to the compilation step yet. I have installed QT 5.7 from the online installer from QT. During step 4 of http://www.vtk.org/Wiki/VTK/Building/Windows, I get the following error during configure: Does this mean I need to installed QT 4 instead??? CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindQt4.cmake:1328 (message): Found unsuitable Qt version "5.7.0" from C:/Qt/5.7/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) VTK/Building/Windows - KitwarePublic www.vtk.org Building VTK on Windows using Visual Studio (from a zip/tar file) Note: VTK uses the standard approach for building CMake based projects on Windows. Can someone help??? Thanks! Libby -------------- next part -------------- An HTML attachment was scrubbed... URL: From op.cairncross at gmail.com Sat Sep 3 01:49:35 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Sat, 3 Sep 2016 15:49:35 +1000 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: (Oh sorry I'll copy it down) What I'm doing is pretty straight forward. I haven't changed the vtk code at all. vtkDirectory * sourceDir = vtkDirectory::New(); sourceDir->Open(sourceString.c_str()); vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); sourceFiles->SkipDirectoriesOn(); sourceFiles->NumericSortOff(); sourceFiles->SetInputFileNames(sourceDir->GetFiles()); sourceFiles->Update(); for (int i = 0; i < targetArray->GetNumberOfValues(); i++) { string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! } Thanks Ollie On 3 September 2016 at 00:02, David E DeMarle wrote: > You forgot to reply all to keep the discussion on the mailing list for > posterity. > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross > wrote: > >> What I'm doing is pretty straight forward. I haven't changed the vtk code >> at all. >> >> vtkDirectory * sourceDir = vtkDirectory::New(); >> sourceDir->Open(sourceString.c_str()); >> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >> sourceFiles->SkipDirectoriesOn(); >> sourceFiles->NumericSortOff(); >> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >> sourceFiles->Update(); >> >> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >> { >> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >> } >> >> Thanks >> Ollie >> >> On 2 September 2016 at 13:45, David E DeMarle >> wrote: >> >>> Whatever your sourceFiles->GetFileNames object has uninitialized >>> pointers. >>> >>> Debug mode initializes all values to 0, release does not (in order to >>> save run time), but this leaves you with some pointer pointing to nonsense. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross < >>> op.cairncross at gmail.com> wrote: >>> >>>> Hi, >>>> >>>> vtk 7, msvc 14, windows 10 >>>> >>>> I've had this problem before and thought it was something bad in my >>>> tool chain. But I've rebuild everything from scratch and it's still a >>>> problem. >>>> >>>> If I do something simple like >>>> >>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>> >>>> it runs fine in debug mode. When I compile in RelwithDebInfo it crashes >>>> with a bad allocation. >>>> When I have a look at the object the there is garbage where the string >>>> is supposed to be. As if it hasn't been initialised. I am calling an >>>> sourceFiles->Update() beforehand. >>>> >>>> Interestingly if I do >>>> >>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>> >>>> it will print to console and then crash on the next line. >>>> >>>> Is anyone else having this problem? >>>> >>>> Cheers >>>> ollie >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Sat Sep 3 02:10:23 2016 From: chinander at gmail.com (Mike Chinander) Date: Sat, 3 Sep 2016 01:10:23 -0500 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: Is the end condition of your for loop correct? That's the only place targetArray appears. On Sep 3, 2016 12:49 AM, "Oliver Cairncross" wrote: (Oh sorry I'll copy it down) What I'm doing is pretty straight forward. I haven't changed the vtk code at all. vtkDirectory * sourceDir = vtkDirectory::New(); sourceDir->Open(sourceString.c_str()); vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); sourceFiles->SkipDirectoriesOn(); sourceFiles->NumericSortOff(); sourceFiles->SetInputFileNames(sourceDir->GetFiles()); sourceFiles->Update(); for (int i = 0; i < targetArray->GetNumberOfValues(); i++) { string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! } Thanks Ollie On 3 September 2016 at 00:02, David E DeMarle wrote: > You forgot to reply all to keep the discussion on the mailing list for > posterity. > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross > wrote: > >> What I'm doing is pretty straight forward. I haven't changed the vtk code >> at all. >> >> vtkDirectory * sourceDir = vtkDirectory::New(); >> sourceDir->Open(sourceString.c_str()); >> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >> sourceFiles->SkipDirectoriesOn(); >> sourceFiles->NumericSortOff(); >> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >> sourceFiles->Update(); >> >> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >> { >> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >> } >> >> Thanks >> Ollie >> >> On 2 September 2016 at 13:45, David E DeMarle >> wrote: >> >>> Whatever your sourceFiles->GetFileNames object has uninitialized >>> pointers. >>> >>> Debug mode initializes all values to 0, release does not (in order to >>> save run time), but this leaves you with some pointer pointing to nonsense. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross < >>> op.cairncross at gmail.com> wrote: >>> >>>> Hi, >>>> >>>> vtk 7, msvc 14, windows 10 >>>> >>>> I've had this problem before and thought it was something bad in my >>>> tool chain. But I've rebuild everything from scratch and it's still a >>>> problem. >>>> >>>> If I do something simple like >>>> >>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>> >>>> it runs fine in debug mode. When I compile in RelwithDebInfo it crashes >>>> with a bad allocation. >>>> When I have a look at the object the there is garbage where the string >>>> is supposed to be. As if it hasn't been initialised. I am calling an >>>> sourceFiles->Update() beforehand. >>>> >>>> Interestingly if I do >>>> >>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>> >>>> it will print to console and then crash on the next line. >>>> >>>> Is anyone else having this problem? >>>> >>>> Cheers >>>> ollie >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From op.cairncross at gmail.com Sat Sep 3 02:54:10 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Sat, 3 Sep 2016 16:54:10 +1000 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: It will crash when i = 0 On 3 Sep 2016 16:10, "Mike Chinander" wrote: > Is the end condition of your for loop correct? That's the only place > targetArray appears. > > On Sep 3, 2016 12:49 AM, "Oliver Cairncross" > wrote: > > (Oh sorry I'll copy it down) > > What I'm doing is pretty straight forward. I haven't changed the vtk code > at all. > > vtkDirectory * sourceDir = vtkDirectory::New(); > sourceDir->Open(sourceString.c_str()); > vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); > sourceFiles->SkipDirectoriesOn(); > sourceFiles->NumericSortOff(); > sourceFiles->SetInputFileNames(sourceDir->GetFiles()); > sourceFiles->Update(); > > for (int i = 0; i < targetArray->GetNumberOfValues(); i++) > { > string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! > } > > Thanks > Ollie > > On 3 September 2016 at 00:02, David E DeMarle > wrote: > >> You forgot to reply all to keep the discussion on the mailing list for >> posterity. >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross < >> op.cairncross at gmail.com> wrote: >> >>> What I'm doing is pretty straight forward. I haven't changed the vtk >>> code at all. >>> >>> vtkDirectory * sourceDir = vtkDirectory::New(); >>> sourceDir->Open(sourceString.c_str()); >>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >>> sourceFiles->SkipDirectoriesOn(); >>> sourceFiles->NumericSortOff(); >>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >>> sourceFiles->Update(); >>> >>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >>> { >>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >>> } >>> >>> Thanks >>> Ollie >>> >>> On 2 September 2016 at 13:45, David E DeMarle >>> wrote: >>> >>>> Whatever your sourceFiles->GetFileNames object has uninitialized >>>> pointers. >>>> >>>> Debug mode initializes all values to 0, release does not (in order to >>>> save run time), but this leaves you with some pointer pointing to nonsense. >>>> >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross < >>>> op.cairncross at gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> vtk 7, msvc 14, windows 10 >>>>> >>>>> I've had this problem before and thought it was something bad in my >>>>> tool chain. But I've rebuild everything from scratch and it's still a >>>>> problem. >>>>> >>>>> If I do something simple like >>>>> >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>> >>>>> it runs fine in debug mode. When I compile in RelwithDebInfo it >>>>> crashes with a bad allocation. >>>>> When I have a look at the object the there is garbage where the string >>>>> is supposed to be. As if it hasn't been initialised. I am calling an >>>>> sourceFiles->Update() beforehand. >>>>> >>>>> Interestingly if I do >>>>> >>>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>> >>>>> it will print to console and then crash on the next line. >>>>> >>>>> Is anyone else having this problem? >>>>> >>>>> Cheers >>>>> ollie >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Sat Sep 3 03:27:00 2016 From: chinander at gmail.com (Mike Chinander) Date: Sat, 3 Sep 2016 02:27:00 -0500 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: Has targetArray been initialized? If not, your program is crashing before it even tries to execute your loop body the first time. On Sep 3, 2016 1:54 AM, "Oliver Cairncross" wrote: > > > > It will crash when i = 0 > > > On 3 Sep 2016 16:10, "Mike Chinander" wrote: > > >> >> Is the end condition of your for loop correct? That's the only place targetArray appears. >> >> >> On Sep 3, 2016 12:49 AM, "Oliver Cairncross" wrote: > > >>> >>> (Oh sorry I'll copy it down) >>> >>> What I'm doing is pretty straight forward. I haven't changed the vtk code at all. >>> >>> vtkDirectory * sourceDir = vtkDirectory::New(); >>> sourceDir->Open(sourceString.c_str()); >>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >>> sourceFiles->SkipDirectoriesOn(); >>> sourceFiles->NumericSortOff(); >>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >>> sourceFiles->Update(); >>> >>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >>> { >>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >>> } >>> >>> Thanks >>> Ollie >>> >>> On 3 September 2016 at 00:02, David E DeMarle wrote: > > >>>> >>>> You forgot to reply all to keep the discussion on the mailing list for posterity. >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross < op.cairncross at gmail.com> wrote: > > >>>>> >>>>> What I'm doing is pretty straight forward. I haven't changed the vtk code at all. >>>>> >>>>> vtkDirectory * sourceDir = vtkDirectory::New(); >>>>> sourceDir->Open(sourceString.c_str()); >>>>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >>>>> sourceFiles->SkipDirectoriesOn(); >>>>> sourceFiles->NumericSortOff(); >>>>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >>>>> sourceFiles->Update(); >>>>> >>>>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >>>>> { >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >>>>> } >>>>> >>>>> Thanks >>>>> Ollie >>>>> >>>>> On 2 September 2016 at 13:45, David E DeMarle < dave.demarle at kitware.com> wrote: > > >>>>>> >>>>>> Whatever your sourceFiles->GetFileNames object has uninitialized pointers. >>>>>> >>>>>> Debug mode initializes all values to 0, release does not (in order to save run time), but this leaves you with some pointer pointing to nonsense. >>>>>> >>>>>> >>>>>> >>>>>> David E DeMarle >>>>>> Kitware, Inc. >>>>>> R&D Engineer >>>>>> 21 Corporate Drive >>>>>> Clifton Park, NY 12065-8662 >>>>>> Phone: 518-881-4909 >>>>>> >>>>>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross < op.cairncross at gmail.com> wrote: > > >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> vtk 7, msvc 14, windows 10 >>>>>>> >>>>>>> I've had this problem before and thought it was something bad in my tool chain. But I've rebuild everything from scratch and it's still a problem. >>>>>>> >>>>>>> If I do something simple like >>>>>>> >>>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>>>> >>>>>>> it runs fine in debug mode. When I compile in RelwithDebInfo it crashes with a bad allocation. >>>>>>> When I have a look at the object the there is garbage where the string is supposed to be. As if it hasn't been initialised. I am calling an sourceFiles->Update() beforehand. >>>>>>> >>>>>>> Interestingly if I do >>>>>>> >>>>>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>>>> >>>>>>> it will print to console and then crash on the next line. >>>>>>> >>>>>>> Is anyone else having this problem? >>>>>>> >>>>>>> Cheers >>>>>>> ollie >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> >>>>> >>>> >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From op.cairncross at gmail.com Sat Sep 3 04:29:24 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Sat, 3 Sep 2016 18:29:24 +1000 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: yeah target array is fine. On 3 September 2016 at 17:27, Mike Chinander wrote: > > Has targetArray been initialized? If not, your program is crashing before > it even tries to execute your loop body the first time. > > On Sep 3, 2016 1:54 AM, "Oliver Cairncross" > wrote: > > > > > > > > > > It will crash when i = 0 > > > > > > On 3 Sep 2016 16:10, "Mike Chinander" wrote: > > > > > > >> > > >> Is the end condition of your for loop correct? That's the only place > targetArray appears. > >> > >> > >> On Sep 3, 2016 12:49 AM, "Oliver Cairncross" > wrote: > > > > > > >>> > > >>> (Oh sorry I'll copy it down) > >>> > >>> What I'm doing is pretty straight forward. I haven't changed the vtk > code at all. > >>> > >>> vtkDirectory * sourceDir = vtkDirectory::New(); > >>> sourceDir->Open(sourceString.c_str()); > >>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); > >>> sourceFiles->SkipDirectoriesOn(); > >>> sourceFiles->NumericSortOff(); > >>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); > >>> sourceFiles->Update(); > >>> > >>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) > >>> { > >>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! > >>> } > >>> > >>> Thanks > >>> Ollie > >>> > >>> On 3 September 2016 at 00:02, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > > > > >>>> > > >>>> You forgot to reply all to keep the discussion on the mailing list > for posterity. > >>>> > >>>> David E DeMarle > >>>> Kitware, Inc. > >>>> R&D Engineer > >>>> 21 Corporate Drive > >>>> Clifton Park, NY 12065-8662 > >>>> Phone: 518-881-4909 > >>>> > >>>> On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross < > op.cairncross at gmail.com> wrote: > > > > > > >>>>> > > >>>>> What I'm doing is pretty straight forward. I haven't changed the vtk > code at all. > >>>>> > >>>>> vtkDirectory * sourceDir = vtkDirectory::New(); > >>>>> sourceDir->Open(sourceString.c_str()); > >>>>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); > >>>>> sourceFiles->SkipDirectoriesOn(); > >>>>> sourceFiles->NumericSortOff(); > >>>>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); > >>>>> sourceFiles->Update(); > >>>>> > >>>>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) > >>>>> { > >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! > >>>>> } > >>>>> > >>>>> Thanks > >>>>> Ollie > >>>>> > >>>>> On 2 September 2016 at 13:45, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > > > > >>>>>> > > >>>>>> Whatever your sourceFiles->GetFileNames object has uninitialized > pointers. > >>>>>> > >>>>>> Debug mode initializes all values to 0, release does not (in order > to save run time), but this leaves you with some pointer pointing to > nonsense. > >>>>>> > >>>>>> > >>>>>> > >>>>>> David E DeMarle > >>>>>> Kitware, Inc. > >>>>>> R&D Engineer > >>>>>> 21 Corporate Drive > >>>>>> Clifton Park, NY 12065-8662 > >>>>>> Phone: 518-881-4909 > >>>>>> > >>>>>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross < > op.cairncross at gmail.com> wrote: > > > > > > >>>>>>> > > >>>>>>> Hi, > >>>>>>> > >>>>>>> vtk 7, msvc 14, windows 10 > >>>>>>> > >>>>>>> I've had this problem before and thought it was something bad in > my tool chain. But I've rebuild everything from scratch and it's still a > problem. > >>>>>>> > >>>>>>> If I do something simple like > >>>>>>> > >>>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); > >>>>>>> > >>>>>>> it runs fine in debug mode. When I compile in RelwithDebInfo it > crashes with a bad allocation. > >>>>>>> When I have a look at the object the there is garbage where the > string is supposed to be. As if it hasn't been initialised. I am calling an > sourceFiles->Update() beforehand. > >>>>>>> > >>>>>>> Interestingly if I do > >>>>>>> > >>>>>>> cout << sourceFiles->GetFileNames()->GetValue(i); > >>>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); > >>>>>>> > >>>>>>> it will print to console and then crash on the next line. > >>>>>>> > >>>>>>> Is anyone else having this problem? > >>>>>>> > >>>>>>> Cheers > >>>>>>> ollie > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > >>>>>>> > >>>>>>> Search the list archives at: http://markmail.org/search/?q= > vtkusers > >>>>>>> > >>>>>>> Follow this link to subscribe/unsubscribe: > >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers > > >>>>>>> > >>>>>> > >>>>> > >>>> > >>> > >>> > >>> _______________________________________________ > >>> 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > > >>> > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.giord at gmail.com Sat Sep 3 05:15:02 2016 From: marco.giord at gmail.com (marco giordano) Date: Sat, 3 Sep 2016 11:15:02 +0200 Subject: [vtkusers] Build link error in VTK 7.0.0 with Python wrap In-Reply-To: References: Message-ID: Thanks, that was exactly the problem. Regards 2016-09-02 16:40 GMT+02:00 David Gobbi : > Could it be a 32-bit VTK build against a 64-bit Python or vice-versa? > What Python package are you using? > > > On Fri, Sep 2, 2016 at 8:21 AM, marco giordano > wrote: > >> Dear users, >> >> I try to build VTK with python wrap on Windows 7. My configuration is MS >> Visual Studio 2013, >> VTK 7.0.0, CMake 3.2.2, Release mode, Python 3.4 (also tried Python 2.7 >> but same story) >> >> I provided the following flags in Cmake: >> >> BUILD_SHARED_LIBS:BOOL=ON >> VTK_WRAP_PYTHON:BOOL=ON >> PYTHON_EXECUTABLE:FILEPATH=C:/Python34/python.exe >> PYTHON_INCLUDE_DIR:PATH=C:/Python34/include >> PYTHON_LIBRARY:FILEPATH=C:/Python34/libs/python34.lib >> >> but I get a series of link errors like these: >> >> Error 1 error LNK2001: unresolved external symbol >> __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\Pyth >> onCore\PyVTKMutableObject.obj vtkWrappingPythonCore >> Error 2 error LNK2001: unresolved external symbol >> __imp_PyType_IsSubtype D:\VTK-7.0.0\bin\Wrapping\PythonCore\PyVTKObject.obj >> vtkWrappingPythonCore >> Error 3 error LNK2019: unresolved external symbol >> __imp_PyType_IsSubtype referenced in function "bool __cdecl >> vtkPythonGetLongLongValue<__int64>(struct _object *,__int64 &)" >> (??$vtkPythonGetLongLongValue at _J@@YA_NPEAU_object@@AEA_J at Z) >> D:\VTK-7.0.0\bin\Wrapping\PythonCore\vtkPythonArgs.obj >> vtkWrappingPythonCore >> >> >> Probably I am doing some very basic errors but after several tries I >> can't figure out what. >> Please any help is appreciated. >> >> Regards >> >> -- >> Marco >> > -- Marco Giordano SKYPE:marcogiord81 -------------- next part -------------- An HTML attachment was scrubbed... URL: From spir.robert at gmail.com Sat Sep 3 06:55:15 2016 From: spir.robert at gmail.com (=?iso-8859-2?B?UvNiZXJ0IKlwaXI=?=) Date: Sat, 3 Sep 2016 12:55:15 +0200 Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 In-Reply-To: References: Message-ID: <003901d205d1$a7ad1e50$f7075af0$@gmail.com> no, the default vtk configuration is for qt4, you have to change it to 5 in cmake VTK->VTK_QT_VERSION and press configure again Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Libby McCord Sent: Saturday, September 3, 2016 2:25 AM To: vtkusers at vtk.org Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 I have recently downloaded vtk 7.0. I'm a newbie, and my ultimate goal is to be able to use QT with the Point Cloud Visualizer. (Point Cloud 1.8) I'm on a windows 64 bit 10.0 system and will be building on msvc 2015, but haven't made it to the compilation step yet. I have installed QT 5.7 from the online installer from QT. During step 4 of http://www.vtk.org/Wiki/VTK/Building/Windows, I get the following error during configure: Does this mean I need to installed QT 4 instead??? CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindQt4.cmake:1328 (message): Found unsuitable Qt version "5.7.0" from C:/Qt/5.7/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) VTK/Building/Windows - KitwarePublic www.vtk.org Building VTK on Windows using Visual Studio (from a zip/tar file) Note: VTK uses the standard approach for building CMake based projects on Windows. Can someone help??? Thanks! Libby -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sat Sep 3 07:49:46 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sat, 3 Sep 2016 11:49:46 +0000 (UTC) Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 In-Reply-To: References: Message-ID: <1449641706.1316596.1472903386140@mail.yahoo.com> Try to do next in CmakeLists.txt # Qt5 need to add set(CMAKE_PREFIX_PATH $ENV{HOME}"E:/Qt/5.6") project(VTK) Leonid From: Libby McCord To: "vtkusers at vtk.org" Sent: Saturday, September 3, 2016 3:25 AM Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 I have recently downloaded vtk 7.0. ?I'm a newbie, and my ultimate goal is to be able to use QT with the Point Cloud Visualizer. ?(Point Cloud 1.8) I'm on a windows 64 bit 10.0?system and will be building on msvc 2015, but haven't made it to the compilation step yet. ?I have installed QT 5.7 from the online installer from QT. During step 4 of?http://www.vtk.org/Wiki/VTK/Building/Windows, I get the following error during configure: ?Does this mean I need to installed QT 4 instead??? CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindQt4.cmake:1328 (message): Found unsuitable Qt version "5.7.0" from C:/Qt/5.7/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) | VTK/Building/Windows - KitwarePublicwww.vtk.orgBuilding VTK on Windows using Visual Studio (from a zip/tar file) Note: VTK uses the standard approach for building CMake based projects on Windows. | Can someone help??? Thanks!Libby _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Sat Sep 3 09:49:07 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Sat, 3 Sep 2016 09:49:07 -0400 Subject: [vtkusers] How to compute streamline length? In-Reply-To: <1472828764666-5740114.post@n5.nabble.com> References: <1472828764666-5740114.post@n5.nabble.com> Message-ID: I don't think there's any any better way than you're currently doing for this. You could modify the stream tracer filter to optionally provide this output though. On Fri, Sep 2, 2016 at 11:06 AM, vincentrivola wrote: > Dear all, I am looking for a simple (and as fast as possible) way to get > the curvilinear / arc length of a streamline generated using the > vtkStreamTracer filter. Is it it possible to get it directly as an output? > So far I did an ugly workaround but I would like to get something faster. > My current code uses vtkThreshold to select streamlines one by one and a > sort filter in order to compute the length of each segment of each > streamline and then sum them to get the curvilinear length of a streamline. > ------------------------------ > View this message in context: How to compute streamline length? > > Sent from the VTK - Users mailing list archive > at Nabble.com. > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sat Sep 3 12:27:27 2016 From: tjlp at netease.com (Liu_tj) Date: Sun, 4 Sep 2016 00:27:27 +0800 (CST) Subject: [vtkusers] How to draw a point with specific size on a 3D model Message-ID: <6859dd2d.4.156f0e04dd6.Coremail.tjlp@netease.com> Hi, I have 2 problems. 1. I want to select a point on a 3D model and mark it with specific size with red color (like a filled solid circle). I follow the example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Picking/CellPicking, use the vtkCellPicker to select a cell on the 3D model and draw it. But the point is very small. How can I draw the point with some size? 2. As I add the callback for left button press event to get the selected point, how to revert that then I can rotate the 3D model? Below is my C# code to set and remove the callback for left button press event. I even restore the interactorstyle. That does not work. public DotAnnotation() { m_style = vtkInteractorStyleUser.New(); m_leftButtonEvent = new vtkObject.vtkObjectEventHandler(DotAnnotation_LeftButtonEvt); } public void SetEventCallBack() { m_originalStyle = m_renderWin.GetInteractor().GetInteractorStyle(); m_style.LeftButtonPressEvt += m_leftButtonEvent; } public override void RemoveEventCallBack() { m_style.LeftButtonPressEvt -= m_leftButtonEvent; m_renderWin.GetInteractor().SetInteractorStyle(m_originalStyle); } Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Sep 3 13:22:44 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 3 Sep 2016 13:22:44 -0400 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: Since you don't show targetArray Try for (int i = 0; i < sourceFiles->GetNumberOfValues(); i++) On Sat, Sep 3, 2016 at 1:49 AM, Oliver Cairncross wrote: > (Oh sorry I'll copy it down) > > What I'm doing is pretty straight forward. I haven't changed the vtk code at > all. > > vtkDirectory * sourceDir = vtkDirectory::New(); > sourceDir->Open(sourceString.c_str()); > vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); > sourceFiles->SkipDirectoriesOn(); > sourceFiles->NumericSortOff(); > sourceFiles->SetInputFileNames(sourceDir->GetFiles()); > sourceFiles->Update(); > > for (int i = 0; i < targetArray->GetNumberOfValues(); i++) > { > string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! > } > > Thanks > Ollie > > On 3 September 2016 at 00:02, David E DeMarle > wrote: >> >> You forgot to reply all to keep the discussion on the mailing list for >> posterity. >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross >> wrote: >>> >>> What I'm doing is pretty straight forward. I haven't changed the vtk code >>> at all. >>> >>> vtkDirectory * sourceDir = vtkDirectory::New(); >>> sourceDir->Open(sourceString.c_str()); >>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >>> sourceFiles->SkipDirectoriesOn(); >>> sourceFiles->NumericSortOff(); >>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >>> sourceFiles->Update(); >>> >>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >>> { >>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >>> } >>> >>> Thanks >>> Ollie >>> >>> On 2 September 2016 at 13:45, David E DeMarle >>> wrote: >>>> >>>> Whatever your sourceFiles->GetFileNames object has uninitialized >>>> pointers. >>>> >>>> Debug mode initializes all values to 0, release does not (in order to >>>> save run time), but this leaves you with some pointer pointing to nonsense. >>>> >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross >>>> wrote: >>>>> >>>>> Hi, >>>>> >>>>> vtk 7, msvc 14, windows 10 >>>>> >>>>> I've had this problem before and thought it was something bad in my >>>>> tool chain. But I've rebuild everything from scratch and it's still a >>>>> problem. >>>>> >>>>> If I do something simple like >>>>> >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>> >>>>> it runs fine in debug mode. When I compile in RelwithDebInfo it crashes >>>>> with a bad allocation. >>>>> When I have a look at the object the there is garbage where the string >>>>> is supposed to be. As if it hasn't been initialised. I am calling an >>>>> sourceFiles->Update() beforehand. >>>>> >>>>> Interestingly if I do >>>>> >>>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>> >>>>> it will print to console and then crash on the next line. >>>>> >>>>> Is anyone else having this problem? >>>>> >>>>> Cheers >>>>> ollie >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>> >> > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Sat Sep 3 13:26:21 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 3 Sep 2016 13:26:21 -0400 Subject: [vtkusers] App crashes unless compiled with debug config (Windows) In-Reply-To: References: Message-ID: Ignore. Sorry. It would be best if you can show a complete, compilable example that crashes. http://sscce.org/ On Sat, Sep 3, 2016 at 1:22 PM, Bill Lorensen wrote: > Since you don't show targetArray > Try > for (int i = 0; i < sourceFiles->GetNumberOfValues(); i++) > > > On Sat, Sep 3, 2016 at 1:49 AM, Oliver Cairncross > wrote: >> (Oh sorry I'll copy it down) >> >> What I'm doing is pretty straight forward. I haven't changed the vtk code at >> all. >> >> vtkDirectory * sourceDir = vtkDirectory::New(); >> sourceDir->Open(sourceString.c_str()); >> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >> sourceFiles->SkipDirectoriesOn(); >> sourceFiles->NumericSortOff(); >> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >> sourceFiles->Update(); >> >> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >> { >> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >> } >> >> Thanks >> Ollie >> >> On 3 September 2016 at 00:02, David E DeMarle >> wrote: >>> >>> You forgot to reply all to keep the discussion on the mailing list for >>> posterity. >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Fri, Sep 2, 2016 at 2:17 AM, Oliver Cairncross >>> wrote: >>>> >>>> What I'm doing is pretty straight forward. I haven't changed the vtk code >>>> at all. >>>> >>>> vtkDirectory * sourceDir = vtkDirectory::New(); >>>> sourceDir->Open(sourceString.c_str()); >>>> vtkSortFileNames * sourceFiles = vtkSortFileNames::New(); >>>> sourceFiles->SkipDirectoriesOn(); >>>> sourceFiles->NumericSortOff(); >>>> sourceFiles->SetInputFileNames(sourceDir->GetFiles()); >>>> sourceFiles->Update(); >>>> >>>> for (int i = 0; i < targetArray->GetNumberOfValues(); i++) >>>> { >>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); // crash! >>>> } >>>> >>>> Thanks >>>> Ollie >>>> >>>> On 2 September 2016 at 13:45, David E DeMarle >>>> wrote: >>>>> >>>>> Whatever your sourceFiles->GetFileNames object has uninitialized >>>>> pointers. >>>>> >>>>> Debug mode initializes all values to 0, release does not (in order to >>>>> save run time), but this leaves you with some pointer pointing to nonsense. >>>>> >>>>> >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Thu, Sep 1, 2016 at 11:32 PM, Oliver Cairncross >>>>> wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> vtk 7, msvc 14, windows 10 >>>>>> >>>>>> I've had this problem before and thought it was something bad in my >>>>>> tool chain. But I've rebuild everything from scratch and it's still a >>>>>> problem. >>>>>> >>>>>> If I do something simple like >>>>>> >>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>>> >>>>>> it runs fine in debug mode. When I compile in RelwithDebInfo it crashes >>>>>> with a bad allocation. >>>>>> When I have a look at the object the there is garbage where the string >>>>>> is supposed to be. As if it hasn't been initialised. I am calling an >>>>>> sourceFiles->Update() beforehand. >>>>>> >>>>>> Interestingly if I do >>>>>> >>>>>> cout << sourceFiles->GetFileNames()->GetValue(i); >>>>>> string s1 = sourceFiles->GetFileNames()->GetValue(i); >>>>>> >>>>>> it will print to console and then crash on the next line. >>>>>> >>>>>> Is anyone else having this problem? >>>>>> >>>>>> Cheers >>>>>> ollie >>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> >>>> >>> >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From jones.rusty at gmail.com Sat Sep 3 21:27:50 2016 From: jones.rusty at gmail.com (Rusty Jones) Date: Sun, 04 Sep 2016 01:27:50 +0000 Subject: [vtkusers] GDAL Version Message-ID: Hi, I am trying to compile VTK with GDAL support on windows. What version of GDAL must be used with VTK? I have tried two different versions and got different compiler errors with both. I don't know how to find which version or versions of GDAL have been tested with VTK. Any ideas? Thanks, Rusty -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 4 02:59:09 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 4 Sep 2016 08:59:09 +0200 Subject: [vtkusers] Z buffer issue of QVTKWidget in Linux In-Reply-To: References: Message-ID: 2016-09-02 20:46 GMT+02:00 Hongzhi Lan : > Hi all, > > > Recently I have an issue with QVTKWidget in my new dell computer. It > didn't happen in any of my other computers. I think it's a z buffer issue? > I combined two examples from http://www.vtk.org/Wiki/VTK/Examples/Cxx to > reproduce the issue (see the attached image). The image slice is supposed > to insert into the sphere but it doesn't render in this way in my case. The > sphere looks not ok either. I know someone mentioned this issue before, but > it's not solved yet, so I hope to get some help about it. > > > I also tried to use QVTKWidget2 and was able to compile successfully, but > when I ran it, I got the error below and a black renderwindow. I really > want to get QVTKWidget or QVTKWidget work for my case. Any suggestions? > Hi Hongzhi, I have the following in my QVTKWidget subclass to get around this issue: QSurfaceFormat surfaceFormat = windowHandle()->format(); surfaceFormat.setStencilBufferSize(8); windowHandle()->setFormat(surfaceFormat); Hope that works out for you too. Elvis > > My computer configurations are: > > ---------------------------------------------- > > Dell desktop OptiPlex 7040 > > CPU: Intel? Core? i7-6700 CPU @ 3.40GHz ? 8 > > Graphics: Intel? HD Graphics 530 (Skylake GT2) > > OS: Linux Ubuntu 14.04.5 64bit > > VTK: 6.2 > > Qt: 5.4.2 > > > > Thanks a lot! > > Hongzhi > > > =========================== > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 139 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 126 > vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 > vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 192 > vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors > detected > 0 : (1280) Invalid enum > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line > 646 > vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkOpenGLRepresentationPainter.cxx, line 128 > vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1 > OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, > line 188 > vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 > OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 575 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 1135 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 282 > vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 154 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 139 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 126 > vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 > vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 192 > vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors > detected > 0 : (1280) Invalid enum > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line > 646 > vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, > line 188 > vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 > OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 575 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 1135 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 282 > vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 154 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 139 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 126 > vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 > vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 192 > vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors > detected > 0 : (1280) Invalid enum > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line > 646 > vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, > line 188 > vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 > OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 575 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 1135 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 282 > vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 154 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 139 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 126 > vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 > vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 192 > vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors > detected > 0 : (1280) Invalid enum > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line > 646 > vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, > line 188 > vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 > OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 575 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 1135 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line > 282 > vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkGenericOpenGLRenderWindow.cxx, line 154 > vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > Generic Warning: In .../SourceCode/VTK/Rendering/OpenGL/ > vtkOpenGLDisplayListPainter.cxx, line 52 > failed after ReleaseAllLists 1 OpenGL errors detected > 0 : (1282) Invalid operation > > > ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 127 > vtkOpenGLImageSliceMapper (0x1da2ba0): failed after > ReleaseGraphicsResources 1 OpenGL errors detected > 0 : (1280) Invalid enum > > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 4 08:25:20 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 4 Sep 2016 14:25:20 +0200 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? Message-ID: Hi all, I have multiple volumes in a renderer, positioned above/below each other (like a "string" of volumes) along the Z axis, none of them are intersecting. As the user clicks+drags the mouse in the viewport, I need to capture the mouse position at the start/end positions of the drag operation and convert them to world coordinates. I think I have these parts figured out. Then, I need to search through the list of my volumes (sorted by their end positions in world coordinates), and construct a series of vtkExtractVOI that will extract the selected segments. For volumes that are completely inside the selected area, the vtkExtractVOI will extract the full volumes, but for the start/end volume (which may be the same volume), it will only extract a portion of it. I looked at the vtkDataSet::FindPoint, which I think will give me a linear point ID (not familiar with that from before) for a point given in world coordinates. But how can I convert that to a structured point position that I can use when setting up the extent to use for my vtkExtractVOI? Is the static vtkStructuredData::ComputePointStructuredCoords helper the function I'm looking for? Or is there some other easier way to extract an area of a volume when the area is expressed in world coordinates? (specifically, as a start/end Z position in world coordinates). Here's an ASCII drawing that perhaps explains better what I want to do, the rectangular areas are my volumes: ^ +-----+ | | | | | P1 | <--- User clicks here (world coordinate X, Y, Z).. | | | Z +-----+ +-----+ | | | | +-----+ +-----+ | | | | | P2 | <--- ..and drags to here (world coordinate A, B, C). | | | | | | +-----+ >From this I want to create three vtkExtractVOI, that when combined gives a list of vtkImageData that represents the selected area along the Z axis (in the X and Y direction, everything from the volumes should be included). Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 4 08:28:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 4 Sep 2016 14:28:06 +0200 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: 2016-09-04 14:25 GMT+02:00 Elvis Stansvik : > Hi all, > > I have multiple volumes in a renderer, positioned above/below each other > (like a "string" of volumes) along the Z axis, none of them are > intersecting. As the user clicks+drags the mouse in the viewport, I need to > capture the mouse position at the start/end positions of the drag operation > and convert them to world coordinates. I think I have these parts figured > out. > > Then, I need to search through the list of my volumes (sorted by their end > positions in world coordinates), and construct a series of vtkExtractVOI > that will extract the selected segments. For volumes that are completely > inside the selected area, the vtkExtractVOI will extract the full volumes, > but for the start/end volume (which may be the same volume), it will only > extract a portion of it. > > I looked at the vtkDataSet::FindPoint, which I think will give me a linear > point ID (not familiar with that from before) for a point given in world > coordinates. But how can I convert that to a structured point position that > I can use when setting up the extent to use for my vtkExtractVOI? > > Is the static vtkStructuredData::ComputePointStructuredCoords helper the > function I'm looking for? Or is there some other easier way to extract an > area of a volume when the area is expressed in world coordinates? > (specifically, as a start/end Z position in world coordinates). > > Here's an ASCII drawing that perhaps explains better what I want to do, > the rectangular areas are my volumes: > > ^ +-----+ > | | | > | | P1 | <--- User clicks here (world coordinate X, Y, Z).. > | | | > Z +-----+ > +-----+ > | | > | | > +-----+ > +-----+ > | | > | | > | P2 | <--- ..and drags to here (world coordinate A, B, C). > | | > | | > | | > +-----+ > > From this I want to create three vtkExtractVOI, that when combined gives a > list of vtkImageData that represents the selected area along the Z axis (in > the X and Y direction, everything from the volumes should be included). > To clarify, the X and Y coordinate of the click/release position are irrelevant here. I'll only capture the Z positions (Z0 and Z1), and from that I want to extract all voxels from my volumes that are between Z0 and Z1. > Thanks in advance, > Elvis > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioana.barcan at ymail.com Mon Sep 5 02:08:02 2016 From: ioana.barcan at ymail.com (Ioana Barcan) Date: Mon, 5 Sep 2016 06:08:02 +0000 (UTC) Subject: [vtkusers] vtkSelectVisiblePoints output has 0 points In-Reply-To: <1291684734.3314914.1472741290850@mail.yahoo.com> References: <1291684734.3314914.1472741290850.ref@mail.yahoo.com> <1291684734.3314914.1472741290850@mail.yahoo.com> Message-ID: <1479320782.1240857.1473055683026@mail.yahoo.com> The answer was right there, in the documentation of the filter: "Warning:You must carefully synchronize the execution of this filter. The filter refers to a renderer, which is modified every time a render occurs. Therefore, the filter is always out of date, and always executes. You may have to perform two rendering passes." It worked as expected if I added the //new lines: ? vtkSmartPointer selectVisiblePoints =?? ? vtkSmartPointer::New();? selectVisiblePoints->SetInput(originalData);? selectVisiblePoints->SetRenderer(renderer);? selectVisiblePoints->Update(); ? renderWindow->Render(); // new? selectVisiblePoints->Update(); // new ? std::cout << "Visible nr of points = " << selectVisiblePoints->GetOutput()->GetNumberOfPoints() << std::endl; From: Ioana Barcan via vtkusers To: VTK Users Sent: Thursday, September 1, 2016 5:48 PM Subject: [vtkusers] vtkSelectVisiblePoints output has 0 points Hello, ?I?m trying to obtain a polyData with only the visible partof a 3D model.To that extent, I?m passing the original data through a vtkSelectVisiblePointsfilter. I?m using a mock renderer, mapper and actor because I want topost-process the visible points before displaying them. ?However, the output of the vtkSelectVisiblePoints filtercontains ?0? points for some reason? ?Using the following example:http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectVisiblePoints ?I came up with the following piece of code: ?? // Render window andinteractor? vtkSmartPointerrenderWindow = ???vtkSmartPointer::New();?renderWindow->SetSize(800, 800); ??vtkSmartPointer renderWindowInteractor= ???vtkSmartPointer::New(); ?? renderWindowInteractor->SetRenderWindow(renderWindow); ? ?? // Mock renderer,mapper and actor?vtkSmartPointer mockRenderer = ??? vtkSmartPointer::New(); ??renderWindow->AddRenderer(mockRenderer); ??vtkSmartPointer mockMapper = ???vtkSmartPointer::New();?mockMapper->SetInput(reader->GetOutput()); ??vtkSmartPointer mockActor =vtkSmartPointer::New();?mockActor->SetMapper(mockMapper);?mockRenderer->AddActor(mockActor); ?? // Set camera to thecorrect position?mockRenderer->GetActiveCamera()->SetPosition(0, -1, 0);?mockRenderer->GetActiveCamera()->SetFocalPoint(0, 0, 0);?mockRenderer->GetActiveCamera()->SetViewUp(0, 1, 0);?mockRenderer->ResetCamera(); ??vtkSmartPointer selectVisiblePoints = ???vtkSmartPointer::New();?selectVisiblePoints->SetInput(reader->GetOutput());?selectVisiblePoints->SetRenderer(mockRenderer);?selectVisiblePoints->Update(); ?? std::cout <<"Visible nr of points = " <GetOutput()->GetNumberOfPoints() << std::endl; ? renderWindow->RemoveRenderer(mockRenderer); ?? prints 0. ?Is it anything that I?m missing? ?Thank you, Ioana _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From libby.mccord at ceptontech.com Mon Sep 5 01:35:54 2016 From: libby.mccord at ceptontech.com (Libby McCord) Date: Mon, 5 Sep 2016 05:35:54 +0000 Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 In-Reply-To: <1449641706.1316596.1472903386140@mail.yahoo.com> References: , <1449641706.1316596.1472903386140@mail.yahoo.com> Message-ID: Thanks for your help! Doing both these things + setting QT5_DIR to C:\Qt\Qt5.7.0\5.7\msvc2015_64\lib\cmake\Qt5 did the trick. [?] Libby ________________________________ From: Leonid Dulman Sent: Saturday, September 3, 2016 4:49:46 AM To: Libby McCord; vtkusers at vtk.org Subject: Re: [vtkusers] Problem building VTK with QT 5.7 windows x64 Try to do next in CmakeLists.txt # Qt5 need to add set(CMAKE_PREFIX_PATH $ENV{HOME}"E:/Qt/5.6") project(VTK) Leonid ________________________________ From: Libby McCord To: "vtkusers at vtk.org" Sent: Saturday, September 3, 2016 3:25 AM Subject: [vtkusers] Problem building VTK with QT 5.7 windows x64 I have recently downloaded vtk 7.0. I'm a newbie, and my ultimate goal is to be able to use QT with the Point Cloud Visualizer. (Point Cloud 1.8) I'm on a windows 64 bit 10.0 system and will be building on msvc 2015, but haven't made it to the compilation step yet. I have installed QT 5.7 from the online installer from QT. During step 4 of http://www.vtk.org/Wiki/VTK/Building/Windows, I get the following error during configure: Does this mean I need to installed QT 4 instead??? CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindQt4.cmake:1328 (message): Found unsuitable Qt version "5.7.0" from C:/Qt/5.7/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) VTK/Building/Windows - KitwarePublic www.vtk.org Building VTK on Windows using Visual Studio (from a zip/tar file) Note: VTK uses the standard approach for building CMake based projects on Windows. Can someone help??? Thanks! Libby _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-?.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-?.png URL: From mathieu.westphal at kitware.com Mon Sep 5 04:10:14 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 5 Sep 2016 10:10:14 +0200 Subject: [vtkusers] VTK/Paraview Courses in October In-Reply-To: References: Message-ID: Hello Kitware will be holding a 2-day VTK and ParaView course on October 11th and 12th 2016 in Lyon, France. Please visit our web site for more information and registration details at VTK (English) : http://training.kitware.fr/browse/130 VTK (French) : http://formations.kitware.fr/browse/130 ParaView (English) : http://training.kitware.fr/browse/131 ParaView (French) : http://formations.kitware.fr/browse/131 Note that the course will be taught in English. If you have any question, please contact us at formations at http://www.kitware.fr Thank you, Mathieu Westphal Mathieu Westphal On Wed, Jul 6, 2016 at 4:49 PM, Mathieu Westphal < mathieu.westphal at kitware.com> wrote: > Hello > Kitware will be holding a 2-day VTK and ParaView course on October 11th > and 12th 2016 in Lyon, France. > > Please visit our web site for more information and registration details at > VTK (English) : http://training.kitware.fr/browse/130 > VTK (French) : http://formations.kitware.fr/browse/130 > ParaView (English) : http://training.kitware.fr/browse/131 > ParaView (French) : http://formations.kitware.fr/browse/131 > > > Note that the course will be taught in English. If you have any question, > please contact us at formations at http://www.kitware.fr > > Thank you, > > Mathieu Westphal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Mon Sep 5 07:31:39 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Mon, 5 Sep 2016 11:31:39 +0000 (UTC) Subject: [vtkusers] MPR by different angle References: <531105912.266886.1473075099973.ref@mail.yahoo.com> Message-ID: <531105912.266886.1473075099973@mail.yahoo.com> I have made a MPR (there is few examples on internet). But I need to made MPR after a custom angle ... is there any example available for that ? I have found on google (might used wrong terms).The patient could be scanned in a slope position ... And what widget could I put over the image in order to choose the MPR angle ?Thank you for any answer ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Mon Sep 5 08:40:40 2016 From: flaviu2 at yahoo.com (flaviu2) Date: Mon, 5 Sep 2016 05:40:40 -0700 (MST) Subject: [vtkusers] MPR by different angle In-Reply-To: <531105912.266886.1473075099973@mail.yahoo.com> References: <531105912.266886.1473075099973@mail.yahoo.com> Message-ID: <1473079240412-5740144.post@n5.nabble.com> I have made a MPR (there is few examples on internet). But I need to made MPR after a custom angle ... is there any example available for that ? The patient could be scanned in a slope position ... And what widget could I put over the image in order to choose the MPR angle ? Thank you for any answer ! -- View this message in context: http://vtk.1045678.n5.nabble.com/MPR-by-different-angle-tp5740143p5740144.html Sent from the VTK - Users mailing list archive at Nabble.com. From enzo.matsumiya at gmail.com Mon Sep 5 09:24:59 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Mon, 5 Sep 2016 10:24:59 -0300 Subject: [vtkusers] MPR by different angle In-Reply-To: <1473079240412-5740144.post@n5.nabble.com> References: <531105912.266886.1473075099973@mail.yahoo.com> <1473079240412-5740144.post@n5.nabble.com> Message-ID: <06E6402B-8440-42E8-95D7-540050F9F042@gmail.com> Hi, Take a look at vtkResliceCursorWidget and this example: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx I was able to build a fully featured MPR (it does oblique) on top of that but it needed a lot of tweaking. > On Sep 5, 2016, at 09:40, flaviu2 via vtkusers wrote: > > I have made a MPR (there is few examples on internet). But I need to made MPR > after a custom angle ... is there any example available for that ? The > patient could be scanned in a slope position ... > > And what widget could I put over the image in order to choose the MPR angle > ? > > Thank you for any answer ! > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/MPR-by-different-angle-tp5740143p5740144.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Mon Sep 5 09:37:31 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Mon, 5 Sep 2016 21:37:31 +0800 (CST) Subject: [vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll Message-ID: <1e84fa2d.1c0cf.156fa917492.Coremail.chenjianyyzz@163.com> Hello, I have meet the error of unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll, it happens so offen, but I cannot figure out what's the reason. Attached please find complete solution where the error happens. the steps to reproduce it: 1) run under debug mode 2) click the "button1" 10 times quickly (normally I click 10 times less than 5 seconds), and then move the mouse into the RenderWindowControl 3) repeat step2) , normally I repeat step 2) at about 4~5 times, and the crash will happens. I have test it under ActiViz.NET 5.8.0 (download from website directly), ActiVizDotNet6.2 ( I built it myself), Activiz.NET.x64.7.0.0(our company bought it), the above crash can be reproduced with different verion of Activiz. and it happens so offen that in another of my bigger program, it crashes when I click the button only about 3 times. will anybody help me to find out what's the reason? Thanks & Best Regards James partMapper.SetInputData(polyData); ???163???????? STLShowing.7z (25.95M, 2016?10?5? 21:19 ??) ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentrivola at hotmail.com Mon Sep 5 09:45:50 2016 From: vincentrivola at hotmail.com (vincentrivola) Date: Mon, 5 Sep 2016 06:45:50 -0700 (MST) Subject: [vtkusers] How to compute streamline length? In-Reply-To: References: <1472828764666-5740114.post@n5.nabble.com> Message-ID: <1473083150503-5740147.post@n5.nabble.com> Dear Andy,Thank you for your reply. Indeed, it looks like it is the only solution. So I changed the class vtkStreamTracer in order to output the legnth of the streamline and it is working fine.However I still have the problem that my algorithm is not fast enough. I am currently trying two options:- 1) I generate the streamlines for the whole polydata (this is very fast, typicaly around 180ms). Then I have to use the threshold filter, in order to select my streamlines one by one, get the value of the streamline length and add it to an original polydata array called lenght. The problem in this case is that the threshold part is the too slow, I don't know why.- 2) I loop over all the points of my original polydata, then I compute the streamline for one point (using SetStartPosition in vtkStreamTracer) but this operation is very slow, typically 8ms per points which end up in more than 20seconds for the whole polydata. In this case I don't have to use the threshold, but the update() of the vtkStreamTracer is too slow for one streamline compared to doing the streamtracing on the whole polydata.Does anyone know how to solve the second option issue? I currently use the same properties to generate the streamlines either for one point or for the whole polydata. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-compute-streamline-length-tp5740114p5740147.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From onlyjus at gmail.com Mon Sep 5 20:43:04 2016 From: onlyjus at gmail.com (Justin Weber) Date: Mon, 5 Sep 2016 20:43:04 -0400 Subject: [vtkusers] ClipPolyData fails to clip CylinderSource? Message-ID: So I noticed that the ClipPolyData filter has trouble clipping cylinders at an arbitrary location along the length axis. Is this a known issue? See attached example using a CylinderSource, ClipPolyData, and Box as the implicit. I would expect that I would get a smaller cylinder with the ends open. Instead I get nothing from the PolyDataClip.GetClippedOutputPort. Please let me know if I am doing something wrong. vtk version 6.3.0 (python 2.7, Anaconda) Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_polydata.py Type: text/x-python-script Size: 1702 bytes Desc: not available URL: From psakievich at gmail.com Tue Sep 6 00:37:20 2016 From: psakievich at gmail.com (Philip Sakievich) Date: Mon, 5 Sep 2016 21:37:20 -0700 Subject: [vtkusers] Setting extent of pieces in *pvts files vtk-7.0 Message-ID: All, I am trying to integrate vtk xml files into a parallel code I am using for research. I am not the original developer, but I am introducing new functionality for post processing. I am able to write the *vts files locally on each processor, and set the grid's extent for each of these files. I am trying to write the *pvts file on rank 0, but I haven't figured out how to set the extent in this file so the defined pieces match the individual vts files. I am probably just missing a function call, so if someone could help me out that would be great. I have not been able to find any examples online thus far. Here is a section of the c++ code with the writer objects is included below. I am calling this as a function from fortran (the main code is all fortran) and I am passing the MPI rank as nPartition. Right now I only get the extent of the grid stored on rank0 because that is where I am generating the *pvts file. The other files/pieces totally omit the extent parameter and it won't read into paraview unless they are correct. ///---------------CODE SNIPPET------------------------------ //Step 5: Setup writer object and write file int ext[6]={7,14,0,31,0,7}; if(*nPartition==1) sGrid->SetExtent(ext); //THIS WORKS FOR THE *VTS FILES if(*nPartition!=0) { vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(&stFileName[0]); writer->SetInputData(sGrid); writer->Write(); } //Step 6: If partition zero write pvts vile if(*nPartition==0) { stPFileName+=".pvts"; vtkSmartPointer pwriter = vtkSmartPointer::New(); pwriter->SetFileName(&stPFileName[0]); pwriter->SetInputData(sGrid); pwriter->SetNumberOfPieces(8); //pwriter->SetUpdateExtent(1,ext); //THIS DOESN'T SEEM TO DO ANYTHING, INHERITED FROM vtkAlgorthim pwriter->Write(); } ///---------------CODE SNIPPET------------------------------ ///---------------PVTS FILE OUTPUT------------------------ //NEED TO MODIFY WHOLE EXTENT TOO //MISSING EXTENT HERE!!! -- ///---------------PVTS FILE OUTPUT------------------------ Thanks, Phil S -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Tue Sep 6 08:27:27 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Tue, 6 Sep 2016 12:27:27 +0000 (UTC) Subject: [vtkusers] MPR by different angle In-Reply-To: <06E6402B-8440-42E8-95D7-540050F9F042@gmail.com> References: <531105912.266886.1473075099973@mail.yahoo.com> <1473079240412-5740144.post@n5.nabble.com> <06E6402B-8440-42E8-95D7-540050F9F042@gmail.com> Message-ID: <1483609688.296852.1473164847630@mail.yahoo.com> Thank you for response. I will take a look to see what you suggest me. On Monday, September 5, 2016 4:25 PM, Enzo Matsumiya wrote: Hi, Take a look at vtkResliceCursorWidget and this example: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx I was able to build a fully featured MPR (it does oblique) on top of that but it needed a lot of tweaking. On Sep 5, 2016, at 09:40, flaviu2 via vtkusers wrote: I have made a MPR (there is few examples on internet). But I need to made MPR after a custom angle ... is there any example available for that ? The patient could be scanned in a slope position ... And what widget could I put over the image in order to choose the MPR angle ? Thank you for any answer ! -- View this message in context: http://vtk.1045678.n5.nabble.com/MPR-by-different-angle-tp5740143p5740144.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Sep 6 08:43:06 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 6 Sep 2016 08:43:06 -0400 Subject: [vtkusers] [Paraview] Reload button in paraviw In-Reply-To: References: Message-ID: Rahul, It's under development. You can build from source, if you're keen. Or wait till the changes get merged in `master` and try the nightly binaries. The feature is targeted for 5.2 release slated for Oct/Nov timeframe. From lplavorante at gmail.com Tue Sep 6 10:04:22 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Tue, 6 Sep 2016 11:04:22 -0300 Subject: [vtkusers] vtkFollower + vtkAssembly Message-ID: Hi everybody, I am observing a strange behaviour in vtkFollower when inserted in a vtkAssembly. Even when I assign the current camera to the follower, when I rotate the camera the follower doesn't follow propertly. I mean, I see that the follower rotates, but it doesn't face the camera exactly. I have seen some posts in the list on the same issue, but no specific solution. Is anybody experiencing something similar? My vtkAssembly is going to contain a geologic well path, as long as a follower showing the well's name. So I thought I could use a vtkAssembly to simplify the visualization pipeline. Thank you very much for any help Luca -------------- next part -------------- An HTML attachment was scrubbed... URL: From psakievich at gmail.com Tue Sep 6 12:05:53 2016 From: psakievich at gmail.com (Philip Sakievich) Date: Tue, 6 Sep 2016 09:05:53 -0700 Subject: [vtkusers] Setting extent of pieces in *pvts files vtk-7.0 Message-ID: All, I am trying to integrate vtk xml files into a parallel code I am using for research. I am not the original developer, but I am introducing new functionality for post processing. I am able to write the *vts files locally on each processor, and set the grid's extent for each of these files. I am trying to write the *pvts file on rank 0, but I haven't figured out how to set the extent in this file so the defined pieces match the individual vts files. I am probably just missing a function call, so if someone could help me out that would be great. I have not been able to find any examples online thus far. Here is a section of the c++ code with the writer objects is included below. I am calling this as a function from fortran (the main code is all fortran) and I am passing the MPI rank as nPartition. Right now I only get the extent of the grid stored on rank0 because that is where I am generating the *pvts file. The other files/pieces totally omit the extent parameter and it won't read into paraview unless they are correct. ///---------------CODE SNIPPET------------------------------ //Step 5: Setup writer object and write file int ext[6]={7,14,0,31,0,7}; if(*nPartition==1) sGrid->SetExtent(ext); //THIS WORKS FOR THE *VTS FILES if(*nPartition!=0) { vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(&stFileName[0]); writer->SetInputData(sGrid); writer->Write(); } //Step 6: If partition zero write pvts vile if(*nPartition==0) { stPFileName+=".pvts"; vtkSmartPointer pwriter = vtkSmartPointer::New(); pwriter->SetFileName(&stPFileName[0]); pwriter->SetInputData(sGrid); pwriter->SetNumberOfPieces(8); //pwriter->SetUpdateExtent(1,ext); //THIS DOESN'T SEEM TO DO ANYTHING, INHERITED FROM vtkAlgorthim pwriter->Write(); } ///---------------CODE SNIPPET------------------------------ ///---------------PVTS FILE OUTPUT------------------------ //NEED TO MODIFY WHOLE EXTENT TOO //MISSING EXTENT HERE!!! -- ///---------------PVTS FILE OUTPUT------------------------ Thanks, Phil S. PS sorry if this is a duplicate, I'm new to the user list. I tired to post it before but never saw it sent to my inbox as part of the mailing list. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Tue Sep 6 23:19:17 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Wed, 7 Sep 2016 11:19:17 +0800 (CST) Subject: [vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll In-Reply-To: <1e84fa2d.1c0cf.156fa917492.Coremail.chenjianyyzz@163.com> References: <1e84fa2d.1c0cf.156fa917492.Coremail.chenjianyyzz@163.com> Message-ID: <594659d7.9710.15702a829f2.Coremail.chenjianyyzz@163.com> I am puzzled by the crash for some time, is there anybody who may have a look inside the C# solution and help me to figure out why it's always crash? Thanks in advanced James At 2016-09-05 21:37:31, "chenjianyyzz" wrote: Hello, I have meet the error of unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll, it happens so offen, but I cannot figure out what's the reason. Attached please find complete solution where the error happens. the steps to reproduce it: 1) run under debug mode 2) click the "button1" 10 times quickly (normally I click 10 times less than 5 seconds), and then move the mouse into the RenderWindowControl 3) repeat step2) , normally I repeat step 2) at about 4~5 times, and the crash will happens. I have test it under ActiViz.NET 5.8.0 (download from website directly), ActiVizDotNet6.2 ( I built it myself), Activiz.NET.x64.7.0.0(our company bought it), the above crash can be reproduced with different verion of Activiz. and it happens so offen that in another of my bigger program, it crashes when I click the button only about 3 times. will anybody help me to find out what's the reason? Thanks & Best Regards James partMapper.SetInputData(polyData); ???163???????? STLShowing.7z (25.95M, 2016?10?5? 21:19 ??) ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Sep 7 03:10:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 7 Sep 2016 09:10:06 +0200 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" : > > Hi all, > > I have multiple volumes in a renderer, positioned above/below each other (like a "string" of volumes) along the Z axis, none of them are intersecting. As the user clicks+drags the mouse in the viewport, I need to capture the mouse position at the start/end positions of the drag operation and convert them to world coordinates. I think I have these parts figured out. > > Then, I need to search through the list of my volumes (sorted by their end positions in world coordinates), and construct a series of vtkExtractVOI that will extract the selected segments. For volumes that are completely inside the selected area, the vtkExtractVOI will extract the full volumes, but for the start/end volume (which may be the same volume), it will only extract a portion of it. > > I looked at the vtkDataSet::FindPoint, which I think will give me a linear point ID (not familiar with that from before) for a point given in world coordinates. But how can I convert that to a structured point position that I can use when setting up the extent to use for my vtkExtractVOI? > > Is the static vtkStructuredData::ComputePointStructuredCoords helper the function I'm looking for? Or is there some other easier way to extract an area of a volume when the area is expressed in world coordinates? (specifically, as a start/end Z position in world coordinates). > > Here's an ASCII drawing that perhaps explains better what I want to do, the rectangular areas are my volumes: > > ^ +-----+ > | | | > | | P1 | <--- User clicks here (world coordinate X, Y, Z).. > | | | > Z +-----+ > +-----+ > | | > | | > +-----+ > +-----+ > | | > | | > | P2 | <--- ..and drags to here (world coordinate A, B, C). > | | > | | > | | > +-----+ > > From this I want to create three vtkExtractVOI, that when combined gives a list of vtkImageData that represents the selected area along the Z axis (in the X and Y direction, everything from the volumes should be included). > > Thanks in advance, > Elvis I realized my mail above is a little long-winded and unclear. Sorry about that. In essence, what I'm asking is how to map an x,y,x (double) point in world coordinates to a i,j,k (int) grid position (voxel coordinate) of a given volume. I don't want the nearest point, but to return "null" or equivalent if the world point does not fall inside any voxel. I'd also be interested how to do the same but against a plain vtkImageData instead of a vtkVolume. For this I assume I'd have to provide some info about where in the world the vtkImageData belongs (where/how I intend to map it into the scene). Anyone know what the VTK API for this is? Thanks in advance, Elvis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From remi.charrier at gmail.com Wed Sep 7 06:00:23 2016 From: remi.charrier at gmail.com (Remi Charrier) Date: Wed, 7 Sep 2016 12:00:23 +0200 Subject: [vtkusers] vtkRenderer->UseShadowOn() & QVTKWidget Message-ID: Dear all, Sorry to come back to this but I didn't have any answer to my previous message and I am really blocked here. Thanks to the function UseShadowOn() of the vtkRenderer I am able to create the shadows I expected in a vtkRenderWindow however as soon as I try to link this renderwindow to a QVTKWidget my program crashes with no message (which is not the case when shadows are disabled). Any idea on what could be wrong would be appreciated. My ultimate solution would be to stop using the QVTKWidget and have a GUI without an integrated renderwindow but this would not be optimal at all... R?mi 2016-08-30 16:20 GMT+02:00 Remi Charrier : > Dear all, > > I am trying for quiet a long time to make the projected shadows visible in > a vtkRenderWindow. > I am working with vtk7.0 and OpenGL2 Backend. > I am using scene lights and the function useShadowOn() (much more > practical than the available examples: TestShadowMapPass.cxx ;) ). > > This works well and creates the shadows as I expected them. > > However, I am trying to integrate this in a QVTKWidget and problem start > there. > As soon as I combine shadows and QVTKWidget it crashes without any > message. > I am using Qt-5.7 > > I didn't find any relevant information helping me to understand this > problem and how to solve it. Does anyone as any idea about what could be > wrong in my code or in the elements I am using? > > Please find my code below: > > > CMAKELIST.txt > /**********************************************************/ > PROJECT(TestShadows) > > set(CMAKE_INCLUDE_CURRENT_DIR ON) > set(CMAKE_AUTOMOC ON) > > find_package (VTK COMPONENTS > vtkCommonCore > vtkFiltersSources > vtkInteractionStyle > vtkRenderingCore > vtkIOCore > vtkIOGeometry > vtkIOPLY > vtkRenderingCore > vtkRenderingVolumeOpenGL2 > vtkRenderingOpenGL2${VTK_RENDERING_BACKEND} > vtkRenderingVolume${VTK_RENDERING_BACKEND} > > #for qt app > vtkGUISupportQt > vtkIOImage > ) > > include ( ${VTK_USE_FILE} ) > > include_Directories (${CMAKE_CURRENT_BINARY_DIR}) > > SET(LOGIC_SOURCE > main.cxx ) > > find_package(Qt5 COMPONENTS Core REQUIRED QUIET) > > ADD_EXECUTABLE(TestShadows ${LOGIC_HEADERS} ${LOGIC_SOURCE}) > qt5_use_modules(TestShadows Core Gui Widgets) > TARGET_LINK_LIBRARIES(TestShadows ${VTK_LIBRARIES} ) > > /************************************************************************/ > > main.cxx: > > int main(int argc, char** argv) > { > QApplication app(argc, argv); > > // load 3D model > const char* fileName = "D:/RCH-CHUV/Data/testdata/dragon.ply"; > vtkNew reader; > reader->SetFileName(fileName); > reader->Update(); > > vtkNew mapper; > mapper->SetInputConnection(reader->GetOutputPort()); > > // create corresponding actor > vtkNew actor; > actor->SetMapper(mapper.Get()); > actor->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); > actor->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); > actor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); > actor->GetProperty()->SetSpecular(0.51); > actor->GetProperty()->SetDiffuse(0.7); > actor->GetProperty()->SetAmbient(0.7); > actor->GetProperty()->SetSpecularPower(30.0); > actor->GetProperty()->SetOpacity(1.0); > > const char* fileName2 = "D:/RCH-CHUV/Data/CMR-1/ > meshes/Left-Right/model.stl"; > vtkNew reader2; > reader2->SetFileName(fileName2); > reader2->Update(); > > vtkNew mapper2; > mapper2->SetInputConnection(reader2->GetOutputPort()); > > // create corresponding actor > vtkNew actor2; > actor2->SetMapper(mapper2.Get()); > actor2->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); > actor2->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); > actor2->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); > actor2->GetProperty()->SetSpecular(0.51); > actor2->GetProperty()->SetDiffuse(0.7); > actor2->GetProperty()->SetAmbient(0.7); > actor2->GetProperty()->SetSpecularPower(30.0); > actor2->GetProperty()->SetOpacity(1.0); > actor2->SetPosition(-0.6, -0.6, -0.6); > actor2->SetScale(0.01); > > // create vtkrenderer > vtkNew renderer; > renderer->SetBackground(0.3, 0.4, 0.6); > vtkSmartPointer renderWindow = vtkSmartPointer< > vtkRenderWindow>::New(); > renderWindow->SetSize(600, 600); > renderWindow->AddRenderer(renderer.Get()); > vtkNew iren; > iren->SetRenderWindow(renderWindow.Get()); > > //create lights > vtkNew light1; > light1->SetPositional(0); // 0 and 1 works > light1->SetFocalPoint(0, 0, 0); > light1->SetPosition(0, 1, 0.2); > light1->SetColor(0.95, 0.97, 1.0); > light1->SetIntensity(0.8); > renderer->AddLight(light1.Get()); > > vtkNew light2; > light2->SetPositional(0); // 0 and 1 works > light2->SetFocalPoint(0, 0, 0); > light2->SetPosition(1.0, 1.0, 1.0); > light2->SetColor(1.0, 0.8, 0.7); > light2->SetIntensity(0.3); > renderer->AddLight(light2.Get()); > > > // add a plane > vtkNew plane; > double *plybounds = mapper->GetBounds(); > plane->SetOrigin(-0.2, plybounds[2], -0.2); > plane->SetPoint1(0.2, plybounds[2], -0.2); > plane->SetPoint2(-0.2, plybounds[2], 0.2); > vtkNew planeMapper; > planeMapper->SetInputConnection(plane->GetOutputPort()); > vtkNew planeActor; > planeActor->SetMapper(planeMapper.Get()); > renderer->AddActor(planeActor.Get()); > renderer->AddActor(actor.Get()); > renderer->AddActor(actor2.Get()); > renderWindow->SetMultiSamples(0); > > // this lines is the line that leads to crash when added (it crashes when > the QVTKwidget tries to render) > renderer->UseShadowsOn(); > > > > vtkNew timer; > timer->StartTimer(); > renderWindow->Render(); > timer->StopTimer(); > double firstRender = timer->GetElapsedTime(); > cerr << "first render time: " << firstRender << endl; > > timer->StartTimer(); > int numRenders = 8; > for (int i = 0; i < numRenders; ++i) > { > renderer->GetActiveCamera()->Azimuth(80.0 / numRenders); > renderer->GetActiveCamera()->Elevation(80.0 / numRenders); > renderWindow->Render(); > } > timer->StopTimer(); > double elapsed = timer->GetElapsedTime(); > cerr << "interactive render time: " << elapsed / numRenders << endl; > unsigned int numTris = reader->GetOutput()->GetPolys( > )->GetNumberOfCells(); > cerr << "number of triangles: " << numTris << endl; > cerr << "triangles per second: " << numTris*(numRenders / elapsed) << > endl; > > renderer->GetActiveCamera()->SetPosition(-0.2, 0.2, 1); > renderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); > renderer->GetActiveCamera()->SetViewUp(0, 1, 0); > renderer->GetActiveCamera()->OrthogonalizeViewUp(); > renderer->ResetCamera(); > renderer->GetActiveCamera()->Zoom(2.5); > > > // Declaration of a QVTKWidget associated to the renderWindow > > QVTKWidget * m_3Dwidget = new QVTKWidget(); > m_3Dwidget->update(); > m_3Dwidget->resize(600, 600); > m_3Dwidget->SetRenderWindow(renderWindow); > m_3Dwidget->update(); > > QVTKInteractor * minteractor = QVTKInteractor::New(); > minteractor->Initialize(); > > m_3Dwidget->GetRenderWindow()->SetInteractor(minteractor); > m_3Dwidget->GetRenderWindow()->Render(); > > app.exec(); > > return EXIT_SUCCESS; > > > } > > > R?mi > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mario at emmenlauer.de Wed Sep 7 06:08:46 2016 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Wed, 7 Sep 2016 12:08:46 +0200 Subject: [vtkusers] scatterplot with different marker shapes, sizes and colors? In-Reply-To: References: Message-ID: <836ea68b-761a-60ce-b00c-3be5dbc94d7f@emmenlauer.de> Hi, can somebody help me with this, is it possible to get scatterplots with different marker shapes and/or sizes? Any help would be greatly appreciated! See below for more info... On 27.08.2016 00:55, Mario Emmenlauer wrote: > > I've been using vtkPlot to get a simple and easy-to-use scatterplot, > and it works great! But ideally I'd like to also have different marker > sizes, i.e. to specify a marker size for each point. I could trace the > code into vtkOpenGLContextDevice2D::DrawPointSprites() where the marker > sprites are drawn. But a recommendation would help - is it even possible > and runtime-efficient to have variable sizes? Or would it come at a huge > performance penalty? How is the best way to achieve it, is it required > to patch vtkOpenGLContextDevice2D or are the other means? > > All the best, > > Mario Emmenlauer From flaviu2 at yahoo.com Wed Sep 7 06:39:58 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Wed, 7 Sep 2016 10:39:58 +0000 (UTC) Subject: [vtkusers] Using vtkResliceCursorWidget References: <1250357729.959416.1473244798345.ref@mail.yahoo.com> Message-ID: <1250357729.959416.1473244798345@mail.yahoo.com> Hi all of you. I really need to use vtkResliceCursorWidget object ... but every time when I write: vtkSmartPointer rcw = vtkSmartPointer::New(); I get the following error: 1>vtkInteractionWidgets-6.1.lib(vtkResliceCursorPolyDataAlgorithm.obj) : error LNK2001: unresolved external symbol "public: static class vtkLinearExtrusionFilter * __cdecl vtkLinearExtrusionFilter::New(void)" (?New at vtkLinearExtrusionFilter@@SAPAV1 at XZ) and I have vtkInteractionWidgets-6.1.lib added to my project (other widgets don't have any problem in order to be used). Can you tell me why I get this link error ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Wed Sep 7 08:23:12 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Wed, 7 Sep 2016 08:23:12 -0400 Subject: [vtkusers] vtkRenderer->UseShadowOn() & QVTKWidget In-Reply-To: References: Message-ID: Hi Remi, My first guess (that it was a Qt4 vs Qt5 issue) was wrong. I'm getting the crash either way. The crash is in the rendering backend. This may be an OpenGL2 issue... have you tried it with the old backend? I'm CCing the main rendering backend guru, he may be able to figure this out. For Ken and/or others on the list who try to track this down, I've attached an updated version of the code (with the #includes put back in and the missing data files replaced with sphere sources). It still reproduces the crash. Here is the backtrace: #0 0x00007ffff64e7d82 in std::vector, std::allocator > >::operator[] (this=0x0, __n=0) at /usr/include/c++/5/bits/stl_vector.h:780 #1 0x00007ffff6652ade in vtkShadowMapPass::Render (this=0xaad230, s=0x7fffffffd500) at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkShadowMapPass.cxx:189 #2 0x00007ffff65f0f9e in vtkOpenGLRenderer::UpdateGeometry (this=0x686a20) at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderer.cxx:209 #3 0x00007ffff65f09f1 in vtkOpenGLRenderer::DeviceRender (this=0x686a20) at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderer.cxx:164 #4 0x00007ffff60b8e86 in vtkRenderer::Render (this=0x686a20) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderer.cxx:327 #5 0x00007ffff60b6e1e in vtkRendererCollection::Render (this=0x685cc0) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRendererCollection.cxx:51 #6 0x00007ffff60d0cd1 in vtkRenderWindow::DoStereoRender (this=0x687420) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:768 #7 0x00007ffff60d0bac in vtkRenderWindow::DoFDRender (this=0x687420) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:737 #8 0x00007ffff60d0550 in vtkRenderWindow::DoAARender (this=0x687420) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:616 #9 0x00007ffff60cfa9a in vtkRenderWindow::Render (this=0x687420) at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:432 #10 0x00007ffff65e8fc4 in vtkOpenGLRenderWindow::Render (this=0x687420) /shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:681 #11 0x00007ffff66ad108 in vtkXOpenGLRenderWindow::Render (this=0x687420) at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1823 #12 0x000000000040466d in main () HTH, Shawn On Wed, Sep 7, 2016 at 6:00 AM, Remi Charrier wrote: > Dear all, > > Sorry to come back to this but I didn't have any answer to my previous > message and I am really blocked here. > > Thanks to the function UseShadowOn() of the vtkRenderer I am able to > create the shadows I expected in a vtkRenderWindow however as soon as I try > to link this renderwindow to a QVTKWidget my program crashes with no > message (which is not the case when shadows are disabled). > > Any idea on what could be wrong would be appreciated. > > My ultimate solution would be to stop using the QVTKWidget and have a GUI > without an integrated renderwindow but this would not be optimal at all... > > R?mi > > > > > > 2016-08-30 16:20 GMT+02:00 Remi Charrier : > >> Dear all, >> >> I am trying for quiet a long time to make the projected shadows visible >> in a vtkRenderWindow. >> I am working with vtk7.0 and OpenGL2 Backend. >> I am using scene lights and the function useShadowOn() (much more >> practical than the available examples: TestShadowMapPass.cxx ;) ). >> >> This works well and creates the shadows as I expected them. >> >> However, I am trying to integrate this in a QVTKWidget and problem start >> there. >> As soon as I combine shadows and QVTKWidget it crashes without any >> message. >> I am using Qt-5.7 >> >> I didn't find any relevant information helping me to understand this >> problem and how to solve it. Does anyone as any idea about what could be >> wrong in my code or in the elements I am using? >> >> Please find my code below: >> >> >> CMAKELIST.txt >> /**********************************************************/ >> PROJECT(TestShadows) >> >> set(CMAKE_INCLUDE_CURRENT_DIR ON) >> set(CMAKE_AUTOMOC ON) >> >> find_package (VTK COMPONENTS >> vtkCommonCore >> vtkFiltersSources >> vtkInteractionStyle >> vtkRenderingCore >> vtkIOCore >> vtkIOGeometry >> vtkIOPLY >> vtkRenderingCore >> vtkRenderingVolumeOpenGL2 >> vtkRenderingOpenGL2${VTK_RENDERING_BACKEND} >> vtkRenderingVolume${VTK_RENDERING_BACKEND} >> >> #for qt app >> vtkGUISupportQt >> vtkIOImage >> ) >> >> include ( ${VTK_USE_FILE} ) >> >> include_Directories (${CMAKE_CURRENT_BINARY_DIR}) >> >> SET(LOGIC_SOURCE >> main.cxx ) >> >> find_package(Qt5 COMPONENTS Core REQUIRED QUIET) >> >> ADD_EXECUTABLE(TestShadows ${LOGIC_HEADERS} ${LOGIC_SOURCE}) >> qt5_use_modules(TestShadows Core Gui Widgets) >> TARGET_LINK_LIBRARIES(TestShadows ${VTK_LIBRARIES} ) >> >> /*********************************************************** >> *************/ >> >> main.cxx: >> >> int main(int argc, char** argv) >> { >> QApplication app(argc, argv); >> >> // load 3D model >> const char* fileName = "D:/RCH-CHUV/Data/testdata/dragon.ply"; >> vtkNew reader; >> reader->SetFileName(fileName); >> reader->Update(); >> >> vtkNew mapper; >> mapper->SetInputConnection(reader->GetOutputPort()); >> >> // create corresponding actor >> vtkNew actor; >> actor->SetMapper(mapper.Get()); >> actor->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); >> actor->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); >> actor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); >> actor->GetProperty()->SetSpecular(0.51); >> actor->GetProperty()->SetDiffuse(0.7); >> actor->GetProperty()->SetAmbient(0.7); >> actor->GetProperty()->SetSpecularPower(30.0); >> actor->GetProperty()->SetOpacity(1.0); >> >> const char* fileName2 = "D:/RCH-CHUV/Data/CMR-1/meshes >> /Left-Right/model.stl"; >> vtkNew reader2; >> reader2->SetFileName(fileName2); >> reader2->Update(); >> >> vtkNew mapper2; >> mapper2->SetInputConnection(reader2->GetOutputPort()); >> >> // create corresponding actor >> vtkNew actor2; >> actor2->SetMapper(mapper2.Get()); >> actor2->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); >> actor2->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); >> actor2->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); >> actor2->GetProperty()->SetSpecular(0.51); >> actor2->GetProperty()->SetDiffuse(0.7); >> actor2->GetProperty()->SetAmbient(0.7); >> actor2->GetProperty()->SetSpecularPower(30.0); >> actor2->GetProperty()->SetOpacity(1.0); >> actor2->SetPosition(-0.6, -0.6, -0.6); >> actor2->SetScale(0.01); >> >> // create vtkrenderer >> vtkNew renderer; >> renderer->SetBackground(0.3, 0.4, 0.6); >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> renderWindow->SetSize(600, 600); >> renderWindow->AddRenderer(renderer.Get()); >> vtkNew iren; >> iren->SetRenderWindow(renderWindow.Get()); >> >> //create lights >> vtkNew light1; >> light1->SetPositional(0); // 0 and 1 works >> light1->SetFocalPoint(0, 0, 0); >> light1->SetPosition(0, 1, 0.2); >> light1->SetColor(0.95, 0.97, 1.0); >> light1->SetIntensity(0.8); >> renderer->AddLight(light1.Get()); >> >> vtkNew light2; >> light2->SetPositional(0); // 0 and 1 works >> light2->SetFocalPoint(0, 0, 0); >> light2->SetPosition(1.0, 1.0, 1.0); >> light2->SetColor(1.0, 0.8, 0.7); >> light2->SetIntensity(0.3); >> renderer->AddLight(light2.Get()); >> >> >> // add a plane >> vtkNew plane; >> double *plybounds = mapper->GetBounds(); >> plane->SetOrigin(-0.2, plybounds[2], -0.2); >> plane->SetPoint1(0.2, plybounds[2], -0.2); >> plane->SetPoint2(-0.2, plybounds[2], 0.2); >> vtkNew planeMapper; >> planeMapper->SetInputConnection(plane->GetOutputPort()); >> vtkNew planeActor; >> planeActor->SetMapper(planeMapper.Get()); >> renderer->AddActor(planeActor.Get()); >> renderer->AddActor(actor.Get()); >> renderer->AddActor(actor2.Get()); >> renderWindow->SetMultiSamples(0); >> >> // this lines is the line that leads to crash when added (it crashes when >> the QVTKwidget tries to render) >> renderer->UseShadowsOn(); >> >> >> >> vtkNew timer; >> timer->StartTimer(); >> renderWindow->Render(); >> timer->StopTimer(); >> double firstRender = timer->GetElapsedTime(); >> cerr << "first render time: " << firstRender << endl; >> >> timer->StartTimer(); >> int numRenders = 8; >> for (int i = 0; i < numRenders; ++i) >> { >> renderer->GetActiveCamera()->Azimuth(80.0 / numRenders); >> renderer->GetActiveCamera()->Elevation(80.0 / numRenders); >> renderWindow->Render(); >> } >> timer->StopTimer(); >> double elapsed = timer->GetElapsedTime(); >> cerr << "interactive render time: " << elapsed / numRenders << endl; >> unsigned int numTris = reader->GetOutput()->GetPolys( >> )->GetNumberOfCells(); >> cerr << "number of triangles: " << numTris << endl; >> cerr << "triangles per second: " << numTris*(numRenders / elapsed) << >> endl; >> >> renderer->GetActiveCamera()->SetPosition(-0.2, 0.2, 1); >> renderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); >> renderer->GetActiveCamera()->SetViewUp(0, 1, 0); >> renderer->GetActiveCamera()->OrthogonalizeViewUp(); >> renderer->ResetCamera(); >> renderer->GetActiveCamera()->Zoom(2.5); >> >> >> // Declaration of a QVTKWidget associated to the renderWindow >> >> QVTKWidget * m_3Dwidget = new QVTKWidget(); >> m_3Dwidget->update(); >> m_3Dwidget->resize(600, 600); >> m_3Dwidget->SetRenderWindow(renderWindow); >> m_3Dwidget->update(); >> >> QVTKInteractor * minteractor = QVTKInteractor::New(); >> minteractor->Initialize(); >> >> m_3Dwidget->GetRenderWindow()->SetInteractor(minteractor); >> m_3Dwidget->GetRenderWindow()->Render(); >> >> app.exec(); >> >> return EXIT_SUCCESS; >> >> >> } >> >> >> R?mi >> >> >> > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.tgz Type: application/x-gzip Size: 1987 bytes Desc: not available URL: From cory.quammen at kitware.com Wed Sep 7 09:32:03 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Sep 2016 09:32:03 -0400 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: Elvis, Have a look at vtkImageData::FindPoint(double x, double y, double z). It takes into account the image spacing and origin, but will not correct for any modifications to the position of the vtkVolume you seem to be using to represent it in the scene. HTH, Cory On Wed, Sep 7, 2016 at 3:10 AM, Elvis Stansvik wrote: > Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" > : >> >> Hi all, >> >> I have multiple volumes in a renderer, positioned above/below each other >> (like a "string" of volumes) along the Z axis, none of them are >> intersecting. As the user clicks+drags the mouse in the viewport, I need to >> capture the mouse position at the start/end positions of the drag operation >> and convert them to world coordinates. I think I have these parts figured >> out. >> >> Then, I need to search through the list of my volumes (sorted by their end >> positions in world coordinates), and construct a series of vtkExtractVOI >> that will extract the selected segments. For volumes that are completely >> inside the selected area, the vtkExtractVOI will extract the full volumes, >> but for the start/end volume (which may be the same volume), it will only >> extract a portion of it. >> >> I looked at the vtkDataSet::FindPoint, which I think will give me a linear >> point ID (not familiar with that from before) for a point given in world >> coordinates. But how can I convert that to a structured point position that >> I can use when setting up the extent to use for my vtkExtractVOI? >> >> Is the static vtkStructuredData::ComputePointStructuredCoords helper the >> function I'm looking for? Or is there some other easier way to extract an >> area of a volume when the area is expressed in world coordinates? >> (specifically, as a start/end Z position in world coordinates). >> >> Here's an ASCII drawing that perhaps explains better what I want to do, >> the rectangular areas are my volumes: >> >> ^ +-----+ >> | | | >> | | P1 | <--- User clicks here (world coordinate X, Y, Z).. >> | | | >> Z +-----+ >> +-----+ >> | | >> | | >> +-----+ >> +-----+ >> | | >> | | >> | P2 | <--- ..and drags to here (world coordinate A, B, C). >> | | >> | | >> | | >> +-----+ >> >> From this I want to create three vtkExtractVOI, that when combined gives a >> list of vtkImageData that represents the selected area along the Z axis (in >> the X and Y direction, everything from the volumes should be included). >> >> Thanks in advance, >> Elvis > > I realized my mail above is a little long-winded and unclear. Sorry about > that. In essence, what I'm asking is how to map an x,y,x (double) point in > world coordinates to a i,j,k (int) grid position (voxel coordinate) of a > given volume. I don't want the nearest point, but to return "null" or > equivalent if the world point does not fall inside any voxel. > > I'd also be interested how to do the same but against a plain vtkImageData > instead of a vtkVolume. For this I assume I'd have to provide some info > about where in the world the vtkImageData belongs (where/how I intend to map > it into the scene). > > Anyone know what the VTK API for this is? > > Thanks in advance, > Elvis > >> >> > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From remi.charrier at gmail.com Wed Sep 7 09:39:35 2016 From: remi.charrier at gmail.com (Remi Charrier) Date: Wed, 7 Sep 2016 15:39:35 +0200 Subject: [vtkusers] vtkRenderer->UseShadowOn() & QVTKWidget In-Reply-To: References: Message-ID: Dear Shawn, Thanks for your prompt answer and for your effort (next time, I will use simpler objects when sharing my code...). I just tried with the opengl backend but it seems that the UseShadowOn() function has no effect in this mode. I did not have time to investigate it further today but I will continue to investigate this option. If the rendering backend guru have any other ideas that I can try, please do not hesitate. Thanks again! R?mi 2016-09-07 14:23 GMT+02:00 Shawn Waldon : > Hi Remi, > > My first guess (that it was a Qt4 vs Qt5 issue) was wrong. I'm getting the > crash either way. The crash is in the rendering backend. This may be an > OpenGL2 issue... have you tried it with the old backend? I'm CCing the > main rendering backend guru, he may be able to figure this out. > > For Ken and/or others on the list who try to track this down, I've > attached an updated version of the code (with the #includes put back in and > the missing data files replaced with sphere sources). It still reproduces > the crash. Here is the backtrace: > > #0 0x00007ffff64e7d82 in std::vector, > std::allocator > >::operator[] > (this=0x0, __n=0) > at /usr/include/c++/5/bits/stl_vector.h:780 > #1 0x00007ffff6652ade in vtkShadowMapPass::Render (this=0xaad230, > s=0x7fffffffd500) > at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkShadowMapPass.cxx:189 > #2 0x00007ffff65f0f9e in vtkOpenGLRenderer::UpdateGeometry > (this=0x686a20) > at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderer.cxx:209 > #3 0x00007ffff65f09f1 in vtkOpenGLRenderer::DeviceRender (this=0x686a20) > at /home/shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderer.cxx:164 > #4 0x00007ffff60b8e86 in vtkRenderer::Render (this=0x686a20) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderer.cxx:327 > #5 0x00007ffff60b6e1e in vtkRendererCollection::Render (this=0x685cc0) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRendererCollection.cxx:51 > #6 0x00007ffff60d0cd1 in vtkRenderWindow::DoStereoRender (this=0x687420) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:768 > #7 0x00007ffff60d0bac in vtkRenderWindow::DoFDRender (this=0x687420) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:737 > #8 0x00007ffff60d0550 in vtkRenderWindow::DoAARender (this=0x687420) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:616 > #9 0x00007ffff60cfa9a in vtkRenderWindow::Render (this=0x687420) > at /home/shawn/dev/vtk/src/Rendering/Core/vtkRenderWindow.cxx:432 > #10 0x00007ffff65e8fc4 in vtkOpenGLRenderWindow::Render (this=0x687420) > /shawn/dev/vtk/src/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:681 > #11 0x00007ffff66ad108 in vtkXOpenGLRenderWindow::Render (this=0x687420) > at /home/shawn/dev/vtk/src/Rendering/OpenGL2/ > vtkXOpenGLRenderWindow.cxx:1823 > #12 0x000000000040466d in main () > > HTH, > Shawn > > On Wed, Sep 7, 2016 at 6:00 AM, Remi Charrier > wrote: > >> Dear all, >> >> Sorry to come back to this but I didn't have any answer to my previous >> message and I am really blocked here. >> >> Thanks to the function UseShadowOn() of the vtkRenderer I am able to >> create the shadows I expected in a vtkRenderWindow however as soon as I try >> to link this renderwindow to a QVTKWidget my program crashes with no >> message (which is not the case when shadows are disabled). >> >> Any idea on what could be wrong would be appreciated. >> >> My ultimate solution would be to stop using the QVTKWidget and have a GUI >> without an integrated renderwindow but this would not be optimal at all... >> >> R?mi >> >> >> >> >> >> 2016-08-30 16:20 GMT+02:00 Remi Charrier : >> >>> Dear all, >>> >>> I am trying for quiet a long time to make the projected shadows visible >>> in a vtkRenderWindow. >>> I am working with vtk7.0 and OpenGL2 Backend. >>> I am using scene lights and the function useShadowOn() (much more >>> practical than the available examples: TestShadowMapPass.cxx ;) ). >>> >>> This works well and creates the shadows as I expected them. >>> >>> However, I am trying to integrate this in a QVTKWidget and problem start >>> there. >>> As soon as I combine shadows and QVTKWidget it crashes without any >>> message. >>> I am using Qt-5.7 >>> >>> I didn't find any relevant information helping me to understand this >>> problem and how to solve it. Does anyone as any idea about what could be >>> wrong in my code or in the elements I am using? >>> >>> Please find my code below: >>> >>> >>> CMAKELIST.txt >>> /**********************************************************/ >>> PROJECT(TestShadows) >>> >>> set(CMAKE_INCLUDE_CURRENT_DIR ON) >>> set(CMAKE_AUTOMOC ON) >>> >>> find_package (VTK COMPONENTS >>> vtkCommonCore >>> vtkFiltersSources >>> vtkInteractionStyle >>> vtkRenderingCore >>> vtkIOCore >>> vtkIOGeometry >>> vtkIOPLY >>> vtkRenderingCore >>> vtkRenderingVolumeOpenGL2 >>> vtkRenderingOpenGL2${VTK_RENDERING_BACKEND} >>> vtkRenderingVolume${VTK_RENDERING_BACKEND} >>> >>> #for qt app >>> vtkGUISupportQt >>> vtkIOImage >>> ) >>> >>> include ( ${VTK_USE_FILE} ) >>> >>> include_Directories (${CMAKE_CURRENT_BINARY_DIR}) >>> >>> SET(LOGIC_SOURCE >>> main.cxx ) >>> >>> find_package(Qt5 COMPONENTS Core REQUIRED QUIET) >>> >>> ADD_EXECUTABLE(TestShadows ${LOGIC_HEADERS} ${LOGIC_SOURCE}) >>> qt5_use_modules(TestShadows Core Gui Widgets) >>> TARGET_LINK_LIBRARIES(TestShadows ${VTK_LIBRARIES} ) >>> >>> /*********************************************************** >>> *************/ >>> >>> main.cxx: >>> >>> int main(int argc, char** argv) >>> { >>> QApplication app(argc, argv); >>> >>> // load 3D model >>> const char* fileName = "D:/RCH-CHUV/Data/testdata/dragon.ply"; >>> vtkNew reader; >>> reader->SetFileName(fileName); >>> reader->Update(); >>> >>> vtkNew mapper; >>> mapper->SetInputConnection(reader->GetOutputPort()); >>> >>> // create corresponding actor >>> vtkNew actor; >>> actor->SetMapper(mapper.Get()); >>> actor->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); >>> actor->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); >>> actor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); >>> actor->GetProperty()->SetSpecular(0.51); >>> actor->GetProperty()->SetDiffuse(0.7); >>> actor->GetProperty()->SetAmbient(0.7); >>> actor->GetProperty()->SetSpecularPower(30.0); >>> actor->GetProperty()->SetOpacity(1.0); >>> >>> const char* fileName2 = "D:/RCH-CHUV/Data/CMR-1/meshes >>> /Left-Right/model.stl"; >>> vtkNew reader2; >>> reader2->SetFileName(fileName2); >>> reader2->Update(); >>> >>> vtkNew mapper2; >>> mapper2->SetInputConnection(reader2->GetOutputPort()); >>> >>> // create corresponding actor >>> vtkNew actor2; >>> actor2->SetMapper(mapper2.Get()); >>> actor2->GetProperty()->SetAmbientColor(0.135, 0.2225, 0.3); >>> actor2->GetProperty()->SetDiffuseColor(0.54, 0.89, 0.63); >>> actor2->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); >>> actor2->GetProperty()->SetSpecular(0.51); >>> actor2->GetProperty()->SetDiffuse(0.7); >>> actor2->GetProperty()->SetAmbient(0.7); >>> actor2->GetProperty()->SetSpecularPower(30.0); >>> actor2->GetProperty()->SetOpacity(1.0); >>> actor2->SetPosition(-0.6, -0.6, -0.6); >>> actor2->SetScale(0.01); >>> >>> // create vtkrenderer >>> vtkNew renderer; >>> renderer->SetBackground(0.3, 0.4, 0.6); >>> vtkSmartPointer renderWindow = >>> vtkSmartPointer::New(); >>> renderWindow->SetSize(600, 600); >>> renderWindow->AddRenderer(renderer.Get()); >>> vtkNew iren; >>> iren->SetRenderWindow(renderWindow.Get()); >>> >>> //create lights >>> vtkNew light1; >>> light1->SetPositional(0); // 0 and 1 works >>> light1->SetFocalPoint(0, 0, 0); >>> light1->SetPosition(0, 1, 0.2); >>> light1->SetColor(0.95, 0.97, 1.0); >>> light1->SetIntensity(0.8); >>> renderer->AddLight(light1.Get()); >>> >>> vtkNew light2; >>> light2->SetPositional(0); // 0 and 1 works >>> light2->SetFocalPoint(0, 0, 0); >>> light2->SetPosition(1.0, 1.0, 1.0); >>> light2->SetColor(1.0, 0.8, 0.7); >>> light2->SetIntensity(0.3); >>> renderer->AddLight(light2.Get()); >>> >>> >>> // add a plane >>> vtkNew plane; >>> double *plybounds = mapper->GetBounds(); >>> plane->SetOrigin(-0.2, plybounds[2], -0.2); >>> plane->SetPoint1(0.2, plybounds[2], -0.2); >>> plane->SetPoint2(-0.2, plybounds[2], 0.2); >>> vtkNew planeMapper; >>> planeMapper->SetInputConnection(plane->GetOutputPort()); >>> vtkNew planeActor; >>> planeActor->SetMapper(planeMapper.Get()); >>> renderer->AddActor(planeActor.Get()); >>> renderer->AddActor(actor.Get()); >>> renderer->AddActor(actor2.Get()); >>> renderWindow->SetMultiSamples(0); >>> >>> // this lines is the line that leads to crash when added (it crashes >>> when the QVTKwidget tries to render) >>> renderer->UseShadowsOn(); >>> >>> >>> >>> vtkNew timer; >>> timer->StartTimer(); >>> renderWindow->Render(); >>> timer->StopTimer(); >>> double firstRender = timer->GetElapsedTime(); >>> cerr << "first render time: " << firstRender << endl; >>> >>> timer->StartTimer(); >>> int numRenders = 8; >>> for (int i = 0; i < numRenders; ++i) >>> { >>> renderer->GetActiveCamera()->Azimuth(80.0 / numRenders); >>> renderer->GetActiveCamera()->Elevation(80.0 / numRenders); >>> renderWindow->Render(); >>> } >>> timer->StopTimer(); >>> double elapsed = timer->GetElapsedTime(); >>> cerr << "interactive render time: " << elapsed / numRenders << endl; >>> unsigned int numTris = reader->GetOutput()->GetPolys( >>> )->GetNumberOfCells(); >>> cerr << "number of triangles: " << numTris << endl; >>> cerr << "triangles per second: " << numTris*(numRenders / elapsed) << >>> endl; >>> >>> renderer->GetActiveCamera()->SetPosition(-0.2, 0.2, 1); >>> renderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); >>> renderer->GetActiveCamera()->SetViewUp(0, 1, 0); >>> renderer->GetActiveCamera()->OrthogonalizeViewUp(); >>> renderer->ResetCamera(); >>> renderer->GetActiveCamera()->Zoom(2.5); >>> >>> >>> // Declaration of a QVTKWidget associated to the renderWindow >>> >>> QVTKWidget * m_3Dwidget = new QVTKWidget(); >>> m_3Dwidget->update(); >>> m_3Dwidget->resize(600, 600); >>> m_3Dwidget->SetRenderWindow(renderWindow); >>> m_3Dwidget->update(); >>> >>> QVTKInteractor * minteractor = QVTKInteractor::New(); >>> minteractor->Initialize(); >>> >>> m_3Dwidget->GetRenderWindow()->SetInteractor(minteractor); >>> m_3Dwidget->GetRenderWindow()->Render(); >>> >>> app.exec(); >>> >>> return EXIT_SUCCESS; >>> >>> >>> } >>> >>> >>> R?mi >>> >>> >>> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Sep 7 09:40:20 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Sep 2016 09:40:20 -0400 Subject: [vtkusers] Using vtkResliceCursorWidget In-Reply-To: <1250357729.959416.1473244798345@mail.yahoo.com> References: <1250357729.959416.1473244798345.ref@mail.yahoo.com> <1250357729.959416.1473244798345@mail.yahoo.com> Message-ID: Looks like you also need to link against vtkFiltersModeling-6.1.lib. HTH, Cory On Wed, Sep 7, 2016 at 6:39 AM, Flaviu2 via vtkusers wrote: > Hi all of you. I really need to use vtkResliceCursorWidget object ... but > every time when I write: > > vtkSmartPointer rcw = > vtkSmartPointer::New(); > > I get the following error: > > 1>vtkInteractionWidgets-6.1.lib(vtkResliceCursorPolyDataAlgorithm.obj) : > error LNK2001: unresolved external symbol "public: static class > vtkLinearExtrusionFilter * __cdecl vtkLinearExtrusionFilter::New(void)" > (?New at vtkLinearExtrusionFilter@@SAPAV1 at XZ) > > and I have vtkInteractionWidgets-6.1.lib added to my project (other widgets > don't have any problem in order to be used). > > Can you tell me why I get this link error ? Thank you. > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From cory.quammen at kitware.com Wed Sep 7 09:43:49 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Sep 2016 09:43:49 -0400 Subject: [vtkusers] scatterplot with different marker shapes, sizes and colors? In-Reply-To: <836ea68b-761a-60ce-b00c-3be5dbc94d7f@emmenlauer.de> References: <836ea68b-761a-60ce-b00c-3be5dbc94d7f@emmenlauer.de> Message-ID: Mario, I am not aware of any capability in VTK to change the marker points or shapes based on the input data. A patch would be required to support that. It might be too hard to implement if you want to give it a try. Best, Cory On Wed, Sep 7, 2016 at 6:08 AM, Mario Emmenlauer wrote: > > Hi, > > can somebody help me with this, is it possible to get scatterplots with > different marker shapes and/or sizes? Any help would be greatly appreciated! > See below for more info... > > > On 27.08.2016 00:55, Mario Emmenlauer wrote: >> >> I've been using vtkPlot to get a simple and easy-to-use scatterplot, >> and it works great! But ideally I'd like to also have different marker >> sizes, i.e. to specify a marker size for each point. I could trace the >> code into vtkOpenGLContextDevice2D::DrawPointSprites() where the marker >> sprites are drawn. But a recommendation would help - is it even possible >> and runtime-efficient to have variable sizes? Or would it come at a huge >> performance penalty? How is the best way to achieve it, is it required >> to patch vtkOpenGLContextDevice2D or are the other means? >> >> All the best, >> >> Mario Emmenlauer > > > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From mario at emmenlauer.de Wed Sep 7 11:07:05 2016 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Wed, 7 Sep 2016 17:07:05 +0200 Subject: [vtkusers] scatterplot with different marker shapes, sizes and colors? In-Reply-To: References: <836ea68b-761a-60ce-b00c-3be5dbc94d7f@emmenlauer.de> Message-ID: Thanks Cory for the quick reply! If I'd send a patch, would you find it worthwhile to include it in the repository? Cheers, Mario On 07.09.2016 15:43, Cory Quammen wrote: > Mario, > > I am not aware of any capability in VTK to change the marker points or > shapes based on the input data. A patch would be required to support > that. It might be too hard to implement if you want to give it a try. > > Best, > Cory > > On Wed, Sep 7, 2016 at 6:08 AM, Mario Emmenlauer wrote: >> >> Hi, >> >> can somebody help me with this, is it possible to get scatterplots with >> different marker shapes and/or sizes? Any help would be greatly appreciated! >> See below for more info... >> >> >> On 27.08.2016 00:55, Mario Emmenlauer wrote: >>> >>> I've been using vtkPlot to get a simple and easy-to-use scatterplot, >>> and it works great! But ideally I'd like to also have different marker >>> sizes, i.e. to specify a marker size for each point. I could trace the >>> code into vtkOpenGLContextDevice2D::DrawPointSprites() where the marker >>> sprites are drawn. But a recommendation would help - is it even possible >>> and runtime-efficient to have variable sizes? Or would it come at a huge >>> performance penalty? How is the best way to achieve it, is it required >>> to patch vtkOpenGLContextDevice2D or are the other means? >>> >>> All the best, >>> >>> Mario Emmenlauer Viele Gruesse, Mario Emmenlauer -- BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 Balanstr. 43 mailto: memmenlauer * biodataanalysis.de D-81669 M?nchen http://www.biodataanalysis.de/ From elvis.stansvik at orexplore.com Wed Sep 7 11:55:20 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 7 Sep 2016 17:55:20 +0200 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: Den 7 sep. 2016 3:32 em skrev "Cory Quammen" : > > Elvis, > > Have a look at vtkImageData::FindPoint(double x, double y, double z). > > It takes into account the image spacing and origin, but will not > correct for any modifications to the position of the vtkVolume you > seem to be using to represent it in the scene. Thanks Cory, I did initially find FindPoint, but I was unsure how I can translate the vtkIdType it returns (some sort of index?) into i,j,k voxel coordinate. Do you know? Since then I've also found vtkImageData::ComputeStructuredCoordinates, which looks similar, but does seem to produce a ijk voxel coordinate. Perhaps that is the function I'm looking for? It's doubly interesting since it has a static variant where I can specify the origin, spacing etc manually, which I might have a need for actually, if I want to do the same computation but don't have access to an actual vtkImageData instance, only its parameters so to speak. Elvis > > HTH, > Cory > > > > On Wed, Sep 7, 2016 at 3:10 AM, Elvis Stansvik > wrote: > > Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" > > : > >> > >> Hi all, > >> > >> I have multiple volumes in a renderer, positioned above/below each other > >> (like a "string" of volumes) along the Z axis, none of them are > >> intersecting. As the user clicks+drags the mouse in the viewport, I need to > >> capture the mouse position at the start/end positions of the drag operation > >> and convert them to world coordinates. I think I have these parts figured > >> out. > >> > >> Then, I need to search through the list of my volumes (sorted by their end > >> positions in world coordinates), and construct a series of vtkExtractVOI > >> that will extract the selected segments. For volumes that are completely > >> inside the selected area, the vtkExtractVOI will extract the full volumes, > >> but for the start/end volume (which may be the same volume), it will only > >> extract a portion of it. > >> > >> I looked at the vtkDataSet::FindPoint, which I think will give me a linear > >> point ID (not familiar with that from before) for a point given in world > >> coordinates. But how can I convert that to a structured point position that > >> I can use when setting up the extent to use for my vtkExtractVOI? > >> > >> Is the static vtkStructuredData::ComputePointStructuredCoords helper the > >> function I'm looking for? Or is there some other easier way to extract an > >> area of a volume when the area is expressed in world coordinates? > >> (specifically, as a start/end Z position in world coordinates). > >> > >> Here's an ASCII drawing that perhaps explains better what I want to do, > >> the rectangular areas are my volumes: > >> > >> ^ +-----+ > >> | | | > >> | | P1 | <--- User clicks here (world coordinate X, Y, Z).. > >> | | | > >> Z +-----+ > >> +-----+ > >> | | > >> | | > >> +-----+ > >> +-----+ > >> | | > >> | | > >> | P2 | <--- ..and drags to here (world coordinate A, B, C). > >> | | > >> | | > >> | | > >> +-----+ > >> > >> From this I want to create three vtkExtractVOI, that when combined gives a > >> list of vtkImageData that represents the selected area along the Z axis (in > >> the X and Y direction, everything from the volumes should be included). > >> > >> Thanks in advance, > >> Elvis > > > > I realized my mail above is a little long-winded and unclear. Sorry about > > that. In essence, what I'm asking is how to map an x,y,x (double) point in > > world coordinates to a i,j,k (int) grid position (voxel coordinate) of a > > given volume. I don't want the nearest point, but to return "null" or > > equivalent if the world point does not fall inside any voxel. > > > > I'd also be interested how to do the same but against a plain vtkImageData > > instead of a vtkVolume. For this I assume I'd have to provide some info > > about where in the world the vtkImageData belongs (where/how I intend to map > > it into the scene). > > > > Anyone know what the VTK API for this is? > > > > Thanks in advance, > > Elvis > > > >> > >> > > > > > > _______________________________________________ > > 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 VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hongzhi at stanford.edu Wed Sep 7 12:08:07 2016 From: hongzhi at stanford.edu (Hongzhi Lan) Date: Wed, 7 Sep 2016 16:08:07 +0000 Subject: [vtkusers] Z buffer issue of QVTKWidget in Linux In-Reply-To: References: , Message-ID: Hi Elvis, I tried your fix and it works!! Thank you so much! Hongzhi ________________________________ From: Elvis Stansvik Sent: Saturday, September 3, 2016 11:59:09 PM To: Hongzhi Lan Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Z buffer issue of QVTKWidget in Linux 2016-09-02 20:46 GMT+02:00 Hongzhi Lan >: Hi all, Recently I have an issue with QVTKWidget in my new dell computer. It didn't happen in any of my other computers. I think it's a z buffer issue? I combined two examples from http://www.vtk.org/Wiki/VTK/Examples/Cxx to reproduce the issue (see the attached image). The image slice is supposed to insert into the sphere but it doesn't render in this way in my case. The sphere looks not ok either. I know someone mentioned this issue before, but it's not solved yet, so I hope to get some help about it. I also tried to use QVTKWidget2 and was able to compile successfully, but when I ran it, I got the error below and a black renderwindow. I really want to get QVTKWidget or QVTKWidget work for my case. Any suggestions? Hi Hongzhi, I have the following in my QVTKWidget subclass to get around this issue: QSurfaceFormat surfaceFormat = windowHandle()->format(); surfaceFormat.setStencilBufferSize(8); windowHandle()->setFormat(surfaceFormat); Hope that works out for you too. Elvis My computer configurations are: ---------------------------------------------- Dell desktop OptiPlex 7040 CPU: Intel? Core? i7-6700 CPU @ 3.40GHz ? 8 Graphics: Intel? HD Graphics 530 (Skylake GT2) OS: Linux Ubuntu 14.04.5 64bit VTK: 6.2 Qt: 5.4.2 Thanks a lot! Hongzhi =========================== ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRepresentationPainter.cxx, line 128 vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 139 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 126 vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line 118 vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 192 vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected 0 : (1280) Invalid enum ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, line 646 vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 575 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 1135 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 282 vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, line 154 vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected 0 : (1282) Invalid operation Generic Warning: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 52 failed after ReleaseAllLists 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 127 vtkOpenGLImageSliceMapper (0x1da2ba0): failed after ReleaseGraphicsResources 1 OpenGL errors detected 0 : (1280) Invalid enum _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 7 12:58:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 7 Sep 2016 10:58:18 -0600 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: Hi Elvis, Let's break this down into two parts: 1) Going from VTK world coords to VTK data coords is achieved via the prop matrix (where a "prop" is a vtkActor, a vtkVolume, a vtkImageSlice, etc): For data-to-world, apply the matrix to the point. For world-to-data, apply the inverse of the matrix. 2) Going from VTK data coords (x,y,z) to point indices (i,j,k) is done with these equations: x = origin[0] + i * spacing[0] y = origin[1] + j * spacing[1] z = origin[2] + k * spacing[2] i = round((x - origin[0])/spacing[0]) j = round((y - origin[1])/spacing[1]) k = round((z - origin[2])/spacing[2]) Personally, I avoid using any VTK APIs to do these computations, for two reasons: a) I prefer mathematical abstractions over programatic abstractions. If I have the equations, then I can combine them and simplify them and often achieve nice performance gains as a result. b) When I look at the available APIs, sometimes I find they were written for a subtly different purpose than my own. For example, consider vtkImageData::ComputeStructuredPoints: int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3]); It looks like it might do what you want, right? But in fact it was written to work with VTK's abstract concept of a "cell" where, for vtkImageData, a cell is a box with a sample point (i.e. what we typically think of as a voxel) at each corner. So the above method gives us indices to tell us which cell we are in, but we'd have to check the pcoords to find out what point we are closest to. At that point, we might as well just ignore this API and use the equations given in (2). As an aside, whenever you're dealing with VTK data, you should always keep in mind that the APIs were written according to the way that VTK's defines its "data set" abstraction, i.e. points and cells and attributes thereof. It's necessary to have a firm grasp of this abstraction in order to use VTK to its utmost. However, it's equally necessary to understand that not all problems fit nicely into this abstraction, and sometimes VTK's API's aren't going to nicely match the problem that one is trying to solve. In those cases, it can be useful to (a) read the VTK source code to understand exactly what VTK is doing, and (b) figure out exactly how you might have to do things differently. - David On Wed, Sep 7, 2016 at 9:55 AM, Elvis Stansvik wrote: > Den 7 sep. 2016 3:32 em skrev "Cory Quammen" : > > > > Elvis, > > > > Have a look at vtkImageData::FindPoint(double x, double y, double z). > > > > It takes into account the image spacing and origin, but will not > > correct for any modifications to the position of the vtkVolume you > > seem to be using to represent it in the scene. > > Thanks Cory, > > I did initially find FindPoint, but I was unsure how I can translate the > vtkIdType it returns (some sort of index?) into i,j,k voxel coordinate. Do > you know? > > Since then I've also found vtkImageData::ComputeStructuredCoordinates, > which looks similar, but does seem to produce a ijk voxel coordinate. > Perhaps that is the function I'm looking for? It's doubly interesting since > it has a static variant where I can specify the origin, spacing etc > manually, which I might have a need for actually, if I want to do the same > computation but don't have access to an actual vtkImageData instance, only > its parameters so to speak. > > Elvis > > > > > HTH, > > Cory > > > > > > > > On Wed, Sep 7, 2016 at 3:10 AM, Elvis Stansvik > > wrote: > > > Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" > > > : > > >> > > >> Hi all, > > >> > > >> I have multiple volumes in a renderer, positioned above/below each > other > > >> (like a "string" of volumes) along the Z axis, none of them are > > >> intersecting. As the user clicks+drags the mouse in the viewport, I > need to > > >> capture the mouse position at the start/end positions of the drag > operation > > >> and convert them to world coordinates. I think I have these parts > figured > > >> out. > > >> > > >> Then, I need to search through the list of my volumes (sorted by > their end > > >> positions in world coordinates), and construct a series of > vtkExtractVOI > > >> that will extract the selected segments. For volumes that are > completely > > >> inside the selected area, the vtkExtractVOI will extract the full > volumes, > > >> but for the start/end volume (which may be the same volume), it will > only > > >> extract a portion of it. > > >> > > >> I looked at the vtkDataSet::FindPoint, which I think will give me a > linear > > >> point ID (not familiar with that from before) for a point given in > world > > >> coordinates. But how can I convert that to a structured point > position that > > >> I can use when setting up the extent to use for my vtkExtractVOI? > > >> > > >> Is the static vtkStructuredData::ComputePointStructuredCoords helper > the > > >> function I'm looking for? Or is there some other easier way to > extract an > > >> area of a volume when the area is expressed in world coordinates? > > >> (specifically, as a start/end Z position in world coordinates). > > >> > > >> Here's an ASCII drawing that perhaps explains better what I want to > do, > > >> the rectangular areas are my volumes: > > >> > > >> ^ +-----+ > > >> | | | > > >> | | P1 | <--- User clicks here (world coordinate X, Y, Z).. > > >> | | | > > >> Z +-----+ > > >> +-----+ > > >> | | > > >> | | > > >> +-----+ > > >> +-----+ > > >> | | > > >> | | > > >> | P2 | <--- ..and drags to here (world coordinate A, B, C). > > >> | | > > >> | | > > >> | | > > >> +-----+ > > >> > > >> From this I want to create three vtkExtractVOI, that when combined > gives a > > >> list of vtkImageData that represents the selected area along the Z > axis (in > > >> the X and Y direction, everything from the volumes should be > included). > > >> > > >> Thanks in advance, > > >> Elvis > > > > > > I realized my mail above is a little long-winded and unclear. Sorry > about > > > that. In essence, what I'm asking is how to map an x,y,x (double) > point in > > > world coordinates to a i,j,k (int) grid position (voxel coordinate) of > a > > > given volume. I don't want the nearest point, but to return "null" or > > > equivalent if the world point does not fall inside any voxel. > > > > > > I'd also be interested how to do the same but against a plain > vtkImageData > > > instead of a vtkVolume. For this I assume I'd have to provide some info > > > about where in the world the vtkImageData belongs (where/how I intend > to map > > > it into the scene). > > > > > > Anyone know what the VTK API for this is? > > > > > > Thanks in advance, > > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Sep 7 14:16:26 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 7 Sep 2016 20:16:26 +0200 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: 2016-09-07 18:58 GMT+02:00 David Gobbi : > Hi Elvis, > > Let's break this down into two parts: > > 1) Going from VTK world coords to VTK data coords is achieved via the prop > matrix (where a "prop" is a vtkActor, a vtkVolume, a vtkImageSlice, etc): > > For data-to-world, apply the matrix to the point. > For world-to-data, apply the inverse of the matrix. > > 2) Going from VTK data coords (x,y,z) to point indices (i,j,k) is done > with these equations: > > x = origin[0] + i * spacing[0] > y = origin[1] + j * spacing[1] > z = origin[2] + k * spacing[2] > > i = round((x - origin[0])/spacing[0]) > j = round((y - origin[1])/spacing[1]) > k = round((z - origin[2])/spacing[2]) > > Personally, I avoid using any VTK APIs to do these computations, for two > reasons: > > a) I prefer mathematical abstractions over programatic abstractions. If I > have the equations, then I can combine them and simplify them and often > achieve nice performance gains as a result. > > b) When I look at the available APIs, sometimes I find they were written > for a subtly different purpose than my own. For example, consider > vtkImageData::ComputeStructuredPoints: > > int ComputeStructuredCoordinates(const double x[3], int ijk[3], double > pcoords[3]); > > It looks like it might do what you want, right? But in fact it was > written to work with VTK's abstract concept of a "cell" where, for > vtkImageData, a cell is a box with a sample point (i.e. what we typically > think of as a voxel) at each corner. So the above method gives us indices > to tell us which cell we are in, but we'd have to check the pcoords to find > out what point we are closest to. At that point, we might as well just > ignore this API and use the equations given in (2). > David, you provide an excellent answer as always :) Of course I always knew I could do these transformations myself, but for some reason (well, see below) I was looking for an API that would fit like a glove. Your reasons above are compelling. > > As an aside, whenever you're dealing with VTK data, you should always keep > in mind that the APIs were written according to the way that VTK's defines > its "data set" abstraction, i.e. points and cells and attributes thereof. > It's necessary to have a firm grasp of this abstraction in order to use VTK > to its utmost. However, it's equally necessary to understand that not all > problems fit nicely into this abstraction, and sometimes VTK's API's aren't > going to nicely match the problem that one is trying to solve. In those > cases, it can be useful to (a) read the VTK source code to understand > exactly what VTK is doing, and (b) figure out exactly how you might have to > do things differently. > Indeed, I think that as a newcomer to VTK, due to the richness of its API, you sometimes become a little too used to there being a canned solution for your problem available. At least I know I'm guilty of it at times.. Also thanks for clarifying what "cells" are (or well, at least in the context of vtkImageData). It explains the the API of ComputeStructuredCoordinates, which I thought a bit strange at first, and which gives me more info than I need. Cheers, Elvis > > - David > > > > On Wed, Sep 7, 2016 at 9:55 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> Den 7 sep. 2016 3:32 em skrev "Cory Quammen" : >> > >> > Elvis, >> > >> > Have a look at vtkImageData::FindPoint(double x, double y, double z). >> > >> > It takes into account the image spacing and origin, but will not >> > correct for any modifications to the position of the vtkVolume you >> > seem to be using to represent it in the scene. >> >> Thanks Cory, >> >> I did initially find FindPoint, but I was unsure how I can translate the >> vtkIdType it returns (some sort of index?) into i,j,k voxel coordinate. Do >> you know? >> >> Since then I've also found vtkImageData::ComputeStructuredCoordinates, >> which looks similar, but does seem to produce a ijk voxel coordinate. >> Perhaps that is the function I'm looking for? It's doubly interesting since >> it has a static variant where I can specify the origin, spacing etc >> manually, which I might have a need for actually, if I want to do the same >> computation but don't have access to an actual vtkImageData instance, only >> its parameters so to speak. >> >> Elvis >> >> > >> > HTH, >> > Cory >> > >> > >> > >> > On Wed, Sep 7, 2016 at 3:10 AM, Elvis Stansvik >> > wrote: >> > > Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" >> > > : >> > >> >> > >> Hi all, >> > >> >> > >> I have multiple volumes in a renderer, positioned above/below each >> other >> > >> (like a "string" of volumes) along the Z axis, none of them are >> > >> intersecting. As the user clicks+drags the mouse in the viewport, I >> need to >> > >> capture the mouse position at the start/end positions of the drag >> operation >> > >> and convert them to world coordinates. I think I have these parts >> figured >> > >> out. >> > >> >> > >> Then, I need to search through the list of my volumes (sorted by >> their end >> > >> positions in world coordinates), and construct a series of >> vtkExtractVOI >> > >> that will extract the selected segments. For volumes that are >> completely >> > >> inside the selected area, the vtkExtractVOI will extract the full >> volumes, >> > >> but for the start/end volume (which may be the same volume), it will >> only >> > >> extract a portion of it. >> > >> >> > >> I looked at the vtkDataSet::FindPoint, which I think will give me a >> linear >> > >> point ID (not familiar with that from before) for a point given in >> world >> > >> coordinates. But how can I convert that to a structured point >> position that >> > >> I can use when setting up the extent to use for my vtkExtractVOI? >> > >> >> > >> Is the static vtkStructuredData::ComputePointStructuredCoords >> helper the >> > >> function I'm looking for? Or is there some other easier way to >> extract an >> > >> area of a volume when the area is expressed in world coordinates? >> > >> (specifically, as a start/end Z position in world coordinates). >> > >> >> > >> Here's an ASCII drawing that perhaps explains better what I want to >> do, >> > >> the rectangular areas are my volumes: >> > >> >> > >> ^ +-----+ >> > >> | | | >> > >> | | P1 | <--- User clicks here (world coordinate X, Y, Z).. >> > >> | | | >> > >> Z +-----+ >> > >> +-----+ >> > >> | | >> > >> | | >> > >> +-----+ >> > >> +-----+ >> > >> | | >> > >> | | >> > >> | P2 | <--- ..and drags to here (world coordinate A, B, C). >> > >> | | >> > >> | | >> > >> | | >> > >> +-----+ >> > >> >> > >> From this I want to create three vtkExtractVOI, that when combined >> gives a >> > >> list of vtkImageData that represents the selected area along the Z >> axis (in >> > >> the X and Y direction, everything from the volumes should be >> included). >> > >> >> > >> Thanks in advance, >> > >> Elvis >> > > >> > > I realized my mail above is a little long-winded and unclear. Sorry >> about >> > > that. In essence, what I'm asking is how to map an x,y,x (double) >> point in >> > > world coordinates to a i,j,k (int) grid position (voxel coordinate) >> of a >> > > given volume. I don't want the nearest point, but to return "null" or >> > > equivalent if the world point does not fall inside any voxel. >> > > >> > > I'd also be interested how to do the same but against a plain >> vtkImageData >> > > instead of a vtkVolume. For this I assume I'd have to provide some >> info >> > > about where in the world the vtkImageData belongs (where/how I intend >> to map >> > > it into the scene). >> > > >> > > Anyone know what the VTK API for this is? >> > > >> > > Thanks in advance, >> > > Elvis >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Sep 7 14:32:12 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 7 Sep 2016 20:32:12 +0200 Subject: [vtkusers] Z buffer issue of QVTKWidget in Linux In-Reply-To: References: Message-ID: 2016-09-07 18:08 GMT+02:00 Hongzhi Lan : > Hi Elvis, > > > I tried your fix and it works!! Thank you so much! > No problem, glad it helped. Elvis > > Hongzhi > ------------------------------ > *From:* Elvis Stansvik > *Sent:* Saturday, September 3, 2016 11:59:09 PM > *To:* Hongzhi Lan > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Z buffer issue of QVTKWidget in Linux > > 2016-09-02 20:46 GMT+02:00 Hongzhi Lan : > >> Hi all, >> >> >> Recently I have an issue with QVTKWidget in my new dell computer. It >> didn't happen in any of my other computers. I think it's a z buffer issue? >> I combined two examples from http://www.vtk.org/Wiki/VTK/Examples/Cxx to >> reproduce the issue (see the attached image). The image slice is supposed >> to insert into the sphere but it doesn't render in this way in my case. The >> sphere looks not ok either. I know someone mentioned this issue before, but >> it's not solved yet, so I hope to get some help about it. >> >> >> I also tried to use QVTKWidget2 and was able to compile successfully, but >> when I ran it, I got the error below and a black renderwindow. I really >> want to get QVTKWidget or QVTKWidget work for my case. Any suggestions? >> > Hi Hongzhi, > > I have the following in my QVTKWidget subclass to get around this issue: > > QSurfaceFormat surfaceFormat = windowHandle()->format(); > surfaceFormat.setStencilBufferSize(8); > windowHandle()->setFormat(surfaceFormat); > > Hope that works out for you too. > > Elvis > >> >> My computer configurations are: >> >> ---------------------------------------------- >> >> Dell desktop OptiPlex 7040 >> >> CPU: Intel? Core? i7-6700 CPU @ 3.40GHz ? 8 >> >> Graphics: Intel? HD Graphics 530 (Skylake GT2) >> >> OS: Linux Ubuntu 14.04.5 64bit >> >> VTK: 6.2 >> >> Qt: 5.4.2 >> >> >> >> Thanks a lot! >> >> Hongzhi >> >> >> =========================== >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 139 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 126 >> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line >> 118 >> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 192 >> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors >> detected >> 0 : (1280) Invalid enum >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, >> line 646 >> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRepresentationPainter.cxx, >> line 128 >> vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, >> line 188 >> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 575 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 1135 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 282 >> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 154 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 139 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 126 >> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line >> 118 >> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 192 >> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors >> detected >> 0 : (1280) Invalid enum >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, >> line 646 >> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, >> line 188 >> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 575 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 1135 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 282 >> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 154 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 139 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 126 >> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line >> 118 >> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 192 >> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors >> detected >> 0 : (1280) Invalid enum >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, >> line 646 >> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, >> line 188 >> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 575 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 1135 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 282 >> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 154 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 139 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 126 >> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line >> 118 >> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 192 >> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors >> detected >> 0 : (1280) Invalid enum >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx, >> line 646 >> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, >> line 188 >> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 575 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 >> OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 1135 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx, >> line 282 >> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors >> detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx, >> line 154 >> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL >> errors detected >> 0 : (1282) Invalid operation >> >> >> Generic Warning: In .../SourceCode/VTK/Rendering/O >> penGL/vtkOpenGLDisplayListPainter.cxx, line 52 >> failed after ReleaseAllLists 1 OpenGL errors detected >> 0 : (1282) Invalid operation >> >> >> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, >> line 127 >> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after >> ReleaseGraphicsResources 1 OpenGL errors detected >> 0 : (1280) Invalid enum >> >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alvaro.sanchez at kitware.com Wed Sep 7 15:06:37 2016 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Wed, 7 Sep 2016 15:06:37 -0400 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: On Wed, Sep 7, 2016 at 12:58 PM, David Gobbi wrote: > Hi Elvis, > > Let's break this down into two parts: > > 1) Going from VTK world coords to VTK data coords is achieved via the prop > matrix (where a "prop" is a vtkActor, a vtkVolume, a vtkImageSlice, etc): > > For data-to-world, apply the matrix to the point. > For world-to-data, apply the inverse of the matrix. > > 2) Going from VTK data coords (x,y,z) to point indices (i,j,k) is done > with these equations: > > x = origin[0] + i * spacing[0] > y = origin[1] + j * spacing[1] > z = origin[2] + k * spacing[2] > > i = round((x - origin[0])/spacing[0]) > j = round((y - origin[1])/spacing[1]) > k = round((z - origin[2])/spacing[2]) > > Personally, I avoid using any VTK APIs to do these computations, for two > reasons: > > a) I prefer mathematical abstractions over programatic abstractions. If I > have the equations, then I can combine them and simplify them and often > achieve nice performance gains as a result. > I totally agree David, I would even arrange transformation (2) into a matrix with a scaling diagonal (spacing) and a translation vector (origin) and apply (2) similarly to how (1) is applied. > > On Wed, Sep 7, 2016 at 9:55 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> Den 7 sep. 2016 3:32 em skrev "Cory Quammen" : >> > >> > Elvis, >> > >> > Have a look at vtkImageData::FindPoint(double x, double y, double z). >> > >> > It takes into account the image spacing and origin, but will not >> > correct for any modifications to the position of the vtkVolume you >> > seem to be using to represent it in the scene. >> >> Thanks Cory, >> >> I did initially find FindPoint, but I was unsure how I can translate the >> vtkIdType it returns (some sort of index?) into i,j,k voxel coordinate. Do >> you know? >> >> Since then I've also found vtkImageData::ComputeStructuredCoordinates, >> which looks similar, but does seem to produce a ijk voxel coordinate. >> Perhaps that is the function I'm looking for? It's doubly interesting since >> it has a static variant where I can specify the origin, spacing etc >> manually, which I might have a need for actually, if I want to do the same >> computation but don't have access to an actual vtkImageData instance, only >> its parameters so to speak. >> >> Elvis >> >> > >> > HTH, >> > Cory >> > >> > >> > >> > On Wed, Sep 7, 2016 at 3:10 AM, Elvis Stansvik >> > wrote: >> > > Den 4 sep. 2016 2:25 em skrev "Elvis Stansvik" >> > > : >> > >> >> > >> Hi all, >> > >> >> > >> I have multiple volumes in a renderer, positioned above/below each >> other >> > >> (like a "string" of volumes) along the Z axis, none of them are >> > >> intersecting. As the user clicks+drags the mouse in the viewport, I >> need to >> > >> capture the mouse position at the start/end positions of the drag >> operation >> > >> and convert them to world coordinates. I think I have these parts >> figured >> > >> out. >> > >> >> > >> Then, I need to search through the list of my volumes (sorted by >> their end >> > >> positions in world coordinates), and construct a series of >> vtkExtractVOI >> > >> that will extract the selected segments. For volumes that are >> completely >> > >> inside the selected area, the vtkExtractVOI will extract the full >> volumes, >> > >> but for the start/end volume (which may be the same volume), it will >> only >> > >> extract a portion of it. >> > >> >> > >> I looked at the vtkDataSet::FindPoint, which I think will give me a >> linear >> > >> point ID (not familiar with that from before) for a point given in >> world >> > >> coordinates. But how can I convert that to a structured point >> position that >> > >> I can use when setting up the extent to use for my vtkExtractVOI? >> > >> >> > >> Is the static vtkStructuredData::ComputePointStructuredCoords >> helper the >> > >> function I'm looking for? Or is there some other easier way to >> extract an >> > >> area of a volume when the area is expressed in world coordinates? >> > >> (specifically, as a start/end Z position in world coordinates). >> > >> >> > >> Here's an ASCII drawing that perhaps explains better what I want to >> do, >> > >> the rectangular areas are my volumes: >> > >> >> > >> ^ +-----+ >> > >> | | | >> > >> | | P1 | <--- User clicks here (world coordinate X, Y, Z).. >> > >> | | | >> > >> Z +-----+ >> > >> +-----+ >> > >> | | >> > >> | | >> > >> +-----+ >> > >> +-----+ >> > >> | | >> > >> | | >> > >> | P2 | <--- ..and drags to here (world coordinate A, B, C). >> > >> | | >> > >> | | >> > >> | | >> > >> +-----+ >> > >> >> > >> From this I want to create three vtkExtractVOI, that when combined >> gives a >> > >> list of vtkImageData that represents the selected area along the Z >> axis (in >> > >> the X and Y direction, everything from the volumes should be >> included). >> > >> >> > >> Thanks in advance, >> > >> Elvis >> > > >> > > I realized my mail above is a little long-winded and unclear. Sorry >> about >> > > that. In essence, what I'm asking is how to map an x,y,x (double) >> point in >> > > world coordinates to a i,j,k (int) grid position (voxel coordinate) >> of a >> > > given volume. I don't want the nearest point, but to return "null" or >> > > equivalent if the world point does not fall inside any voxel. >> > > >> > > I'd also be interested how to do the same but against a plain >> vtkImageData >> > > instead of a vtkVolume. For this I assume I'd have to provide some >> info >> > > about where in the world the vtkImageData belongs (where/how I intend >> to map >> > > it into the scene). >> > > >> > > Anyone know what the VTK API for this is? >> > > >> > > Thanks in advance, >> > > Elvis >> > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 7 15:22:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 7 Sep 2016 13:22:18 -0600 Subject: [vtkusers] vtkDataSet::FindPoint, vtkExtractVOI and world coordinates? In-Reply-To: References: Message-ID: On Wed, Sep 7, 2016 at 1:06 PM, Alvaro Sanchez wrote: > On Wed, Sep 7, 2016 at 12:58 PM, David Gobbi > wrote: > >> >> a) I prefer mathematical abstractions over programatic abstractions. If >> I have the equations, then I can combine them and simplify them and often >> achieve nice performance gains as a result. >> > > I totally agree David, I would even arrange transformation (2) into a > matrix with a scaling diagonal (spacing) and a translation vector (origin) > and apply (2) similarly to how (1) is applied. > Yup, and of course that's exactly how vtkImageReslice works: everything is condensed into a single 4x4 matrix (in fact, the inner loop only uses one column of that matrix). - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Sep 7 17:15:01 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 7 Sep 2016 17:15:01 -0400 Subject: [vtkusers] Please nominate ParaView for for the 2016 HPCwire Readers' Choice Awards In-Reply-To: References: Message-ID: Thank you to everyone who nominated ParaView for the HPCwire Readers? Choice Awards. The survey is now open for voting, and ParaView is included in the ?Best HPC Visualization Product or Technology? category.? To vote for ParaView, please visit https://www.hpcwire.com/2016-hpcwire-readers-choice-awards/. Thank you for your continued support! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Aug 2, 2016 at 11:54 AM, David E DeMarle wrote: > We would like to thank everyone who contributed to version 5.1.2 of > ParaView. To acknowledge the growth of ParaView, please join us in > nominating the fruit of our combined efforts for a 2016 HPCwire Readers? > Award in the ?Best HPC Visualization Product or Technology? category. > > Nominations can be made at http://www.hpcwire.com/2015- > hpcwire-readers-choice-awards. Thank you for your support! > > For reference, here are some recent updates > made to ParaView: > > - Enabled ray tracing through OSPRay > - Added ?Point Interpolation? filters > - Introduced the capability to render picture-in-picture visualizations > - Launched a welcome screen with a link to ?ParaView Getting Started > Guide? > - Improved ParaView Catalyst and Cinema for In-Situ processing at > extreme scales > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rphellan2210 at gmail.com Wed Sep 7 19:57:34 2016 From: rphellan2210 at gmail.com (Renzo Ph) Date: Wed, 7 Sep 2016 17:57:34 -0600 Subject: [vtkusers] Fwd: Click on surface and get image intensity value In-Reply-To: References: Message-ID: Hello all, I'm using vtkMarchingCubes to generate a surface of a niftii medical image. //Read image vtkSmartPointer reader = vtkSmartPointer< vtkNIFTIImageReader>::New(); reader->SetFileName (inputPath); reader->Update(); //Trick to transform to vtkImageData vtkSmartPointer volume = vtkSmartPointer: :New(); volume->DeepCopy(reader->GetOutput()); //Marching cubes vtkSmartPointer surface = vtkSmartPointer< vtkMarchingCubes>::New(); surface->SetInputData(volume); surface->ComputeNormalsOn(); surface->SetValue(0, 1); surface->Update(); vtkPolyData* surfacePiece = surface->GetOutput(); Then, I try to get the original intensity values for every point of the surface. This implies I have to map every surface point to its corresponding voxel in the original medical image. As follows: for(int i = 0; i < surfacePiece->GetNumberOfPoints(); i++) { double p[3]; p[0] = (p[0] - volume->GetOrigin()[0]) / volume->GetSpacing()[0]; p[1] = (p[0] - volume->GetOrigin()[1]) / volume->GetSpacing()[1]; p[2] = (p[0] - volume->GetOrigin()[2]) / volume->GetSpacing()[2]; surfacePiece->GetPoint(i,p); double intensity = volume->GetScalarComponentAsDouble((int)(p[0]), (int)(p[1]), (int)(p[2]), 0); cout << p[0] << " " << p[1] << " " << p[2] << " " << intensity << endl; } However, I get an intensity value of 0 for most of the points of the surface, which is not possible, as points with value 0 would not be part of the surface. So, I think my mapping is not correct, and surface and original image coordinates do not match. I tried looking at close voxels, such as (int)(p[0]) + 1 or (int)(p[0]) - 1, but the result is the same. Also, I tried not to do the origin and spacing conversion, but there were no improvements. I'm thinking about orientation issues, but they do not seem to be the answer, and I cannot find a way to check orientation by using VTK. Has anybody had this problem before? Sincerely, Renzo Phellan -------------- next part -------------- An HTML attachment was scrubbed... URL: From maogui.hu at gmail.com Thu Sep 8 03:27:23 2016 From: maogui.hu at gmail.com (maogui.hu) Date: Thu, 8 Sep 2016 15:27:23 +0800 Subject: [vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll References: <1e84fa2d.1c0cf.156fa917492.Coremail.chenjianyyzz@163.com>, <594659d7.9710.15702a829f2.Coremail.chenjianyyzz@163.com> Message-ID: <201609081527214535992@gmail.com> Hi James, Try to declare "vtkInteractorStyleTrackballCamera style; " as a member variable instead of a local variable. Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research, CAS ???? chenjianyyzz ????? 2016-09-07 11:19 ???? chenjianyyzz ??? maogui.hu; vtkusers ??? Re:[vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll I am puzzled by the crash for some time, is there anybody who may have a look inside the C# solution and help me to figure out why it's always crash? Thanks in advanced James At 2016-09-05 21:37:31, "chenjianyyzz" wrote: Hello, I have meet the error of unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll, it happens so offen, but I cannot figure out what's the reason. Attached please find complete solution where the error happens. the steps to reproduce it: 1) run under debug mode 2) click the "button1" 10 times quickly (normally I click 10 times less than 5 seconds), and then move the mouse into the RenderWindowControl 3) repeat step2) , normally I repeat step 2) at about 4~5 times, and the crash will happens. I have test it under ActiViz.NET 5.8.0 (download from website directly), ActiVizDotNet6.2 ( I built it myself), Activiz.NET.x64.7.0.0(our company bought it), the above crash can be reproduced with different verion of Activiz. and it happens so offen that in another of my bigger program, it crashes when I click the button only about 3 times. will anybody help me to find out what's the reason? Thanks & Best Regards James partMapper.SetInputData(polyData); ???163???????? STLShowing.7z (25.95M, 2016?10?5? 21:19 ??) ?? ?????|30???????????51???????4???????????52??> -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Thu Sep 8 04:41:11 2016 From: flaviu2 at yahoo.com (flaviu2) Date: Thu, 8 Sep 2016 01:41:11 -0700 (MST) Subject: [vtkusers] Using vtkResliceCursorWidget In-Reply-To: References: <1250357729.959416.1473244798345@mail.yahoo.com> Message-ID: <1473324071296-5740181.post@n5.nabble.com> Yes, it's working now ! :) Kindly thank you ! -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-vtkResliceCursorWidget-tp5740159p5740181.html Sent from the VTK - Users mailing list archive at Nabble.com. From grothausmann.roman at mh-hannover.de Thu Sep 8 06:36:40 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Thu, 8 Sep 2016 12:36:40 +0200 Subject: [vtkusers] Testing ITK/VTK/PV contributions with (kitware) Gitlab-CI Message-ID: Dear mailing list members, Just getting to know Gitlab-CI, I am wondering whether it is possible to test contributions to ITK/VTK/PV with Gitlab-CI from gitlab.com or gitlab.kitware.com. As far as I understand, this basically needs runners, in this case specific to ITK/VTK/PV. Since kitware has done CI even before the use of gitlab, I wonder if the former testing environments are available for use with Gitlab-CI and if so how to use them. For example, none of my contributions to the ITK/VTK/Midas Journals got into the testing phase even though marked for testing during submission. So a possibility to use Gitlab-CI to test the compilation and to run the project test would be really great, especially for continued development and testing on other OSs. Specifically, for e.g. testing my FacetAnalyser contribution (http://www.midasjournal.org/browse/publication/951 https://gitlab.com/romangrothausmann/FacetAnalyser) I would need a runner environment with PV, VTK and ITK ideally for Linux, MacOS and Windows. Thanks for any comments and hints. Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From paul.melis at surfsara.nl Thu Sep 8 07:23:46 2016 From: paul.melis at surfsara.nl (Paul Melis) Date: Thu, 8 Sep 2016 13:23:46 +0200 (CEST) Subject: [vtkusers] VTK 7.0.0 + Python: GIL released? Message-ID: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> Hi all, What's the status of threading in VTK 7.0.0 under Python w.r.t the GIL, specifically for classes derived from vtkAlgorithm? I'm attempting to offload a computation (basically vtkStreamTracer.Update()) to a Python threading.Thread, but strongly get the impression that the GIL is not released by Update(). The release notes (https://blog.kitware.com/vtk-7-0-0/) seem to suggest there was some recent development in this area: * multi-threaded Python codes facilitated by VTK's new and optional protocol for using the Global Interpreter Lock But clicking the link appears to indicate this is for VTK used inside Paraview only. I see the mentioned cmake variable VTK_PYTHON_FULL_THREADSAFE referenced by files under Utilities/Python, but the cmake files themselves don't contain a reference, nor something like an option. Would hacking the define in somewhere cause Update() to be protected by the GIL? Commit https://github.com/Kitware/VTK/commit/8eb50dd23fd762d42fe1a6785bbaa704f2ed76c3 lists some classes and their possible protection by vtkPythonScopeGilEnsurer, but what specifically is covered isn't entirely clear to me. Thanks, Paul -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | From mathieu.westphal at kitware.com Thu Sep 8 07:51:18 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Thu, 8 Sep 2016 13:51:18 +0200 Subject: [vtkusers] VTK 7.0.0 + Python: GIL released? In-Reply-To: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> References: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> Message-ID: Hi All python calls are protected by gil if the VTK_PYTHON_FULL_THREADSAFE option is on. The mechanism take place in vtkPython.h, where the vtkPythonScopeGilEnsurer is configured by the cmake option. the vtkPythonScopeGilEnsurer is then ( suposed to be ) used before every pthon call. Regards, Mathieu Westphal On Thu, Sep 8, 2016 at 1:23 PM, Paul Melis wrote: > Hi all, > > What's the status of threading in VTK 7.0.0 under Python w.r.t the GIL, > specifically for classes derived from vtkAlgorithm? > I'm attempting to offload a computation (basically > vtkStreamTracer.Update()) > to a Python threading.Thread, but strongly get the impression that > the GIL is not released by Update(). > > The release notes (https://blog.kitware.com/vtk-7-0-0/) seem to suggest > there was some recent development in this area: > > * multi-threaded Python codes facilitated by VTK's new and optional > protocol for using the Global Interpreter Lock > > But clicking the link appears to indicate this is for VTK used inside > Paraview only. I see the mentioned cmake variable > VTK_PYTHON_FULL_THREADSAFE > referenced by files under Utilities/Python, but the cmake files themselves > don't contain a reference, nor something like an option. Would hacking > the define in somewhere cause Update() to be protected by the GIL? > Commit https://github.com/Kitware/VTK/commit/ > 8eb50dd23fd762d42fe1a6785bbaa704f2ed76c3 > lists some classes and their possible protection by > vtkPythonScopeGilEnsurer, > but what specifically is covered isn't entirely clear to me. > > Thanks, > Paul > > -- > > Paul Melis > | Visualization group leader & developer | SURFsara | > | Science Park 140 | 1098 XG Amsterdam | > | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.melis at surfsara.nl Thu Sep 8 08:11:24 2016 From: paul.melis at surfsara.nl (Paul Melis) Date: Thu, 8 Sep 2016 14:11:24 +0200 (CEST) Subject: [vtkusers] VTK 7.0.0 + Python: GIL released? In-Reply-To: References: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> Message-ID: <431824114.6018294.1473336684175.JavaMail.zimbra@surfsara.nl> Great! But the VTK_PYTHON_FULL_THREADSAFE option doesn't seem to exist at the CMake level. With a git update of a minute ago: /data/c/vtk-git$ find . -name CMakeLists.txt | xargs -iX grep -Hs VTK_PYTHON_FULL_THREADSAFE X /data/c/vtk-git$ find . | xargs -iX grep -Hs VTK_PYTHON_FULL_THREADSAFE X ./Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:#ifdef VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPythonConfigure.h.in:#cmakedefine VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPython.h:// Note: behaviour of this class depends on VTK_PYTHON_FULL_THREADSAFE. ./Utilities/Python/vtkPython.h: // If force is TRUE, lock/unlock even if VTK_PYTHON_FULL_THREADSAFE is not defined. ./Utilities/Python/vtkPython.h: // If force is FALSE, lock/unlock is only performed if VTK_PYTHON_FULL_THREADSAFE is ./Utilities/Python/vtkPython.h:#ifdef VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPython.h: // Force is always true with VTK_PYTHON_FULL_THREADSAFE /data/c/vtk-git-release$ cmake -D VTK_WRAP_PYTHON=ON ../vtk-git ... /data/c/vtk-git-release$ grep VTK_PYTHON_FULL_THREADSAFE CMakeCache.txt /data/c/vtk-git-release$ grep THREAD CMakeCache.txt CMAKE_THREAD_LIBS:STRING=-lpthread LIBPROJ_USE_THREAD:BOOL=ON VTK_MAX_THREADS:STRING=64 CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 CMAKE_HAVE_PTHREAD_H:INTERNAL=1 //ADVANCED property for variable: CMAKE_THREAD_LIBS CMAKE_THREAD_LIBS-ADVANCED:INTERNAL=1 H5_HAVE_PTHREAD_H:INTERNAL=1 H5_SYSTEM_SCOPE_THREADS:INTERNAL=1 HAVE_PTHREAD_H:INTERNAL=1 //Have symbol PTHREAD_MUTEX_RECURSIVE HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN:INTERNAL= HDF5_ENABLE_THREADSAFE:INTERNAL=OFF //ADVANCED property for variable: LIBPROJ_USE_THREAD LIBPROJ_USE_THREAD-ADVANCED:INTERNAL=1 SYSTEM_SCOPE_THREADS:INTERNAL=TRUE //ADVANCED property for variable: VTK_MAX_THREADS VTK_MAX_THREADS-ADVANCED:INTERNAL=1 Paul From: "Mathieu Westphal" To: "Paul Melis" Cc: "vtk" Sent: Thursday, 8 September, 2016 13:51:18 Subject: Re: [vtkusers] VTK 7.0.0 + Python: GIL released? Hi All python calls are protected by gil if the VTK_PYTHON_FULL_THREADSAFE option is on. The mechanism take place in vtkPython.h, where the vtkPythonScopeGilEnsurer is configured by the cmake option. the vtkPythonScopeGilEnsurer is then ( suposed to be ) used before every pthon call. Regards, Mathieu Westphal On Thu, Sep 8, 2016 at 1:23 PM, Paul Melis < paul.melis at surfsara.nl > wrote: Hi all, What's the status of threading in VTK 7.0.0 under Python w.r.t the GIL, specifically for classes derived from vtkAlgorithm? I'm attempting to offload a computation (basically vtkStreamTracer.Update()) to a Python threading.Thread, but strongly get the impression that the GIL is not released by Update(). The release notes ( https://blog.kitware.com/vtk-7-0-0/ ) seem to suggest there was some recent development in this area: * multi-threaded Python codes facilitated by VTK's new and optional protocol for using the Global Interpreter Lock But clicking the link appears to indicate this is for VTK used inside Paraview only. I see the mentioned cmake variable VTK_PYTHON_FULL_THREADSAFE referenced by files under Utilities/Python, but the cmake files themselves don't contain a reference, nor something like an option. Would hacking the define in somewhere cause Update() to be protected by the GIL? Commit https://github.com/Kitware/VTK/commit/8eb50dd23fd762d42fe1a6785bbaa704f2ed76c3 lists some classes and their possible protection by vtkPythonScopeGilEnsurer, but what specifically is covered isn't entirely clear to me. Thanks, Paul -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Thu Sep 8 08:30:23 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Thu, 8 Sep 2016 14:30:23 +0200 Subject: [vtkusers] VTK 7.0.0 + Python: GIL released? In-Reply-To: <431824114.6018294.1473336684175.JavaMail.zimbra@surfsara.nl> References: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> <431824114.6018294.1473336684175.JavaMail.zimbra@surfsara.nl> Message-ID: Hi Sorry, I did not see you were only on VTK. The option is exposed in ParaView cmake option, the same way VTK_NO_PYTHON_THREAD is. But you should be able to define the option manually when configuring VTK. -DVTK_PYTHON_FULL_THREADSAFE:BOOL="ON" Regards, Mathieu Westphal On Thu, Sep 8, 2016 at 2:11 PM, Paul Melis wrote: > Great! But the VTK_PYTHON_FULL_THREADSAFE option doesn't seem to exist at > the CMake level. With a git update of a minute ago: > > /data/c/vtk-git$ find . -name CMakeLists.txt | xargs -iX grep -Hs > VTK_PYTHON_FULL_THREADSAFE X > > > /data/c/vtk-git$ find . | xargs -iX grep -Hs VTK_PYTHON_FULL_THREADSAFE X > ./Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:#ifdef > VTK_PYTHON_FULL_THREADSAFE > ./Utilities/Python/vtkPythonConfigure.h.in:#cmakedefine > VTK_PYTHON_FULL_THREADSAFE > ./Utilities/Python/vtkPython.h:// Note: behaviour of this class depends > on VTK_PYTHON_FULL_THREADSAFE. > ./Utilities/Python/vtkPython.h: // If force is TRUE, lock/unlock even if > VTK_PYTHON_FULL_THREADSAFE is not defined. > ./Utilities/Python/vtkPython.h: // If force is FALSE, lock/unlock is only > performed if VTK_PYTHON_FULL_THREADSAFE is > ./Utilities/Python/vtkPython.h:#ifdef VTK_PYTHON_FULL_THREADSAFE > ./Utilities/Python/vtkPython.h: // Force is always true with > VTK_PYTHON_FULL_THREADSAFE > > /data/c/vtk-git-release$ cmake -DVTK_WRAP_PYTHON=ON ../vtk-git > ... > /data/c/vtk-git-release$ grep VTK_PYTHON_FULL_THREADSAFE CMakeCache.txt > > > /data/c/vtk-git-release$ grep THREAD CMakeCache.txt > CMAKE_THREAD_LIBS:STRING=-lpthread > LIBPROJ_USE_THREAD:BOOL=ON > VTK_MAX_THREADS:STRING=64 > CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= > CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 > CMAKE_HAVE_PTHREAD_H:INTERNAL=1 > //ADVANCED property for variable: CMAKE_THREAD_LIBS > CMAKE_THREAD_LIBS-ADVANCED:INTERNAL=1 > H5_HAVE_PTHREAD_H:INTERNAL=1 > H5_SYSTEM_SCOPE_THREADS:INTERNAL=1 > HAVE_PTHREAD_H:INTERNAL=1 > //Have symbol PTHREAD_MUTEX_RECURSIVE > HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN:INTERNAL= > HDF5_ENABLE_THREADSAFE:INTERNAL=OFF > //ADVANCED property for variable: LIBPROJ_USE_THREAD > LIBPROJ_USE_THREAD-ADVANCED:INTERNAL=1 > SYSTEM_SCOPE_THREADS:INTERNAL=TRUE > //ADVANCED property for variable: VTK_MAX_THREADS > VTK_MAX_THREADS-ADVANCED:INTERNAL=1 > > Paul > > ------------------------------ > *From: *"Mathieu Westphal" > *To: *"Paul Melis" > *Cc: *"vtk" > *Sent: *Thursday, 8 September, 2016 13:51:18 > *Subject: *Re: [vtkusers] VTK 7.0.0 + Python: GIL released? > > Hi > > All python calls are protected by gil if the VTK_PYTHON_FULL_THREADSAFE > option is on. > The mechanism take place in vtkPython.h, where the > vtkPythonScopeGilEnsurer is configured by the cmake option. > the vtkPythonScopeGilEnsurer is then ( suposed to be ) used before every > pthon call. > > Regards, > > Mathieu Westphal > > On Thu, Sep 8, 2016 at 1:23 PM, Paul Melis wrote: > >> Hi all, >> >> What's the status of threading in VTK 7.0.0 under Python w.r.t the GIL, >> specifically for classes derived from vtkAlgorithm? >> I'm attempting to offload a computation (basically >> vtkStreamTracer.Update()) >> to a Python threading.Thread, but strongly get the impression that >> the GIL is not released by Update(). >> >> The release notes (https://blog.kitware.com/vtk-7-0-0/) seem to suggest >> there was some recent development in this area: >> >> * multi-threaded Python codes facilitated by VTK's new and optional >> protocol for using the Global Interpreter Lock >> >> But clicking the link appears to indicate this is for VTK used inside >> Paraview only. I see the mentioned cmake variable >> VTK_PYTHON_FULL_THREADSAFE >> referenced by files under Utilities/Python, but the cmake files themselves >> don't contain a reference, nor something like an option. Would hacking >> the define in somewhere cause Update() to be protected by the GIL? >> Commit https://github.com/Kitware/VTK/commit/ >> 8eb50dd23fd762d42fe1a6785bbaa704f2ed76c3 >> lists some classes and their possible protection by >> vtkPythonScopeGilEnsurer, >> but what specifically is covered isn't entirely clear to me. >> >> Thanks, >> Paul >> >> -- >> >> Paul Melis >> | Visualization group leader & developer | SURFsara | >> | Science Park 140 | 1098 XG Amsterdam | >> | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.melis at surfsara.nl Thu Sep 8 08:57:49 2016 From: paul.melis at surfsara.nl (Paul Melis) Date: Thu, 8 Sep 2016 14:57:49 +0200 (CEST) Subject: [vtkusers] VTK 7.0.0 + Python: GIL released? In-Reply-To: References: <171219871.6014142.1473333826552.JavaMail.zimbra@surfsara.nl> <431824114.6018294.1473336684175.JavaMail.zimbra@surfsara.nl> Message-ID: <220757126.6022131.1473339469643.JavaMail.zimbra@surfsara.nl> Good to know, thanks! Paul From: "Mathieu Westphal" To: "Paul Melis" Cc: "vtk" Sent: Thursday, 8 September, 2016 14:30:23 Subject: Re: [vtkusers] VTK 7.0.0 + Python: GIL released? Hi Sorry, I did not see you were only on VTK. The option is exposed in ParaView cmake option, the same way VTK_NO_PYTHON_THREAD is. But you should be able to define the option manually when configuring VTK. -DVTK_PYTHON_FULL_THREADSAFE:BOOL="ON" Regards, Mathieu Westphal On Thu, Sep 8, 2016 at 2:11 PM, Paul Melis < paul.melis at surfsara.nl > wrote: Great! But the VTK_PYTHON_FULL_THREADSAFE option doesn't seem to exist at the CMake level. With a git update of a minute ago: /data/c/vtk-git$ find . -name CMakeLists.txt | xargs -iX grep -Hs VTK_PYTHON_FULL_THREADSAFE X /data/c/vtk-git$ find . | xargs -iX grep -Hs VTK_PYTHON_FULL_THREADSAFE X ./Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:#ifdef VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPythonConfigure.h.in:#cmakedefine VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPython.h:// Note: behaviour of this class depends on VTK_PYTHON_FULL_THREADSAFE. ./Utilities/Python/vtkPython.h: // If force is TRUE, lock/unlock even if VTK_PYTHON_FULL_THREADSAFE is not defined. ./Utilities/Python/vtkPython.h: // If force is FALSE, lock/unlock is only performed if VTK_PYTHON_FULL_THREADSAFE is ./Utilities/Python/vtkPython.h:#ifdef VTK_PYTHON_FULL_THREADSAFE ./Utilities/Python/vtkPython.h: // Force is always true with VTK_PYTHON_FULL_THREADSAFE /data/c/vtk-git-release$ cmake -D VTK_WRAP_PYTHON=ON ../vtk-git ... /data/c/vtk-git-release$ grep VTK_PYTHON_FULL_THREADSAFE CMakeCache.txt /data/c/vtk-git-release$ grep THREAD CMakeCache.txt CMAKE_THREAD_LIBS:STRING=-lpthread LIBPROJ_USE_THREAD:BOOL=ON VTK_MAX_THREADS:STRING=64 CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 CMAKE_HAVE_PTHREAD_H:INTERNAL=1 //ADVANCED property for variable: CMAKE_THREAD_LIBS CMAKE_THREAD_LIBS-ADVANCED:INTERNAL=1 H5_HAVE_PTHREAD_H:INTERNAL=1 H5_SYSTEM_SCOPE_THREADS:INTERNAL=1 HAVE_PTHREAD_H:INTERNAL=1 //Have symbol PTHREAD_MUTEX_RECURSIVE HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN:INTERNAL= HDF5_ENABLE_THREADSAFE:INTERNAL=OFF //ADVANCED property for variable: LIBPROJ_USE_THREAD LIBPROJ_USE_THREAD-ADVANCED:INTERNAL=1 SYSTEM_SCOPE_THREADS:INTERNAL=TRUE //ADVANCED property for variable: VTK_MAX_THREADS VTK_MAX_THREADS-ADVANCED:INTERNAL=1 Paul From: "Mathieu Westphal" < mathieu.westphal at kitware.com > To: "Paul Melis" < paul.melis at surfsara.nl > Cc: "vtk" < vtkusers at vtk.org > Sent: Thursday, 8 September, 2016 13:51:18 Subject: Re: [vtkusers] VTK 7.0.0 + Python: GIL released? Hi All python calls are protected by gil if the VTK_PYTHON_FULL_THREADSAFE option is on. The mechanism take place in vtkPython.h, where the vtkPythonScopeGilEnsurer is configured by the cmake option. the vtkPythonScopeGilEnsurer is then ( suposed to be ) used before every pthon call. Regards, Mathieu Westphal On Thu, Sep 8, 2016 at 1:23 PM, Paul Melis < paul.melis at surfsara.nl > wrote: BQ_BEGIN Hi all, What's the status of threading in VTK 7.0.0 under Python w.r.t the GIL, specifically for classes derived from vtkAlgorithm? I'm attempting to offload a computation (basically vtkStreamTracer.Update()) to a Python threading.Thread, but strongly get the impression that the GIL is not released by Update(). The release notes ( https://blog.kitware.com/vtk-7-0-0/ ) seem to suggest there was some recent development in this area: * multi-threaded Python codes facilitated by VTK's new and optional protocol for using the Global Interpreter Lock But clicking the link appears to indicate this is for VTK used inside Paraview only. I see the mentioned cmake variable VTK_PYTHON_FULL_THREADSAFE referenced by files under Utilities/Python, but the cmake files themselves don't contain a reference, nor something like an option. Would hacking the define in somewhere cause Update() to be protected by the GIL? Commit https://github.com/Kitware/VTK/commit/8eb50dd23fd762d42fe1a6785bbaa704f2ed76c3 lists some classes and their possible protection by vtkPythonScopeGilEnsurer, but what specifically is covered isn't entirely clear to me. Thanks, Paul -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers BQ_END -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Sep 8 09:14:17 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 8 Sep 2016 09:14:17 -0400 Subject: [vtkusers] Testing ITK/VTK/PV contributions with (kitware) Gitlab-CI In-Reply-To: References: Message-ID: <20160908131417.GB13993@megas.kitware.com> On Thu, Sep 08, 2016 at 12:36:40 +0200, Grothausmann, Roman Dr. wrote: > Just getting to know Gitlab-CI, I am wondering whether it is possible to test > contributions to ITK/VTK/PV with Gitlab-CI from gitlab.com or > gitlab.kitware.com. As far as I understand, this basically needs runners, in > this case specific to ITK/VTK/PV. Since kitware has done CI even before the use > of gitlab, I wonder if the former testing environments are available for use > with Gitlab-CI and if so how to use them. We're (VTK and ParaView) using buildbot to manage our testing. The number of settings we test across machines is hard to specify in YAML files (machines also have different settings based on what you're testing, e.g., load up a different compiler or Qt4 or Qt5 and the paths they live in, etc.). We're working on improving the hardware situation buildbot is currently in; things should be getting better over the next few months on that front. > For example, none of my contributions to the ITK/VTK/Midas Journals got into the > testing phase even though marked for testing during submission. So a possibility > to use Gitlab-CI to test the compilation and to run the project test would be > really great, especially for continued development and testing on other OSs. > Specifically, for e.g. testing my FacetAnalyser contribution > (http://www.midasjournal.org/browse/publication/951 > https://gitlab.com/romangrothausmann/FacetAnalyser) I would need a runner > environment with PV, VTK and ITK ideally for Linux, MacOS and Windows. ITK is using Gerrit and Jenkins, not Gitlab. --Ben From cory.quammen at kitware.com Thu Sep 8 09:23:26 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Sep 2016 09:23:26 -0400 Subject: [vtkusers] scatterplot with different marker shapes, sizes and colors? In-Reply-To: References: <836ea68b-761a-60ce-b00c-3be5dbc94d7f@emmenlauer.de> Message-ID: Mario, I would be happy to review such a change. See the instructions for contributing here: https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md Best, Cory On Wed, Sep 7, 2016 at 11:07 AM, Mario Emmenlauer wrote: > > Thanks Cory for the quick reply! If I'd send a patch, would you find it > worthwhile to include it in the repository? > > Cheers, > > Mario > > > > On 07.09.2016 15:43, Cory Quammen wrote: >> Mario, >> >> I am not aware of any capability in VTK to change the marker points or >> shapes based on the input data. A patch would be required to support >> that. It might be too hard to implement if you want to give it a try. >> >> Best, >> Cory >> >> On Wed, Sep 7, 2016 at 6:08 AM, Mario Emmenlauer wrote: >>> >>> Hi, >>> >>> can somebody help me with this, is it possible to get scatterplots with >>> different marker shapes and/or sizes? Any help would be greatly appreciated! >>> See below for more info... >>> >>> >>> On 27.08.2016 00:55, Mario Emmenlauer wrote: >>>> >>>> I've been using vtkPlot to get a simple and easy-to-use scatterplot, >>>> and it works great! But ideally I'd like to also have different marker >>>> sizes, i.e. to specify a marker size for each point. I could trace the >>>> code into vtkOpenGLContextDevice2D::DrawPointSprites() where the marker >>>> sprites are drawn. But a recommendation would help - is it even possible >>>> and runtime-efficient to have variable sizes? Or would it come at a huge >>>> performance penalty? How is the best way to achieve it, is it required >>>> to patch vtkOpenGLContextDevice2D or are the other means? >>>> >>>> All the best, >>>> >>>> Mario Emmenlauer > > > > Viele Gruesse, > > Mario Emmenlauer > > > -- > BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 > Balanstr. 43 mailto: memmenlauer * biodataanalysis.de > D-81669 M?nchen http://www.biodataanalysis.de/ -- Cory Quammen Staff R&D Engineer Kitware, Inc. From dzenanz at gmail.com Thu Sep 8 10:26:48 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 8 Sep 2016 10:26:48 -0400 Subject: [vtkusers] Testing ITK/VTK/PV contributions with (kitware) Gitlab-CI In-Reply-To: <20160908131417.GB13993@megas.kitware.com> References: <20160908131417.GB13993@megas.kitware.com> Message-ID: Hi Roman, some of ITK's remote modules are using CircleCI for testing. Two recent examples are RLEImage and MorphologicalContourInterpolation . Of course, you should be familiar, or familiarize yourself with CircleCI . Regards, D?enan On Thu, Sep 8, 2016 at 9:14 AM, Ben Boeckel wrote: > On Thu, Sep 08, 2016 at 12:36:40 +0200, Grothausmann, Roman Dr. wrote: > > Just getting to know Gitlab-CI, I am wondering whether it is possible to > test > > contributions to ITK/VTK/PV with Gitlab-CI from gitlab.com or > > gitlab.kitware.com. As far as I understand, this basically needs > runners, in > > this case specific to ITK/VTK/PV. Since kitware has done CI even before > the use > > of gitlab, I wonder if the former testing environments are available for > use > > with Gitlab-CI and if so how to use them. > > We're (VTK and ParaView) using buildbot to manage our testing. The > number of settings we test across machines is hard to specify in YAML > files (machines also have different settings based on what you're > testing, e.g., load up a different compiler or Qt4 or Qt5 and the paths > they live in, etc.). We're working on improving the hardware situation > buildbot is currently in; things should be getting better over the next > few months on that front. > > > For example, none of my contributions to the ITK/VTK/Midas Journals got > into the > > testing phase even though marked for testing during submission. So a > possibility > > to use Gitlab-CI to test the compilation and to run the project test > would be > > really great, especially for continued development and testing on other > OSs. > > Specifically, for e.g. testing my FacetAnalyser contribution > > (http://www.midasjournal.org/browse/publication/951 > > https://gitlab.com/romangrothausmann/FacetAnalyser) I would need a > runner > > environment with PV, VTK and ITK ideally for Linux, MacOS and Windows. > > ITK is using Gerrit and Jenkins, not Gitlab. > > --Ben > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Sep 8 12:50:03 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Sep 2016 12:50:03 -0400 Subject: [vtkusers] RFC: removing Mac OS X 10.6 support in VTK In-Reply-To: <20160822143453.1008991438@mail.rogue-research.com> References: <20160810183407.812025755@mail.rogue-research.com> <20160822143453.1008991438@mail.rogue-research.com> Message-ID: JC, any update on upgrading your 10.6.8 dashboard machine? On Mon, Aug 22, 2016 at 10:34 AM, Sean McBride wrote: > On Fri, 19 Aug 2016 15:38:06 -0400, Jean-Christophe Fillion-Robin said: > >>For what it is worth, Slicer MacOSX build machine is still running 10.6.8, >>we will soon transition to machine with 10.11 > > OK, I'll hold off merging the change in VTK until you switch. What's your ETA on that upgrade? > > I'm curious: are you still on 10.6 for some reason beyond "it works, and we're busy"? :) > > Sean > > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From ben.boeckel at kitware.com Thu Sep 8 14:26:36 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 8 Sep 2016 14:26:36 -0400 Subject: [vtkusers] GDAL Version In-Reply-To: References: Message-ID: <20160908182636.GA17570@megas.kitware.com> On Sun, Sep 04, 2016 at 01:27:50 +0000, Rusty Jones wrote: > I am trying to compile VTK with GDAL support on windows. > > What version of GDAL must be used with VTK? I have tried two different > versions and got different compiler errors with both. I don't know how to > find which version or versions of GDAL have been tested with VTK. Any ideas? There's a branch of GDAL 1.11 we use to handle lots of Windows errors here: https://github.com/judajake/gdal-svn/tree/gdal-1.11-cmb GDAL 2.0 is a massive difference on top of GDAL 1.x and VTK has not been ported yet. --Ben From guanw at rhpcs.mcmaster.ca Thu Sep 8 14:27:29 2016 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Thu, 08 Sep 2016 14:27:29 -0400 Subject: [vtkusers] Rotate vtkBoxWidget In-Reply-To: References: Message-ID: <57D1AD91.9070301@rhpcs.mcmaster.ca> Hello, I need to rotate the box widget to make its orientation toward particular directions. Right now I use SetTransform() to do the trick, but the drawback is that it changes back to the original size (L, W, H). How to re-orient the box without changing L, W, H? Thanks. Best, Weiguang From jones.rusty at gmail.com Thu Sep 8 14:47:27 2016 From: jones.rusty at gmail.com (Rusty Jones) Date: Thu, 08 Sep 2016 18:47:27 +0000 Subject: [vtkusers] GDAL Version In-Reply-To: <20160908182636.GA17570@megas.kitware.com> References: <20160908182636.GA17570@megas.kitware.com> Message-ID: Thanks I'll check it out. On Thu, Sep 8, 2016, 1:26 PM Ben Boeckel wrote: > On Sun, Sep 04, 2016 at 01:27:50 +0000, Rusty Jones wrote: > > I am trying to compile VTK with GDAL support on windows. > > > > What version of GDAL must be used with VTK? I have tried two different > > versions and got different compiler errors with both. I don't know how to > > find which version or versions of GDAL have been tested with VTK. Any > ideas? > > There's a branch of GDAL 1.11 we use to handle lots of Windows errors > here: > > https://github.com/judajake/gdal-svn/tree/gdal-1.11-cmb > > GDAL 2.0 is a massive difference on top of GDAL 1.x and VTK has not been > ported yet. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b1.miller at samsung.com Thu Sep 8 15:14:02 2016 From: b1.miller at samsung.com (Brian Miller) Date: Thu, 08 Sep 2016 19:14:02 +0000 Subject: [vtkusers] scale of rendered object in vtkEGLRenderWindow (Android) References: Message-ID: Hello: I am working on some code that is based initially on the example from VTK 7.0.0 in Examples/Android/JavaVTK My Android view extends GLSurfaceView, as in that example, with the same EGLContext and EGLConfig as in that example. I have been able to modify this Android example to display a JPG image from /sdcard/DCIM/Camera/*.jpg on the screen, after using vtkImageImport to import it and vtkImageActor as the actor However, the image is being displayed at a reduced size, about half of the original, in the middle of the screen, with a lot of black border around it. I verified that VTK is able to draw to the entire screen, and I can change the black border to red / green / blue by calling SetBackground(r, g, b) on the vtkRenderer. I have tried a number of the VTK APIs such as SetSize, SetScale, SetAspect, SetFullScreen(true), etc ... but it continues to display only at a reduced size. I am testing on a screen with resolution 2560 * 1440 and the JPEG file I am reading is that same resolution also. Any ideas on how to get the image to display full screen when rendered by VTK ? Brian Miller From chenjianyyzz at 163.com Fri Sep 9 01:46:34 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 9 Sep 2016 13:46:34 +0800 (CST) Subject: [vtkusers] How to support OpenGL2 while building Activiz Message-ID: <56b55d4a.d106.1570d7bb88e.Coremail.chenjianyyzz@163.com> Hello, I build VTK OpenGL2, but while building Activiz, I have not found where to configure the OpenGL2, if I am not configure Activiz, but using the VTK OpenGL2, it seems it try to find a lot of OpenGL related code, error information such as: ------------------------------------------------ error: vtkRenderingOpenGLModule.h: No such file or directory C:/Activiz/VTK/Rendering/OpenGL/vtkValuePasses.h:28:58 ----------------------------------------------- and I found in VTK build folder, there's no folder "OpenGL", instead, it has the folder "OpenGL2" so I think there's should be some configuration for Activiz to tell it to use OpenGL2, not OpenGL. does any one know how to configure it? Thanks & Best Regards James -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Fri Sep 9 02:01:47 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 9 Sep 2016 14:01:47 +0800 (CST) Subject: [vtkusers] Activiz build: The type or namespace name 'vtkGenericCompositePolyDataMapper2' could not be found Message-ID: <140cda3d.d813.1570d89a857.Coremail.chenjianyyzz@163.com> Hello, I meet the following 2 errors while building C# library 'Kitware.VTK' 1) c:\Activiz\activizdotnet-build\csharp\vtkCompositePolyDataMapper2.cs(27,44): error CS0246: The type or namespace name 'vtkGenericCompositePolyDataMapper2' could not be found (are you missing a using directive or an assembly reference?) 2) c:\Activiz\activizdotnet-build\csharp\vtkContextArea.cs(327,27): error CS0246: The type or namespace name 'vtkRecti' could not be found (are you missing a using directive or an assembly reference?) I think "vtkGenericCompositePolyDataMapper2" should be defined in vtkRenderingOpenGL2-7.0.lib, and I goto the VTK\lib\release, and find vtkRenderingOpenGL2-7.0.lib is there, I also goes inside the folder c:\Activiz\activizdotnet-build\csharp, and find the "vtkGenericCompositePolyDataMapper2.cs" is generated, will anybody help me how to handle the problem? for "vtkRecti", I think it should be defined in vtkCommonDataModel-7.0.lib, and I do find vtkCommonDataModel-7.0.lib inside the VTK lib folder, will anybody help me out? Best Regards James. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 9 05:04:31 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 9 Sep 2016 11:04:31 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other Message-ID: Hi all, I have a hopefully simple question: Since the bounds of a vtkImageData start and end in the center of the corner voxels, if I want to place two volumes in the world adjacent (right next to eachother) using SetPosition, will I have to compensate for this, to avoid the volumes overlapping by 0.5*spacing_of_first_volume + 0.5*spacing_of_second_volume ? Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 9 05:08:13 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 9 Sep 2016 11:08:13 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-09 11:04 GMT+02:00 Elvis Stansvik : > Hi all, > > I have a hopefully simple question: > > Since the bounds of a vtkImageData start and end in the center of the > corner voxels, if I want to place two volumes in the world adjacent (right > next to eachother) using SetPosition, will I have to compensate for this, > to avoid the volumes overlapping by 0.5*spacing_of_first_volume + > 0.5*spacing_of_second_volume ? > I guess this is really two questions: 1) Is the (visual, in world) size of a volume in the first dimension (extent[1] - extent[0]) * spacing[2] or (extent[1] - extent[0] + 1) * spacing[2]. 2) Will SetPosition move the volume such that the center of the corner voxel is at the given world position? Elvis > Thanks in advance, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 9 05:08:45 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 9 Sep 2016 11:08:45 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-09 11:08 GMT+02:00 Elvis Stansvik : > 2016-09-09 11:04 GMT+02:00 Elvis Stansvik : > >> Hi all, >> >> I have a hopefully simple question: >> >> Since the bounds of a vtkImageData start and end in the center of the >> corner voxels, if I want to place two volumes in the world adjacent (right >> next to eachother) using SetPosition, will I have to compensate for this, >> to avoid the volumes overlapping by 0.5*spacing_of_first_volume + >> 0.5*spacing_of_second_volume ? >> > > I guess this is really two questions: > > 1) Is the (visual, in world) size of a volume in the first dimension > (extent[1] - extent[0]) * spacing[2] or (extent[1] - extent[0] + 1) * > spacing[2]. > Ehm, here I meant spacing[0] of course. Elvis > 2) Will SetPosition move the volume such that the center of the corner > voxel is at the given world position? > > Elvis > > >> Thanks in advance, >> Elvis >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Fri Sep 9 07:20:51 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 9 Sep 2016 19:20:51 +0800 (CST) Subject: [vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll In-Reply-To: <201609081527214535992@gmail.com> References: <1e84fa2d.1c0cf.156fa917492.Coremail.chenjianyyzz@163.com>, <594659d7.9710.15702a829f2.Coremail.chenjianyyzz@163.com> <201609081527214535992@gmail.com> Message-ID: <2617958e.bf3d.1570eadc465.Coremail.chenjianyyzz@163.com> Hi Maogui, thank you very much, that solved my problem :-) Best Regards James At 2016-09-08 15:27:23, "maogui.hu" wrote: Hi James, Try to declare "vtkInteractorStyleTrackballCamera style; " as a member variable instead of a local variable. Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research, CAS ???? chenjianyyzz ????? 2016-09-07 11:19 ???? chenjianyyzz ??? maogui.hu; vtkusers ??? Re:[vtkusers] C# program crash with unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll I am puzzled by the crash for some time, is there anybody who may have a look inside the C# solution and help me to figure out why it's always crash? Thanks in advanced James At 2016-09-05 21:37:31, "chenjianyyzz" wrote: Hello, I have meet the error of unhandled exception of type 'System.Exception' occurred in Kitware.mummy.Runtime.dll, it happens so offen, but I cannot figure out what's the reason. Attached please find complete solution where the error happens. the steps to reproduce it: 1) run under debug mode 2) click the "button1" 10 times quickly (normally I click 10 times less than 5 seconds), and then move the mouse into the RenderWindowControl 3) repeat step2) , normally I repeat step 2) at about 4~5 times, and the crash will happens. I have test it under ActiViz.NET 5.8.0 (download from website directly), ActiVizDotNet6.2 ( I built it myself), Activiz.NET.x64.7.0.0(our company bought it), the above crash can be reproduced with different verion of Activiz. and it happens so offen that in another of my bigger program, it crashes when I click the button only about 3 times. will anybody help me to find out what's the reason? Thanks & Best Regards James partMapper.SetInputData(polyData); ???163???????? STLShowing.7z (25.95M, 2016?10?5? 21:19 ??) ?? ?????|30???????????51???????4???????????52??> -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Fri Sep 9 08:32:37 2016 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Fri, 09 Sep 2016 08:32:37 -0400 Subject: [vtkusers] Rotate vtkBoxWidget Message-ID: <57D2ABE5.4020002@rhpcs.mcmaster.ca> Reposting ... Hello, I need to rotate the box widget to make its orientation toward particular directions. Right now I use SetTransform() to do the trick, but the drawback is that it changes back to the original size (L, W, H). How to re-orient the box without changing L, W, H? Thanks. Best, Weiguang -- -- Weiguang Guan Research Scientist RHPCS, McMaster University Phone: 905-525-9140 x22540 From cory.quammen at kitware.com Fri Sep 9 10:39:50 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 9 Sep 2016 10:39:50 -0400 Subject: [vtkusers] Rotate vtkBoxWidget In-Reply-To: <57D2ABE5.4020002@rhpcs.mcmaster.ca> References: <57D2ABE5.4020002@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, Just a hunch, but I think you would need to account for the (L, W, H) by applying scaling factors appropriately in your transform. HTH, Cory On Fri, Sep 9, 2016 at 8:32 AM, Weiguang Guan wrote: > Reposting ... > > Hello, > > I need to rotate the box widget to make its orientation toward particular > directions. Right now I use SetTransform() to do the trick, but the drawback > is that it changes back to the original size (L, W, H). How to re-orient the > box without changing L, W, H? Thanks. > > > Best, > Weiguang > > -- > -- > Weiguang Guan > Research Scientist > RHPCS, McMaster University > Phone: 905-525-9140 x22540 > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From adriangeologo at yahoo.es Fri Sep 9 14:12:25 2016 From: adriangeologo at yahoo.es (Adrian Martinez Vargas) Date: Fri, 9 Sep 2016 11:12:25 -0700 Subject: [vtkusers] Implicit boolean Message-ID: <6a6761fd-d777-4e6c-bc0c-3e6c5e57f60f@yahoo.es> Hi List, I would like to do boolean operations like in the example http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Python/iceCream.py or https://itk.org/Wiki/VTK/Examples/Cxx/Filtering/ImplicitBoolean but using as input vtkPolyData closed/open surfaces. The question is: How I can create implicit functions from polydata objects. I did some tests with vtkImplicitPolyDataDistance() but it didn't work for me. Any idea? Kind regards Adrian Martinez From bill.lorensen at gmail.com Fri Sep 9 14:24:14 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 9 Sep 2016 14:24:14 -0400 Subject: [vtkusers] Implicit boolean In-Reply-To: <6a6761fd-d777-4e6c-bc0c-3e6c5e57f60f@yahoo.es> References: <6a6761fd-d777-4e6c-bc0c-3e6c5e57f60f@yahoo.es> Message-ID: Look at http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ImplicitModeller On Fri, Sep 9, 2016 at 2:12 PM, Adrian Martinez Vargas via vtkusers wrote: > Hi List, > > I would like to do boolean operations like in the example > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Python/iceCream.py > or https://itk.org/Wiki/VTK/Examples/Cxx/Filtering/ImplicitBoolean but using > as input vtkPolyData closed/open surfaces. The question is: > > How I can create implicit functions from polydata objects. I did some tests > with vtkImplicitPolyDataDistance() but it didn't work for me. Any idea? > > Kind regards > Adrian Martinez > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From neok.m4700 at gmail.com Sat Sep 10 13:10:11 2016 From: neok.m4700 at gmail.com (neok m4700) Date: Sat, 10 Sep 2016 19:10:11 +0200 Subject: [vtkusers] GL2PSExporter issue In-Reply-To: References: Message-ID: Hi, Thank you for the clear explanation. It now works with these options: cmake -DVTK_RENDERING_BACKEND=OpenGL2 -DModule_vtkRenderingGL2PSOpenGL2=ON -DModule_vtkIOExportOpenGL2=ON <...> 2016-06-27 15:02 GMT+02:00 David Lonie : > I can confirm that GL2PS is not supported in VTK 7.0 on the OpenGL2 > backend. > > It should be working on the master branch for both backends, though. It is > for me: > > >>> import vtk > >>> a = vtk.vtkGL2PSExporter() > >>> print a.GetClassName() > vtkOpenGLGL2PSExporter > > If it's failing to locate the override class ("vtkOpenGLGL2PSExporter"), > that means that the IOExportOpenGL2 module is missing. > > Double check that Module_vtkIOExportOpenGL2 is enabled in the new build > against master. Build in a clean directory and verify that there's a > libvtkIOExportOpenGL2 library in [buildDir]/lib afterwards. > > HTH, > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.parness at decisionsciencescorp.com Sat Sep 10 15:15:40 2016 From: joe.parness at decisionsciencescorp.com (Joe Parness) Date: Sat, 10 Sep 2016 12:15:40 -0700 Subject: [vtkusers] vtkDataSetReader::Update reports Error reading ascii data. Possible mismatch of datasize with declaration. Message-ID: <57D45BDC.2090107@decisionsciencescorp.com> After copying vtkPolyData object to a vtkDataSetWriter I grab the vtkDataSetWriter payload as a string (send it across a net). When I grab the buffer off the net I check it in memory and it looks good but when I try and copy it back to a vtkDataSetReader the error vtkDataSetReader::Update reports Update reports Error reading ascii data. Possible mismatch of datasize with declaration and the resulting vtkDataSet appears truncated, any helpful thoughts on this would be appreciated. -- This email and its contents are confidential. If you are not the intended recipient, please do not disclose or use the information within this email or its attachments. If you have received this email in error, please report the error to the sender by return email and delete this communication from your records. From magnus_elden at hotmail.com Sat Sep 10 20:01:00 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Sun, 11 Sep 2016 02:01:00 +0200 Subject: [vtkusers] How do I save all slices of a volume from vtkCutter to another canvas? Message-ID: I have a volume that the class vtkCutter cuts into n slices. Now I need to save a render of each slice to another larger canvas to generate something similar to this: http://previews.123rf.com/images/bunyos/bunyos1403/bunyos140300039/26777884- MRI-scan-of-the-human-brain-Stock-Photo.jpg I am able to render it by linking the cutter output to a mapper and then into a vtkActor that I add to the renderer, but I have no idea how I can render each slice to a canvas. In the worst case I just want the renders to be all stored to disk. Thank you for your help. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 11 10:17:05 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 11 Sep 2016 16:17:05 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-09 11:08 GMT+02:00 Elvis Stansvik : > 2016-09-09 11:04 GMT+02:00 Elvis Stansvik : > >> Hi all, >> >> I have a hopefully simple question: >> >> Since the bounds of a vtkImageData start and end in the center of the >> corner voxels, if I want to place two volumes in the world adjacent (right >> next to eachother) using SetPosition, will I have to compensate for this, >> to avoid the volumes overlapping by 0.5*spacing_of_first_volume + >> 0.5*spacing_of_second_volume ? >> > > I guess this is really two questions: > > 1) Is the (visual, in world) size of a volume in the first dimension > (extent[1] - extent[0]) * spacing[2] or (extent[1] - extent[0] + 1) * > spacing[2]. > 2) Will SetPosition move the volume such that the center of the corner > voxel is at the given world position? > Okay, I made the following small test program: #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char* argv[]) { if (argc != 2) { std::cerr << "Usage: " << argv[0] << "" << std::endl; return 1; } auto reader = vtkSmartPointer::New(); reader->SetFileName(argv[1]); reader->Update(); auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(reader->GetOutputPort()); auto color = vtkSmartPointer::New(); color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); // blue color->AddRGBPoint(1.0, 0.0, 0.0, 1.0); // blue auto opacity = vtkSmartPointer::New(); opacity->AddPoint(0.0, 0.4); opacity->AddPoint(1.0, 0.4); auto property = vtkSmartPointer::New(); property->SetColor(color); property->SetScalarOpacity(opacity); auto volume = vtkSmartPointer::New(); volume->SetMapper(mapper); volume->SetProperty(property); volume->SetPosition(0, 0, 0); auto renderer = vtkSmartPointer::New(); renderer->AddVolume(volume); // Cube axes actor auto cubeAxesActor = vtkSmartPointer::New(); cubeAxesActor->SetBounds(0, 4, 0, 4, 0, 4); cubeAxesActor->SetCamera(renderer->GetActiveCamera()); cubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0); cubeAxesActor->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 0.0); cubeAxesActor->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0); cubeAxesActor->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0); cubeAxesActor->GetTitleTextProperty(2)->SetColor(0.0, 0.0, 1.0); cubeAxesActor->GetLabelTextProperty(2)->SetColor(0.0, 0.0, 1.0); cubeAxesActor->DrawXGridlinesOn(); cubeAxesActor->DrawYGridlinesOn(); cubeAxesActor->DrawZGridlinesOn(); cubeAxesActor->SetGridLineLocation(VTK_GRID_LINES_FURTHEST); renderer->AddActor(cubeAxesActor); renderer->ResetCamera(); auto renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); auto interactor = vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); interactor->Initialize(); interactor->Start(); return EXIT_SUCCESS; } And then loaded each of the following three files, containing a 2x2x2 (extent: 0 1 0 1 0 1), a 3x3x3 (extent: 0 2 0 2 0 2) and a 4x4x4 (extent: 0 3 0 3 0 3) image, all of them with spacing 1.0 1.0 1.0: 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 I'm attaching the result. As you can see, the 2x2x2 volume has a visual dimension of 1x1x1, the 3x3x3 a visual dimension of 2x2x2 and the 4x4x4 a visual dimension of 3x3x3, so one less than what I would have expected. I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I would get 2x2x2 area occupied when the volume is mapped into the world. If someone could clarify what is going on here, it would be much appreciated. I understand now that to "stack" my volumes adjacently on top of each other, I should add extent[5] * spacing[2], not (extent[5] + 1) * spacing[2] (I don't have access to the vtkVolume at that point, so can't use GetBounds), and that it's precisely this position I should give to SetPosition (no need to "compensate" for the half spacing to the voxel center). But I'm still surprised that a volume containing 2x2x2 voxels values gives a 1x1x1 visual rendering. Elvis > Elvis > > >> Thanks in advance, >> Elvis >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result-2x2x2.png Type: image/png Size: 12788 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result-3x3x3.png Type: image/png Size: 13299 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result-4x4x4.png Type: image/png Size: 14862 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Sun Sep 11 10:23:53 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 11 Sep 2016 16:23:53 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-11 16:17 GMT+02:00 Elvis Stansvik : > 2016-09-09 11:08 GMT+02:00 Elvis Stansvik : > >> 2016-09-09 11:04 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> I have a hopefully simple question: >>> >>> Since the bounds of a vtkImageData start and end in the center of the >>> corner voxels, if I want to place two volumes in the world adjacent (right >>> next to eachother) using SetPosition, will I have to compensate for this, >>> to avoid the volumes overlapping by 0.5*spacing_of_first_volume + >>> 0.5*spacing_of_second_volume ? >>> >> >> I guess this is really two questions: >> >> 1) Is the (visual, in world) size of a volume in the first dimension >> (extent[1] - extent[0]) * spacing[2] or (extent[1] - extent[0] + 1) * >> spacing[2]. >> 2) Will SetPosition move the volume such that the center of the corner >> voxel is at the given world position? >> > > Okay, I made the following small test program: > > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > if (argc != 2) { > std::cerr << "Usage: " << argv[0] << "" << std::endl; > return 1; > } > > auto reader = vtkSmartPointer::New(); > reader->SetFileName(argv[1]); > reader->Update(); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputConnection(reader->GetOutputPort()); > > auto color = vtkSmartPointer::New(); > color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); // blue > color->AddRGBPoint(1.0, 0.0, 0.0, 1.0); // blue > > auto opacity = vtkSmartPointer::New(); > opacity->AddPoint(0.0, 0.4); > opacity->AddPoint(1.0, 0.4); > > auto property = vtkSmartPointer::New(); > property->SetColor(color); > property->SetScalarOpacity(opacity); > > auto volume = vtkSmartPointer::New(); > volume->SetMapper(mapper); > volume->SetProperty(property); > volume->SetPosition(0, 0, 0); > > auto renderer = vtkSmartPointer::New(); > renderer->AddVolume(volume); > > // Cube axes actor > auto cubeAxesActor = vtkSmartPointer::New(); > cubeAxesActor->SetBounds(0, 4, 0, 4, 0, 4); > cubeAxesActor->SetCamera(renderer->GetActiveCamera()); > cubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetTitleTextProperty(2)->SetColor(0.0, 0.0, 1.0); > cubeAxesActor->GetLabelTextProperty(2)->SetColor(0.0, 0.0, 1.0); > cubeAxesActor->DrawXGridlinesOn(); > cubeAxesActor->DrawYGridlinesOn(); > cubeAxesActor->DrawZGridlinesOn(); > cubeAxesActor->SetGridLineLocation(VTK_GRID_LINES_FURTHEST); > renderer->AddActor(cubeAxesActor); > > renderer->ResetCamera(); > > auto renderWindow = vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > > auto interactor = vtkSmartPointer::New(); > interactor->SetRenderWindow(renderWindow); > interactor->Initialize(); > > interactor->Start(); > > return EXIT_SUCCESS; > } > > And then loaded each of the following three files, containing a 2x2x2 > (extent: 0 1 0 1 0 1), a 3x3x3 (extent: 0 2 0 2 0 2) and a 4x4x4 (extent: 0 > 3 0 3 0 3) image, all of them with spacing 1.0 1.0 1.0: > > > > > > > > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > > > > > > > > > > > > > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > > > > > > > > > > > > > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > > > > > > Sorry, these files had a bit too many scalars in them (but the result is the same of course). Here they are corrected: 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Elvis > I'm attaching the result. > > As you can see, the 2x2x2 volume has a visual dimension of 1x1x1, the > 3x3x3 a visual dimension of 2x2x2 and the 4x4x4 a visual dimension of > 3x3x3, so one less than what I would have expected. > > I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I would > get 2x2x2 area occupied when the volume is mapped into the world. > > If someone could clarify what is going on here, it would be much > appreciated. > > I understand now that to "stack" my volumes adjacently on top of each > other, I should add extent[5] * spacing[2], not (extent[5] + 1) * > spacing[2] (I don't have access to the vtkVolume at that point, so can't > use GetBounds), and that it's precisely this position I should give to > SetPosition (no need to "compensate" for the half spacing to the voxel > center). > > But I'm still surprised that a volume containing 2x2x2 voxels values gives > a 1x1x1 visual rendering. > > Elvis > > >> Elvis >> >> >>> Thanks in advance, >>> Elvis >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 11 10:48:07 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 11 Sep 2016 16:48:07 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-11 16:17 GMT+02:00 Elvis Stansvik : > 2016-09-09 11:08 GMT+02:00 Elvis Stansvik : > >> 2016-09-09 11:04 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> I have a hopefully simple question: >>> >>> Since the bounds of a vtkImageData start and end in the center of the >>> corner voxels, if I want to place two volumes in the world adjacent (right >>> next to eachother) using SetPosition, will I have to compensate for this, >>> to avoid the volumes overlapping by 0.5*spacing_of_first_volume + >>> 0.5*spacing_of_second_volume ? >>> >> >> I guess this is really two questions: >> >> 1) Is the (visual, in world) size of a volume in the first dimension >> (extent[1] - extent[0]) * spacing[2] or (extent[1] - extent[0] + 1) * >> spacing[2]. >> 2) Will SetPosition move the volume such that the center of the corner >> voxel is at the given world position? >> > > Okay, I made the following small test program: > > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > if (argc != 2) { > std::cerr << "Usage: " << argv[0] << "" << std::endl; > return 1; > } > > auto reader = vtkSmartPointer::New(); > reader->SetFileName(argv[1]); > reader->Update(); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputConnection(reader->GetOutputPort()); > > auto color = vtkSmartPointer::New(); > color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); // blue > color->AddRGBPoint(1.0, 0.0, 0.0, 1.0); // blue > > auto opacity = vtkSmartPointer::New(); > opacity->AddPoint(0.0, 0.4); > opacity->AddPoint(1.0, 0.4); > > auto property = vtkSmartPointer::New(); > property->SetColor(color); > property->SetScalarOpacity(opacity); > > auto volume = vtkSmartPointer::New(); > volume->SetMapper(mapper); > volume->SetProperty(property); > volume->SetPosition(0, 0, 0); > > auto renderer = vtkSmartPointer::New(); > renderer->AddVolume(volume); > > // Cube axes actor > auto cubeAxesActor = vtkSmartPointer::New(); > cubeAxesActor->SetBounds(0, 4, 0, 4, 0, 4); > cubeAxesActor->SetCamera(renderer->GetActiveCamera()); > cubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetTitleTextProperty(2)->SetColor(0.0, 0.0, 1.0); > cubeAxesActor->GetLabelTextProperty(2)->SetColor(0.0, 0.0, 1.0); > cubeAxesActor->DrawXGridlinesOn(); > cubeAxesActor->DrawYGridlinesOn(); > cubeAxesActor->DrawZGridlinesOn(); > cubeAxesActor->SetGridLineLocation(VTK_GRID_LINES_FURTHEST); > renderer->AddActor(cubeAxesActor); > > renderer->ResetCamera(); > > auto renderWindow = vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > > auto interactor = vtkSmartPointer::New(); > interactor->SetRenderWindow(renderWindow); > interactor->Initialize(); > > interactor->Start(); > > return EXIT_SUCCESS; > } > > And then loaded each of the following three files, containing a 2x2x2 > (extent: 0 1 0 1 0 1), a 3x3x3 (extent: 0 2 0 2 0 2) and a 4x4x4 (extent: 0 > 3 0 3 0 3) image, all of them with spacing 1.0 1.0 1.0: > > > > > > > > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > 1.0 1.0 > > > > > > > > > > > > > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > > > > > > > > > > > > > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 > > > > > > > I'm attaching the result. > > As you can see, the 2x2x2 volume has a visual dimension of 1x1x1, the > 3x3x3 a visual dimension of 2x2x2 and the 4x4x4 a visual dimension of > 3x3x3, so one less than what I would have expected. > > I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I would > get 2x2x2 area occupied when the volume is mapped into the world. > > If someone could clarify what is going on here, it would be much > appreciated. > > I understand now that to "stack" my volumes adjacently on top of each > other, I should add extent[5] * spacing[2], not (extent[5] + 1) * > spacing[2] (I don't have access to the vtkVolume at that point, so can't > use GetBounds), and that it's precisely this position I should give to > SetPosition (no need to "compensate" for the half spacing to the voxel > center). > > But I'm still surprised that a volume containing 2x2x2 voxels values gives > a 1x1x1 visual rendering. > Okay, I think I understand now: The voxel values are mapped to grid intersections in the world. So in the 2x2x2 case, the 8 scalar values are mapped to (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0) and (1,1,1) in world coordinates, and the visual representation of that is a cube with corners in those points, colored according to scalars. When I played around with the 2x2x2 example and colored it in alternating red/blue it helped me understand. Quite interesting to see how it calculates the colors based on how you look at that little volume actually :) Elvis > Elvis > > >> Elvis >> >> >>> Thanks in advance, >>> Elvis >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Sep 11 10:55:52 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 11 Sep 2016 08:55:52 -0600 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: On Sun, Sep 11, 2016 at 8:17 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > > > I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I would > get 2x2x2 area occupied when the volume is mapped into the world. > Let's get straight to the point. In order to seamlessly display two adjacent volumes, the volumes must share a face, e.g. the rightmost face of the first volume must have the same data points as the leftmost face of second volume. I.e. the data points on the edge must be duplicated between the two volumes. This isn't specific to VTK, or even to volume rendering. If one is analyzing/visualizing a data set in a manner that requires interpolation, and the data set needs to be broken into pieces, then adjacent pieces must share data points at the edges. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Sep 11 11:01:22 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 11 Sep 2016 09:01:22 -0600 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: On Sun, Sep 11, 2016 at 8:55 AM, David Gobbi wrote: > On Sun, Sep 11, 2016 at 8:17 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: >> >> >> I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I would >> get 2x2x2 area occupied when the volume is mapped into the world. >> > > Let's get straight to the point. In order to seamlessly display two > adjacent volumes, the volumes must share a face, e.g. the rightmost face of > the first volume must have the same data points as the leftmost face of > second volume. I.e. the data points on the edge must be duplicated between > the two volumes. > > This isn't specific to VTK, or even to volume rendering. If one is > analyzing/visualizing a data set in a manner that requires interpolation, > and the data set needs to be broken into pieces, then adjacent pieces must > share data points at the edges. > Actually this isn't specific to interpolation. Any time the analysis/visualization of the pieces requires any kind of neighborhood filtering whatsoever, there must be data values shared between adjacent pieces. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Sep 11 11:11:57 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 11 Sep 2016 17:11:57 +0200 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: 2016-09-11 17:01 GMT+02:00 David Gobbi : > On Sun, Sep 11, 2016 at 8:55 AM, David Gobbi > wrote: > >> On Sun, Sep 11, 2016 at 8:17 AM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >>> >>> >>> I thought that with e.g. a 2x2x2 volume with spacing 1.0 1.0 1.0, I >>> would get 2x2x2 area occupied when the volume is mapped into the world. >>> >> >> Let's get straight to the point. In order to seamlessly display two >> adjacent volumes, the volumes must share a face, e.g. the rightmost face of >> the first volume must have the same data points as the leftmost face of >> second volume. I.e. the data points on the edge must be duplicated between >> the two volumes. >> >> This isn't specific to VTK, or even to volume rendering. If one is >> analyzing/visualizing a data set in a manner that requires interpolation, >> and the data set needs to be broken into pieces, then adjacent pieces must >> share data points at the edges. >> > > Actually this isn't specific to interpolation. Any time the > analysis/visualization of the pieces requires any kind of neighborhood > filtering whatsoever, there must be data values shared between adjacent > pieces. > Ah yes, that makes sense. My confusion in this slightly stream-of-conciousness-style thread (sorry 'bout that!) was that I didn't really grasp how a 2x2x2 source volume could give rise to a 1x1x1 cube in the world. But it was just that I didn't understand how rendering works and how the extents of the volume relate to what I see rendered. I think I understand now. Regarding ensuring the volumes are seamless: So far, the visual result in this particular case seems acceptable enough to me, without having to worry about "stiching" them together by making them share values at the boundary. But I'll keep it in mind and do some more testing, thanks for bringing it up. Elvis > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Sep 11 11:47:06 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 11 Sep 2016 09:47:06 -0600 Subject: [vtkusers] Placing volumes exactly adjacent to each other In-Reply-To: References: Message-ID: On Sun, Sep 11, 2016 at 9:11 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > > > My confusion in this slightly stream-of-conciousness-style thread (sorry > 'bout that!) was that I didn't really grasp how a 2x2x2 source volume could > give rise to a 1x1x1 cube in the world. But it was just that I didn't > understand how rendering works and how the extents of the volume relate to > what I see rendered. I think I understand now. > Think of it in terms of the old fencepost-counting problem. The data points are the fenceposts. The data set is the fence. Each fence segment needs a post on each side to hold it up. You can't go beyond the posts at either end without extrapolating. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Sep 11 12:18:37 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 12 Sep 2016 00:18:37 +0800 (CST) Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? Message-ID: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> Hi, I want to give Chinese text annotation on 3D model.Does vtkCaptionActor2D support chinese characters? If no, what class should I use? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From onatt at gmx.de Sun Sep 11 15:26:36 2016 From: onatt at gmx.de (Oliver Natt) Date: Sun, 11 Sep 2016 21:26:36 +0200 Subject: [vtkusers] vtkOBJReader, Qt4 and German locale Message-ID: Dear users, I found a very strange behaviour of vtkOBJReader which can be reproduced by the attached script 'test.py'. Interestingly, whether the script works or not depends on the locale: If I do the following, the script runs without problems and displays a teddy. ~/> LANG=en_US.UTF-8 ~/> python test.py However, when I do the following, the script stops working with the following error message: ~/> LANG=de_DE.UTF-8 ~/> python test.py ERROR: In /home/onatt/Downloads/vtk-py3-qt4/src/VTK-7.0.0/IO/Geometry/vtkOBJReader.cxx, line 193 vtkOBJReader (0x29cdf40): Error reading 'v' at line 1 I think the reason is, that in the german local the role of "." and "," are swapped. The english number "1,234.55" corresponds to the german number "1.234,55". Another interesting observation is, that the script runs independently of the selected locale, if I remove the line a = QApplication(["", ""]) The obvious solution would be to remove the line with "QApplication". However, I want to use the vtkOBJReader in a Qt-Application with the german locale. Do you have any suggestions how to get vtkOBJReader working in this particular situation? I am running Arch Linux with Python 3.5.2, vtk 7.0.0, and qt 4.8.7 Best regards Oliver -------------- next part -------------- A non-text attachment was scrubbed... Name: test.obj Type: application/x-tgif Size: 91538 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.py Type: text/x-python Size: 494 bytes Desc: not available URL: From chenjianyyzz at 163.com Mon Sep 12 02:47:15 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Sun, 11 Sep 2016 23:47:15 -0700 (MST) Subject: [vtkusers] Activiz build: The type or namespace name 'vtkGenericCompositePolyDataMapper2' could not be found In-Reply-To: <140cda3d.d813.1570d89a857.Coremail.chenjianyyzz@163.com> References: <140cda3d.d813.1570d89a857.Coremail.chenjianyyzz@163.com> Message-ID: <1473662835313-5740257.post@n5.nabble.com> Hello VTK Users, I am still struggling of the error of "The type or namespace name 'vtkGenericCompositePolyDataMapper2' could not be found", actually I have a check the csharp folder, there's the file vtkGenericCompositePolyDataMapper2.cs, and the namespace is also the ?Kitware.VTK", why it cannot be found? James -- View this message in context: http://vtk.1045678.n5.nabble.com/Activiz-build-The-type-or-namespace-name-vtkGenericCompositePolyDataMapper2-could-not-be-found-tp5740226p5740257.html Sent from the VTK - Users mailing list archive at Nabble.com. From grothausmann.roman at mh-hannover.de Mon Sep 12 05:49:35 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Mon, 12 Sep 2016 11:49:35 +0200 Subject: [vtkusers] Testing ITK/VTK/PV contributions with (kitware) Gitlab-CI In-Reply-To: References: <20160908131417.GB13993@megas.kitware.com> Message-ID: Many thanks Ben and D?enan for Your replies and pointing me to CircleCI. I see that testing contributions employing PV,VTK and ITK all together is rather challenging. I wonder though why my pure VTK (PV) based contribution did not get tested when submitted to the VTK-Journal, e.g. http://www.midasjournal.org/browse/publication/949 Is the testing the VTK/Midas Journals used to do not available any more? Regards, Roman On 08/09/16 16:26, D?enan Zuki? wrote: > Hi Roman, > > some of ITK's remote modules are using CircleCI for testing. Two recent examples > are RLEImage and > MorphologicalContourInterpolation > . Of > course, you should be familiar, or familiarize yourself with CircleCI > . > > Regards, > D?enan > > On Thu, Sep 8, 2016 at 9:14 AM, Ben Boeckel > wrote: > > On Thu, Sep 08, 2016 at 12:36:40 +0200, Grothausmann, Roman Dr. wrote: > > Just getting to know Gitlab-CI, I am wondering whether it is possible to test > > contributions to ITK/VTK/PV with Gitlab-CI from gitlab.com or > > gitlab.kitware.com . As far as I understand, this > basically needs runners, in > > this case specific to ITK/VTK/PV. Since kitware has done CI even before the use > > of gitlab, I wonder if the former testing environments are available for use > > with Gitlab-CI and if so how to use them. > > We're (VTK and ParaView) using buildbot to manage our testing. The > number of settings we test across machines is hard to specify in YAML > files (machines also have different settings based on what you're > testing, e.g., load up a different compiler or Qt4 or Qt5 and the paths > they live in, etc.). We're working on improving the hardware situation > buildbot is currently in; things should be getting better over the next > few months on that front. > > > For example, none of my contributions to the ITK/VTK/Midas Journals got into the > > testing phase even though marked for testing during submission. So a possibility > > to use Gitlab-CI to test the compilation and to run the project test would be > > really great, especially for continued development and testing on other OSs. > > Specifically, for e.g. testing my FacetAnalyser contribution > > (http://www.midasjournal.org/browse/publication/951 > > > https://gitlab.com/romangrothausmann/FacetAnalyser > ) I would need a runner > > environment with PV, VTK and ITK ideally for Linux, MacOS and Windows. > > ITK is using Gerrit and Jenkins, not Gitlab. > > --Ben > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From nabil.ghodbane at gmail.com Mon Sep 12 07:34:51 2016 From: nabil.ghodbane at gmail.com (Nabil Ghodbane) Date: Mon, 12 Sep 2016 13:34:51 +0200 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? Message-ID: dear all, I am trying to compile VTK 5.10.1 and I fail to find a zip of the VTKLargeData-5.10.1 Can someone point me to its link if it is available somewhere ? Thanks Nabil Ghodbane (Ph. D. Habil*.*) Mailto: nabil.ghodbane at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 08:01:07 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 14:01:07 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? Message-ID: Hi all, I've just noticed the there's a large difference in rendering quality if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). I found this very old post from 2007 about the same problem: http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html I was originally using a data spacing of 0.12, which is the voxel size in centimeters for the particular volume I'm working with (stored in our data files), but after I tried to divide it by 100.0 during loading, rendering quality dropped considerably. The reason I wanted to do this is because it's more convenient if VTK world coordinates are in meters in this particular application, not centimeters. Anyone know why volume rendering quality seems dependant on the data spacing? Thanks for any clarifications! Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Sep 12 08:42:38 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 12 Sep 2016 08:42:38 -0400 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: Use git. git clone git://vtk.org/VTKLargeData.git David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane wrote: > dear all, > I am trying to compile VTK 5.10.1 and I fail to find a zip of the > VTKLargeData-5.10.1 > Can someone point me to its link if it is available somewhere ? > Thanks > > Nabil Ghodbane (Ph. D. Habil*.*) > Mailto: nabil.ghodbane at gmail.com > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabil.ghodbane at gmail.com Mon Sep 12 08:45:35 2016 From: nabil.ghodbane at gmail.com (Nabil Ghodbane) Date: Mon, 12 Sep 2016 14:45:35 +0200 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: Hi David, I have tried that already, but unfortunately I keep getting a timeout. Is it mirrored ? thanks Nabil Ghodbane (Ph. D. Habil*.*) Mailto: nabil.ghodbane at gmail.com On Mon, Sep 12, 2016 at 2:42 PM, David E DeMarle wrote: > Use git. > > git clone git://vtk.org/VTKLargeData.git > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane > wrote: > >> dear all, >> I am trying to compile VTK 5.10.1 and I fail to find a zip of the >> VTKLargeData-5.10.1 >> Can someone point me to its link if it is available somewhere ? >> Thanks >> >> Nabil Ghodbane (Ph. D. Habil*.*) >> Mailto: nabil.ghodbane at gmail.com >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Sep 12 08:49:10 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 12 Sep 2016 08:49:10 -0400 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: Does git clone http://vtk.org/VTKLargeData.git work? If not I'll tar and push somewhere public. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Sep 12, 2016 at 8:45 AM, Nabil Ghodbane wrote: > Hi David, > I have tried that already, but unfortunately I keep getting a timeout. Is > it mirrored ? > thanks > > Nabil Ghodbane (Ph. D. Habil*.*) > Mailto: nabil.ghodbane at gmail.com > > > On Mon, Sep 12, 2016 at 2:42 PM, David E DeMarle > wrote: > >> Use git. >> >> git clone git://vtk.org/VTKLargeData.git >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane > > wrote: >> >>> dear all, >>> I am trying to compile VTK 5.10.1 and I fail to find a zip of the >>> VTKLargeData-5.10.1 >>> Can someone point me to its link if it is available somewhere ? >>> Thanks >>> >>> Nabil Ghodbane (Ph. D. Habil*.*) >>> Mailto: nabil.ghodbane at gmail.com >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabil.ghodbane at gmail.com Mon Sep 12 08:54:15 2016 From: nabil.ghodbane at gmail.com (Nabil Ghodbane) Date: Mon, 12 Sep 2016 14:54:15 +0200 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: Unfortunately, as I wrote it in my previous email, it fails with a timeout. It would definitely make sens to have the .tar.gz package of vtk-largedata for *5.10.1* as well, which is currently missing from the download site: http://www.vtk.org/download/ is vtk-largedata 6.x compatible with vtk-5.10.1 ? thanks Nabil Ghodbane (Ph. D. Habil*.*) Phone: +33 6 34 42 33 43 Mailto: nabil.ghodbane at gmail.com On Mon, Sep 12, 2016 at 2:49 PM, David E DeMarle wrote: > Does git clone http://vtk.org/VTKLargeData.git work? > If not I'll tar and push somewhere public. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Sep 12, 2016 at 8:45 AM, Nabil Ghodbane > wrote: > >> Hi David, >> I have tried that already, but unfortunately I keep getting a timeout. Is >> it mirrored ? >> thanks >> >> Nabil Ghodbane (Ph. D. Habil*.*) >> Mailto: nabil.ghodbane at gmail.com >> >> >> On Mon, Sep 12, 2016 at 2:42 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> Use git. >>> >>> git clone git://vtk.org/VTKLargeData.git >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane < >>> nabil.ghodbane at gmail.com> wrote: >>> >>>> dear all, >>>> I am trying to compile VTK 5.10.1 and I fail to find a zip of the >>>> VTKLargeData-5.10.1 >>>> Can someone point me to its link if it is available somewhere ? >>>> Thanks >>>> >>>> Nabil Ghodbane (Ph. D. Habil*.*) >>>> Mailto: nabil.ghodbane at gmail.com >>>> >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 08:56:16 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 14:56:16 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: 2016-09-12 14:01 GMT+02:00 Elvis Stansvik : > Hi all, > > I've just noticed the there's a large difference in rendering quality if I > decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). > > I found this very old post from 2007 about the same problem: > > http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html > > I was originally using a data spacing of 0.12, which is the voxel size in > centimeters for the particular volume I'm working with (stored in our data > files), but after I tried to divide it by 100.0 during loading, rendering > quality dropped considerably. The reason I wanted to do this is because > it's more convenient if VTK world coordinates are in meters in this > particular application, not centimeters. > > Anyone know why volume rendering quality seems dependant on the data > spacing? > I now found another more recent post from 2014 which describes in more detail what I seem to experience as well (seemingly also with no answer): http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html I get the expected rendering when the spacing is ~1. Must I make sure that my volumes have a spacing ~1? I'm willing to abandon the idea of having VTK world coordinates == meters and introduce another scale, but it's a bit cumbersome as I'm working with multiple volumes which I add to the renderer at once, and not all of them will have the same spacing. This means I must first analyse the volumes I'm going to load a priori, and calculate a factor common to them all that will bring all of their spacings as close to 1 as possible :( Would be great if someone in the know could chime in. Is there some workaround? Can I instruct the mapper to "expect" the small spacings I want to work with? Elvis > Thanks for any clarifications! > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Sep 12 09:10:00 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 12 Sep 2016 09:10:00 -0400 Subject: [vtkusers] Testing ITK/VTK/PV contributions with (kitware) Gitlab-CI In-Reply-To: References: <20160908131417.GB13993@megas.kitware.com> Message-ID: Hi Roman, I don't think that Insight and Midas journals' testing infrastructure is functional any more. Perhaps Matt can provide more info? Regards, D?enan On Mon, Sep 12, 2016 at 5:49 AM, Grothausmann, Roman Dr. < grothausmann.roman at mh-hannover.de> wrote: > Many thanks Ben and D?enan for Your replies and pointing me to CircleCI. I > see that testing contributions employing PV,VTK and ITK all together is > rather challenging. > > I wonder though why my pure VTK (PV) based contribution did not get tested > when submitted to the VTK-Journal, e.g. > http://www.midasjournal.org/browse/publication/949 > > Is the testing the VTK/Midas Journals used to do not available any more? > > Regards, > Roman > > On 08/09/16 16:26, D?enan Zuki? wrote: > >> Hi Roman, >> >> some of ITK's remote modules are using CircleCI for testing. Two recent >> examples >> are RLEImage and >> MorphologicalContourInterpolation >> . >> Of >> course, you should be familiar, or familiarize yourself with CircleCI >> . >> >> Regards, >> D?enan >> >> On Thu, Sep 8, 2016 at 9:14 AM, Ben Boeckel > > wrote: >> >> On Thu, Sep 08, 2016 at 12:36:40 +0200, Grothausmann, Roman Dr. wrote: >> > Just getting to know Gitlab-CI, I am wondering whether it is >> possible to test >> > contributions to ITK/VTK/PV with Gitlab-CI from gitlab.com < >> http://gitlab.com> or >> > gitlab.kitware.com . As far as I >> understand, this >> basically needs runners, in >> > this case specific to ITK/VTK/PV. Since kitware has done CI even >> before the use >> > of gitlab, I wonder if the former testing environments are >> available for use >> > with Gitlab-CI and if so how to use them. >> >> We're (VTK and ParaView) using buildbot to manage our testing. The >> number of settings we test across machines is hard to specify in YAML >> files (machines also have different settings based on what you're >> testing, e.g., load up a different compiler or Qt4 or Qt5 and the >> paths >> they live in, etc.). We're working on improving the hardware situation >> buildbot is currently in; things should be getting better over the >> next >> few months on that front. >> >> > For example, none of my contributions to the ITK/VTK/Midas Journals >> got into the >> > testing phase even though marked for testing during submission. So >> a possibility >> > to use Gitlab-CI to test the compilation and to run the project >> test would be >> > really great, especially for continued development and testing on >> other OSs. >> > Specifically, for e.g. testing my FacetAnalyser contribution >> > (http://www.midasjournal.org/browse/publication/951 >> >> > https://gitlab.com/romangrothausmann/FacetAnalyser >> ) I would need a >> runner >> > environment with PV, VTK and ITK ideally for Linux, MacOS and >> Windows. >> >> ITK is using Gerrit and Jenkins, not Gitlab. >> >> --Ben >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Sep 12 09:13:15 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 12 Sep 2016 09:13:15 -0400 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: Not perfectly compatible, they were a couple of removals and one correction in the log. So I've pushed the release-5.10 branch to http://www.vtk.org/files/release/5.10/vtklargedata-5.10.0.tar.gz David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Sep 12, 2016 at 8:54 AM, Nabil Ghodbane wrote: > Unfortunately, as I wrote it in my previous email, it fails with a > timeout. It would definitely make sens to have the .tar.gz package of > vtk-largedata for *5.10.1* as well, which is currently missing from the > download site: http://www.vtk.org/download/ > is vtk-largedata 6.x compatible with vtk-5.10.1 ? > thanks > > Nabil Ghodbane (Ph. D. Habil*.*) > Phone: +33 6 34 42 33 43 > Mailto: nabil.ghodbane at gmail.com > > > On Mon, Sep 12, 2016 at 2:49 PM, David E DeMarle > wrote: > >> Does git clone http://vtk.org/VTKLargeData.git work? >> If not I'll tar and push somewhere public. >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Mon, Sep 12, 2016 at 8:45 AM, Nabil Ghodbane > > wrote: >> >>> Hi David, >>> I have tried that already, but unfortunately I keep getting a timeout. >>> Is it mirrored ? >>> thanks >>> >>> Nabil Ghodbane (Ph. D. Habil*.*) >>> Mailto: nabil.ghodbane at gmail.com >>> >>> >>> On Mon, Sep 12, 2016 at 2:42 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> Use git. >>>> >>>> git clone git://vtk.org/VTKLargeData.git >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane < >>>> nabil.ghodbane at gmail.com> wrote: >>>> >>>>> dear all, >>>>> I am trying to compile VTK 5.10.1 and I fail to find a zip of the >>>>> VTKLargeData-5.10.1 >>>>> Can someone point me to its link if it is available somewhere ? >>>>> Thanks >>>>> >>>>> Nabil Ghodbane (Ph. D. Habil*.*) >>>>> Mailto: nabil.ghodbane at gmail.com >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Mon Sep 12 09:20:46 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 12 Sep 2016 09:20:46 -0400 Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? In-Reply-To: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> References: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> Message-ID: On Sun, Sep 11, 2016 at 12:18 PM, Liu_tj wrote: > I want to give Chinese text annotation on 3D model.Does vtkCaptionActor2D > support chinese characters? If no, what class should I use? > vtkCaptionActor2D will work. You'll need to provide a unicode font file (the embedded fonts in VTK only support ASCII) via the caption actor's GetCaptionTextProperty: captionActor->GetCaptionTextProperty()->SetFontFamily(VTK_FONT_FILE); captionActor->GetCaptionTextProperty()->SetFontFile("/path/to/some/unicode/font/file"); and then encode the caption text as UTF-8. Hope this helps, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabil.ghodbane at gmail.com Mon Sep 12 09:24:27 2016 From: nabil.ghodbane at gmail.com (Nabil Ghodbane) Date: Mon, 12 Sep 2016 15:24:27 +0200 Subject: [vtkusers] vtk-5.10.1 VTK_LARGE_DATA_ROOT: where can I download it from? In-Reply-To: References: Message-ID: brillant! I am downloading the tarball. thanks for the prompt action. I fail to understand why checking out the release-5.10 branch fails with a timeout. git clone -b release-5.10 git://vtk.org/VTKLargeData.git Nabil Ghodbane (Ph. D. Habil*.*) Phone: +33 6 34 42 33 43 Mailto: nabil.ghodbane at gmail.com On Mon, Sep 12, 2016 at 3:13 PM, David E DeMarle wrote: > Not perfectly compatible, they were a couple of removals and one > correction in the log. > > So I've pushed the release-5.10 branch to http://www.vtk.org/files/ > release/5.10/vtklargedata-5.10.0.tar.gz > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Sep 12, 2016 at 8:54 AM, Nabil Ghodbane > wrote: > >> Unfortunately, as I wrote it in my previous email, it fails with a >> timeout. It would definitely make sens to have the .tar.gz package of >> vtk-largedata for *5.10.1* as well, which is currently missing from the >> download site: http://www.vtk.org/download/ >> is vtk-largedata 6.x compatible with vtk-5.10.1 ? >> thanks >> >> Nabil Ghodbane (Ph. D. Habil*.*) >> Phone: +33 6 34 42 33 43 >> Mailto: nabil.ghodbane at gmail.com >> >> >> On Mon, Sep 12, 2016 at 2:49 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> Does git clone http://vtk.org/VTKLargeData.git work? >>> If not I'll tar and push somewhere public. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Mon, Sep 12, 2016 at 8:45 AM, Nabil Ghodbane < >>> nabil.ghodbane at gmail.com> wrote: >>> >>>> Hi David, >>>> I have tried that already, but unfortunately I keep getting a timeout. >>>> Is it mirrored ? >>>> thanks >>>> >>>> Nabil Ghodbane (Ph. D. Habil*.*) >>>> Mailto: nabil.ghodbane at gmail.com >>>> >>>> >>>> On Mon, Sep 12, 2016 at 2:42 PM, David E DeMarle < >>>> dave.demarle at kitware.com> wrote: >>>> >>>>> Use git. >>>>> >>>>> git clone git://vtk.org/VTKLargeData.git >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Mon, Sep 12, 2016 at 7:34 AM, Nabil Ghodbane < >>>>> nabil.ghodbane at gmail.com> wrote: >>>>> >>>>>> dear all, >>>>>> I am trying to compile VTK 5.10.1 and I fail to find a zip of the >>>>>> VTKLargeData-5.10.1 >>>>>> Can someone point me to its link if it is available somewhere ? >>>>>> Thanks >>>>>> >>>>>> Nabil Ghodbane (Ph. D. Habil*.*) >>>>>> Mailto: nabil.ghodbane at gmail.com >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Mon Sep 12 09:29:53 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Mon, 12 Sep 2016 09:29:53 -0400 Subject: [vtkusers] Job Posting: Software Developer at Kitware Message-ID: Folks, I wanted to draw your attention to this job posting: https://www.smartrecruiters.com/kitware/90427842-software-developer The posting itself is quite general and targets multiple teams, so I figured I'd give a few more details on what our team is looking for. We are the VTK, ParaView, VTK-m (and related technologies) team. If you think you can make contributions to these projects on algorithms or applications side, then certainly apply. At the same time, however, if you are a systems guy or gal, with interests in the workings of different computer systems including Crays, BlueGenes, with aptitude for overcoming platform (and compiler) quirks, or are at home with CMake scripts, then you may be a good match. If development workflows is your thing: toying with testing systems like Buildbot, setting up Git hooks and configurations to simplify development, etc, then this job posting may be of interest to you too. We routinely work with various National (and Intentional) Labs to get our tools built and deployed on the latest and greatest super-computing system. If that's of interest to you, I'd strongly encourage you to apply for this position. If you have any questions, feel free to email me directly. Look forward to hearing from you all. Utkarsh From sankhesh.jhaveri at kitware.com Mon Sep 12 09:30:00 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 12 Sep 2016 09:30:00 -0400 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: Hi Elvis, There are flags on the volume mapper that allow setting the distance between samples along the ray. By default, the sample distance is computed as 1/2 the average spacing throughout the volume. If you have AutoAdjustSampleDistances enabled, the mapper computes the sample distance each frame based on the time taken to render the last frame. For consistent quality, you should disable AutoAdjustSampleDistances and set the sample distance explicitly. That way, you can leave the volume spacing in the units you desire. *Sankhesh Jhaveri* *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-12 14:01 GMT+02:00 Elvis Stansvik : > >> Hi all, >> >> I've just noticed the there's a large difference in rendering quality if >> I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >> >> I found this very old post from 2007 about the same problem: >> >> http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html >> >> I was originally using a data spacing of 0.12, which is the voxel size in >> centimeters for the particular volume I'm working with (stored in our data >> files), but after I tried to divide it by 100.0 during loading, rendering >> quality dropped considerably. The reason I wanted to do this is because >> it's more convenient if VTK world coordinates are in meters in this >> particular application, not centimeters. >> >> Anyone know why volume rendering quality seems dependant on the data >> spacing? >> > > I now found another more recent post from 2014 which describes in more > detail what I seem to experience as well (seemingly also with no answer): > > http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html > > I get the expected rendering when the spacing is ~1. > > Must I make sure that my volumes have a spacing ~1? I'm willing to abandon > the idea of having VTK world coordinates == meters and introduce another > scale, but it's a bit cumbersome as I'm working with multiple volumes which > I add to the renderer at once, and not all of them will have the same > spacing. This means I must first analyse the volumes I'm going to load a > priori, and calculate a factor common to them all that will bring all of > their spacings as close to 1 as possible :( > > Would be great if someone in the know could chime in. Is there some > workaround? Can I instruct the mapper to "expect" the small spacings I want > to work with? > > Elvis > > >> Thanks for any clarifications! >> >> Elvis >> > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Sep 12 09:36:16 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 12 Sep 2016 09:36:16 -0400 Subject: [vtkusers] How do I save all slices of a volume from vtkCutter to another canvas? In-Reply-To: References: Message-ID: Hi Magnus, First of all, if the goal is to just slice the volume consider using vtkImageReslice ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice) instead of vtkCutter. You can simply set the output image data of the vtkImageReslice to a vtkImageActor and add it to a vtkRenderer as in http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage Hope that helps. *Sankhesh Jhaveri* *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 On Sat, Sep 10, 2016 at 8:01 PM, Magnus Elden wrote: > I have a volume that the class vtkCutter cuts into n slices. Now I need to > save a render of each slice to another larger canvas to generate something > similar to this: http://previews.123rf.com/images/bunyos/bunyos1403/ > bunyos140300039/26777884-MRI-scan-of-the-human-brain-Stock-Photo.jpg > > > > I am able to render it by linking the cutter output to a mapper and then > into a vtkActor that I add to the renderer, but I have no idea how I can > render each slice to a canvas. In the worst case I just want the renders to > be all stored to disk. > > > > Thank you for your help. > > > > Yours, > > Magnus Elden > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 10:06:31 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 16:06:31 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri : > Hi Elvis, > > There are flags on the volume mapper that allow setting the distance > between samples along the ray. By default, the sample distance is computed > as 1/2 the average spacing throughout the volume. If you have > AutoAdjustSampleDistances enabled, the mapper computes the sample distance > each frame based on the time taken to render the last frame. For consistent > quality, you should disable AutoAdjustSampleDistances and set the sample > distance explicitly. That way, you can leave the volume spacing in the > units you desire. > Hi Sankhesh, Hm, I don't see why it shouldn't be able to automatically compute an appropriate sample distance even with small volume spacings? E.g. right now, I'm testing with a volume that has 0.0006 spacing in all three dimensions and I leave the spacing as-is. The rendering looks like the attached result-0-0006.png. If I just hardcode the spacing to 0.1 (much closer to 1) instead, the result is as shown in the attached result-0-1.png. In both cases the same color/opacity transfer function is used, the difference is just the data spacing (and as a result, how much space the volume occupies in VTK the world). Shouldn't the automatic adjustment of sample distances work in this case? I think want that feature turned on, because I want the quality to degrade when moving/rotating the camera, as it improves interactivity. For testing, I tried disabling the AutoAdjustSampleDistances and hardcoding the sample distance to 0.0003 (half my data spacing) with: volumeMapper->SetAutoAdjustSampleDistances(0); volumeMapper->SetSampleDistance(0.0003); But the result was the same as in with the option turned on (as in the first screenshot). Any other ideas? Thanks a lot for your help. Elvis > > *Sankhesh Jhaveri* > *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > > > > > On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> I've just noticed the there's a large difference in rendering quality if >>> I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>> >>> I found this very old post from 2007 about the same problem: >>> >>> http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html >>> >>> I was originally using a data spacing of 0.12, which is the voxel size >>> in centimeters for the particular volume I'm working with (stored in our >>> data files), but after I tried to divide it by 100.0 during loading, >>> rendering quality dropped considerably. The reason I wanted to do this is >>> because it's more convenient if VTK world coordinates are in meters in this >>> particular application, not centimeters. >>> >>> Anyone know why volume rendering quality seems dependant on the data >>> spacing? >>> >> >> I now found another more recent post from 2014 which describes in more >> detail what I seem to experience as well (seemingly also with no answer): >> >> http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html >> >> I get the expected rendering when the spacing is ~1. >> >> Must I make sure that my volumes have a spacing ~1? I'm willing to >> abandon the idea of having VTK world coordinates == meters and introduce >> another scale, but it's a bit cumbersome as I'm working with multiple >> volumes which I add to the renderer at once, and not all of them will have >> the same spacing. This means I must first analyse the volumes I'm going to >> load a priori, and calculate a factor common to them all that will bring >> all of their spacings as close to 1 as possible :( >> >> Would be great if someone in the know could chime in. Is there some >> workaround? Can I instruct the mapper to "expect" the small spacings I want >> to work with? >> >> Elvis >> >> >>> Thanks for any clarifications! >>> >>> Elvis >>> >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result-0-0006.png Type: image/png Size: 14321 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result-0-1.png Type: image/png Size: 62210 bytes Desc: not available URL: From serge at infolytica.com Mon Sep 12 10:22:46 2016 From: serge at infolytica.com (Serge Lalonde) Date: Mon, 12 Sep 2016 10:22:46 -0400 Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? In-Reply-To: References: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> Message-ID: An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 10:34:04 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 16:34:04 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: I believe I've now found yet another post (this time from 2001!) describing what I see: https://itk.org/pipermail/vtkusers/2001-June/006846.html In this thread, Lisa points out two things: > > Hello Alex, > > One other thing to note is that the transfer functions are not independent > of scale. The scalar opacity function indicates how much opacity is > accumulated per unit length. Scaling your volume by 0.1 means that you need > to adjust this table accordingly. > > Lisa > > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: > >Hello Alex, > > > >I believe the comment stating that the sample distance is in voxel > >coordinates is out-of-date. When Actor and Volume merged (quite a long > >time ago) the Volume obtained a UserMatrix and 3 component scaling, and > >the sampling distance changed to world distance. So, if you scale your > >volume by 0.1 you should do the same to your sampling distance. > > > >One limitation (this is true of Actors and Volumes) is that non-uniform > >scaling is not handled correctly for gradient calculation. For correct > >rendering, change the aspect of the volume in the ImageData rather than > >the Volume. > > > >Lisa Given the age of that thread, I have to ask: Which of these things are still true? Must I always compensate my opacity transfer function taking the scale into account? Lisa later explains how to do this: http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html Is this what I must do? At the moment, my different volumes share the same transfer function (in fact, the same volume property). But do do this compensation, I'd have to give them each their own opacity transfer function. But, do you think this is all that I have to do to get the rendering I want no matter the scale of the input data? Thanks for any advice, Elvis 2016-09-12 16:06 GMT+02:00 Elvis Stansvik : > 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri > : > >> Hi Elvis, >> >> There are flags on the volume mapper that allow setting the distance >> between samples along the ray. By default, the sample distance is computed >> as 1/2 the average spacing throughout the volume. If you have >> AutoAdjustSampleDistances enabled, the mapper computes the sample distance >> each frame based on the time taken to render the last frame. For consistent >> quality, you should disable AutoAdjustSampleDistances and set the sample >> distance explicitly. That way, you can leave the volume spacing in the >> units you desire. >> > > Hi Sankhesh, > > Hm, I don't see why it shouldn't be able to automatically compute an > appropriate sample distance even with small volume spacings? > > E.g. right now, I'm testing with a volume that has 0.0006 spacing in all > three dimensions and I leave the spacing as-is. The rendering looks like > the attached result-0-0006.png. > > If I just hardcode the spacing to 0.1 (much closer to 1) instead, the > result is as shown in the attached result-0-1.png. > > In both cases the same color/opacity transfer function is used, the > difference is just the data spacing (and as a result, how much space the > volume occupies in VTK the world). > > Shouldn't the automatic adjustment of sample distances work in this case? > I think want that feature turned on, because I want the quality to degrade > when moving/rotating the camera, as it improves interactivity. > > For testing, I tried disabling the AutoAdjustSampleDistances and > hardcoding the sample distance to 0.0003 (half my data spacing) with: > > volumeMapper->SetAutoAdjustSampleDistances(0); > volumeMapper->SetSampleDistance(0.0003); > > But the result was the same as in with the option turned on (as in the > first screenshot). > > Any other ideas? > > Thanks a lot for your help. > > Elvis > > >> >> *Sankhesh Jhaveri* >> *Sr. Research & Development Engineer* | Kitware >> | (518) 881-4417 >> >> >> >> >> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik >>> : >>> >>>> Hi all, >>>> >>>> I've just noticed the there's a large difference in rendering quality >>>> if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>>> >>>> I found this very old post from 2007 about the same problem: >>>> >>>> http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html >>>> >>>> I was originally using a data spacing of 0.12, which is the voxel size >>>> in centimeters for the particular volume I'm working with (stored in our >>>> data files), but after I tried to divide it by 100.0 during loading, >>>> rendering quality dropped considerably. The reason I wanted to do this is >>>> because it's more convenient if VTK world coordinates are in meters in this >>>> particular application, not centimeters. >>>> >>>> Anyone know why volume rendering quality seems dependant on the data >>>> spacing? >>>> >>> >>> I now found another more recent post from 2014 which describes in more >>> detail what I seem to experience as well (seemingly also with no answer): >>> >>> http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html >>> >>> I get the expected rendering when the spacing is ~1. >>> >>> Must I make sure that my volumes have a spacing ~1? I'm willing to >>> abandon the idea of having VTK world coordinates == meters and introduce >>> another scale, but it's a bit cumbersome as I'm working with multiple >>> volumes which I add to the renderer at once, and not all of them will have >>> the same spacing. This means I must first analyse the volumes I'm going to >>> load a priori, and calculate a factor common to them all that will bring >>> all of their spacings as close to 1 as possible :( >>> >>> Would be great if someone in the know could chime in. Is there some >>> workaround? Can I instruct the mapper to "expect" the small spacings I want >>> to work with? >>> >>> Elvis >>> >>> >>>> Thanks for any clarifications! >>>> >>>> Elvis >>>> >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 10:43:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 16:43:25 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: 2016-09-12 16:34 GMT+02:00 Elvis Stansvik : > I believe I've now found yet another post (this time from 2001!) > describing what I see: > > https://itk.org/pipermail/vtkusers/2001-June/006846.html > > In this thread, Lisa points out two things: > > > > > Hello Alex, > > > > One other thing to note is that the transfer functions are not > independent > > of scale. The scalar opacity function indicates how much opacity is > > accumulated per unit length. Scaling your volume by 0.1 means that you > need > > to adjust this table accordingly. > > > > Lisa > > > > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: > > >Hello Alex, > > > > > >I believe the comment stating that the sample distance is in voxel > > >coordinates is out-of-date. When Actor and Volume merged (quite a long > > >time ago) the Volume obtained a UserMatrix and 3 component scaling, and > > >the sampling distance changed to world distance. So, if you scale your > > >volume by 0.1 you should do the same to your sampling distance. > > > > > >One limitation (this is true of Actors and Volumes) is that non-uniform > > >scaling is not handled correctly for gradient calculation. For correct > > >rendering, change the aspect of the volume in the ImageData rather than > > >the Volume. > > > > > >Lisa > > Given the age of that thread, I have to ask: Which of these things are > still true? Must I always compensate my opacity transfer function taking > the scale into account? > > Lisa later explains how to do this: > > http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html > > Is this what I must do? At the moment, my different volumes share the same > transfer function (in fact, the same volume property). But do do this > compensation, I'd have to give them each their own opacity transfer > function. > I gave the above a quick try with my volume, changing my transfer function from opacity->AddPoint(0.000, 0.00); opacity->AddPoint(0.500, 0.00); opacity->AddPoint(2.000, 0.70); opacity->AddPoint(3.500, 1.00); opacity->AddPoint(20.000, 1.00); to opacity->AddPoint(0.000, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); opacity->AddPoint(0.500, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); opacity->AddPoint(2.000, 1.0 - std::pow(1.0 - 0.70, 1 / 0.0006)); opacity->AddPoint(3.500, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); opacity->AddPoint(20.000, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); and got the attached result, so not quite there yet :( Scaling the opacity transfer functions like this seems to not be enough to get the same rendering as if I had hardcoded the spacings of the volume to 1 (instead of 0.0006). Anyone know what else I have to do? Elvis > But, do you think this is all that I have to do to get the rendering I > want no matter the scale of the input data? > > Thanks for any advice, > Elvis > > > 2016-09-12 16:06 GMT+02:00 Elvis Stansvik : > >> 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri > >: >> >>> Hi Elvis, >>> >>> There are flags on the volume mapper that allow setting the distance >>> between samples along the ray. By default, the sample distance is computed >>> as 1/2 the average spacing throughout the volume. If you have >>> AutoAdjustSampleDistances enabled, the mapper computes the sample distance >>> each frame based on the time taken to render the last frame. For consistent >>> quality, you should disable AutoAdjustSampleDistances and set the sample >>> distance explicitly. That way, you can leave the volume spacing in the >>> units you desire. >>> >> >> Hi Sankhesh, >> >> Hm, I don't see why it shouldn't be able to automatically compute an >> appropriate sample distance even with small volume spacings? >> >> E.g. right now, I'm testing with a volume that has 0.0006 spacing in all >> three dimensions and I leave the spacing as-is. The rendering looks like >> the attached result-0-0006.png. >> >> If I just hardcode the spacing to 0.1 (much closer to 1) instead, the >> result is as shown in the attached result-0-1.png. >> >> In both cases the same color/opacity transfer function is used, the >> difference is just the data spacing (and as a result, how much space the >> volume occupies in VTK the world). >> >> Shouldn't the automatic adjustment of sample distances work in this case? >> I think want that feature turned on, because I want the quality to degrade >> when moving/rotating the camera, as it improves interactivity. >> >> For testing, I tried disabling the AutoAdjustSampleDistances and >> hardcoding the sample distance to 0.0003 (half my data spacing) with: >> >> volumeMapper->SetAutoAdjustSampleDistances(0); >> volumeMapper->SetSampleDistance(0.0003); >> >> But the result was the same as in with the option turned on (as in the >> first screenshot). >> >> Any other ideas? >> >> Thanks a lot for your help. >> >> Elvis >> >> >>> >>> *Sankhesh Jhaveri* >>> *Sr. Research & Development Engineer* | Kitware >>> | (518) 881-4417 >>> >>> >>> >>> >>> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < >>> elvis.stansvik at orexplore.com> wrote: >>> >>>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik >>> >: >>>> >>>>> Hi all, >>>>> >>>>> I've just noticed the there's a large difference in rendering quality >>>>> if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>>>> >>>>> I found this very old post from 2007 about the same problem: >>>>> >>>>> http://public.kitware.com/pipermail/vtkusers/2007-March/0405 >>>>> 59.html >>>>> >>>>> I was originally using a data spacing of 0.12, which is the voxel size >>>>> in centimeters for the particular volume I'm working with (stored in our >>>>> data files), but after I tried to divide it by 100.0 during loading, >>>>> rendering quality dropped considerably. The reason I wanted to do this is >>>>> because it's more convenient if VTK world coordinates are in meters in this >>>>> particular application, not centimeters. >>>>> >>>>> Anyone know why volume rendering quality seems dependant on the data >>>>> spacing? >>>>> >>>> >>>> I now found another more recent post from 2014 which describes in more >>>> detail what I seem to experience as well (seemingly also with no answer): >>>> >>>> http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html >>>> >>>> I get the expected rendering when the spacing is ~1. >>>> >>>> Must I make sure that my volumes have a spacing ~1? I'm willing to >>>> abandon the idea of having VTK world coordinates == meters and introduce >>>> another scale, but it's a bit cumbersome as I'm working with multiple >>>> volumes which I add to the renderer at once, and not all of them will have >>>> the same spacing. This means I must first analyse the volumes I'm going to >>>> load a priori, and calculate a factor common to them all that will bring >>>> all of their spacings as close to 1 as possible :( >>>> >>>> Would be great if someone in the know could chime in. Is there some >>>> workaround? Can I instruct the mapper to "expect" the small spacings I want >>>> to work with? >>>> >>>> Elvis >>>> >>>> >>>>> Thanks for any clarifications! >>>>> >>>>> Elvis >>>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result.png Type: image/png Size: 36974 bytes Desc: not available URL: From sankhesh.jhaveri at kitware.com Mon Sep 12 11:04:41 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 12 Sep 2016 11:04:41 -0400 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: Hi Elvis, Sorry for not being prompt. You shouldn't need to scale your transfer function. See vtkVolumeProperty::SetScalarOpacityUnitDistance(). Changing it to target spacing might do the trick. *Sankhesh Jhaveri* *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 On Mon, Sep 12, 2016 at 10:43 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-12 16:34 GMT+02:00 Elvis Stansvik : > >> I believe I've now found yet another post (this time from 2001!) >> describing what I see: >> >> https://itk.org/pipermail/vtkusers/2001-June/006846.html >> >> In this thread, Lisa points out two things: >> >> > >> > Hello Alex, >> > >> > One other thing to note is that the transfer functions are not >> independent >> > of scale. The scalar opacity function indicates how much opacity is >> > accumulated per unit length. Scaling your volume by 0.1 means that you >> need >> > to adjust this table accordingly. >> > >> > Lisa >> > >> > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: >> > >Hello Alex, >> > > >> > >I believe the comment stating that the sample distance is in voxel >> > >coordinates is out-of-date. When Actor and Volume merged (quite a long >> > >time ago) the Volume obtained a UserMatrix and 3 component scaling, >> and >> > >the sampling distance changed to world distance. So, if you scale your >> > >volume by 0.1 you should do the same to your sampling distance. >> > > >> > >One limitation (this is true of Actors and Volumes) is that >> non-uniform >> > >scaling is not handled correctly for gradient calculation. For correct >> > >rendering, change the aspect of the volume in the ImageData rather >> than >> > >the Volume. >> > > >> > >Lisa >> >> Given the age of that thread, I have to ask: Which of these things are >> still true? Must I always compensate my opacity transfer function taking >> the scale into account? >> >> Lisa later explains how to do this: >> >> http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html >> >> Is this what I must do? At the moment, my different volumes share the >> same transfer function (in fact, the same volume property). But do do this >> compensation, I'd have to give them each their own opacity transfer >> function. >> > > I gave the above a quick try with my volume, changing my transfer function > from > > opacity->AddPoint(0.000, 0.00); > opacity->AddPoint(0.500, 0.00); > opacity->AddPoint(2.000, 0.70); > opacity->AddPoint(3.500, 1.00); > opacity->AddPoint(20.000, 1.00); > > to > > opacity->AddPoint(0.000, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); > opacity->AddPoint(0.500, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); > opacity->AddPoint(2.000, 1.0 - std::pow(1.0 - 0.70, 1 / 0.0006)); > opacity->AddPoint(3.500, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); > opacity->AddPoint(20.000, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); > > and got the attached result, so not quite there yet :( Scaling the opacity > transfer functions like this seems to not be enough to get the same > rendering as if I had hardcoded the spacings of the volume to 1 (instead of > 0.0006). > > Anyone know what else I have to do? > > Elvis > > > >> But, do you think this is all that I have to do to get the rendering I >> want no matter the scale of the input data? >> >> Thanks for any advice, >> Elvis >> >> >> 2016-09-12 16:06 GMT+02:00 Elvis Stansvik : >> >>> 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com>: >>> >>>> Hi Elvis, >>>> >>>> There are flags on the volume mapper that allow setting the distance >>>> between samples along the ray. By default, the sample distance is computed >>>> as 1/2 the average spacing throughout the volume. If you have >>>> AutoAdjustSampleDistances enabled, the mapper computes the sample distance >>>> each frame based on the time taken to render the last frame. For consistent >>>> quality, you should disable AutoAdjustSampleDistances and set the sample >>>> distance explicitly. That way, you can leave the volume spacing in the >>>> units you desire. >>>> >>> >>> Hi Sankhesh, >>> >>> Hm, I don't see why it shouldn't be able to automatically compute an >>> appropriate sample distance even with small volume spacings? >>> >>> E.g. right now, I'm testing with a volume that has 0.0006 spacing in all >>> three dimensions and I leave the spacing as-is. The rendering looks like >>> the attached result-0-0006.png. >>> >>> If I just hardcode the spacing to 0.1 (much closer to 1) instead, the >>> result is as shown in the attached result-0-1.png. >>> >>> In both cases the same color/opacity transfer function is used, the >>> difference is just the data spacing (and as a result, how much space the >>> volume occupies in VTK the world). >>> >>> Shouldn't the automatic adjustment of sample distances work in this >>> case? I think want that feature turned on, because I want the quality to >>> degrade when moving/rotating the camera, as it improves interactivity. >>> >>> For testing, I tried disabling the AutoAdjustSampleDistances and >>> hardcoding the sample distance to 0.0003 (half my data spacing) with: >>> >>> volumeMapper->SetAutoAdjustSampleDistances(0); >>> volumeMapper->SetSampleDistance(0.0003); >>> >>> But the result was the same as in with the option turned on (as in the >>> first screenshot). >>> >>> Any other ideas? >>> >>> Thanks a lot for your help. >>> >>> Elvis >>> >>> >>>> >>>> *Sankhesh Jhaveri* >>>> *Sr. Research & Development Engineer* | Kitware >>>> | (518) 881-4417 >>>> >>>> >>>> >>>> >>>> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < >>>> elvis.stansvik at orexplore.com> wrote: >>>> >>>>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik < >>>>> elvis.stansvik at orexplore.com>: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I've just noticed the there's a large difference in rendering quality >>>>>> if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>>>>> >>>>>> I found this very old post from 2007 about the same problem: >>>>>> >>>>>> http://public.kitware.com/pipermail/vtkusers/2007-March/0405 >>>>>> 59.html >>>>>> >>>>>> I was originally using a data spacing of 0.12, which is the voxel >>>>>> size in centimeters for the particular volume I'm working with (stored in >>>>>> our data files), but after I tried to divide it by 100.0 during loading, >>>>>> rendering quality dropped considerably. The reason I wanted to do this is >>>>>> because it's more convenient if VTK world coordinates are in meters in this >>>>>> particular application, not centimeters. >>>>>> >>>>>> Anyone know why volume rendering quality seems dependant on the data >>>>>> spacing? >>>>>> >>>>> >>>>> I now found another more recent post from 2014 which describes in more >>>>> detail what I seem to experience as well (seemingly also with no answer): >>>>> >>>>> http://public.kitware.com/pipermail/vtkusers/2014-March/0833 >>>>> 11.html >>>>> >>>>> I get the expected rendering when the spacing is ~1. >>>>> >>>>> Must I make sure that my volumes have a spacing ~1? I'm willing to >>>>> abandon the idea of having VTK world coordinates == meters and introduce >>>>> another scale, but it's a bit cumbersome as I'm working with multiple >>>>> volumes which I add to the renderer at once, and not all of them will have >>>>> the same spacing. This means I must first analyse the volumes I'm going to >>>>> load a priori, and calculate a factor common to them all that will bring >>>>> all of their spacings as close to 1 as possible :( >>>>> >>>>> Would be great if someone in the know could chime in. Is there some >>>>> workaround? Can I instruct the mapper to "expect" the small spacings I want >>>>> to work with? >>>>> >>>>> Elvis >>>>> >>>>> >>>>>> Thanks for any clarifications! >>>>>> >>>>>> Elvis >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 11:35:35 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 17:35:35 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: 2016-09-12 17:04 GMT+02:00 Sankhesh Jhaveri : > Hi Elvis, > > Sorry for not being prompt. > > You shouldn't need to scale your transfer function. See vtkVolumeProperty:: > SetScalarOpacityUnitDistance(). Changing it to target spacing might do > the trick. > Thank you, that indeed did the trick. Setting it to 0.0006 (my volume spacing) and rendering is back to normal. I'll do some more testing to see that I can achive similar looking result with multiple volumes with different spacing, but I'm hopeful it is now solved. Again, thanks a lot. Not sure I would have found this myself. I'll have to rewrite the app slightly such that each volume has its own vtkVolumeProperty (at the moment they share the same), but that should be no problem. Elvis > > > > *Sankhesh Jhaveri* > *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > > > > > On Mon, Sep 12, 2016 at 10:43 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-09-12 16:34 GMT+02:00 Elvis Stansvik : >> >>> I believe I've now found yet another post (this time from 2001!) >>> describing what I see: >>> >>> https://itk.org/pipermail/vtkusers/2001-June/006846.html >>> >>> In this thread, Lisa points out two things: >>> >>> > >>> > Hello Alex, >>> > >>> > One other thing to note is that the transfer functions are not >>> independent >>> > of scale. The scalar opacity function indicates how much opacity is >>> > accumulated per unit length. Scaling your volume by 0.1 means that you >>> need >>> > to adjust this table accordingly. >>> > >>> > Lisa >>> > >>> > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: >>> > >Hello Alex, >>> > > >>> > >I believe the comment stating that the sample distance is in voxel >>> > >coordinates is out-of-date. When Actor and Volume merged (quite a >>> long >>> > >time ago) the Volume obtained a UserMatrix and 3 component scaling, >>> and >>> > >the sampling distance changed to world distance. So, if you scale >>> your >>> > >volume by 0.1 you should do the same to your sampling distance. >>> > > >>> > >One limitation (this is true of Actors and Volumes) is that >>> non-uniform >>> > >scaling is not handled correctly for gradient calculation. For >>> correct >>> > >rendering, change the aspect of the volume in the ImageData rather >>> than >>> > >the Volume. >>> > > >>> > >Lisa >>> >>> Given the age of that thread, I have to ask: Which of these things are >>> still true? Must I always compensate my opacity transfer function taking >>> the scale into account? >>> >>> Lisa later explains how to do this: >>> >>> http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html >>> >>> Is this what I must do? At the moment, my different volumes share the >>> same transfer function (in fact, the same volume property). But do do this >>> compensation, I'd have to give them each their own opacity transfer >>> function. >>> >> >> I gave the above a quick try with my volume, changing my transfer >> function from >> >> opacity->AddPoint(0.000, 0.00); >> opacity->AddPoint(0.500, 0.00); >> opacity->AddPoint(2.000, 0.70); >> opacity->AddPoint(3.500, 1.00); >> opacity->AddPoint(20.000, 1.00); >> >> to >> >> opacity->AddPoint(0.000, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >> opacity->AddPoint(0.500, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >> opacity->AddPoint(2.000, 1.0 - std::pow(1.0 - 0.70, 1 / 0.0006)); >> opacity->AddPoint(3.500, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >> opacity->AddPoint(20.000, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >> >> and got the attached result, so not quite there yet :( Scaling the >> opacity transfer functions like this seems to not be enough to get the same >> rendering as if I had hardcoded the spacings of the volume to 1 (instead of >> 0.0006). >> >> Anyone know what else I have to do? >> >> Elvis >> >> >> >>> But, do you think this is all that I have to do to get the rendering I >>> want no matter the scale of the input data? >>> >>> Thanks for any advice, >>> Elvis >>> >>> >>> 2016-09-12 16:06 GMT+02:00 Elvis Stansvik >>> : >>> >>>> 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri < >>>> sankhesh.jhaveri at kitware.com>: >>>> >>>>> Hi Elvis, >>>>> >>>>> There are flags on the volume mapper that allow setting the distance >>>>> between samples along the ray. By default, the sample distance is computed >>>>> as 1/2 the average spacing throughout the volume. If you have >>>>> AutoAdjustSampleDistances enabled, the mapper computes the sample distance >>>>> each frame based on the time taken to render the last frame. For consistent >>>>> quality, you should disable AutoAdjustSampleDistances and set the sample >>>>> distance explicitly. That way, you can leave the volume spacing in the >>>>> units you desire. >>>>> >>>> >>>> Hi Sankhesh, >>>> >>>> Hm, I don't see why it shouldn't be able to automatically compute an >>>> appropriate sample distance even with small volume spacings? >>>> >>>> E.g. right now, I'm testing with a volume that has 0.0006 spacing in >>>> all three dimensions and I leave the spacing as-is. The rendering looks >>>> like the attached result-0-0006.png. >>>> >>>> If I just hardcode the spacing to 0.1 (much closer to 1) instead, the >>>> result is as shown in the attached result-0-1.png. >>>> >>>> In both cases the same color/opacity transfer function is used, the >>>> difference is just the data spacing (and as a result, how much space the >>>> volume occupies in VTK the world). >>>> >>>> Shouldn't the automatic adjustment of sample distances work in this >>>> case? I think want that feature turned on, because I want the quality to >>>> degrade when moving/rotating the camera, as it improves interactivity. >>>> >>>> For testing, I tried disabling the AutoAdjustSampleDistances and >>>> hardcoding the sample distance to 0.0003 (half my data spacing) with: >>>> >>>> volumeMapper->SetAutoAdjustSampleDistances(0); >>>> volumeMapper->SetSampleDistance(0.0003); >>>> >>>> But the result was the same as in with the option turned on (as in the >>>> first screenshot). >>>> >>>> Any other ideas? >>>> >>>> Thanks a lot for your help. >>>> >>>> Elvis >>>> >>>> >>>>> >>>>> *Sankhesh Jhaveri* >>>>> *Sr. Research & Development Engineer* | Kitware >>>>> | (518) 881-4417 >>>>> >>>>> >>>>> >>>>> >>>>> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik < >>>>> elvis.stansvik at orexplore.com> wrote: >>>>> >>>>>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik < >>>>>> elvis.stansvik at orexplore.com>: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> I've just noticed the there's a large difference in rendering >>>>>>> quality if I decrease the spacing of my data (using >>>>>>> vtkGPUVolumeRayCastMapper). >>>>>>> >>>>>>> I found this very old post from 2007 about the same problem: >>>>>>> >>>>>>> http://public.kitware.com/pipermail/vtkusers/2007-March/0405 >>>>>>> 59.html >>>>>>> >>>>>>> I was originally using a data spacing of 0.12, which is the voxel >>>>>>> size in centimeters for the particular volume I'm working with (stored in >>>>>>> our data files), but after I tried to divide it by 100.0 during loading, >>>>>>> rendering quality dropped considerably. The reason I wanted to do this is >>>>>>> because it's more convenient if VTK world coordinates are in meters in this >>>>>>> particular application, not centimeters. >>>>>>> >>>>>>> Anyone know why volume rendering quality seems dependant on the data >>>>>>> spacing? >>>>>>> >>>>>> >>>>>> I now found another more recent post from 2014 which describes in >>>>>> more detail what I seem to experience as well (seemingly also with no >>>>>> answer): >>>>>> >>>>>> http://public.kitware.com/pipermail/vtkusers/2014-March/0833 >>>>>> 11.html >>>>>> >>>>>> I get the expected rendering when the spacing is ~1. >>>>>> >>>>>> Must I make sure that my volumes have a spacing ~1? I'm willing to >>>>>> abandon the idea of having VTK world coordinates == meters and introduce >>>>>> another scale, but it's a bit cumbersome as I'm working with multiple >>>>>> volumes which I add to the renderer at once, and not all of them will have >>>>>> the same spacing. This means I must first analyse the volumes I'm going to >>>>>> load a priori, and calculate a factor common to them all that will bring >>>>>> all of their spacings as close to 1 as possible :( >>>>>> >>>>>> Would be great if someone in the know could chime in. Is there some >>>>>> workaround? Can I instruct the mapper to "expect" the small spacings I want >>>>>> to work with? >>>>>> >>>>>> Elvis >>>>>> >>>>>> >>>>>>> Thanks for any clarifications! >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Mon Sep 12 12:21:20 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Mon, 12 Sep 2016 09:21:20 -0700 (MST) Subject: [vtkusers] GPU Memory Detection Message-ID: <1473697280617-5740281.post@n5.nabble.com> Hi all, I am seeing a lot of out of memory errors when loading large data sets for volume rendering with the new VTK 7.0 release. These are as follows: vtkTextureObject (424DB080): failed at glTexImage2D 1 OpenGL errors detected 0 : (1285) Out of memory These sets used to display fine with VTK 6.1, and now no longer do in VTK 7.0 . The set is not particularly large - a 512x512, 266 slice CT stack. Smaller sets render fine so there is no fundamental issue. One oddity I have noticed is that the GPU memory is being reported as being 128 MB (actually a 2GB card) which is what happens when the vtkDummyGPUInfoList is used rather than the vtkDirectXGPUInfoList to probe the available graphics memory. This used to be caused by not having the DirectX SDK installed in previous versions with similar visual symptoms (invisible volumes, only first/last slice drawn, etc). I notice that this class is not actually present in the Rendering/OpenGL2 source file directory, but is in the OpenGL directory. So the question is - has this been replaced by a purely OpenGL mechanism which I somehow need to 'turn on' using CMake / compiler switches, etc? Am I barking up completely the wrong tree - is the new OpenGL2 version inherently more heavyweight? I am building on Windows 10 with the June 2010 DirectX SDK installed, Visual Studio 2012, 32/64 bit build with the VTK_USE_64BIT_IDS flag on. The GPU is a 2GB AMD Radeon R7 200 with the latest drivers. Thanks in advance for any light shed on this, it has me stumped currently. -- View this message in context: http://vtk.1045678.n5.nabble.com/GPU-Memory-Detection-tp5740281.html Sent from the VTK - Users mailing list archive at Nabble.com. From sankhesh.jhaveri at kitware.com Mon Sep 12 13:25:36 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 12 Sep 2016 13:25:36 -0400 Subject: [vtkusers] GPU Memory Detection In-Reply-To: <1473697280617-5740281.post@n5.nabble.com> References: <1473697280617-5740281.post@n5.nabble.com> Message-ID: Could you try the development version of VTK? You can clone the latest version using git as documented here: https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md#clone *Sankhesh?* On Mon, Sep 12, 2016 at 12:21 PM, ianl wrote: > Hi all, > > I am seeing a lot of out of memory errors when loading large data sets for > volume rendering with the new VTK 7.0 release. These are as follows: > > vtkTextureObject (424DB080): failed at glTexImage2D 1 OpenGL errors > detected > 0 : (1285) Out of memory > > These sets used to display fine with VTK 6.1, and now no longer do in VTK > 7.0 . The set is not particularly large - a 512x512, 266 slice CT stack. > Smaller sets render fine so there is no fundamental issue. One oddity I > have > noticed is that the GPU memory is being reported as being 128 MB (actually > a > 2GB card) which is what happens when the vtkDummyGPUInfoList is used rather > than the vtkDirectXGPUInfoList to probe the available graphics memory. This > used to be caused by not having the DirectX SDK installed in previous > versions with similar visual symptoms (invisible volumes, only first/last > slice drawn, etc). I notice that this class is not actually present in the > Rendering/OpenGL2 source file directory, but is in the OpenGL directory. > > So the question is - has this been replaced by a purely OpenGL mechanism > which I somehow need to 'turn on' using CMake / compiler switches, etc? Am > I > barking up completely the wrong tree - is the new OpenGL2 version > inherently > more heavyweight? > > I am building on Windows 10 with the June 2010 DirectX SDK installed, > Visual > Studio 2012, 32/64 bit build with the VTK_USE_64BIT_IDS flag on. The GPU is > a 2GB AMD Radeon R7 200 with the latest drivers. > > Thanks in advance for any light shed on this, it has me stumped currently. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/GPU-Memory-Detection-tp5740281.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 12 14:00:57 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 20:00:57 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: Den 12 sep. 2016 5:35 em skrev "Elvis Stansvik" : > > 2016-09-12 17:04 GMT+02:00 Sankhesh Jhaveri : >> >> Hi Elvis, >> >> Sorry for not being prompt. >> >> You shouldn't need to scale your transfer function. See vtkVolumeProperty::SetScalarOpacityUnitDistance(). Changing it to target spacing might do the trick. > > > Thank you, that indeed did the trick. Setting it to 0.0006 (my volume spacing) and rendering is back to normal. I'll do some more testing to see that I can achive similar looking result with multiple volumes with different spacing, but I'm hopeful it is now solved. > > Again, thanks a lot. Not sure I would have found this myself. > > I'll have to rewrite the app slightly such that each volume has its own vtkVolumeProperty (at the moment they share the same), but that should be no problem. Hope it's okay with some last questions, because I want to know what I'm doing by setting this option and why it "works", and I'm not sure I fully understand yet. If I understand correctly VTK, by default, calculates the opacity based on the opacity transfer function and the sample distance (aka step size, the distance traveled by the ray). Is this correct? (It looks like it, from these lines in vtkVolume [1]). You said that by default "[...] the sample distance is computed as 1/2 the average spacing throughout the volume.". But if the sample distance is based on the spacing, and the opacity is based on the sample distance, then how come a volume looks different (opacity-wise) when it is scaled (or equivalently, its spacing is altered)? I think I tried (can't quite remember and I'm back home now) to check if the AutoAdjustSampleDistances option was turned on, and I think it was. I didn't turn it on explicitly, so perhaps this is the default (and not 1/2 average spacing)? My question then is, with this option turned on, is the opacity completely independent of the volume spacing, and only a function of the performance of the computer and the desired frame rate? If so, that would explain what I was seeing. But (!), if that's the case, then shouldn't I have gotten good result when I turned the option off and set the sample distance explicitly (using SetSampleDistance) to 1/2 of my data spacing? (The result still looked strange when I did that). Now, the vtkVolumeProperty::SetScalarOpacityUnitDistance() option. When I called it with my volume spacing, I seem to have gotten the result I wanted. Is this because it hardwires the opacity calculation to use the given value when correcting the opacity, instead of using the sample distance? Any and all clarifications are much appreciated! Elvis [1] https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Core/vtkVolume.cxx#L747-750 > > Elvis > > >> >> >> >> >> Sankhesh Jhaveri >> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >> >> >> >> >> On Mon, Sep 12, 2016 at 10:43 AM, Elvis Stansvik wrote: >>> >>> 2016-09-12 16:34 GMT+02:00 Elvis Stansvik : >>>> >>>> I believe I've now found yet another post (this time from 2001!) describing what I see: >>>> >>>> https://itk.org/pipermail/vtkusers/2001-June/006846.html >>>> >>>> In this thread, Lisa points out two things: >>>> >>>> > >>>> > Hello Alex, >>>> > >>>> > One other thing to note is that the transfer functions are not independent >>>> > of scale. The scalar opacity function indicates how much opacity is >>>> > accumulated per unit length. Scaling your volume by 0.1 means that you need >>>> > to adjust this table accordingly. >>>> > >>>> > Lisa >>>> > >>>> > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: >>>> > >Hello Alex, >>>> > > >>>> > >I believe the comment stating that the sample distance is in voxel >>>> > >coordinates is out-of-date. When Actor and Volume merged (quite a long >>>> > >time ago) the Volume obtained a UserMatrix and 3 component scaling, and >>>> > >the sampling distance changed to world distance. So, if you scale your >>>> > >volume by 0.1 you should do the same to your sampling distance. >>>> > > >>>> > >One limitation (this is true of Actors and Volumes) is that non-uniform >>>> > >scaling is not handled correctly for gradient calculation. For correct >>>> > >rendering, change the aspect of the volume in the ImageData rather than >>>> > >the Volume. >>>> > > >>>> > >Lisa >>>> >>>> Given the age of that thread, I have to ask: Which of these things are still true? Must I always compensate my opacity transfer function taking the scale into account? >>>> >>>> Lisa later explains how to do this: >>>> >>>> http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html >>>> >>>> Is this what I must do? At the moment, my different volumes share the same transfer function (in fact, the same volume property). But do do this compensation, I'd have to give them each their own opacity transfer function. >>> >>> >>> I gave the above a quick try with my volume, changing my transfer function from >>> >>> opacity->AddPoint(0.000, 0.00); >>> opacity->AddPoint(0.500, 0.00); >>> opacity->AddPoint(2.000, 0.70); >>> opacity->AddPoint(3.500, 1.00); >>> opacity->AddPoint(20.000, 1.00); >>> >>> to >>> >>> opacity->AddPoint(0.000, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >>> opacity->AddPoint(0.500, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >>> opacity->AddPoint(2.000, 1.0 - std::pow(1.0 - 0.70, 1 / 0.0006)); >>> opacity->AddPoint(3.500, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >>> opacity->AddPoint(20.000, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >>> >>> and got the attached result, so not quite there yet :( Scaling the opacity transfer functions like this seems to not be enough to get the same rendering as if I had hardcoded the spacings of the volume to 1 (instead of 0.0006). >>> >>> Anyone know what else I have to do? >>> >>> Elvis >>> >>> >>>> >>>> But, do you think this is all that I have to do to get the rendering I want no matter the scale of the input data? >>>> >>>> Thanks for any advice, >>>> Elvis >>>> >>>> >>>> 2016-09-12 16:06 GMT+02:00 Elvis Stansvik : >>>>> >>>>> 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri : >>>>>> >>>>>> Hi Elvis, >>>>>> >>>>>> There are flags on the volume mapper that allow setting the distance between samples along the ray. By default, the sample distance is computed as 1/2 the average spacing throughout the volume. If you have AutoAdjustSampleDistances enabled, the mapper computes the sample distance each frame based on the time taken to render the last frame. For consistent quality, you should disable AutoAdjustSampleDistances and set the sample distance explicitly. That way, you can leave the volume spacing in the units you desire. >>>>> >>>>> >>>>> Hi Sankhesh, >>>>> >>>>> Hm, I don't see why it shouldn't be able to automatically compute an appropriate sample distance even with small volume spacings? >>>>> >>>>> E.g. right now, I'm testing with a volume that has 0.0006 spacing in all three dimensions and I leave the spacing as-is. The rendering looks like the attached result-0-0006.png. >>>>> >>>>> If I just hardcode the spacing to 0.1 (much closer to 1) instead, the result is as shown in the attached result-0-1.png. >>>>> >>>>> In both cases the same color/opacity transfer function is used, the difference is just the data spacing (and as a result, how much space the volume occupies in VTK the world). >>>>> >>>>> Shouldn't the automatic adjustment of sample distances work in this case? I think want that feature turned on, because I want the quality to degrade when moving/rotating the camera, as it improves interactivity. >>>>> >>>>> For testing, I tried disabling the AutoAdjustSampleDistances and hardcoding the sample distance to 0.0003 (half my data spacing) with: >>>>> >>>>> volumeMapper->SetAutoAdjustSampleDistances(0); >>>>> volumeMapper->SetSampleDistance(0.0003); >>>>> >>>>> But the result was the same as in with the option turned on (as in the first screenshot). >>>>> >>>>> Any other ideas? >>>>> >>>>> Thanks a lot for your help. >>>>> >>>>> Elvis >>>>> >>>>>> >>>>>> >>>>>> Sankhesh Jhaveri >>>>>> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik wrote: >>>>>>> >>>>>>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik : >>>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> I've just noticed the there's a large difference in rendering quality if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>>>>>>> >>>>>>>> I found this very old post from 2007 about the same problem: >>>>>>>> >>>>>>>> http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html >>>>>>>> >>>>>>>> I was originally using a data spacing of 0.12, which is the voxel size in centimeters for the particular volume I'm working with (stored in our data files), but after I tried to divide it by 100.0 during loading, rendering quality dropped considerably. The reason I wanted to do this is because it's more convenient if VTK world coordinates are in meters in this particular application, not centimeters. >>>>>>>> >>>>>>>> Anyone know why volume rendering quality seems dependant on the data spacing? >>>>>>> >>>>>>> >>>>>>> I now found another more recent post from 2014 which describes in more detail what I seem to experience as well (seemingly also with no answer): >>>>>>> >>>>>>> http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html >>>>>>> >>>>>>> I get the expected rendering when the spacing is ~1. >>>>>>> >>>>>>> Must I make sure that my volumes have a spacing ~1? I'm willing to abandon the idea of having VTK world coordinates == meters and introduce another scale, but it's a bit cumbersome as I'm working with multiple volumes which I add to the renderer at once, and not all of them will have the same spacing. This means I must first analyse the volumes I'm going to load a priori, and calculate a factor common to them all that will bring all of their spacings as close to 1 as possible :( >>>>>>> >>>>>>> Would be great if someone in the know could chime in. Is there some workaround? Can I instruct the mapper to "expect" the small spacings I want to work with? >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>>>> >>>>>>>> Thanks for any clarifications! >>>>>>>> >>>>>>>> Elvis >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> >>>>> >>>> >>> >> > From elvis.stansvik at orexplore.com Mon Sep 12 14:21:01 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 20:21:01 +0200 Subject: [vtkusers] Data spacing affects volume rendering quality? In-Reply-To: References: Message-ID: 2016-09-12 20:00 GMT+02:00 Elvis Stansvik : > Den 12 sep. 2016 5:35 em skrev "Elvis Stansvik" : >> >> 2016-09-12 17:04 GMT+02:00 Sankhesh Jhaveri : >>> >>> Hi Elvis, >>> >>> Sorry for not being prompt. >>> >>> You shouldn't need to scale your transfer function. See vtkVolumeProperty::SetScalarOpacityUnitDistance(). Changing it to target spacing might do the trick. >> >> >> Thank you, that indeed did the trick. Setting it to 0.0006 (my volume spacing) and rendering is back to normal. I'll do some more testing to see that I can achive similar looking result with multiple volumes with different spacing, but I'm hopeful it is now solved. >> >> Again, thanks a lot. Not sure I would have found this myself. >> >> I'll have to rewrite the app slightly such that each volume has its own vtkVolumeProperty (at the moment they share the same), but that should be no problem. > I realize now my mail below is filled with some backwards thinking, so replying to myself. > Hope it's okay with some last questions, because I want to know what > I'm doing by setting this option and why it "works", and I'm not sure > I fully understand yet. > > If I understand correctly VTK, by default, calculates the opacity > based on the opacity transfer function and the sample distance (aka > step size, the distance traveled by the ray). Is this correct? (It > looks like it, from these lines in vtkVolume [1]). > > You said that by default "[...] the sample distance is computed as 1/2 > the average spacing throughout the volume.". But if the sample > distance is based on the spacing, and the opacity is based on the > sample distance, then how come a volume looks different (opacity-wise) > when it is scaled (or equivalently, its spacing is altered)? This of course makes perfect sense. Spacing -> sample distance -> opacity. Change the spacing and you change the opacity. > > I think I tried (can't quite remember and I'm back home now) to check > if the AutoAdjustSampleDistances option was turned on, and I think it > was. I didn't turn it on explicitly, so perhaps this is the default > (and not 1/2 average spacing)? My question then is, with this option > turned on, is the opacity completely independent of the volume > spacing, and only a function of the performance of the computer and > the desired frame rate? If so, that would explain what I was seeing. It probably isn't just a function of the performance/target frame rate, but also of the spacing. And _that_ would explain what I was seeing. (Backwards thinking from me here as well...). > But (!), if that's the case, then shouldn't I have gotten good result > when I turned the option off and set the sample distance explicitly > (using SetSampleDistance) to 1/2 of my data spacing? (The result still > looked strange when I did that). This I still don't quite understand. To me it seems that this should have worked just as well as using the vtkVolumeProperty::SetScalarOpacityUnitDistance option ..? > Now, the vtkVolumeProperty::SetScalarOpacityUnitDistance() option. > When I called it with my volume spacing, I seem to have gotten the > result I wanted. Is this because it hardwires the opacity calculation > to use the given value when correcting the opacity, instead of using > the sample distance? Why this works now makes perfect sense to me. Since I'm setting it's the unit I'm setting, it effectively normalizes the opacity correction calculations. It will be as if my volume had a spacing of 1.0. Elvis > > Any and all clarifications are much appreciated! > > Elvis > > [1] https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Core/vtkVolume.cxx#L747-750 > > >> >> Elvis >> >> >>> >>> >>> >>> >>> Sankhesh Jhaveri >>> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >>> >>> >>> >>> >>> On Mon, Sep 12, 2016 at 10:43 AM, Elvis Stansvik wrote: >>>> >>>> 2016-09-12 16:34 GMT+02:00 Elvis Stansvik : >>>>> >>>>> I believe I've now found yet another post (this time from 2001!) describing what I see: >>>>> >>>>> https://itk.org/pipermail/vtkusers/2001-June/006846.html >>>>> >>>>> In this thread, Lisa points out two things: >>>>> >>>>> > >>>>> > Hello Alex, >>>>> > >>>>> > One other thing to note is that the transfer functions are not independent >>>>> > of scale. The scalar opacity function indicates how much opacity is >>>>> > accumulated per unit length. Scaling your volume by 0.1 means that you need >>>>> > to adjust this table accordingly. >>>>> > >>>>> > Lisa >>>>> > >>>>> > At 11:05 AM 6/18/2001, Lisa S. Avila wrote: >>>>> > >Hello Alex, >>>>> > > >>>>> > >I believe the comment stating that the sample distance is in voxel >>>>> > >coordinates is out-of-date. When Actor and Volume merged (quite a long >>>>> > >time ago) the Volume obtained a UserMatrix and 3 component scaling, and >>>>> > >the sampling distance changed to world distance. So, if you scale your >>>>> > >volume by 0.1 you should do the same to your sampling distance. >>>>> > > >>>>> > >One limitation (this is true of Actors and Volumes) is that non-uniform >>>>> > >scaling is not handled correctly for gradient calculation. For correct >>>>> > >rendering, change the aspect of the volume in the ImageData rather than >>>>> > >the Volume. >>>>> > > >>>>> > >Lisa >>>>> >>>>> Given the age of that thread, I have to ask: Which of these things are still true? Must I always compensate my opacity transfer function taking the scale into account? >>>>> >>>>> Lisa later explains how to do this: >>>>> >>>>> http://www.vtk.org/pipermail/vtkusers/2001-June/006860.html >>>>> >>>>> Is this what I must do? At the moment, my different volumes share the same transfer function (in fact, the same volume property). But do do this compensation, I'd have to give them each their own opacity transfer function. >>>> >>>> >>>> I gave the above a quick try with my volume, changing my transfer function from >>>> >>>> opacity->AddPoint(0.000, 0.00); >>>> opacity->AddPoint(0.500, 0.00); >>>> opacity->AddPoint(2.000, 0.70); >>>> opacity->AddPoint(3.500, 1.00); >>>> opacity->AddPoint(20.000, 1.00); >>>> >>>> to >>>> >>>> opacity->AddPoint(0.000, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >>>> opacity->AddPoint(0.500, 1.0 - std::pow(1.0 - 0.0, 1 / 0.0006)); >>>> opacity->AddPoint(2.000, 1.0 - std::pow(1.0 - 0.70, 1 / 0.0006)); >>>> opacity->AddPoint(3.500, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >>>> opacity->AddPoint(20.000, 1.0 - std::pow(1.0 - 1.0, 1 / 0.0006)); >>>> >>>> and got the attached result, so not quite there yet :( Scaling the opacity transfer functions like this seems to not be enough to get the same rendering as if I had hardcoded the spacings of the volume to 1 (instead of 0.0006). >>>> >>>> Anyone know what else I have to do? >>>> >>>> Elvis >>>> >>>> >>>>> >>>>> But, do you think this is all that I have to do to get the rendering I want no matter the scale of the input data? >>>>> >>>>> Thanks for any advice, >>>>> Elvis >>>>> >>>>> >>>>> 2016-09-12 16:06 GMT+02:00 Elvis Stansvik : >>>>>> >>>>>> 2016-09-12 15:30 GMT+02:00 Sankhesh Jhaveri : >>>>>>> >>>>>>> Hi Elvis, >>>>>>> >>>>>>> There are flags on the volume mapper that allow setting the distance between samples along the ray. By default, the sample distance is computed as 1/2 the average spacing throughout the volume. If you have AutoAdjustSampleDistances enabled, the mapper computes the sample distance each frame based on the time taken to render the last frame. For consistent quality, you should disable AutoAdjustSampleDistances and set the sample distance explicitly. That way, you can leave the volume spacing in the units you desire. >>>>>> >>>>>> >>>>>> Hi Sankhesh, >>>>>> >>>>>> Hm, I don't see why it shouldn't be able to automatically compute an appropriate sample distance even with small volume spacings? >>>>>> >>>>>> E.g. right now, I'm testing with a volume that has 0.0006 spacing in all three dimensions and I leave the spacing as-is. The rendering looks like the attached result-0-0006.png. >>>>>> >>>>>> If I just hardcode the spacing to 0.1 (much closer to 1) instead, the result is as shown in the attached result-0-1.png. >>>>>> >>>>>> In both cases the same color/opacity transfer function is used, the difference is just the data spacing (and as a result, how much space the volume occupies in VTK the world). >>>>>> >>>>>> Shouldn't the automatic adjustment of sample distances work in this case? I think want that feature turned on, because I want the quality to degrade when moving/rotating the camera, as it improves interactivity. >>>>>> >>>>>> For testing, I tried disabling the AutoAdjustSampleDistances and hardcoding the sample distance to 0.0003 (half my data spacing) with: >>>>>> >>>>>> volumeMapper->SetAutoAdjustSampleDistances(0); >>>>>> volumeMapper->SetSampleDistance(0.0003); >>>>>> >>>>>> But the result was the same as in with the option turned on (as in the first screenshot). >>>>>> >>>>>> Any other ideas? >>>>>> >>>>>> Thanks a lot for your help. >>>>>> >>>>>> Elvis >>>>>> >>>>>>> >>>>>>> >>>>>>> Sankhesh Jhaveri >>>>>>> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Sep 12, 2016 at 8:56 AM, Elvis Stansvik wrote: >>>>>>>> >>>>>>>> 2016-09-12 14:01 GMT+02:00 Elvis Stansvik : >>>>>>>>> >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> I've just noticed the there's a large difference in rendering quality if I decrease the spacing of my data (using vtkGPUVolumeRayCastMapper). >>>>>>>>> >>>>>>>>> I found this very old post from 2007 about the same problem: >>>>>>>>> >>>>>>>>> http://public.kitware.com/pipermail/vtkusers/2007-March/040559.html >>>>>>>>> >>>>>>>>> I was originally using a data spacing of 0.12, which is the voxel size in centimeters for the particular volume I'm working with (stored in our data files), but after I tried to divide it by 100.0 during loading, rendering quality dropped considerably. The reason I wanted to do this is because it's more convenient if VTK world coordinates are in meters in this particular application, not centimeters. >>>>>>>>> >>>>>>>>> Anyone know why volume rendering quality seems dependant on the data spacing? >>>>>>>> >>>>>>>> >>>>>>>> I now found another more recent post from 2014 which describes in more detail what I seem to experience as well (seemingly also with no answer): >>>>>>>> >>>>>>>> http://public.kitware.com/pipermail/vtkusers/2014-March/083311.html >>>>>>>> >>>>>>>> I get the expected rendering when the spacing is ~1. >>>>>>>> >>>>>>>> Must I make sure that my volumes have a spacing ~1? I'm willing to abandon the idea of having VTK world coordinates == meters and introduce another scale, but it's a bit cumbersome as I'm working with multiple volumes which I add to the renderer at once, and not all of them will have the same spacing. This means I must first analyse the volumes I'm going to load a priori, and calculate a factor common to them all that will bring all of their spacings as close to 1 as possible :( >>>>>>>> >>>>>>>> Would be great if someone in the know could chime in. Is there some workaround? Can I instruct the mapper to "expect" the small spacings I want to work with? >>>>>>>> >>>>>>>> Elvis >>>>>>>> >>>>>>>>> >>>>>>>>> Thanks for any clarifications! >>>>>>>>> >>>>>>>>> Elvis >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> From elvis.stansvik at orexplore.com Mon Sep 12 15:12:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 12 Sep 2016 21:12:25 +0200 Subject: [vtkusers] About 7.0.1 and 7.1 Message-ID: Perhaps this is a questions for the developers list, but: Is there some estimate of when 7.0.1 (if ever) and 7.1 will be released? Are you targeting some date/rough period? Elvis From tjlp at netease.com Mon Sep 12 20:58:04 2016 From: tjlp at netease.com (Liu_tj) Date: Tue, 13 Sep 2016 08:58:04 +0800 (CST) Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? In-Reply-To: References: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> Message-ID: <2fafab86.0.157210d0653.Coremail.tjlp@netease.com> Hi, Dave, I am using Activiz .NET. In C#, the string is UTF16 and I convert it to UTF8. And I follow your step. It doesn't work. If I convert to UTF8, the characters are not displayed. If I don't convert, the characters are displayed as ??. As you said, we need unicode font file. How can I identify the font file is unicode font file. Thanks ?2016-09-12?"David Lonie" ??? -----????----- ???:"David Lonie" ????:2016?09?12? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] Does vtkCaptionActor2D support chinese characters? On Sun, Sep 11, 2016 at 12:18 PM, Liu_tj wrote: I want to give Chinese text annotation on 3D model.Does vtkCaptionActor2D support chinese characters? If no, what class should I use? vtkCaptionActor2D will work. You'll need to provide a unicode font file (the embedded fonts in VTK only support ASCII) via the caption actor's GetCaptionTextProperty: captionActor->GetCaptionTextProperty()->SetFontFamily(VTK_FONT_FILE); captionActor->GetCaptionTextProperty()->SetFontFile("/path/to/some/unicode/font/file"); and then encode the caption text as UTF-8. Hope this helps, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Sep 13 06:26:32 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 13 Sep 2016 03:26:32 -0700 (MST) Subject: [vtkusers] GPU Memory Detection In-Reply-To: References: <1473697280617-5740281.post@n5.nabble.com> Message-ID: <1473762391998-5740291.post@n5.nabble.com> Hi, I have downloaded the latest master branch code and built the 32 bit version. Slightly, but not much better - GetMaxMemoryInBytes() on the smart volume / gpu mapper still returns 134217728 (128 MB) and mostly no volume shown with lots of out of memory errors from OpenGL as before. I am reasonably sure that this particular set volume rendered fine in 32 bit mode with the 64 bit IDs flag on as it is one of our common test sets. When testing, I did get the volume to render a few times, and it looked like it was having to drop to the reduced volume (due to the incorrect 128MB measurement?). It may be this memory allocation that is failing. Any ideas? -- View this message in context: http://vtk.1045678.n5.nabble.com/GPU-Memory-Detection-tp5740281p5740291.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.lonie at kitware.com Tue Sep 13 09:31:20 2016 From: david.lonie at kitware.com (David Lonie) Date: Tue, 13 Sep 2016 09:31:20 -0400 Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? In-Reply-To: <2fafab86.0.157210d0653.Coremail.tjlp@netease.com> References: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> <2fafab86.0.157210d0653.Coremail.tjlp@netease.com> Message-ID: On Mon, Sep 12, 2016 at 8:58 PM, Liu_tj wrote: > Hi, Dave, > > I am using Activiz .NET. In C#, the string is UTF16 and I convert it to > UTF8. And I follow your step. It doesn't work. If I convert to UTF8, the > characters are not displayed. If I don't convert, the characters are > displayed as ??. > > As you said, we need unicode font file. How can I identify the font file > is unicode font file. > You'll have to check with the author of the font file itself. I think there are also applications that can open font files so that you can inspect the character information inside them, but I don't know of any off the top of my head. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.schober at stemmer-imaging.de Tue Sep 13 11:23:04 2016 From: b.schober at stemmer-imaging.de (bsxside) Date: Tue, 13 Sep 2016 08:23:04 -0700 (MST) Subject: [vtkusers] QVTKWidget in DockWidget (as Qt Plugin) does not render correctly Message-ID: <1473780183932-5740294.post@n5.nabble.com> Hello, I have following setup: I load my VTK application as a plugin in my Qt application. Therefore I create a QVTKWidget in the plugin. Issue: I can see the point cloud (vtkPolyData) shortly correctly (like a blink), then the lower part of it disappears. As I am not sure, where this issue comes from, first here is the create window source code: Rendering is done in following function: After this I only see part of the point cloud. Running following code after rendering, the whole point cloud is shown correctly. So I am only repeating part of the code after first rending and run a second render: For sure I am doing something wrong or I do not consider some important point, but also searching for a solution I could not find anything. So this is my last hope to avoid this "work-around" repeating code to get a correct image. Thank you very much in advance! Bea -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-in-DockWidget-as-Qt-Plugin-does-not-render-correctly-tp5740294.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Tue Sep 13 11:38:00 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 13 Sep 2016 11:38:00 -0400 Subject: [vtkusers] vtkDataSetReader::Update reports Error reading ascii data. Possible mismatch of datasize with declaration. In-Reply-To: <57D45BDC.2090107@decisionsciencescorp.com> References: <57D45BDC.2090107@decisionsciencescorp.com> Message-ID: Can you dump the string on the receiving end and post it for debugging? On Sat, Sep 10, 2016 at 3:15 PM, Joe Parness < joe.parness at decisionsciencescorp.com> wrote: > After copying vtkPolyData object to a vtkDataSetWriter I grab the > vtkDataSetWriter payload as a string (send it across a net). When I grab > the buffer off the net I check it in memory and it looks good but when I > try and copy it back to a vtkDataSetReader the error > vtkDataSetReader::Update reports Update reports Error reading ascii data. > Possible mismatch of datasize with declaration and the resulting vtkDataSet > appears truncated, any helpful thoughts on this would be appreciated. > > -- > This email and its contents are confidential. If you are not the intended > recipient, please do not disclose or use the information within this email > or its attachments. If you have received this email in error, please report > the error to the sender by return email and delete this communication from > your records. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Tue Sep 13 23:59:11 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Tue, 13 Sep 2016 20:59:11 -0700 (MST) Subject: [vtkusers] vtkDICOMReader & vtkDICOMDirectory not exists in the newest VTK? Message-ID: <1473825551162-5740316.post@n5.nabble.com> Hi, I just have a build of the newest VTK and found the vtkDICOMReader & vtkDICOMDirectory no longer existing, are these 2 class removed from the newest VTK? Best Regards James -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMReader-vtkDICOMDirectory-not-exists-in-the-newest-VTK-tp5740316.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviu2 at yahoo.com Wed Sep 14 03:57:48 2016 From: flaviu2 at yahoo.com (flaviu2) Date: Wed, 14 Sep 2016 00:57:48 -0700 (MST) Subject: [vtkusers] vtkDICOMReader & vtkDICOMDirectory not exists in the newest VTK? In-Reply-To: <1473825551162-5740316.post@n5.nabble.com> References: <1473825551162-5740316.post@n5.nabble.com> Message-ID: <1473839868414-5740317.post@n5.nabble.com> Do you know that these classes are part of VTK DICOM library ? I think you should check VTK DICOM library first ... -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMReader-vtkDICOMDirectory-not-exists-in-the-newest-VTK-tp5740316p5740317.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Sep 14 05:05:13 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 14 Sep 2016 11:05:13 +0200 Subject: [vtkusers] vtkDICOMReader & vtkDICOMDirectory not exists in the newest VTK? In-Reply-To: <1473825551162-5740316.post@n5.nabble.com> References: <1473825551162-5740316.post@n5.nabble.com> Message-ID: In CMake, enable the module ?Module_vtkDICOM?. HTH > On 14 Sep 2016, at 05:59, chenjianyyzz wrote: > > Hi, > > I just have a build of the newest VTK and found the vtkDICOMReader & > vtkDICOMDirectory no longer existing, are these 2 class removed from the > newest VTK? > > Best Regards > James > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMReader-vtkDICOMDirectory-not-exists-in-the-newest-VTK-tp5740316.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From elvis.stansvik at orexplore.com Wed Sep 14 08:50:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 14 Sep 2016 14:50:06 +0200 Subject: [vtkusers] Clipping problem (?) trying to use vtkCubeSource as selection marker Message-ID: Hi all, I'm rendering a cylindrical volume and need to let the user select a segment of the volume. As a "selection marker" I thought I'd, for simplicity, just use a semi-transparent cube with "no shading" which I put around the segment of the volume to indicate the selection: vtkSmartPointer m_selectionMarker; which I then configure with: auto selectionMarkerMapper = vtkSmartPointer::New(); selectionMarkerMapper->SetInputConnection(m_selectionMarker->GetOutputPort()); auto selectionMarkerActor = vtkSmartPointer::New(); selectionMarkerActor->SetMapper(selectionMarkerMapper); selectionMarkerActor->GetProperty()->SetColor(0.0, 0.0, 1.0); selectionMarkerActor->GetProperty()->SetOpacity(0.1); selectionMarkerActor->GetProperty()->SetAmbient(1.0); selectionMarkerActor->GetProperty()->SetDiffuse(0.0); selectionMarkerActor->GetProperty()->SetSpecular(0.0); renderer()->AddActor(selectionMarkerActor); Now, my interactor style is such that the camera is locked to move on a cylinder around my subject volume, and the camera is always uses parallel projection. When the camera is modified (zoomed or panned "around" my subject), I do something like this to update the selection marker cube source: int *windowSize = GetRenderWindow()->GetSize(); // Half window width in world coordinates auto halfWindowWidth = renderer()->GetActiveCamera()->GetParallelScale() * (double(windowSize[0]) / windowSize[1]); m_selectionMarker->SetBounds( -halfWindowWidth, halfWindowWidth, -halfWindowWidth, halfWindowWidth, start, end ); where start and end are the start/end of the selection. This seems to work fine, and the selection has the look I'm after (see looks_fine.png). But, if I zoom out quite a bit, I get a strange look (see looks_strange.png). Anyone know what is happening here? Is the cube clipped perhaps? Each time the camera moves or is zoomed, I also reset the camera clipping range with renderer->ResetCameraClippingRange() So I wouldn't expect the cube to be clipped... Thanks for any advice. Elvis -------------- next part -------------- A non-text attachment was scrubbed... Name: looks_fine.png Type: image/png Size: 39912 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: looks_strange.png Type: image/png Size: 3819 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Wed Sep 14 09:27:18 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 14 Sep 2016 15:27:18 +0200 Subject: [vtkusers] Clipping problem (?) trying to use vtkCubeSource as selection marker In-Reply-To: References: Message-ID: 2016-09-14 14:50 GMT+02:00 Elvis Stansvik : > Hi all, > > I'm rendering a cylindrical volume and need to let the user select a > segment of the volume. > > As a "selection marker" I thought I'd, for simplicity, just use a > semi-transparent cube with "no shading" which I put around the segment > of the volume to indicate the selection: > > vtkSmartPointer m_selectionMarker; > > which I then configure with: > > auto selectionMarkerMapper = vtkSmartPointer::New(); > selectionMarkerMapper->SetInputConnection(m_selectionMarker->GetOutputPort()); > > auto selectionMarkerActor = vtkSmartPointer::New(); > selectionMarkerActor->SetMapper(selectionMarkerMapper); > selectionMarkerActor->GetProperty()->SetColor(0.0, 0.0, 1.0); > selectionMarkerActor->GetProperty()->SetOpacity(0.1); > selectionMarkerActor->GetProperty()->SetAmbient(1.0); > selectionMarkerActor->GetProperty()->SetDiffuse(0.0); > selectionMarkerActor->GetProperty()->SetSpecular(0.0); > > renderer()->AddActor(selectionMarkerActor); > > Now, my interactor style is such that the camera is locked to move on > a cylinder around my subject volume, and the camera is always uses > parallel projection. > > When the camera is modified (zoomed or panned "around" my subject), I > do something like this to update the selection marker cube source: > > int *windowSize = GetRenderWindow()->GetSize(); > > // Half window width in world coordinates > auto halfWindowWidth = renderer()->GetActiveCamera()->GetParallelScale() > * (double(windowSize[0]) / windowSize[1]); > > m_selectionMarker->SetBounds( > -halfWindowWidth, halfWindowWidth, > -halfWindowWidth, halfWindowWidth, > start, > end > ); > > where start and end are the start/end of the selection. > > This seems to work fine, and the selection has the look I'm after (see > looks_fine.png). > > But, if I zoom out quite a bit, I get a strange look (see looks_strange.png). > > Anyone know what is happening here? Is the cube clipped perhaps? Each > time the camera moves or is zoomed, I also reset the camera clipping > range with > > renderer->ResetCameraClippingRange() > > So I wouldn't expect the cube to be clipped... Bah, so silly, parts of my selection marker were actually behind the camera. Nevermind. Elvis > > Thanks for any advice. > > Elvis From inglis.dl at gmail.com Wed Sep 14 09:27:22 2016 From: inglis.dl at gmail.com (Dean Inglis) Date: Wed, 14 Sep 2016 09:27:22 -0400 Subject: [vtkusers] Tcl wrapping error with tag v5.10.1 Message-ID: Hi all, I am trying to build vtk tag v5.10.1 with tcl wrapping but ran into an error /Rendering/vtkTkRenderWidget.cxx:1309:14: error: invalid conversion from ?void*? to ?char*? [-fpermissive] self->RW = ckalloc( this is easily fixable with static_cast around ckalloc and my build proceeds to completion. Building on Ubuntu 15.10 64-bit OS gcc 5.2.1, shared libs, debug. - Dean -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 14 11:48:00 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 14 Sep 2016 09:48:00 -0600 Subject: [vtkusers] Tcl wrapping error with tag v5.10.1 In-Reply-To: References: Message-ID: Hi Dean, Are you sure your build is for tag v5.10.1, and not v5.10.0? Here is the vtkTkRenderWidget for v5.10.1, and it has the static_cast: http://gitlab.kitware.com/vtk/vtk/blob/v5.10.1/Rendering/ vtkTkRenderWidget.cxx#L1311 Cheers, - David On Wed, Sep 14, 2016 at 7:27 AM, Dean Inglis wrote: > Hi all, > > I am trying to build vtk tag v5.10.1 with tcl wrapping > but ran into an error > > /Rendering/vtkTkRenderWidget.cxx:1309:14: error: invalid conversion from > ?void*? to ?char*? [-fpermissive] > self->RW = ckalloc( > > this is easily fixable with static_cast around ckalloc > and my build proceeds to completion. Building on Ubuntu 15.10 64-bit OS > gcc 5.2.1, shared libs, debug. > > - Dean > -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Wed Sep 14 12:14:43 2016 From: inglis.dl at gmail.com (Dean Inglis) Date: Wed, 14 Sep 2016 12:14:43 -0400 Subject: [vtkusers] Tcl wrapping error with tag v5.10.1 In-Reply-To: References: Message-ID: yep, that was it ... wrong tag. Thanks David. On Wed, Sep 14, 2016 at 11:48 AM, David Gobbi wrote: > Hi Dean, > > Are you sure your build is for tag v5.10.1, and not v5.10.0? > > Here is the vtkTkRenderWidget for v5.10.1, and it has the static_cast: > http://gitlab.kitware.com/vtk/vtk/blob/v5.10.1/Rendering/vtk > TkRenderWidget.cxx#L1311 > > Cheers, > - David > > > On Wed, Sep 14, 2016 at 7:27 AM, Dean Inglis wrote: > >> Hi all, >> >> I am trying to build vtk tag v5.10.1 with tcl wrapping >> but ran into an error >> >> /Rendering/vtkTkRenderWidget.cxx:1309:14: error: invalid conversion from >> ?void*? to ?char*? [-fpermissive] >> self->RW = ckalloc( >> >> this is easily fixable with static_cast around ckalloc >> and my build proceeds to completion. Building on Ubuntu 15.10 64-bit OS >> gcc 5.2.1, shared libs, debug. >> >> - Dean >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From budric at gmail.com Wed Sep 14 14:43:43 2016 From: budric at gmail.com (Bud Bundy) Date: Wed, 14 Sep 2016 14:43:43 -0400 Subject: [vtkusers] Proper way to append to vtkPoints Message-ID: <45622812-c5ef-c381-7cda-2226e95cbdc9@gmail.com> Hi, What's the proper, efficient way to append point data to vtkPoints? The following does not work (assume 2 batches insert thousands of points not 1 per each batch) vtkSmartPointer points = vtkSmartPointer::New(); points->SetNumberOfPoints(1); //first batch insert points->SetPoint(0, 0, 0, 0); points->Resize(2); //second batch insert points->SetPoint(1, 1, 1, 1); size_t size = points->GetNumberOfPoints(); //size == 1 not 2 I'm using VTK 7.0.0. Thank you. From cory.quammen at kitware.com Wed Sep 14 14:50:27 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 14 Sep 2016 14:50:27 -0400 Subject: [vtkusers] Proper way to append to vtkPoints In-Reply-To: <45622812-c5ef-c381-7cda-2226e95cbdc9@gmail.com> References: <45622812-c5ef-c381-7cda-2226e95cbdc9@gmail.com> Message-ID: For expanding the list of points, use points->InsertPoint(1, 1, 1, 1) instead of points->SetPoint(1, 1, 1, 1). HTH, Cory On Wed, Sep 14, 2016 at 2:43 PM, Bud Bundy wrote: > Hi, > > What's the proper, efficient way to append point data to vtkPoints? The > following does not work (assume 2 batches insert thousands of points not 1 > per each batch) > > vtkSmartPointer points = vtkSmartPointer::New(); > points->SetNumberOfPoints(1); //first batch insert > points->SetPoint(0, 0, 0, 0); > points->Resize(2); //second batch insert > points->SetPoint(1, 1, 1, 1); > size_t size = points->GetNumberOfPoints(); > //size == 1 not 2 > > I'm using VTK 7.0.0. > > Thank you. > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From flaviu2 at yahoo.com Thu Sep 15 08:45:50 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Thu, 15 Sep 2016 12:45:50 +0000 (UTC) Subject: [vtkusers] Do obliqe MPR (multi planar reconstruction) References: <301166803.1546991.1473943550789.ref@mail.yahoo.com> Message-ID: <301166803.1546991.1473943550789@mail.yahoo.com> I have following matrix from MPR example: | | | | | | | | | | | Examples/ImageProcessing/Cxx/ImageSlicing.cxx ? 77895235b0c99b5cf2bb98af8b1... Visualization Toolkit | | | | for standard MPR. See example: | | | Pasteboard ? Uploaded Image Super simple and lightning fast image sharing. Upload clipboard images with Copy & Paste and image files wit... | | | But if the patient (let say that?was unconscious) and CT hasn't keep his head right, the MPR should be made after an custom angle: Link | | | Pasteboard ? Uploaded Image Super simple and lightning fast image sharing. Upload clipboard images with Copy & Paste and image files wit... | | | What?should I modify in inside code matrix:?double axialElements[16] = { ????? 1, 0, 0, 0, ????? 0, 1, 0, 0, ????? 0, 0, 1, 0, ????? 0, 0, 0, 1 }; ?double coronalElements[16] = { ????? 1, 0, 0, 0, ????? 0, 0, 1, 0, ????? 0,-1, 0, 0, ????? 0, 0, 0, 1 }; ?double sagittalElements[16] = { ????? 0, 0,-1, 0, ????? 1, 0, 0, 0, ????? 0,-1, 0, 0, ????? 0, 0, 0, 1 }; to made oblique MPR, in order to have sagittal an coronal plan straight, just like the patient?had kept the head right ? Could you guide me a little bit ? I will mean a lot for me ! Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Thu Sep 15 12:10:20 2016 From: rabysam28 at gmail.com (Sam Raby) Date: Thu, 15 Sep 2016 09:10:20 -0700 Subject: [vtkusers] usage of vtkSelectEnclosedPoints Message-ID: Hello I am using vtkSelectEnclosedPoints to identify if a "point" is inside a vtkPloyData or outside. The result always says the point is outside, no matter where the point is. My guess is it is because the vtkPolyData is not closed, although the vtkPloyData appears to be perfectly closed. I was wondering what filter I can use as a reprocessing stage to close my vtkPolyData before passing it to vtkSelectEnclosedPoints? vtkSmartPointer selectEnclosedPoints = vtkSmartPointer::New(); selectEnclosedPoints->SetInputData(myPoints); selectEnclosedPoints->SetSurfaceData(myPolydata); selectEnclosedPoints->Update(); std::cout << "Point " << i << ": " << selectEnclosedPoints->IsInside(i) << std::endl; Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 15 13:18:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 15 Sep 2016 11:18:35 -0600 Subject: [vtkusers] New documentation for vtk-dicom Message-ID: Hi All, This is a brief update on my vtk-dicom project on github. Perhaps the biggest change is new documentation pages: http://dgobbi.github.io/vtk-dicom/doc/api/pages.html Other recent fixes and improvements are listed here: https://github.com/dgobbi/vtk-dicom/commit/f1e78955 As before, you can build with VTK by setting Module_vtkDICOM=ON when you configure VTK with cmake, or you can download and build vtk-dicom separately. It is recommended that you also set USE_GDCM=ON and tell cmake where to find gdcm, since the vtkDICOMReader needs gdcm to handle compressed files. Please see the "Installation" page at the link above for more details. Wrapping is provided for Tcl, Python, and Java for VTK 5.10 and later, for best results I recommend the Python wrapping with VTK 6.2 or later. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.schroeder at kitware.com Thu Sep 15 13:54:58 2016 From: will.schroeder at kitware.com (Will Schroeder) Date: Thu, 15 Sep 2016 13:54:58 -0400 Subject: [vtkusers] VTK Textbook and User's Guide now available for download Message-ID: Kitware is releasing the VTK Textbook and VTK User's Guide for PDF download. Follow the links below to a landing page where you can buy a printed version, or download a PDF. Longer term, the plan is to convert these books to LaTeX (from Framemaker) and place the content into an open repository. The first step is to mostly duplicate what exists now; eventually we have the ambitious goal to completely rewrite / recombine / rethink the books. For example, using VTK.js (under development now) to offer web interaction with examples etc. We can certainly use the talents of the community to take this challenge on, so if you are interested please let me know. The Visualization Toolkit An Object-Oriented Approach to 3D Graphics (4th ed.) http://www.vtk.org/vtk-textbook/ pdf: http://www.kitware.com/products/books/VTKTextbook.pdf *The VTK User?s Guide* http://www.vtk.org/vtk-users-guide/ pdf: http://www.kitware.com/products/books/VTKUsersGuide.pdf Best, please let me know if there are issues or concerns. W -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Thu Sep 15 15:48:26 2016 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 15 Sep 2016 12:48:26 -0700 Subject: [vtkusers] [ITK] [ITK-users] [ITK-dev] VTK Textbook and User's Guide now available for download In-Reply-To: References: Message-ID: On Thu, Sep 15, 2016 at 12:07 PM, Francois Budin wrote: > How about writing the book in a Jupyter notebook using a Python or a > Javascript kernel to run the examples? I know it is possible to export the > content of notebooks as PDFs through LaTeX, although I am not sure how the > formatting is handled and if that would work for a book. I've used notebooks a lot, but it's not a practical format for editing a large document like a book. For example, some colleagues of mine who also use notebooks a lot developed their own markdown annotation to be able to build and run the code examples from markdown text files. They can then export the document as notebooks, for them as needs them. Cheers, Matthew From zmanvortex at gmail.com Thu Sep 15 21:17:02 2016 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Thu, 15 Sep 2016 20:17:02 -0500 Subject: [vtkusers] Picker to get texture coordinates Message-ID: I am using vtk to texture polygons (triangles). I use a single texture and calculate what area of the texture is mapped to each polygon and then assign the correct u,v texture coordinates to the polygon points. Using a spot that is picked on the textured polygon, I need to find the coordinates of the 2D vtkImageData (x,y) that was used to create the texture. I am having trouble wrapping my head around a way to do this. I am looking at using vtkWorldPointPicker, reverse my transformation to get the pre-transformed world coordinate, and then use my u,v texture coordinate calculation to find the x,y coordinate of the vtkImageData. I can't use the nearest polydata point that was picked because there are only 3 per polydata which would be at the edge of the texture. Is there an easier solution? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Fri Sep 16 04:49:44 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 16 Sep 2016 01:49:44 -0700 (MST) Subject: [vtkusers] GPU Memory Detection In-Reply-To: <1473762391998-5740291.post@n5.nabble.com> References: <1473697280617-5740281.post@n5.nabble.com> <1473762391998-5740291.post@n5.nabble.com> Message-ID: <1474015784546-5740351.post@n5.nabble.com> Hi all, I have just been having a poke around in the CMakeLists.txt for the OpenGL and OpenGL2 directories under the Rendering directory. It seems that the part that deals with the GPU info list has been replaced by a much shorter (placeholder?) section: OpenGL: # Now to see about the GPU info list. list(APPEND vtk_module_overrides "vtkGPUInfoList") if(VTK_USE_NVCONTROL) list(APPEND Module_SRCS "vtkXGPUInfoList.cxx") set(extra_libs ${NVCtrlLib_LIBRARY}) include_directories(${NVCtrlLib_INCLUDE_DIR}) set(vtk_module_vtkGPUInfoList_override "vtkXGPUInfoList") elseif(VTK_USE_CORE_GRAPHICS) list(APPEND Module_SRCS "vtkCoreGraphicsGPUInfoList.cxx") set(extra_libs) set(vtk_module_vtkGPUInfoList_override "vtkCoreGraphicsGPUInfoList") elseif(VTK_USE_DIRECTX) list(APPEND Module_SRCS "vtkDirectXGPUInfoList.cxx") set(extra_libs ${DirectX_LIBRARY} wbemuuid) include_directories(${DirectX_INCLUDE_DIR}) set(vtk_module_vtkGPUInfoList_override "vtkDirectXGPUInfoList") else() # Shouldn't this just be the base class, and the others override if needed? list(APPEND Module_SRCS "vtkDummyGPUInfoList.cxx") set(vtk_module_vtkGPUInfoList_override "vtkDummyGPUInfoList") endif() has become in OpenGL2: # Now to see about the GPU info list. list(APPEND vtk_module_overrides "vtkGPUInfoList") list(APPEND Module_SRCS "vtkDummyGPUInfoList.cxx") set(vtk_module_vtkGPUInfoList_override "vtkDummyGPUInfoList") So could I just copy the relevent classes to the OpenGL2 directory and update the CMakelists.txt to match (including the bit earlier where the VTK_USE_DIRECTX flag is worked out)? Alternatively, I could hack the part in vtkGPUVolumeRayCastMapper to default to a larger number than 128 MB. What is my best way forward here? I am reluctant to switch back to the old OpenGL rendering as the speed improvements in the new implementation are very beneficial. -- View this message in context: http://vtk.1045678.n5.nabble.com/GPU-Memory-Detection-tp5740281p5740351.html Sent from the VTK - Users mailing list archive at Nabble.com. From rakesh.p at tataelxsi.co.in Fri Sep 16 05:03:46 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Fri, 16 Sep 2016 09:03:46 +0000 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: References: , Message-ID: Hi, How do I make sure that my VTK based application will work on any system with any configuration, without throwing this error message? Upgrading VTK 6.3 to the latest version will solve the issue, or should we try upgrading the NVidia driver card? Warm Regards Rakesh Patil ________________________________ From: Ken Martin Sent: Monday, March 14, 2016 7:30 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. The old OpenGL backend will work with OpenGL version 1.1, while the new OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or later). Windows only comes with OpenGL version 1.4 (a software renderer). It is up to the hardware providers to supply hardware drivers. Pretty much anything released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or miss. Yes it depends on the graphics card. But since Intel started building in OpenGL support into their CPUs you can generally count on all recent (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL support for the new backend. There is a method renderWindow->SupportsOpenGL() that will test if a system meets the minimum requirements for the new backend, I mentioned "one provided to VTK" because sometimes developers create their own opengl context (the context determines what level of OpenGL is provided) and then tell VTK to use it. That will only work if they give VTK a context that includes support for 3.2. Normally VTK creates its own context so it makes sure to create the right one. I do not know much about Qt. Thanks Ken On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: Hi Ken Martin, I believe I understood the core reason as why this message is displayed. I need some more details. 1) In what way OpenGL backend is different from the OpenGL2 backend for VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite conditions needs to be considered to stick myself working with QVTKWidget on various system? 2) What exactly do you mean, when you say "one was provided to VTK that did not include opengl support". I guess all the latest Windows OS do come with OpenGL version greater than 1.1. So I think all the drivers must have OpenGL support right? Correct me if I am wrong. 3) Does this functionality really vary from one graphics card to another? I mean does it depend on the graphics card also? If so, how will I know whether my graphics card supports OpenGL backend or OpenGL2 backend? Thank You Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Saturday, March 12, 2016 1:03 AM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. I believe you gave the specs for your desktop as opposed to the laptop. That message occurs on windows on the old OpenGL backend (and the OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device context for rendering but the device did not support opengl, either because VTK failed to find a suitable device or because on was provided to VTK that did not include opengl support. Thanks Ken On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil > wrote: Hi VTK users, I am facing a strange issue. I am using QVTKWidget in my application and it works very well on my desktop computer. The same code when I try to compile on my laptop it throws me this error message: "Invalid pixel format, no opengl support" I would like to know what are the scenarios in which VTK throws this message. Whether there is any dependency on various versions of Windows OS? I believe it should not be. Below is the system information where I get this error: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 Note: I am not using QVTKWidget2. Kindly give some feedback as early as possible. Thank You Warm Regards Rakesh Patil _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 16 07:26:18 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Sep 2016 13:26:18 +0200 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume Message-ID: This is a very basic question, but I feel like I've missed something fundamental. I have a volume which I set the position for using SetPosition. I'm not applying any other transformations such as rotation or scale. What surprises me is that after having set the position, if I look at the MinZBound of the volume, it doesn't correspond to the Z position I set. E.g. if I (after I set the position of the volume) do qDebug() << "MinZBound:" << volume->GetMinZBound(); qDebug() << "Position[3]" << volume->GetPosition()[2]; I can get output such as: MinZBound: -0.162738 Position[3] -0.165138 I thought that the bounds of a volume was in VTK world coordinates. If so, shouldn't MinZBound be exactly the Z position? Thanks for any clarifications, I've probably missed something simple. Elvis From elvis.stansvik at orexplore.com Fri Sep 16 07:27:19 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Sep 2016 13:27:19 +0200 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume In-Reply-To: References: Message-ID: 2016-09-16 13:26 GMT+02:00 Elvis Stansvik : > This is a very basic question, but I feel like I've missed something > fundamental. > > I have a volume which I set the position for using SetPosition. I'm > not applying any other transformations such as rotation or scale. > > What surprises me is that after having set the position, if I look at > the MinZBound of the volume, it doesn't correspond to the Z position I > set. > > E.g. if I (after I set the position of the volume) do > > qDebug() << "MinZBound:" << volume->GetMinZBound(); > qDebug() << "Position[3]" << volume->GetPosition()[2]; Err, the string here should be "Position[2]" of course. Elvis > > I can get output such as: > > MinZBound: -0.162738 > Position[3] -0.165138 > > I thought that the bounds of a volume was in VTK world coordinates. If > so, shouldn't MinZBound be exactly the Z position? > > Thanks for any clarifications, I've probably missed something simple. > > Elvis From elvis.stansvik at orexplore.com Fri Sep 16 08:15:03 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Sep 2016 14:15:03 +0200 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume In-Reply-To: References: Message-ID: 2016-09-16 13:26 GMT+02:00 Elvis Stansvik : > This is a very basic question, but I feel like I've missed something > fundamental. > > I have a volume which I set the position for using SetPosition. I'm > not applying any other transformations such as rotation or scale. > > What surprises me is that after having set the position, if I look at > the MinZBound of the volume, it doesn't correspond to the Z position I > set. > > E.g. if I (after I set the position of the volume) do > > qDebug() << "MinZBound:" << volume->GetMinZBound(); > qDebug() << "Position[3]" << volume->GetPosition()[2]; > > I can get output such as: > > MinZBound: -0.162738 > Position[3] -0.165138 > > I thought that the bounds of a volume was in VTK world coordinates. If > so, shouldn't MinZBound be exactly the Z position? > > Thanks for any clarifications, I've probably missed something simple. I forgot to say that in the X and Y axes, there seems to always be a correspondance after my SetPosition(..): MinXBound: -0.0299 Position[0] -0.0299 MinYBound: -0.0299 Position[1] -0.0299 I can't see what's special about the Z direction. What else affects the bounds of the vtkVolume? The reason I'm asking, and what made me discover this, is that my volumes don't show up at the positions I expect them to. I'm sure I've missed something trivial, but I'm at a loss as to what it is :/ Elvis > > Elvis From elvis.stansvik at orexplore.com Fri Sep 16 08:19:37 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Sep 2016 14:19:37 +0200 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume In-Reply-To: References: Message-ID: 2016-09-16 14:15 GMT+02:00 Elvis Stansvik : > 2016-09-16 13:26 GMT+02:00 Elvis Stansvik : >> This is a very basic question, but I feel like I've missed something >> fundamental. >> >> I have a volume which I set the position for using SetPosition. I'm >> not applying any other transformations such as rotation or scale. >> >> What surprises me is that after having set the position, if I look at >> the MinZBound of the volume, it doesn't correspond to the Z position I >> set. >> >> E.g. if I (after I set the position of the volume) do >> >> qDebug() << "MinZBound:" << volume->GetMinZBound(); >> qDebug() << "Position[3]" << volume->GetPosition()[2]; >> >> I can get output such as: >> >> MinZBound: -0.162738 >> Position[3] -0.165138 >> >> I thought that the bounds of a volume was in VTK world coordinates. If >> so, shouldn't MinZBound be exactly the Z position? >> >> Thanks for any clarifications, I've probably missed something simple. > > I forgot to say that in the X and Y axes, there seems to always be a > correspondance after my SetPosition(..): > > MinXBound: -0.0299 > Position[0] -0.0299 > MinYBound: -0.0299 > Position[1] -0.0299 > > I can't see what's special about the Z direction. What else affects > the bounds of the vtkVolume? The reason I'm asking, and what made me > discover this, is that my volumes don't show up at the positions I > expect them to. > > I'm sure I've missed something trivial, but I'm at a loss as to what it is :/ A perhaps important piece of information is that the vtkVolume uses a vtkImageData that was the result of a vtkExtractVOI (taking a piece of the image in the Z direction). So.. is there something special I should watch out for regarding the bounds of the resulting image when using vtkExtractVOI? I found this old and unanswered post from 2006 where someone else was seeing strange bounds after a vtkExtractVOI: http://www.vtk.org/pipermail/vtkusers/2006-December/039113.html Or perhaps that poster also suffers from the same confusions I am at the moment? Elvis > > Elvis > >> >> Elvis From david.gobbi at gmail.com Fri Sep 16 08:23:22 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 16 Sep 2016 06:23:22 -0600 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume In-Reply-To: References: Message-ID: I might have time for a longer answer later, but for now, I suggest you look at vtkImageChangeInformation. - David On Fri, Sep 16, 2016 at 6:19 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-16 14:15 GMT+02:00 Elvis Stansvik : > > 2016-09-16 13:26 GMT+02:00 Elvis Stansvik > : > >> This is a very basic question, but I feel like I've missed something > >> fundamental. > >> > >> I have a volume which I set the position for using SetPosition. I'm > >> not applying any other transformations such as rotation or scale. > >> > >> What surprises me is that after having set the position, if I look at > >> the MinZBound of the volume, it doesn't correspond to the Z position I > >> set. > >> > >> E.g. if I (after I set the position of the volume) do > >> > >> qDebug() << "MinZBound:" << volume->GetMinZBound(); > >> qDebug() << "Position[3]" << volume->GetPosition()[2]; > >> > >> I can get output such as: > >> > >> MinZBound: -0.162738 > >> Position[3] -0.165138 > >> > >> I thought that the bounds of a volume was in VTK world coordinates. If > >> so, shouldn't MinZBound be exactly the Z position? > >> > >> Thanks for any clarifications, I've probably missed something simple. > > > > I forgot to say that in the X and Y axes, there seems to always be a > > correspondance after my SetPosition(..): > > > > MinXBound: -0.0299 > > Position[0] -0.0299 > > MinYBound: -0.0299 > > Position[1] -0.0299 > > > > I can't see what's special about the Z direction. What else affects > > the bounds of the vtkVolume? The reason I'm asking, and what made me > > discover this, is that my volumes don't show up at the positions I > > expect them to. > > > > I'm sure I've missed something trivial, but I'm at a loss as to what it > is :/ > > A perhaps important piece of information is that the vtkVolume uses a > vtkImageData that was the result of a vtkExtractVOI (taking a piece of > the image in the Z direction). So.. is there something special I > should watch out for regarding the bounds of the resulting image when > using vtkExtractVOI? > > I found this old and unanswered post from 2006 where someone else was > seeing strange bounds after a vtkExtractVOI: > > http://www.vtk.org/pipermail/vtkusers/2006-December/039113.html > > Or perhaps that poster also suffers from the same confusions I am at the > moment? > > Elvis > > > > > Elvis > > > >> > >> Elvis > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 16 08:37:14 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 16 Sep 2016 14:37:14 +0200 Subject: [vtkusers] Relationship between MinZBound and Position for a vtkVolume In-Reply-To: References: Message-ID: 2016-09-16 14:23 GMT+02:00 David Gobbi : > I might have time for a longer answer later, but for now, I suggest you look > at vtkImageChangeInformation. Thanks David, and no hurry/expectations. I'll have a look at that. Elvis > > - David > > On Fri, Sep 16, 2016 at 6:19 AM, Elvis Stansvik > wrote: >> >> 2016-09-16 14:15 GMT+02:00 Elvis Stansvik : >> > 2016-09-16 13:26 GMT+02:00 Elvis Stansvik >> > : >> >> This is a very basic question, but I feel like I've missed something >> >> fundamental. >> >> >> >> I have a volume which I set the position for using SetPosition. I'm >> >> not applying any other transformations such as rotation or scale. >> >> >> >> What surprises me is that after having set the position, if I look at >> >> the MinZBound of the volume, it doesn't correspond to the Z position I >> >> set. >> >> >> >> E.g. if I (after I set the position of the volume) do >> >> >> >> qDebug() << "MinZBound:" << volume->GetMinZBound(); >> >> qDebug() << "Position[3]" << volume->GetPosition()[2]; >> >> >> >> I can get output such as: >> >> >> >> MinZBound: -0.162738 >> >> Position[3] -0.165138 >> >> >> >> I thought that the bounds of a volume was in VTK world coordinates. If >> >> so, shouldn't MinZBound be exactly the Z position? >> >> >> >> Thanks for any clarifications, I've probably missed something simple. >> > >> > I forgot to say that in the X and Y axes, there seems to always be a >> > correspondance after my SetPosition(..): >> > >> > MinXBound: -0.0299 >> > Position[0] -0.0299 >> > MinYBound: -0.0299 >> > Position[1] -0.0299 >> > >> > I can't see what's special about the Z direction. What else affects >> > the bounds of the vtkVolume? The reason I'm asking, and what made me >> > discover this, is that my volumes don't show up at the positions I >> > expect them to. >> > >> > I'm sure I've missed something trivial, but I'm at a loss as to what it >> > is :/ >> >> A perhaps important piece of information is that the vtkVolume uses a >> vtkImageData that was the result of a vtkExtractVOI (taking a piece of >> the image in the Z direction). So.. is there something special I >> should watch out for regarding the bounds of the resulting image when >> using vtkExtractVOI? >> >> I found this old and unanswered post from 2006 where someone else was >> seeing strange bounds after a vtkExtractVOI: >> >> http://www.vtk.org/pipermail/vtkusers/2006-December/039113.html >> >> Or perhaps that poster also suffers from the same confusions I am at the >> moment? >> >> Elvis >> >> > >> > Elvis >> > >> >> >> >> Elvis >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > From ken.martin at kitware.com Fri Sep 16 08:51:28 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 16 Sep 2016 08:51:28 -0400 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: References: Message-ID: Any system with any configuration is pretty broad :-) If you want maximum portability at the cost of performance then make sure you build with the OpenGL1 backend. It will not run on every system, but it should work on most systems that are currently in use. On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil wrote: > Hi, > > > How do I make sure that my VTK based application will work on any system > with any configuration, without throwing this error message? Upgrading VTK > 6.3 to the latest version will solve the issue, or should we try upgrading > the NVidia driver card? > > > Warm Regards > > Rakesh Patil > > > ------------------------------ > *From:* Ken Martin > *Sent:* Monday, March 14, 2016 7:30 PM > *To:* Rakesh Patil > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Need information about "Invalid pixel format, > no opengl support" message. > > The old OpenGL backend will work with OpenGL version 1.1, while the new > OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or > later). > > Windows only comes with OpenGL version 1.4 (a software renderer). It is up > to the hardware providers to supply hardware drivers. Pretty much anything > released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 > or later. Earlier than that and it becomes a bit more hit or miss. > > Yes it depends on the graphics card. But since Intel started building in > OpenGL support into their CPUs you can generally count on all recent > (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL > support for the new backend. There is a method > renderWindow->SupportsOpenGL() that will test if a system meets the minimum > requirements for the new backend, > > I mentioned "one provided to VTK" because sometimes developers create > their own opengl context (the context determines what level of OpenGL is > provided) and then tell VTK to use it. That will only work if they give > VTK a context that includes support for 3.2. Normally VTK creates its own > context so it makes sure to create the right one. > > I do not know much about Qt. > > Thanks > Ken > > > On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: > >> Hi Ken Martin, >> >> >> I believe I understood the core reason as why this message is displayed. >> I need some more details. >> >> >> 1) In what way OpenGL backend is different from the OpenGL2 backend for >> VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite >> conditions needs to be considered to stick myself working with QVTKWidget >> on various system? >> >> 2) What exactly do you mean, when you say *"**one was provided to VTK >> that did not include opengl support"*. I guess all the latest Windows OS >> do come with OpenGL version greater than 1.1. So I think all the drivers >> must have OpenGL support right? Correct me if I am wrong. >> >> 3) Does this functionality really vary from one graphics card to another? >> I mean does it depend on the graphics card also? If so, how will I know >> whether my graphics card supports OpenGL backend or OpenGL2 backend? >> >> >> Thank You >> >> >> Warm Regards >> >> Rakesh Patil >> ------------------------------ >> *From:* Ken Martin >> *Sent:* Saturday, March 12, 2016 1:03 AM >> *To:* Rakesh Patil >> *Cc:* vtkusers at vtk.org >> *Subject:* Re: [vtkusers] Need information about "Invalid pixel format, >> no opengl support" message. >> >> I believe you gave the specs for your desktop as opposed to the laptop. >> >> That message occurs on windows on the old OpenGL backend (and the OpenGL2 >> backend for VTK 6.3) It indicates that VTK tried to setup a device context >> for rendering but the device did not support opengl, either because VTK >> failed to find a suitable device or because on was provided to VTK that did >> not include opengl support. >> >> Thanks >> Ken >> >> >> >> On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil >> wrote: >> >>> Hi VTK users, >>> >>> >>> I am facing a strange issue. I am using QVTKWidget in my application and >>> it works very well on my desktop computer. The same code when I try to >>> compile on my laptop it throws me this error message: >>> >>> >>> "Invalid pixel format, no opengl support" >>> >>> >>> I would like to know what are the scenarios in which VTK throws >>> this message. Whether there is any dependency on various versions of >>> Windows OS? I believe it should not be. Below is the system information >>> where I get this error: >>> >>> >>> OS Name: Microsoft Windows 8.1 Pro >>> Version: 6.3.9600 Build 9600 >>> OS Manufacturer: Microsoft Corporation >>> System Manufacturer: Dell Inc. >>> System Model: Precision T1700 >>> System Type: x64-based PC >>> Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), >>> 8 Logical Processor(s) >>> Installed Physical Memory (RAM): 32.0 GB >>> Total Virtual Memory: 36.7 GB >>> Display adapter: NVIDIA Quadro K620 >>> >>> Note: I am not using QVTKWidget2. Kindly give some feedback as early as >>> possible. >>> >>> Thank You >>> >>> Warm Regards >>> >>> Rakesh Patil >>> >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Fri Sep 16 13:20:37 2016 From: tjlp at netease.com (Liu_tj) Date: Sat, 17 Sep 2016 01:20:37 +0800 (CST) Subject: [vtkusers] Does vtkCaptionActor2D support chinese characters? In-Reply-To: References: <24d10773.a.1571a0b195d.Coremail.tjlp@netease.com> Message-ID: <4bef9bfa.1.1573403a8ce.Coremail.tjlp@netease.com> Hi, Serge, I use pure C# code instead of C# with managed C++. Before I set the caption I transform the C# utf16 Chinese string to utf8. But it does not work. The code is as follow. public static string Utf16ToUtf8(string utf16String) { byte[] utf16Bytes = Encoding.Unicode.GetBytes(utf16String); byte[] utf8Bytes = Encoding.Convert(Encoding.Unicode, Encoding.UTF8, utf16Bytes); string utf8String = Encoding.Default.GetString(utf8Bytes); return utf8String; } vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(25); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile("simsunb.ttf"); rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); string utf8text = Utilities.Utf16ToUtf8(@"ab12??"); rep.GetCaptionActor2D().SetCaption(utf8text); .... ?2016-09-12?"Serge Lalonde" ??? -----????----- ???:"Serge Lalonde" ????:2016?09?12? ??? ???:"vtkusers" ??:Re: [vtkusers] Does vtkCaptionActor2D support chinese characters? I had summarized the steps in the VTK Users mailing list back in Jan 2015. Search for "VTK 6.1 no longer supports ASCII characters > 128? (5.10.1 was ok)" in the archives. On 9/12/2016 9:20 AM, David Lonie wrote: On Sun, Sep 11, 2016 at 12:18 PM, Liu_tj wrote: I want to give Chinese text annotation on 3D model.Does vtkCaptionActor2D support chinese characters? If no, what class should I use? vtkCaptionActor2D will work. You'll need to provide a unicode font file (the embedded fonts in VTK only support ASCII) via the caption actor's GetCaptionTextProperty: captionActor->GetCaptionTextProperty()->SetFontFamily(VTK_FONT_FILE); captionActor->GetCaptionTextProperty()->SetFontFile("/path/to/some/unicode/font/file"); and then encode the caption text as UTF-8. Hope this helps, Dave _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- www.infolytica.com 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3 (514) 849-8752 x236, Fax: (514) 849-4239 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed1996 at gmail.com Fri Sep 16 14:06:48 2016 From: ed1996 at gmail.com (EdwardWang) Date: Fri, 16 Sep 2016 11:06:48 -0700 (MST) Subject: [vtkusers] ClipClosedSurface - Choose which side of plane to keep Message-ID: <1474049208063-5740367.post@n5.nabble.com> Hi all, This feels like a trivial issue, but I've been having some trouble with vtkClipClosedSurface. Basically, I describe a plane using the normal and an origin point, and try to clip based on that plane. This image shows what I'm trying to do. The problem is that the wrong side of the plane is being returned. The grey is the original model and the yellow is the result of the clipping. I want the grey part, not the yellow part. I've tried flipping the sign of the normal vector, but that hasn't helped. Any ideas on how to do this? For reference, I am using Slicer3D, which uses vtk. Thank you, Edward -- View this message in context: http://vtk.1045678.n5.nabble.com/ClipClosedSurface-Choose-which-side-of-plane-to-keep-tp5740367.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Fri Sep 16 14:35:51 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 16 Sep 2016 14:35:51 -0400 Subject: [vtkusers] ClipClosedSurface - Choose which side of plane to keep In-Reply-To: <1474049208063-5740367.post@n5.nabble.com> References: <1474049208063-5740367.post@n5.nabble.com> Message-ID: I just wrote a quick example. When I flip the normal, the other side is shown. Can you post a self-contained, compiplable example and CMakeLists.txt file that illustrates your problem? You can use a vtkSphereSource as your polydata. On Fri, Sep 16, 2016 at 2:06 PM, EdwardWang wrote: > Hi all, > > > This feels like a trivial issue, but I've been having some trouble with > vtkClipClosedSurface. Basically, I describe a plane using the normal and an > origin point, and try to clip based on that plane. > This image shows what I'm trying to do. > > > The problem is that the wrong side of the plane is being returned. The grey > is the original model and the yellow is the result of the clipping. I want > the grey part, not the yellow part. > > I've tried flipping the sign of the normal vector, but that hasn't helped. > Any ideas on how to do this? > > For reference, I am using Slicer3D, which uses vtk. > > Thank you, > Edward > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/ClipClosedSurface-Choose-which-side-of-plane-to-keep-tp5740367.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Fri Sep 16 14:41:10 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 16 Sep 2016 14:41:10 -0400 Subject: [vtkusers] poll - vtk doxygen style Message-ID: Hey Folks, I'm getting ready to replace VTK's non-standard documentation comment style with normal doxygen markup. Once we do that IDEs will generally do the right thing and we can all more easily edit the headers and get exactly what we expect. Before I make the big initial conversion commit, what specific doxygen flavor do people prefer? /*! and //! vs /** and /// all c-style (/*) or all c++ style (//) or mixed OK? for c-style, leading *'s or not in continuation lines thanks David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Fri Sep 16 14:49:36 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Fri, 16 Sep 2016 14:49:36 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: /// get's my vote On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle wrote: > Hey Folks, > > I'm getting ready to replace VTK's non-standard documentation comment style > with normal doxygen markup. Once we do that IDEs will generally do the right > thing and we can all more easily edit the headers and get exactly what we > expect. > > Before I make the big initial conversion commit, what specific doxygen > flavor do people prefer? > > /*! and //! vs /** and /// > all c-style (/*) or all c++ style (//) or mixed OK? > for c-style, leading *'s or not in continuation lines > > thanks > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > From alvaro.sanchez at kitware.com Fri Sep 16 14:50:12 2016 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Fri, 16 Sep 2016 14:50:12 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: I personally prefer ///, no specific reason. Would be good to stick to a single one though. On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle wrote: > Hey Folks, > > I'm getting ready to replace VTK's non-standard documentation comment > style with normal doxygen markup. Once we do that IDEs will generally do > the right thing and we can all more easily edit the headers and get exactly > what we expect. > > Before I make the big initial conversion commit, what specific doxygen > flavor do people prefer? > > /*! and //! vs /** and /// > all c-style (/*) or all c++ style (//) or mixed OK? > for c-style, leading *'s or not in continuation lines > > thanks > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Fri Sep 16 16:52:43 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 16 Sep 2016 16:52:43 -0400 Subject: [vtkusers] vtkEnSightWriter Message-ID: Hi, Does anyone use the vtkEnSightWriter or familiar with the EnSight file format? I'm wondering why the WriteCaseFile() method needs to be specially called in order to write out the .case file. This is the file that seems to need to be read into VTK and also seems like the .case file should be automatically written out by default. Thanks, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri Sep 16 17:31:37 2016 From: sean at rogue-research.com (Sean McBride) Date: Fri, 16 Sep 2016 17:31:37 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: <20160916213137.492003816@mail.rogue-research.com> On Fri, 16 Sep 2016 14:41:10 -0400, David E DeMarle said: >Before I make the big initial conversion commit, what specific doxygen >flavor do people prefer? I prefer /// and /** */, like: /// Summary blah blah /** Details blah blah. */ int Function(int param) Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From ed1996 at gmail.com Fri Sep 16 17:56:58 2016 From: ed1996 at gmail.com (Edward Wang) Date: Fri, 16 Sep 2016 14:56:58 -0700 Subject: [vtkusers] ClipClosedSurface - Choose which side of plane to keep In-Reply-To: References: <1474049208063-5740367.post@n5.nabble.com> Message-ID: Hi Bill, After taking a break and looking at this again, negating the normal did solve my problem. I don't know why it wasn't before, but I'm sure it was my fault. Just as well, because I don't know what you mean by your second paragraph. I've seen some reference to CMake when using Slicer, but I've never actually used it successfully. Could you direct me to a resource where I can learn more about this? I am working on a Windows if that is relevant. Thanks, Edward On Fri, Sep 16, 2016 at 11:35 AM, Bill Lorensen wrote: > I just wrote a quick example. When I flip the normal, the other side is > shown. > > Can you post a self-contained, compiplable example and CMakeLists.txt > file that illustrates your problem? You can use a vtkSphereSource as > your polydata. > > > On Fri, Sep 16, 2016 at 2:06 PM, EdwardWang wrote: > > Hi all, > > > > > > This feels like a trivial issue, but I've been having some trouble with > > vtkClipClosedSurface. Basically, I describe a plane using the normal and > an > > origin point, and try to clip based on that plane. > > This image shows what I'm trying to do. > > > > > > The problem is that the wrong side of the plane is being returned. The > grey > > is the original model and the yellow is the result of the clipping. I > want > > the grey part, not the yellow part. > > > > I've tried flipping the sign of the normal vector, but that hasn't > helped. > > Any ideas on how to do this? > > > > For reference, I am using Slicer3D, which uses vtk. > > > > Thank you, > > Edward > > > > > > > > -- > > View this message in context: http://vtk.1045678.n5.nabble. > com/ClipClosedSurface-Choose-which-side-of-plane-to-keep-tp5740367.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > _______________________________________________ > > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Edward -------------- next part -------------- An HTML attachment was scrubbed... URL: From rakesh.p at tataelxsi.co.in Sat Sep 17 01:45:39 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Sat, 17 Sep 2016 05:45:39 +0000 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: References: , Message-ID: Hi, I have currently built VTK with OpenGL1 backend itself. On one of the system it is producing this error. So is there any other way to make sure that it works on that system? Following is the system configuration of that machine: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 The mailing list suggests to use QVTKWidget2 instead of QVTKWidget. Will this help me to solve the issue? Thanks for your quick reply. Warm Regards Rakesh Patil ________________________________ From: Ken Martin Sent: Friday, September 16, 2016 6:21:28 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Any system with any configuration is pretty broad :-) If you want maximum portability at the cost of performance then make sure you build with the OpenGL1 backend. It will not run on every system, but it should work on most systems that are currently in use. On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil > wrote: Hi, How do I make sure that my VTK based application will work on any system with any configuration, without throwing this error message? Upgrading VTK 6.3 to the latest version will solve the issue, or should we try upgrading the NVidia driver card? Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Monday, March 14, 2016 7:30 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. The old OpenGL backend will work with OpenGL version 1.1, while the new OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or later). Windows only comes with OpenGL version 1.4 (a software renderer). It is up to the hardware providers to supply hardware drivers. Pretty much anything released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or miss. Yes it depends on the graphics card. But since Intel started building in OpenGL support into their CPUs you can generally count on all recent (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL support for the new backend. There is a method renderWindow->SupportsOpenGL() that will test if a system meets the minimum requirements for the new backend, I mentioned "one provided to VTK" because sometimes developers create their own opengl context (the context determines what level of OpenGL is provided) and then tell VTK to use it. That will only work if they give VTK a context that includes support for 3.2. Normally VTK creates its own context so it makes sure to create the right one. I do not know much about Qt. Thanks Ken On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: Hi Ken Martin, I believe I understood the core reason as why this message is displayed. I need some more details. 1) In what way OpenGL backend is different from the OpenGL2 backend for VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite conditions needs to be considered to stick myself working with QVTKWidget on various system? 2) What exactly do you mean, when you say "one was provided to VTK that did not include opengl support". I guess all the latest Windows OS do come with OpenGL version greater than 1.1. So I think all the drivers must have OpenGL support right? Correct me if I am wrong. 3) Does this functionality really vary from one graphics card to another? I mean does it depend on the graphics card also? If so, how will I know whether my graphics card supports OpenGL backend or OpenGL2 backend? Thank You Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Saturday, March 12, 2016 1:03 AM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. I believe you gave the specs for your desktop as opposed to the laptop. That message occurs on windows on the old OpenGL backend (and the OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device context for rendering but the device did not support opengl, either because VTK failed to find a suitable device or because on was provided to VTK that did not include opengl support. Thanks Ken On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil > wrote: Hi VTK users, I am facing a strange issue. I am using QVTKWidget in my application and it works very well on my desktop computer. The same code when I try to compile on my laptop it throws me this error message: "Invalid pixel format, no opengl support" I would like to know what are the scenarios in which VTK throws this message. Whether there is any dependency on various versions of Windows OS? I believe it should not be. Below is the system information where I get this error: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 Note: I am not using QVTKWidget2. Kindly give some feedback as early as possible. Thank You Warm Regards Rakesh Patil _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.schroeder at kitware.com Sat Sep 17 09:24:23 2016 From: will.schroeder at kitware.com (Will Schroeder) Date: Sat, 17 Sep 2016 09:24:23 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: For reference, I believe ITK uses /** text */ /** Method for creation through the object factory. */ and /** A global data type for this class of equations. Used to store * values that are needed in calculating the time step and other intermediate * products such as derivatives that may be used by virtual functions called * from ComputeUpdate. Caching these values here allows the ComputeUpdate * function to be const and thread safe. */ On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle wrote: > Hey Folks, > > I'm getting ready to replace VTK's non-standard documentation comment > style with normal doxygen markup. Once we do that IDEs will generally do > the right thing and we can all more easily edit the headers and get exactly > what we expect. > > Before I make the big initial conversion commit, what specific doxygen > flavor do people prefer? > > /*! and //! vs /** and /// > all c-style (/*) or all c++ style (//) or mixed OK? > for c-style, leading *'s or not in continuation lines > > thanks > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Sat Sep 17 09:28:56 2016 From: ken.martin at kitware.com (Ken Martin) Date: Sat, 17 Sep 2016 09:28:56 -0400 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: References: Message-ID: Ohh sorry, that system is fine in terms of OpenGL1 or OpenGL2 support (both on the intel GPU and the quadro) as long as the drivers are up to date. I suspect your issue may be related to which Qt widget is being used. There are folks on this list that have a lot of experience with Qt graphics issues and probably know the answer. Just not me :-) On Sat, Sep 17, 2016 at 1:45 AM, Rakesh Patil wrote: > Hi, > > > I have currently built VTK with OpenGL1 backend itself. On one of the > system it is producing this error. So is there any other way to make sure > that it works on that system? Following is the system configuration of that > machine: > > > OS Name: Microsoft Windows 8.1 Pro > Version: 6.3.9600 Build 9600 > > OS Manufacturer: Microsoft Corporation > System Manufacturer: Dell Inc. > System Model: Precision T1700 > System Type: x64-based PC > Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 > Logical Processor(s) > Installed Physical Memory (RAM): 32.0 GB > Total Virtual Memory: 36.7 GB > Display adapter: NVIDIA Quadro K620 > > > The mailing list suggests to use QVTKWidget2 instead of QVTKWidget. Will > this help me to solve the issue? > > > Thanks for your quick reply. > > > Warm Regards > > Rakesh Patil > > ------------------------------ > *From:* Ken Martin > *Sent:* Friday, September 16, 2016 6:21:28 PM > *To:* Rakesh Patil > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Need information about "Invalid pixel format, > no opengl support" message. > > Any system with any configuration is pretty broad :-) If you want maximum > portability at the cost of performance then make sure you build with the > OpenGL1 backend. It will not run on every system, but it should work on > most systems that are currently in use. > > > > On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil > wrote: > >> Hi, >> >> >> How do I make sure that my VTK based application will work on any system >> with any configuration, without throwing this error message? Upgrading VTK >> 6.3 to the latest version will solve the issue, or should we try upgrading >> the NVidia driver card? >> >> >> Warm Regards >> >> Rakesh Patil >> >> >> ------------------------------ >> *From:* Ken Martin >> *Sent:* Monday, March 14, 2016 7:30 PM >> *To:* Rakesh Patil >> *Cc:* vtkusers at vtk.org >> *Subject:* Re: [vtkusers] Need information about "Invalid pixel format, >> no opengl support" message. >> >> The old OpenGL backend will work with OpenGL version 1.1, while the new >> OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or >> later). >> >> Windows only comes with OpenGL version 1.4 (a software renderer). It is >> up to the hardware providers to supply hardware drivers. Pretty much >> anything released by Nvidia/AMD/Intel in the past 5 years will support >> OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or >> miss. >> >> Yes it depends on the graphics card. But since Intel started building in >> OpenGL support into their CPUs you can generally count on all recent >> (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL >> support for the new backend. There is a method >> renderWindow->SupportsOpenGL() that will test if a system meets the minimum >> requirements for the new backend, >> >> I mentioned "one provided to VTK" because sometimes developers create >> their own opengl context (the context determines what level of OpenGL is >> provided) and then tell VTK to use it. That will only work if they give >> VTK a context that includes support for 3.2. Normally VTK creates its own >> context so it makes sure to create the right one. >> >> I do not know much about Qt. >> >> Thanks >> Ken >> >> >> On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil >> wrote: >> >>> Hi Ken Martin, >>> >>> >>> I believe I understood the core reason as why this message is displayed. >>> I need some more details. >>> >>> >>> 1) In what way OpenGL backend is different from the OpenGL2 backend for >>> VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite >>> conditions needs to be considered to stick myself working with QVTKWidget >>> on various system? >>> >>> 2) What exactly do you mean, when you say *"**one was provided to VTK >>> that did not include opengl support"*. I guess all the latest Windows >>> OS do come with OpenGL version greater than 1.1. So I think all the drivers >>> must have OpenGL support right? Correct me if I am wrong. >>> >>> 3) Does this functionality really vary from one graphics card to >>> another? I mean does it depend on the graphics card also? If so, how will I >>> know whether my graphics card supports OpenGL backend or OpenGL2 backend? >>> >>> >>> Thank You >>> >>> >>> Warm Regards >>> >>> Rakesh Patil >>> ------------------------------ >>> *From:* Ken Martin >>> *Sent:* Saturday, March 12, 2016 1:03 AM >>> *To:* Rakesh Patil >>> *Cc:* vtkusers at vtk.org >>> *Subject:* Re: [vtkusers] Need information about "Invalid pixel format, >>> no opengl support" message. >>> >>> I believe you gave the specs for your desktop as opposed to the laptop. >>> >>> That message occurs on windows on the old OpenGL backend (and the >>> OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device >>> context for rendering but the device did not support opengl, either because >>> VTK failed to find a suitable device or because on was provided to VTK that >>> did not include opengl support. >>> >>> Thanks >>> Ken >>> >>> >>> >>> On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil >>> wrote: >>> >>>> Hi VTK users, >>>> >>>> >>>> I am facing a strange issue. I am using QVTKWidget in my application >>>> and it works very well on my desktop computer. The same code when I try to >>>> compile on my laptop it throws me this error message: >>>> >>>> >>>> "Invalid pixel format, no opengl support" >>>> >>>> >>>> I would like to know what are the scenarios in which VTK throws >>>> this message. Whether there is any dependency on various versions of >>>> Windows OS? I believe it should not be. Below is the system information >>>> where I get this error: >>>> >>>> >>>> OS Name: Microsoft Windows 8.1 Pro >>>> Version: 6.3.9600 Build 9600 >>>> OS Manufacturer: Microsoft Corporation >>>> System Manufacturer: Dell Inc. >>>> System Model: Precision T1700 >>>> System Type: x64-based PC >>>> Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 >>>> Core(s), 8 Logical Processor(s) >>>> Installed Physical Memory (RAM): 32.0 GB >>>> Total Virtual Memory: 36.7 GB >>>> Display adapter: NVIDIA Quadro K620 >>>> >>>> Note: I am not using QVTKWidget2. Kindly give some feedback as early as >>>> possible. >>>> >>>> Thank You >>>> >>>> Warm Regards >>>> >>>> Rakesh Patil >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From spir.robert at gmail.com Sat Sep 17 09:57:54 2016 From: spir.robert at gmail.com (=?UTF-8?B?UsOzYmVydCDFoHBpcg==?=) Date: Sat, 17 Sep 2016 15:57:54 +0200 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: References: Message-ID: <000a01d210eb$7d738f50$785aadf0$@gmail.com> try updating the nvidia driver. One of my students has similar problem with nvidia drivers 350 series, after upgrading to 360 series everything works. Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ken Martin Sent: Saturday, September 17, 2016 3:29 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Ohh sorry, that system is fine in terms of OpenGL1 or OpenGL2 support (both on the intel GPU and the quadro) as long as the drivers are up to date. I suspect your issue may be related to which Qt widget is being used. There are folks on this list that have a lot of experience with Qt graphics issues and probably know the answer. Just not me :-) On Sat, Sep 17, 2016 at 1:45 AM, Rakesh Patil > wrote: Hi, I have currently built VTK with OpenGL1 backend itself. On one of the system it is producing this error. So is there any other way to make sure that it works on that system? Following is the system configuration of that machine: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 The mailing list suggests to use QVTKWidget2 instead of QVTKWidget. Will this help me to solve the issue? Thanks for your quick reply. Warm Regards Rakesh Patil _____ From: Ken Martin > Sent: Friday, September 16, 2016 6:21:28 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Any system with any configuration is pretty broad :-) If you want maximum portability at the cost of performance then make sure you build with the OpenGL1 backend. It will not run on every system, but it should work on most systems that are currently in use. On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil > wrote: Hi, How do I make sure that my VTK based application will work on any system with any configuration, without throwing this error message? Upgrading VTK 6.3 to the latest version will solve the issue, or should we try upgrading the NVidia driver card? Warm Regards Rakesh Patil _____ From: Ken Martin > Sent: Monday, March 14, 2016 7:30 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. The old OpenGL backend will work with OpenGL version 1.1, while the new OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or later). Windows only comes with OpenGL version 1.4 (a software renderer). It is up to the hardware providers to supply hardware drivers. Pretty much anything released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or miss. Yes it depends on the graphics card. But since Intel started building in OpenGL support into their CPUs you can generally count on all recent (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL support for the new backend. There is a method renderWindow->SupportsOpenGL() that will test if a system meets the minimum requirements for the new backend, I mentioned "one provided to VTK" because sometimes developers create their own opengl context (the context determines what level of OpenGL is provided) and then tell VTK to use it. That will only work if they give VTK a context that includes support for 3.2. Normally VTK creates its own context so it makes sure to create the right one. I do not know much about Qt. Thanks Ken On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: Hi Ken Martin, I believe I understood the core reason as why this message is displayed. I need some more details. 1) In what way OpenGL backend is different from the OpenGL2 backend for VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite conditions needs to be considered to stick myself working with QVTKWidget on various system? 2) What exactly do you mean, when you say "one was provided to VTK that did not include opengl support". I guess all the latest Windows OS do come with OpenGL version greater than 1.1. So I think all the drivers must have OpenGL support right? Correct me if I am wrong. 3) Does this functionality really vary from one graphics card to another? I mean does it depend on the graphics card also? If so, how will I know whether my graphics card supports OpenGL backend or OpenGL2 backend? Thank You Warm Regards Rakesh Patil _____ From: Ken Martin > Sent: Saturday, March 12, 2016 1:03 AM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. I believe you gave the specs for your desktop as opposed to the laptop. That message occurs on windows on the old OpenGL backend (and the OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device context for rendering but the device did not support opengl, either because VTK failed to find a suitable device or because on was provided to VTK that did not include opengl support. Thanks Ken On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil > wrote: Hi VTK users, I am facing a strange issue. I am using QVTKWidget in my application and it works very well on my desktop computer. The same code when I try to compile on my laptop it throws me this error message: "Invalid pixel format, no opengl support" I would like to know what are the scenarios in which VTK throws this message. Whether there is any dependency on various versions of Windows OS? I believe it should not be. Below is the system information where I get this error: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 Note: I am not using QVTKWidget2. Kindly give some feedback as early as possible. Thank You Warm Regards Rakesh Patil _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sat Sep 17 10:24:03 2016 From: DLRdave at aol.com (David Cole) Date: Sat, 17 Sep 2016 10:24:03 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: For what it's worth, I've always found reading the /// style throughout to be the easiest on my brain and eyes when reading in a text editor. For some reason, it seems to be easiest to filter out a constant column of /// repeated on every line than the sprinkled start/stop signals of the other styles. Just my 2 cents, David C. > On Sep 17, 2016, at 9:24 AM, Will Schroeder wrote: > > For reference, I believe ITK uses /** text */ > > /** Method for creation through the object factory. */ > > and > > /** A global data type for this class of equations. Used to store > * values that are needed in calculating the time step and other intermediate > * products such as derivatives that may be used by virtual functions called > * from ComputeUpdate. Caching these values here allows the ComputeUpdate > * function to be const and thread safe. */ > > > >> On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle wrote: >> Hey Folks, >> >> I'm getting ready to replace VTK's non-standard documentation comment style with normal doxygen markup. Once we do that IDEs will generally do the right thing and we can all more easily edit the headers and get exactly what we expect. >> >> Before I make the big initial conversion commit, what specific doxygen flavor do people prefer? >> >> /*! and //! vs /** and /// >> all c-style (/*) or all c++ style (//) or mixed OK? >> for c-style, leading *'s or not in continuation lines >> >> thanks >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers > > > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Sat Sep 17 11:01:44 2016 From: david.thompson at kitware.com (David Thompson) Date: Sat, 17 Sep 2016 11:01:44 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: <18D50BCB-9BB9-479C-9B9B-9009E9E637F8@kitware.com> I like the /** ... */ style comments with an explicit \brief keyword where warranted. I also strongly advocate putting documentation wherever the implementation is, rather than the declaration, on the principal that people who change the implementation will be more likely to update the docs that way. David > On Sep 17, 2016, at 10:24, David Cole via vtk-developers wrote: > > For what it's worth, I've always found reading the /// style throughout to be the easiest on my brain and eyes when reading in a text editor. For some reason, it seems to be easiest to filter out a constant column of /// repeated on every line than the sprinkled start/stop signals of the other styles. > > Just my 2 cents, > David C. > > >> On Sep 17, 2016, at 9:24 AM, Will Schroeder wrote: >> >> For reference, I believe ITK uses /** text */ >> >> /** Method for creation through the object factory. */ >> >> and >> >> /** A global data type for this class of equations. Used to store >> * values that are needed in calculating the time step and other intermediate >> * products such as derivatives that may be used by virtual functions called >> * from ComputeUpdate. Caching these values here allows the ComputeUpdate >> * function to be const and thread safe. */ >> >> >> >>> On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle wrote: >>> Hey Folks, >>> >>> I'm getting ready to replace VTK's non-standard documentation comment style with normal doxygen markup. Once we do that IDEs will generally do the right thing and we can all more easily edit the headers and get exactly what we expect. >>> >>> Before I make the big initial conversion commit, what specific doxygen flavor do people prefer? >>> >>> /*! and //! vs /** and /// >>> all c-style (/*) or all c++ style (//) or mixed OK? >>> for c-style, leading *'s or not in continuation lines >>> >>> thanks >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> >> >> >> >> -- >> William J. Schroeder, PhD >> Kitware, Inc. - Building the World's Technical Computing Software >> 28 Corporate Drive >> Clifton Park, NY 12065 >> will.schroeder at kitware.com >> http://www.kitware.com >> (518) 881-4902 >> _______________________________________________ >> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sat Sep 17 11:26:48 2016 From: tjlp at netease.com (Liu_tj) Date: Sat, 17 Sep 2016 23:26:48 +0800 (CST) Subject: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? Message-ID: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> Hi, I use vtkCaptionWidget to display text annotation on 3D model. My issue is the font size of the text. Below is my C# code: vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(100); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile("simsunb.ttf"); rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); When the font size is from 100 to 50, the text is smaller; but if the size is from 50 to 25 to 10, the text size keeps the same. Why? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmanvortex at gmail.com Sat Sep 17 12:41:07 2016 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Sat, 17 Sep 2016 11:41:07 -0500 Subject: [vtkusers] Picker to get texture coordinates In-Reply-To: References: Message-ID: I have figured it out. Since my world coordinates are in meters from the center of the earth, I used vtkWorldPointPicker to get the world coordinates and then convert it to Latitude and Longitude using vtkGlobeSource::ComputeLatitudeLongitude. I then use an algorithm to calculate the distance in meters and bearing in degrees from a known point to interpolate to my image data coordinates. On Thu, Sep 15, 2016 at 8:17 PM, Donny Zimmerman wrote: > I am using vtk to texture polygons (triangles). I use a single texture and > calculate what area of the texture is mapped to each polygon and then > assign the correct u,v texture coordinates to the polygon points. > > Using a spot that is picked on the textured polygon, I need to find the > coordinates of the 2D vtkImageData (x,y) that was used to create the > texture. I am having trouble wrapping my head around a way to do this. > > I am looking at using vtkWorldPointPicker, reverse my transformation to > get the pre-transformed world coordinate, and then use my u,v texture > coordinate calculation to find the x,y coordinate of the vtkImageData. > > I can't use the nearest polydata point that was picked because there are > only 3 per polydata which would be at the edge of the texture. > > Is there an easier solution? > > Thanks. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From qcring at googlemail.com Sat Sep 17 12:53:44 2016 From: qcring at googlemail.com (A.E. Szalo) Date: Sat, 17 Sep 2016 18:53:44 +0200 Subject: [vtkusers] Building VTK with OpenGL2 and Module_vtkRenderingExternal Message-ID: <0E95BA65-149D-4674-AEFB-ADE93B91D1FC@gmail.com> Hi everyone, I?m working on a small open source project (check it out on GitHub if you?re interested: https://github.com/qCring/QuickVtk ) and have encountered the following issue: I?m not able to build VTK with OpenGL2 and Module_vtkRenderingExternal from more recent commits (results in configuration error in CMake). Without Module_vtkRenderingExternal I can?t access vtkExternalOpenGLRenderWindow which I need to embed VTK into my Qt/QML application. Is there an alternative way to achieve that without relying on Module_vtkRenderingExternal and also having OpenGL2 enabled instead of switching back to OpenGL? Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Sat Sep 17 14:06:47 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Sat, 17 Sep 2016 23:36:47 +0530 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: <18D50BCB-9BB9-479C-9B9B-9009E9E637F8@kitware.com> References: <18D50BCB-9BB9-479C-9B9B-9009E9E637F8@kitware.com> Message-ID: I vote for "///" style. Chiranjib On Sat, Sep 17, 2016 at 8:31 PM, David Thompson wrote: > I like the /** ... */ style comments with an explicit \brief keyword where > warranted. > > I also strongly advocate putting documentation wherever the implementation > is, rather than the declaration, on the principal that people who change > the implementation will be more likely to update the docs that way. > > David > > On Sep 17, 2016, at 10:24, David Cole via vtk-developers < > vtk-developers at vtk.org> wrote: > > For what it's worth, I've always found reading the /// style throughout to > be the easiest on my brain and eyes when reading in a text editor. For some > reason, it seems to be easiest to filter out a constant column of /// > repeated on every line than the sprinkled start/stop signals of the other > styles. > > Just my 2 cents, > David C. > > > On Sep 17, 2016, at 9:24 AM, Will Schroeder > wrote: > > For reference, I believe ITK uses /** text */ > > /** Method for creation through the object factory. */ > > and > > /** A global data type for this class of equations. Used to store > * values that are needed in calculating the time step and other > intermediate > * products such as derivatives that may be used by virtual functions > called > * from ComputeUpdate. Caching these values here allows the > ComputeUpdate > * function to be const and thread safe. */ > > > > On Fri, Sep 16, 2016 at 2:41 PM, David E DeMarle > wrote: > >> Hey Folks, >> >> I'm getting ready to replace VTK's non-standard documentation comment >> style with normal doxygen markup. Once we do that IDEs will generally do >> the right thing and we can all more easily edit the headers and get exactly >> what we expect. >> >> Before I make the big initial conversion commit, what specific doxygen >> flavor do people prefer? >> >> /*! and //! vs /** and /// >> all c-style (/*) or all c++ style (//) or mixed OK? >> for c-style, leading *'s or not in continuation lines >> >> thanks >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sat Sep 17 18:31:01 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 18 Sep 2016 08:31:01 +1000 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style Message-ID: In looking through all my code, I have settled on two styles A, and B (often used interchangeably). See also the variant of style B tha I use for the class description. Personally I would favour style B without the asterisks in front of every line i.e the one I use for the class description. The reasons for this are: 1. When writing cross-platform code, especially Python, it is very easy to convert this style to the one favoured by Sphinx. Java, on the other hand, tends to prefer the leading asterisk. 2. It looks clean and is easy to read. For what it is worth, I also believe that documentation should be with the declaration simply because the header files are the ones people tend to first look at not the definition. This is what VTK currently does. A: //! Test for a leap year. /*! * @param year Year * @param calendar The calendar to use. * @return true if it is a leap year. */ or B: /** * Calculate the Julian day number of the date. * The Proleptic Gregorian Calendar is used. * * Not valid for ymd < -4713 12 25. * @param ymd The year, month and day. * * @return The Julian day number of the date, an integer * running from noon to noon. */ For a class description I use this, style B with no asterisks in front of every line: /** This class provides conversion routines between Calendrical dates and times and the date and time as a Julian Day Number (JDN) and fraction of the day (FoD). The Julian Day is defined as the interval of time in days and fractions of a day since 4713 B.C. January 1, Greenwich noon Julian proleptic calendar. ... more stuff ... */ See: https://gitlab.com/amaclean/date-time in this, there are C++, Python and Java implementations of the same code. Regards Andrew -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Sat Sep 17 18:47:44 2016 From: david.thompson at kitware.com (David Thompson) Date: Sat, 17 Sep 2016 18:47:44 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: Hi Andrew, > ... > For what it is worth, I also believe that documentation should be with the declaration simply because the header files are the ones people tend to first look at not the definition. This is what VTK currently does. ... I think that moving method (not class) documentation out of the headers makes the headers much more terse and legible. For the vast majority of classes, the method names themselves are enough documentation. In cases where method names are not enough, it is nice to have the implementation nearby. Methods with inline or macro-generated implementations would still have documentation in the header, as would enums. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sat Sep 17 22:37:29 2016 From: DLRdave at aol.com (David Cole) Date: Sat, 17 Sep 2016 22:37:29 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: Message-ID: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Another argument for keeping all documentation in the header files is so it's available in an install-tree-only situation. Some people use VTK without the source tree around, and having the docs built into the header files is quite nice in that scenario. If it were in the cxx files, it wouldn't be available to such users. David > On Sep 17, 2016, at 6:47 PM, David Thompson wrote: > > Hi Andrew, > > ... >> For what it is worth, I also believe that documentation should be with the declaration simply because the header files are the ones people tend to first look at not the definition. This is what VTK currently does. ... > > I think that moving method (not class) documentation out of the headers makes the headers much more terse and legible. For the vast majority of classes, the method names themselves are enough documentation. In cases where method names are not enough, it is nice to have the implementation nearby. Methods with inline or macro-generated implementations would still have documentation in the header, as would enums. > > David > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Sun Sep 18 09:31:23 2016 From: david.thompson at kitware.com (David Thompson) Date: Sun, 18 Sep 2016 09:31:23 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Message-ID: <830CFB38-1FF6-4EE0-A1F6-569380BDFF88@kitware.com> But an install tree will have doxygen's output in it. David > On Sep 17, 2016, at 22:37, David Cole wrote: > > Another argument for keeping all documentation in the header files is so it's available in an install-tree-only situation. Some people use VTK without the source tree around, and having the docs built into the header files is quite nice in that scenario. If it were in the cxx files, it wouldn't be available to such users. > > > David > > >> On Sep 17, 2016, at 6:47 PM, David Thompson wrote: >> >> Hi Andrew, >> >> ... >>> For what it is worth, I also believe that documentation should be with the declaration simply because the header files are the ones people tend to first look at not the definition. This is what VTK currently does. ... >> >> I think that moving method (not class) documentation out of the headers makes the headers much more terse and legible. For the vast majority of classes, the method names themselves are enough documentation. In cases where method names are not enough, it is nice to have the implementation nearby. Methods with inline or macro-generated implementations would still have documentation in the header, as would enums. >> >> David >> _______________________________________________ >> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Sun Sep 18 11:06:02 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Sun, 18 Sep 2016 11:06:02 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: <830CFB38-1FF6-4EE0-A1F6-569380BDFF88@kitware.com> References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <830CFB38-1FF6-4EE0-A1F6-569380BDFF88@kitware.com> Message-ID: <20160918150602.GA10210@megas.kitware.com> On Sun, Sep 18, 2016 at 09:31:23 -0400, David Thompson wrote: > But an install tree will have doxygen's output in it. Assuming Doxygen was available during the build? There's nothing in VTK that pressures people to enable documentation, so not building it is easy. --Ben From elvis.stansvik at orexplore.com Mon Sep 19 01:40:08 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 19 Sep 2016 07:40:08 +0200 Subject: [vtkusers] Array order in VTK? Message-ID: Hi all, This is a simple question: I haven't been able to find any info on whether arrays (images, ...) are stored in row major (C) or column major (Fortran) order in VTK. I assumed they are in C order, but then I saw this blog post: https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/ In a comment the author says # Note that we flip the dimensions here because # VTK's order is Fortran whereas h5py writes in # C order. We don't want to do deep copies so we write # with dimensions flipped and pretend the array is # C order. which made me a little unsure. What is the array order of the data classes in VTK, and is it the same for all classes? Thanks, Elvis From sankhesh.jhaveri at kitware.com Mon Sep 19 08:54:30 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 19 Sep 2016 08:54:30 -0400 Subject: [vtkusers] Building VTK with OpenGL2 and Module_vtkRenderingExternal In-Reply-To: <0E95BA65-149D-4674-AEFB-ADE93B91D1FC@gmail.com> References: <0E95BA65-149D-4674-AEFB-ADE93B91D1FC@gmail.com> Message-ID: I've pushed a change to fix the errors here: https://gitlab.kitware.com/vtk/vtk/merge_requests/1976 *Sankhesh Jhaveri* *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 On Sat, Sep 17, 2016 at 12:53 PM, A.E. Szalo via vtkusers wrote: > Hi everyone, > > I?m working on a small open source project (check it out on GitHub if > you?re interested: https://github.com/qCring/QuickVtk) and have > encountered the following issue: I?m not able to build VTK with OpenGL2 and > Module_vtkRenderingExternal from more recent commits (results in > configuration error in CMake). Without Module_vtkRenderingExternal I can?t > access vtkExternalOpenGLRenderWindow which I need to embed VTK into my > Qt/QML application. Is there an alternative way to achieve that without > relying on Module_vtkRenderingExternal and also having OpenGL2 enabled > instead of switching back to OpenGL? > > Thanks in advance! > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Mon Sep 19 08:56:02 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 19 Sep 2016 08:56:02 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Message-ID: The Doxygen isn't always there, when I am hunting issues I often end up in the header for the class thanks to my IDE, and having the Doxygen there is often helpful whether the Doxygen is somewhere on the machine or not. I really dislike projects that put it in the implementation, and disagree on the method names being enough. I hope we leave it in the headers, and for the purposes of the migration to real Doxygen I am not sure the tools have the necessary logic to move documentation - just transform the style. I prefer the /** * Document code * @param */ Style personally, but /// also works, never really liked the //! but I am sure I could adapt were that chosen. On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers wrote: > Another argument for keeping all documentation in the header files is so > it's available in an install-tree-only situation. Some people use VTK > without the source tree around, and having the docs built into the header > files is quite nice in that scenario. If it were in the cxx files, it > wouldn't be available to such users. > > > David > > > On Sep 17, 2016, at 6:47 PM, David Thompson > wrote: > > Hi Andrew, > > ... > > For what it is worth, I also believe that documentation should be with the > declaration simply because the header files are the ones people tend to > first look at not the definition. This is what VTK currently does. ... > > > I think that moving method (not class) documentation out of the headers > makes the headers much more terse and legible. For the vast majority of > classes, the method names themselves are enough documentation. In cases > where method names are not enough, it is nice to have the implementation > nearby. Methods with inline or macro-generated implementations would still > have documentation in the header, as would enums. > > David > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > From cory.quammen at kitware.com Mon Sep 19 09:24:12 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 19 Sep 2016 09:24:12 -0400 Subject: [vtkusers] Array order in VTK? In-Reply-To: References: Message-ID: Elvis, VTK image data arrays are stored such that the X dimension increases fastest, followed by Y, followed by Z. Concrete example where dimensions of the image are XDIM, YDIM, ZDIM: Array index : i,j,k indices 0 : (0, 0, 0) 1 : (1, 0, 0) 2 : (2, 0, 0) ... XDIM : (0, 1, 0) XDIM+1 : (1, 1, 0) XDIM+2 : (2, 1, 0) ... XDIM*YDIM : (0, 0, 1) XDIM*YDIM + 1 : (1, 0, 1) So I guess that is Fortran order? HTH, Cory On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik wrote: > Hi all, > > This is a simple question: I haven't been able to find any info on > whether arrays (images, ...) are stored in row major (C) or column > major (Fortran) order in VTK. > > I assumed they are in C order, but then I saw this blog post: > > https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/ > > In a comment the author says > > # Note that we flip the dimensions here because > # VTK's order is Fortran whereas h5py writes in > # C order. We don't want to do deep copies so we write > # with dimensions flipped and pretend the array is > # C order. > > which made me a little unsure. What is the array order of the data > classes in VTK, and is it the same for all classes? > > Thanks, > Elvis > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From dan.lipsa at kitware.com Mon Sep 19 09:40:21 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 19 Sep 2016 09:40:21 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Message-ID: I also prefer this doxygen style: /** * Document code * @param */ as it creates a nice header for a function that contains the documentation. I think documentation should stay in the header as it is part of the interface of the module. On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell < marcus.hanwell at kitware.com> wrote: > The Doxygen isn't always there, when I am hunting issues I often end > up in the header for the class thanks to my IDE, and having the > Doxygen there is often helpful whether the Doxygen is somewhere on the > machine or not. I really dislike projects that put it in the > implementation, and disagree on the method names being enough. I hope > we leave it in the headers, and for the purposes of the migration to > real Doxygen I am not sure the tools have the necessary logic to move > documentation - just transform the style. > > I prefer the > > /** > * Document code > * @param > */ > > Style personally, but /// also works, never really liked the //! but I > am sure I could adapt were that chosen. > > On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers > wrote: > > Another argument for keeping all documentation in the header files is so > > it's available in an install-tree-only situation. Some people use VTK > > without the source tree around, and having the docs built into the header > > files is quite nice in that scenario. If it were in the cxx files, it > > wouldn't be available to such users. > > > > > > David > > > > > > On Sep 17, 2016, at 6:47 PM, David Thompson > > wrote: > > > > Hi Andrew, > > > > ... > > > > For what it is worth, I also believe that documentation should be with > the > > declaration simply because the header files are the ones people tend to > > first look at not the definition. This is what VTK currently does. ... > > > > > > I think that moving method (not class) documentation out of the headers > > makes the headers much more terse and legible. For the vast majority of > > classes, the method names themselves are enough documentation. In cases > > where method names are not enough, it is nice to have the implementation > > nearby. Methods with inline or macro-generated implementations would > still > > have documentation in the header, as would enums. > > > > David > > > > _______________________________________________ > > 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 VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Search the list archives at: http://markmail.org/search/?q= > vtk-developers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 19 09:51:21 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 19 Sep 2016 15:51:21 +0200 Subject: [vtkusers] Array order in VTK? In-Reply-To: References: Message-ID: 2016-09-19 15:24 GMT+02:00 Cory Quammen : > Elvis, > > VTK image data arrays are stored such that the X dimension increases > fastest, followed by Y, followed by Z. > Concrete example where dimensions of the image are XDIM, YDIM, ZDIM: > > Array index : i,j,k indices > 0 : (0, 0, 0) > 1 : (1, 0, 0) > 2 : (2, 0, 0) > ... > XDIM : (0, 1, 0) > XDIM+1 : (1, 1, 0) > XDIM+2 : (2, 1, 0) > ... > XDIM*YDIM : (0, 0, 1) > XDIM*YDIM + 1 : (1, 0, 1) > > So I guess that is Fortran order? Right, thanks for the clarification Cory. Elvis > > HTH, > Cory > > On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik > wrote: >> Hi all, >> >> This is a simple question: I haven't been able to find any info on >> whether arrays (images, ...) are stored in row major (C) or column >> major (Fortran) order in VTK. >> >> I assumed they are in C order, but then I saw this blog post: >> >> https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/ >> >> In a comment the author says >> >> # Note that we flip the dimensions here because >> # VTK's order is Fortran whereas h5py writes in >> # C order. We don't want to do deep copies so we write >> # with dimensions flipped and pretend the array is >> # C order. >> >> which made me a little unsure. What is the array order of the data >> classes in VTK, and is it the same for all classes? >> >> Thanks, >> Elvis >> _______________________________________________ >> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. From Priyank.Soni at bsci.com Mon Sep 19 09:54:40 2016 From: Priyank.Soni at bsci.com (Soni, Priyank) Date: Mon, 19 Sep 2016 13:54:40 +0000 Subject: [vtkusers] VTK files Message-ID: <972C06374137E6498DB265AA706B235606DF23A6@STPMSDAGPG02N2.bsci.bossci.com> Hi , We are using the VTK feature and needs following formats - a. Unstructured legacy format b. Unstructured XML format c. Polydata legacy format d. Polydata xml format It will be great help you can provide me these different pre-segmented VTK files. Thanks, Priyank From cory.quammen at kitware.com Mon Sep 19 11:01:48 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 19 Sep 2016 11:01:48 -0400 Subject: [vtkusers] Proper way to append to vtkPoints In-Reply-To: <11111770-3c72-c55e-d31c-6397edd2545e@gmail.com> References: <45622812-c5ef-c381-7cda-2226e95cbdc9@gmail.com> <11111770-3c72-c55e-d31c-6397edd2545e@gmail.com> Message-ID: Bud, Please keep messages on the list so that others may contribute to and benefit from the conversation. Your example is okay for VTK 7, but GetVoidPointer() may be going away at some point in the future. David, do you have a more future-proof way to do bulk copying of data into data arrays? Thanks, Cory On Thu, Sep 15, 2016 at 12:34 PM, Bud Bundy wrote: > That works, thank you. I was tempted by the documentation for SetPoint: "No > range checking performed (fast!)." to use that function. > > In order to speed things up further I actually have some points stored in > contiguous memory. I wrote the following and it seems to work to append > tuple data. Can I get a second opinion if this is decent code to append to > vtkPoints using memcpy()? There's a comment under > vtkAbstractArray::GetVoidPointer() that "as newer arrays require a deep-copy > of the array data in order to return a suitable pointer" and I'm not sure > what that means. > > void appendPoints(vtkSmartPointer target, const double * > vec3Data, size_t numInputPoints) > { > //some assertions that target storage type is double, and number of > componnets == 3 and app specific exceptions > //... > // > > //resize > size_t allocatedPoints = (target->GetData()->GetSize()) / 3; > size_t numStoredPoints = (target->GetData()->GetNumberOfTuples()); > size_t requiredAllocatePoints = numStoredPoints + numInputPoints; > if (allocatedPoints < requiredAllocatePoints) > { > target->Resize(requiredAllocatePoints); > } > //copy data > double * targetMemPtr = (double*)target->GetVoidPointer(numStoredPoints > * 3); > memcpy(targetMemPtr, vec3Data, numInputPoints * 3 * sizeof(double)); > > //update point count > target->GetData()->SetNumberOfTuples(requiredAllocatePoints); > > } > > > On 09/14/2016 02:50 PM, Cory Quammen wrote: >> >> For expanding the list of points, use points->InsertPoint(1, 1, 1, 1) >> instead of points->SetPoint(1, 1, 1, 1). >> >> HTH, >> Cory >> >> On Wed, Sep 14, 2016 at 2:43 PM, Bud Bundy wrote: >>> >>> Hi, >>> >>> What's the proper, efficient way to append point data to vtkPoints? The >>> following does not work (assume 2 batches insert thousands of points not >>> 1 >>> per each batch) >>> >>> vtkSmartPointer points = >>> vtkSmartPointer::New(); >>> points->SetNumberOfPoints(1); //first batch insert >>> points->SetPoint(0, 0, 0, 0); >>> points->Resize(2); //second batch insert >>> points->SetPoint(1, 1, 1, 1); >>> size_t size = points->GetNumberOfPoints(); >>> //size == 1 not 2 >>> >>> I'm using VTK 7.0.0. >>> >>> Thank you. >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From berk.geveci at kitware.com Mon Sep 19 11:28:30 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 19 Sep 2016 11:28:30 -0400 Subject: [vtkusers] Array order in VTK? In-Reply-To: References: Message-ID: One thing that makes things a bit confusing is that, in the case of vectors, the fastest growing is the vector component. So something like this: (0, 0, 0) u, (0, 0, 0) v, (0, 0, 0) w, (1, 0, 0) u, (1, 0, 0) v, (1, 0, 0) w This makes it a hybrid Fortran and C. Which is pain when mapping these to numpy arrays :-) -berk On Mon, Sep 19, 2016 at 9:51 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-19 15:24 GMT+02:00 Cory Quammen : > > Elvis, > > > > VTK image data arrays are stored such that the X dimension increases > > fastest, followed by Y, followed by Z. > > Concrete example where dimensions of the image are XDIM, YDIM, ZDIM: > > > > Array index : i,j,k indices > > 0 : (0, 0, 0) > > 1 : (1, 0, 0) > > 2 : (2, 0, 0) > > ... > > XDIM : (0, 1, 0) > > XDIM+1 : (1, 1, 0) > > XDIM+2 : (2, 1, 0) > > ... > > XDIM*YDIM : (0, 0, 1) > > XDIM*YDIM + 1 : (1, 0, 1) > > > > So I guess that is Fortran order? > > Right, thanks for the clarification Cory. > > Elvis > > > > > HTH, > > Cory > > > > On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik > > wrote: > >> Hi all, > >> > >> This is a simple question: I haven't been able to find any info on > >> whether arrays (images, ...) are stored in row major (C) or column > >> major (Fortran) order in VTK. > >> > >> I assumed they are in C order, but then I saw this blog post: > >> > >> https://blog.kitware.com/developing-hdf5-readers-using- > vtkpythonalgorithm/ > >> > >> In a comment the author says > >> > >> # Note that we flip the dimensions here because > >> # VTK's order is Fortran whereas h5py writes in > >> # C order. We don't want to do deep copies so we write > >> # with dimensions flipped and pretend the array is > >> # C order. > >> > >> which made me a little unsure. What is the array order of the data > >> classes in VTK, and is it the same for all classes? > >> > >> Thanks, > >> Elvis > >> _______________________________________________ > >> 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > -- > > Cory Quammen > > Staff R&D Engineer > > Kitware, Inc. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Sep 19 12:11:35 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 19 Sep 2016 18:11:35 +0200 Subject: [vtkusers] Array order in VTK? In-Reply-To: References: Message-ID: 2016-09-19 17:28 GMT+02:00 Berk Geveci : > One thing that makes things a bit confusing is that, in the case of vectors, > the fastest growing is the vector component. So something like this: > > (0, 0, 0) u, (0, 0, 0) v, (0, 0, 0) w, (1, 0, 0) u, (1, 0, 0) v, (1, 0, 0) w > > This makes it a hybrid Fortran and C. Which is pain when mapping these to > numpy arrays :-) Ah. Thankfully working only with single component data so far, but thanks for the heads up Berk :) Elvis > > -berk > > On Mon, Sep 19, 2016 at 9:51 AM, Elvis Stansvik > wrote: >> >> 2016-09-19 15:24 GMT+02:00 Cory Quammen : >> > Elvis, >> > >> > VTK image data arrays are stored such that the X dimension increases >> > fastest, followed by Y, followed by Z. >> > Concrete example where dimensions of the image are XDIM, YDIM, ZDIM: >> > >> > Array index : i,j,k indices >> > 0 : (0, 0, 0) >> > 1 : (1, 0, 0) >> > 2 : (2, 0, 0) >> > ... >> > XDIM : (0, 1, 0) >> > XDIM+1 : (1, 1, 0) >> > XDIM+2 : (2, 1, 0) >> > ... >> > XDIM*YDIM : (0, 0, 1) >> > XDIM*YDIM + 1 : (1, 0, 1) >> > >> > So I guess that is Fortran order? >> >> Right, thanks for the clarification Cory. >> >> Elvis >> >> > >> > HTH, >> > Cory >> > >> > On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik >> > wrote: >> >> Hi all, >> >> >> >> This is a simple question: I haven't been able to find any info on >> >> whether arrays (images, ...) are stored in row major (C) or column >> >> major (Fortran) order in VTK. >> >> >> >> I assumed they are in C order, but then I saw this blog post: >> >> >> >> >> >> https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/ >> >> >> >> In a comment the author says >> >> >> >> # Note that we flip the dimensions here because >> >> # VTK's order is Fortran whereas h5py writes in >> >> # C order. We don't want to do deep copies so we write >> >> # with dimensions flipped and pretend the array is >> >> # C order. >> >> >> >> which made me a little unsure. What is the array order of the data >> >> classes in VTK, and is it the same for all classes? >> >> >> >> Thanks, >> >> Elvis >> >> _______________________________________________ >> >> 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 VTK FAQ at: >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/vtkusers >> > >> > >> > >> > -- >> > Cory Quammen >> > Staff R&D Engineer >> > Kitware, Inc. >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > From david.gobbi at gmail.com Mon Sep 19 12:19:44 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 19 Sep 2016 10:19:44 -0600 Subject: [vtkusers] Array order in VTK? In-Reply-To: References: Message-ID: For vector components, the terminology I prefer is "packed" vs. "unpacked", where VTK uses the former -- unless one uses the new SOA data arrays ;) On Mon, Sep 19, 2016 at 10:11 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-19 17:28 GMT+02:00 Berk Geveci : > > One thing that makes things a bit confusing is that, in the case of > vectors, > > the fastest growing is the vector component. So something like this: > > > > (0, 0, 0) u, (0, 0, 0) v, (0, 0, 0) w, (1, 0, 0) u, (1, 0, 0) v, (1, 0, > 0) w > > > > This makes it a hybrid Fortran and C. Which is pain when mapping these to > > numpy arrays :-) > > Ah. Thankfully working only with single component data so far, but > thanks for the heads up Berk :) > > Elvis > > > > > -berk > > > > On Mon, Sep 19, 2016 at 9:51 AM, Elvis Stansvik > > wrote: > >> > >> 2016-09-19 15:24 GMT+02:00 Cory Quammen : > >> > Elvis, > >> > > >> > VTK image data arrays are stored such that the X dimension increases > >> > fastest, followed by Y, followed by Z. > >> > Concrete example where dimensions of the image are XDIM, YDIM, ZDIM: > >> > > >> > Array index : i,j,k indices > >> > 0 : (0, 0, 0) > >> > 1 : (1, 0, 0) > >> > 2 : (2, 0, 0) > >> > ... > >> > XDIM : (0, 1, 0) > >> > XDIM+1 : (1, 1, 0) > >> > XDIM+2 : (2, 1, 0) > >> > ... > >> > XDIM*YDIM : (0, 0, 1) > >> > XDIM*YDIM + 1 : (1, 0, 1) > >> > > >> > So I guess that is Fortran order? > >> > >> Right, thanks for the clarification Cory. > >> > >> Elvis > >> > >> > > >> > HTH, > >> > Cory > >> > > >> > On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik > >> > wrote: > >> >> Hi all, > >> >> > >> >> This is a simple question: I haven't been able to find any info on > >> >> whether arrays (images, ...) are stored in row major (C) or column > >> >> major (Fortran) order in VTK. > >> >> > >> >> I assumed they are in C order, but then I saw this blog post: > >> >> > >> >> > >> >> https://blog.kitware.com/developing-hdf5-readers-using- > vtkpythonalgorithm/ > >> >> > >> >> In a comment the author says > >> >> > >> >> # Note that we flip the dimensions here because > >> >> # VTK's order is Fortran whereas h5py writes in > >> >> # C order. We don't want to do deep copies so we write > >> >> # with dimensions flipped and pretend the array is > >> >> # C order. > >> >> > >> >> which made me a little unsure. What is the array order of the data > >> >> classes in VTK, and is it the same for all classes? > >> >> > >> >> Thanks, > >> >> Elvis > >> >> _______________________________________________ > >> >> 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 VTK FAQ at: > >> >> http://www.vtk.org/Wiki/VTK_FAQ > >> >> > >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> >> > >> >> Follow this link to subscribe/unsubscribe: > >> >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > >> > > >> > > >> > -- > >> > Cory Quammen > >> > Staff R&D Engineer > >> > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 2448.rok at gmail.com Mon Sep 19 14:10:42 2016 From: 2448.rok at gmail.com (oblakr) Date: Mon, 19 Sep 2016 11:10:42 -0700 (MST) Subject: [vtkusers] Constructing a surface from a boundary curve Message-ID: <1474308642161-5740429.post@n5.nabble.com> Hi, VTK newcomer here. I have a very straightforward problem and was wondering whether someone can give me an example on how to solve it or perhaps tell me of a builtin VTK function that might help. I have a set of connected lines in 3D which form a closed loop/boundary curve. I would like to construct a surface from this loop. Sorf of like Delaunay3D, except the curve might be concave, whereas Delaunay3D (as far as I know) only generates convex surfaces. (I have to create caps for a set of cut tubes where the tubes might be irregularly cut at their ends.) What approach could I use to generate such surfaces? Thanks and best regards, Rok -- View this message in context: http://vtk.1045678.n5.nabble.com/Constructing-a-surface-from-a-boundary-curve-tp5740429.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.lonie at kitware.com Mon Sep 19 14:16:35 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 19 Sep 2016 14:16:35 -0400 Subject: [vtkusers] Proper way to append to vtkPoints In-Reply-To: References: <45622812-c5ef-c381-7cda-2226e95cbdc9@gmail.com> <11111770-3c72-c55e-d31c-6397edd2545e@gmail.com> Message-ID: On Mon, Sep 19, 2016 at 11:01 AM, Cory Quammen wrote: > David, do you have a more future-proof way to do bulk copying of data > into data arrays? > Unless you need to worry about mixing the new struct-of-arrays layout arrays (vtkSOADataArrayTemplate) with the default array-of-structs arrays (which is unlikely unless you've explicitly used them elsewhere in your code), you can just use SetArray: double *pointBuffer = ...; vtkDoubleArray *array = vtkDoubleArray::FastDownCast(points->GetData()); assert(array); array->SetArray(pointBuffer, size, true); Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Sep 19 14:17:14 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 19 Sep 2016 14:17:14 -0400 Subject: [vtkusers] Constructing a surface from a boundary curve In-Reply-To: <1474308642161-5740429.post@n5.nabble.com> References: <1474308642161-5740429.post@n5.nabble.com> Message-ID: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface On Mon, Sep 19, 2016 at 2:10 PM, oblakr <2448.rok at gmail.com> wrote: > Hi, > VTK newcomer here. > > I have a very straightforward problem and was wondering whether someone can > give me an example on how to solve it or perhaps tell me of a builtin VTK > function that might help. > > I have a set of connected lines in 3D which form a closed loop/boundary > curve. I would like to construct a surface from this loop. Sorf of like > Delaunay3D, except the curve might be concave, whereas Delaunay3D (as far as > I know) only generates convex surfaces. > > (I have to create caps for a set of cut tubes where the tubes might be > irregularly cut at their ends.) > > What approach could I use to generate such surfaces? > > Thanks and best regards, > Rok > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Constructing-a-surface-from-a-boundary-curve-tp5740429.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From david.lonie at kitware.com Mon Sep 19 14:27:46 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 19 Sep 2016 14:27:46 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Message-ID: One more vote for /** ... */ with leading * on lines in-between, and keeping the docs in the headers. Jumping to a header is much faster and easier than opening a doxygen page with modern IDEs. Plus, I doubt anyone would want to volunteer for the task of moving all the docstrings, and it doesn't sound easy to script/automate. On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa wrote: > I also prefer this doxygen style: > > /** > * Document code > * @param > */ > > as it creates a nice header for a function that contains the documentation. > > I think documentation should stay in the header as it is part of the > interface of the module. > > > > > On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell < > marcus.hanwell at kitware.com> wrote: > >> The Doxygen isn't always there, when I am hunting issues I often end >> up in the header for the class thanks to my IDE, and having the >> Doxygen there is often helpful whether the Doxygen is somewhere on the >> machine or not. I really dislike projects that put it in the >> implementation, and disagree on the method names being enough. I hope >> we leave it in the headers, and for the purposes of the migration to >> real Doxygen I am not sure the tools have the necessary logic to move >> documentation - just transform the style. >> >> I prefer the >> >> /** >> * Document code >> * @param >> */ >> >> Style personally, but /// also works, never really liked the //! but I >> am sure I could adapt were that chosen. >> >> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers >> wrote: >> > Another argument for keeping all documentation in the header files is so >> > it's available in an install-tree-only situation. Some people use VTK >> > without the source tree around, and having the docs built into the >> header >> > files is quite nice in that scenario. If it were in the cxx files, it >> > wouldn't be available to such users. >> > >> > >> > David >> > >> > >> > On Sep 17, 2016, at 6:47 PM, David Thompson > > >> > wrote: >> > >> > Hi Andrew, >> > >> > ... >> > >> > For what it is worth, I also believe that documentation should be with >> the >> > declaration simply because the header files are the ones people tend to >> > first look at not the definition. This is what VTK currently does. ... >> > >> > >> > I think that moving method (not class) documentation out of the headers >> > makes the headers much more terse and legible. For the vast majority of >> > classes, the method names themselves are enough documentation. In cases >> > where method names are not enough, it is nice to have the implementation >> > nearby. Methods with inline or macro-generated implementations would >> still >> > have documentation in the header, as would enums. >> > >> > David >> > >> > _______________________________________________ >> > 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 VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Search the list archives at: http://markmail.org/search/?q= >> vtk-developers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtk-developers >> > >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Mon Sep 19 14:31:29 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 19 Sep 2016 14:31:29 -0400 Subject: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? In-Reply-To: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> References: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> Message-ID: On Sat, Sep 17, 2016 at 11:26 AM, Liu_tj wrote: > Hi, > > I use vtkCaptionWidget to display text annotation on 3D model. My issue is > the font size of the text. Below is my C# code: > > vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); > rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); > rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(100); > rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4); > rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile( > "simsunb.ttf"); > rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); > Try setting it on rep.GetCaptionActor2D().GetTextProperty() instead of rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Mon Sep 19 15:27:44 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Mon, 19 Sep 2016 15:27:44 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> Message-ID: <57E03C30.5010803@bluequartz.net> +1 for > > /** > * Document code > * @param > */ and leave them in the header file -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net David Lonie wrote: > One more vote for /** ... */ with leading * on lines in-between, and > keeping the docs in the headers. Jumping to a header is much faster and > easier than opening a doxygen page with modern IDEs. Plus, I doubt > anyone would want to volunteer for the task of moving all the > docstrings, and it doesn't sound easy to script/automate. > > On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa > wrote: > > I also prefer this doxygen style: > > /** > * Document code > * @param > */ > > as it creates a nice header for a function that contains the > documentation. > > I think documentation should stay in the header as it is part of the > interface of the module. > > > > > On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell > > wrote: > > The Doxygen isn't always there, when I am hunting issues I often end > up in the header for the class thanks to my IDE, and having the > Doxygen there is often helpful whether the Doxygen is somewhere > on the > machine or not. I really dislike projects that put it in the > implementation, and disagree on the method names being enough. I > hope > we leave it in the headers, and for the purposes of the migration to > real Doxygen I am not sure the tools have the necessary logic to > move > documentation - just transform the style. > > I prefer the > > /** > * Document code > * @param > */ > > Style personally, but /// also works, never really liked the //! > but I > am sure I could adapt were that chosen. > > On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers > > wrote: > > Another argument for keeping all documentation in the header > files is so > > it's available in an install-tree-only situation. Some people > use VTK > > without the source tree around, and having the docs built > into the header > > files is quite nice in that scenario. If it were in the cxx > files, it > > wouldn't be available to such users. > > > > > > David > > > > > > On Sep 17, 2016, at 6:47 PM, David Thompson > > > > wrote: > > > > Hi Andrew, > > > > ... > > > > For what it is worth, I also believe that documentation > should be with the > > declaration simply because the header files are the ones > people tend to > > first look at not the definition. This is what VTK currently > does. ... > > > > > > I think that moving method (not class) documentation out of > the headers > > makes the headers much more terse and legible. For the vast > majority of > > classes, the method names themselves are enough > documentation. In cases > > where method names are not enough, it is nice to have the > implementation > > nearby. Methods with inline or macro-generated > implementations would still > > have documentation in the header, as would enums. > > > > David > > > > _______________________________________________ > > 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 VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: > http://markmail.org/search/?q=vtkusers > > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > > Search the list archives at: > http://markmail.org/search/?q=vtk-developers > > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Search the list archives at: > http://markmail.org/search/?q=vtk-developers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From magnus_elden at hotmail.com Mon Sep 19 16:43:54 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Mon, 19 Sep 2016 20:43:54 +0000 Subject: [vtkusers] How do I save all slices of a volume from vtkCutter to another canvas? In-Reply-To: References: Message-ID: I tried following the advice I was provided, but using reslice and using the cutter to get a single cut end up with nothing for the reslice and a blank plane for the cutter. If I render the volume by itself it works fine, but I only need a single slice of that volume with the transfer functions. I have been able to save an image to another canvas, so all I need is a xPixels*yPixels image rendered so that I can copy it into its slot on the big canvas. Below you have the minimum code that ever rendered anything for me. I followed the examples as best I could, but I was unable to make sense of this. vtkSmartPointer imageData = vtkSmartPointer::New(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(path.c_str()); reader->Update(); reader->GetOutput()->Register(reader); imageData->ShallowCopy(reader->GetOutput()); double bounds[6]; reader->GetOutput()->GetBounds(bounds);//Get the bounds of the volume. X0x1, y0y1, z0z1 vtkSmartPointer plane = vtkSmartPointer::New();//This plane is used to define the cutting plane. plane->SetOrigin(0, 0, 0); plane->SetNormal(0, 1, 0); // Create model actor vtkSmartPointer lut = vtkSmartPointer::New();//This seems to be required to render anything at all. lut->SetRange(0.3, 1); // image intensity range lut->SetValueRange(0.3, 1.0); // from black to white lut->SetSaturationRange(0.3, 1.0); // no color saturation lut->SetTableRange(0.2, 1.0); lut->SetRampToLinear(); lut->SetBelowRangeColor(1, 1, 1, 1); lut->Build(); vtkSmartPointer cutter = vtkSmartPointer::New();//The object doing the cutting for us. cutter->SetInputConnection(reader->GetOutputPort()); cutter->SetCutFunction(plane); cutter->GenerateValues(1, 0.1, 0.1); vtkSmartPointer reslice = vtkSmartPointer::New();//No idea what this is supposed to do. reslice->SetOutputExtent(0, 600, 0, 600, 0, 0); reslice->SetInputData(reader->GetOutput()); reslice->Update(); vtkSmartPointer cutterMapper = vtkSmartPointer::New(); cutterMapper->SetInputConnection(cutter->GetOutputPort());//Change betweent he cutter and reslice here cutterMapper->SetLookupTable(lut); cutterMapper->UseLookupTableScalarRangeOn(); // Create cut actor vtkSmartPointer sliceActor = vtkSmartPointer::New(); sliceActor->SetMapper(cutterMapper); Thank you for your time. Yours, Magnus Elden From: Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] Sent: Monday, 12 September, 2016 15:36 To: Magnus Elden Cc: vtkusers at vtk.org Subject: Re: [vtkusers] How do I save all slices of a volume from vtkCutter to another canvas? Hi Magnus, First of all, if the goal is to just slice the volume consider using vtkImageReslice (http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice) instead of vtkCutter. You can simply set the output image data of the vtkImageReslice to a vtkImageActor and add it to a vtkRenderer as in http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage Hope that helps. Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 On Sat, Sep 10, 2016 at 8:01 PM, Magnus Elden > wrote: I have a volume that the class vtkCutter cuts into n slices. Now I need to save a render of each slice to another larger canvas to generate something similar to this: http://previews.123rf.com/images/bunyos/bunyos1403/bunyos140300039/26777884-MRI-scan-of-the-human-brain-Stock-Photo.jpg I am able to render it by linking the cutter output to a mapper and then into a vtkActor that I add to the renderer, but I have no idea how I can render each slice to a canvas. In the worst case I just want the renders to be all stored to disk. Thank you for your help. Yours, Magnus Elden _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcauley at llu.edu Mon Sep 19 22:05:02 2016 From: gmcauley at llu.edu (Grant McAuley) Date: Mon, 19 Sep 2016 19:05:02 -0700 Subject: [vtkusers] Writing Out Image Data After Modifying Point Arrays In-Reply-To: References: Message-ID: On Mon, Sep 19, 2016 at 5:02 PM, Grant Mc Auley wrote: > > I have a vti file that contains several PointData arrays containing > 3-tuples. Many of the 3-tuples contain all zeros and, after reading in the > file I remove them, essentially like: > > xmlreader = vtk.vtkXMLImageDataReader() > xmlreader.SetFileName(self.__filename) > xmlreader.Update() > image_data = xmlreader.GetOutput() > image_point_data = image_data.GetPointData() > ... > if math.sqrt(x_ ** 2 + y_ ** 2 + z_ ** 2) == 0.0: > > image_point_data.RemoveArray(index) > > Now, I want to write out a new file with the cleaned-up arrays using: > > xml_image_writer = vtk.vtkXMLImageDataWriter() > xml_image_writer.SetFileName(filename) > xml_image_writer.SetDataModeToBinary() > > # self.__image_data.SetDimensions(51905, 1, 1) > xml_image_writer.SetInputData(self.__image_data) > xml_image_writer.Write() > > > However, there are at least two issue I am not sure how to handle: > [program output] > Number of points: 266688 > ERROR: In /build/buildd/vtk6-6.1.0+dfsg/Common/DataModel/vtkDataSet.cxx, > line 414 > vtkImageData (0x1632f50): Point array array_1 with 3 components, only has > 51905 tuples but there are 266688 points > [/program output] > > 1) The number of 3-tuples no longer matches the number of points in the > image data structure, and ... > > 2) Even if I try to remedy this by putting the correct number in > getDimensions() above, it will still not be correct for the other arrays > since in the number of 'zero tuples' removed from each is in general > different > > Finally, I will need to combine the contents of point arrays of the same > name in multiple files by appending the data from each file into one. > Something like: > > > > > > > RangeMin="0.1" RangeMax="100"> > 1 2 3 4 5 6 7 8 9 10 11 12 > > RangeMin="0.1" RangeMax="100"> > 50 100 150 200 > > ... > AND > > > > > > > RangeMin="0.1" RangeMax="100"> > 13 14 15 16 17 18 19 20 21 > > RangeMin="0.1" RangeMax="100"> > 250 300 350 > > ... > ... > > COMBINED INTO: > > > > > > > RangeMin="0.1" RangeMax="100"> > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 > > RangeMin="0.1" RangeMax="100"> > 50 100 150 200 250 300 350 > > ... > > Any guidance/suggestions/info/corrections would be much appreciated. > > -- Grant McAuley, PhD Assistant Professor Radiation Medicine Loma Linda University (909) 558-8082 Ext 88082 gmcauley at llu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisjkalas at gmail.com Tue Sep 20 05:23:26 2016 From: chrisjkalas at gmail.com (user192048) Date: Tue, 20 Sep 2016 02:23:26 -0700 (MST) Subject: [vtkusers] vtkOBJReader incorrect number of points Message-ID: <1474363406637-5740439.post@n5.nabble.com> Hi, I'm having trouble with some basic wavefront obj file manipulation. I can read in and display a textured model correctly seemingly, but when I query the number of points I get a strange number (let me explain). The file has vertices (v), texture coords (vt) and triangle faces (f) specified v/vt v/vt v/vt. There are 17460 vertex points specified in the file, and 34357. When I query the obj reader, it tells me "34537 cells, 0 verts, 0 lines, 34537 polys, 0 strips, 103611 points". The number of points here is exactly 3*34357. I had a quick look in the source for the reader and numPts is only incremented on scanning a line starting with v, so I'm unsure why this is happening. The major issue with this is that ultimately I want to write out an object file that is a modified version of the original, but if the original is wrong it won't work. Any ideas? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkOBJReader-incorrect-number-of-points-tp5740439.html Sent from the VTK - Users mailing list archive at Nabble.com. From rakesh.p at tataelxsi.co.in Tue Sep 20 07:09:02 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Tue, 20 Sep 2016 11:09:02 +0000 Subject: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. In-Reply-To: <000a01d210eb$7d738f50$785aadf0$@gmail.com> References: , <000a01d210eb$7d738f50$785aadf0$@gmail.com> Message-ID: Hi, Was your student using QVTKWidget & old OpenGL backend? Warm Regards Rakesh Patil ________________________________ From: R?bert ?pir Sent: Saturday, September 17, 2016 7:27 PM To: 'Ken Martin'; Rakesh Patil Cc: vtkusers at vtk.org Subject: RE: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. try updating the nvidia driver. One of my students has similar problem with nvidia drivers 350 series, after upgrading to 360 series everything works. Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ken Martin Sent: Saturday, September 17, 2016 3:29 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Ohh sorry, that system is fine in terms of OpenGL1 or OpenGL2 support (both on the intel GPU and the quadro) as long as the drivers are up to date. I suspect your issue may be related to which Qt widget is being used. There are folks on this list that have a lot of experience with Qt graphics issues and probably know the answer. Just not me :-) On Sat, Sep 17, 2016 at 1:45 AM, Rakesh Patil > wrote: Hi, I have currently built VTK with OpenGL1 backend itself. On one of the system it is producing this error. So is there any other way to make sure that it works on that system? Following is the system configuration of that machine: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 The mailing list suggests to use QVTKWidget2 instead of QVTKWidget. Will this help me to solve the issue? Thanks for your quick reply. Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Friday, September 16, 2016 6:21:28 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Any system with any configuration is pretty broad :-) If you want maximum portability at the cost of performance then make sure you build with the OpenGL1 backend. It will not run on every system, but it should work on most systems that are currently in use. On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil > wrote: Hi, How do I make sure that my VTK based application will work on any system with any configuration, without throwing this error message? Upgrading VTK 6.3 to the latest version will solve the issue, or should we try upgrading the NVidia driver card? Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Monday, March 14, 2016 7:30 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. The old OpenGL backend will work with OpenGL version 1.1, while the new OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or later). Windows only comes with OpenGL version 1.4 (a software renderer). It is up to the hardware providers to supply hardware drivers. Pretty much anything released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or miss. Yes it depends on the graphics card. But since Intel started building in OpenGL support into their CPUs you can generally count on all recent (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL support for the new backend. There is a method renderWindow->SupportsOpenGL() that will test if a system meets the minimum requirements for the new backend, I mentioned "one provided to VTK" because sometimes developers create their own opengl context (the context determines what level of OpenGL is provided) and then tell VTK to use it. That will only work if they give VTK a context that includes support for 3.2. Normally VTK creates its own context so it makes sure to create the right one. I do not know much about Qt. Thanks Ken On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: Hi Ken Martin, I believe I understood the core reason as why this message is displayed. I need some more details. 1) In what way OpenGL backend is different from the OpenGL2 backend for VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite conditions needs to be considered to stick myself working with QVTKWidget on various system? 2) What exactly do you mean, when you say "one was provided to VTK that did not include opengl support". I guess all the latest Windows OS do come with OpenGL version greater than 1.1. So I think all the drivers must have OpenGL support right? Correct me if I am wrong. 3) Does this functionality really vary from one graphics card to another? I mean does it depend on the graphics card also? If so, how will I know whether my graphics card supports OpenGL backend or OpenGL2 backend? Thank You Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Saturday, March 12, 2016 1:03 AM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. I believe you gave the specs for your desktop as opposed to the laptop. That message occurs on windows on the old OpenGL backend (and the OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device context for rendering but the device did not support opengl, either because VTK failed to find a suitable device or because on was provided to VTK that did not include opengl support. Thanks Ken On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil > wrote: Hi VTK users, I am facing a strange issue. I am using QVTKWidget in my application and it works very well on my desktop computer. The same code when I try to compile on my laptop it throws me this error message: "Invalid pixel format, no opengl support" I would like to know what are the scenarios in which VTK throws this message. Whether there is any dependency on various versions of Windows OS? I believe it should not be. Below is the system information where I get this error: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 Note: I am not using QVTKWidget2. Kindly give some feedback as early as possible. Thank You Warm Regards Rakesh Patil _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. ________________________________ From: R?bert ?pir Sent: Saturday, September 17, 2016 7:27:54 PM To: 'Ken Martin'; Rakesh Patil Cc: vtkusers at vtk.org Subject: RE: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. try updating the nvidia driver. One of my students has similar problem with nvidia drivers 350 series, after upgrading to 360 series everything works. Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ken Martin Sent: Saturday, September 17, 2016 3:29 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Ohh sorry, that system is fine in terms of OpenGL1 or OpenGL2 support (both on the intel GPU and the quadro) as long as the drivers are up to date. I suspect your issue may be related to which Qt widget is being used. There are folks on this list that have a lot of experience with Qt graphics issues and probably know the answer. Just not me :-) On Sat, Sep 17, 2016 at 1:45 AM, Rakesh Patil > wrote: Hi, I have currently built VTK with OpenGL1 backend itself. On one of the system it is producing this error. So is there any other way to make sure that it works on that system? Following is the system configuration of that machine: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 The mailing list suggests to use QVTKWidget2 instead of QVTKWidget. Will this help me to solve the issue? Thanks for your quick reply. Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Friday, September 16, 2016 6:21:28 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. Any system with any configuration is pretty broad :-) If you want maximum portability at the cost of performance then make sure you build with the OpenGL1 backend. It will not run on every system, but it should work on most systems that are currently in use. On Fri, Sep 16, 2016 at 5:03 AM, Rakesh Patil > wrote: Hi, How do I make sure that my VTK based application will work on any system with any configuration, without throwing this error message? Upgrading VTK 6.3 to the latest version will solve the issue, or should we try upgrading the NVidia driver card? Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Monday, March 14, 2016 7:30 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. The old OpenGL backend will work with OpenGL version 1.1, while the new OpenGL backend requires something closer to OpenGL version 2.1 to 3.2 (or later). Windows only comes with OpenGL version 1.4 (a software renderer). It is up to the hardware providers to supply hardware drivers. Pretty much anything released by Nvidia/AMD/Intel in the past 5 years will support OpenGL 3.2 or later. Earlier than that and it becomes a bit more hit or miss. Yes it depends on the graphics card. But since Intel started building in OpenGL support into their CPUs you can generally count on all recent (IvyBridge maybe SandyBridge or later) systems having sufficient OpenGL support for the new backend. There is a method renderWindow->SupportsOpenGL() that will test if a system meets the minimum requirements for the new backend, I mentioned "one provided to VTK" because sometimes developers create their own opengl context (the context determines what level of OpenGL is provided) and then tell VTK to use it. That will only work if they give VTK a context that includes support for 3.2. Normally VTK creates its own context so it makes sure to create the right one. I do not know much about Qt. Thanks Ken On Mon, Mar 14, 2016 at 4:16 AM, Rakesh Patil > wrote: Hi Ken Martin, I believe I understood the core reason as why this message is displayed. I need some more details. 1) In what way OpenGL backend is different from the OpenGL2 backend for VTK 6.3. Knowing that QVTKWidget will be deprecated, what pre-requisite conditions needs to be considered to stick myself working with QVTKWidget on various system? 2) What exactly do you mean, when you say "one was provided to VTK that did not include opengl support". I guess all the latest Windows OS do come with OpenGL version greater than 1.1. So I think all the drivers must have OpenGL support right? Correct me if I am wrong. 3) Does this functionality really vary from one graphics card to another? I mean does it depend on the graphics card also? If so, how will I know whether my graphics card supports OpenGL backend or OpenGL2 backend? Thank You Warm Regards Rakesh Patil ________________________________ From: Ken Martin > Sent: Saturday, March 12, 2016 1:03 AM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Need information about "Invalid pixel format, no opengl support" message. I believe you gave the specs for your desktop as opposed to the laptop. That message occurs on windows on the old OpenGL backend (and the OpenGL2 backend for VTK 6.3) It indicates that VTK tried to setup a device context for rendering but the device did not support opengl, either because VTK failed to find a suitable device or because on was provided to VTK that did not include opengl support. Thanks Ken On Wed, Mar 9, 2016 at 7:22 AM, Rakesh Patil > wrote: Hi VTK users, I am facing a strange issue. I am using QVTKWidget in my application and it works very well on my desktop computer. The same code when I try to compile on my laptop it throws me this error message: "Invalid pixel format, no opengl support" I would like to know what are the scenarios in which VTK throws this message. Whether there is any dependency on various versions of Windows OS? I believe it should not be. Below is the system information where I get this error: OS Name: Microsoft Windows 8.1 Pro Version: 6.3.9600 Build 9600 OS Manufacturer: Microsoft Corporation System Manufacturer: Dell Inc. System Model: Precision T1700 System Type: x64-based PC Processor Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3592 Mhz, 4 Core(s), 8 Logical Processor(s) Installed Physical Memory (RAM): 32.0 GB Total Virtual Memory: 36.7 GB Display adapter: NVIDIA Quadro K620 Note: I am not using QVTKWidget2. Kindly give some feedback as early as possible. Thank You Warm Regards Rakesh Patil _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 20 08:45:52 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 20 Sep 2016 08:45:52 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: <57E03C30.5010803@bluequartz.net> References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: I count 9 votes for /** to 5 (including my own) for /// and none for /*! or //!. I'll go with this then: /** something blah blah blah */ I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 and on Thursday. Note David Gobbi has another big style change coming that is going to modernizing our indentation style in implementation files. See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 That will go in very soon too. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < mike.jackson at bluequartz.net> wrote: > +1 for > > > /** > > * Document code > > * @param > > */ > > and leave them in the header file > > -- > Michael A. Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > > > David Lonie wrote: > >> One more vote for /** ... */ with leading * on lines in-between, and >> keeping the docs in the headers. Jumping to a header is much faster and >> easier than opening a doxygen page with modern IDEs. Plus, I doubt >> anyone would want to volunteer for the task of moving all the >> docstrings, and it doesn't sound easy to script/automate. >> >> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa > > wrote: >> >> I also prefer this doxygen style: >> >> /** >> * Document code >> * @param >> */ >> >> as it creates a nice header for a function that contains the >> documentation. >> >> I think documentation should stay in the header as it is part of the >> interface of the module. >> >> >> >> >> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >> > >> wrote: >> >> The Doxygen isn't always there, when I am hunting issues I often >> end >> up in the header for the class thanks to my IDE, and having the >> Doxygen there is often helpful whether the Doxygen is somewhere >> on the >> machine or not. I really dislike projects that put it in the >> implementation, and disagree on the method names being enough. I >> hope >> we leave it in the headers, and for the purposes of the migration >> to >> real Doxygen I am not sure the tools have the necessary logic to >> move >> documentation - just transform the style. >> >> I prefer the >> >> /** >> * Document code >> * @param >> */ >> >> Style personally, but /// also works, never really liked the //! >> but I >> am sure I could adapt were that chosen. >> >> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers >> > wrote: >> > Another argument for keeping all documentation in the header >> files is so >> > it's available in an install-tree-only situation. Some people >> use VTK >> > without the source tree around, and having the docs built >> into the header >> > files is quite nice in that scenario. If it were in the cxx >> files, it >> > wouldn't be available to such users. >> > >> > >> > David >> > >> > >> > On Sep 17, 2016, at 6:47 PM, David Thompson >> > >> > wrote: >> > >> > Hi Andrew, >> > >> > ... >> > >> > For what it is worth, I also believe that documentation >> should be with the >> > declaration simply because the header files are the ones >> people tend to >> > first look at not the definition. This is what VTK currently >> does. ... >> > >> > >> > I think that moving method (not class) documentation out of >> the headers >> > makes the headers much more terse and legible. For the vast >> majority of >> > classes, the method names themselves are enough >> documentation. In cases >> > where method names are not enough, it is nice to have the >> implementation >> > nearby. Methods with inline or macro-generated >> implementations would still >> > have documentation in the header, as would enums. >> > >> > David >> > >> > _______________________________________________ >> > 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 VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ > AQ> >> > >> > Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> >> > >> > Search the list archives at: >> http://markmail.org/search/?q=vtk-developers >> >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtk-developers >> >> > >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Search the list archives at: >> http://markmail.org/search/?q=vtk-developers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Sep 20 10:15:09 2016 From: tjlp at netease.com (Liu_tj) Date: Tue, 20 Sep 2016 22:15:09 +0800 (CST) Subject: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? In-Reply-To: References: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> Message-ID: <7b3ce825.1.15747f34cb5.Coremail.tjlp@netease.com> Hi, David, There is no member method GetTextProperty() for vtkCaptionActor2D. No matter how much the font size is, the display is the same. And I found a similar post http://public.kitware.com/pipermail/vtkusers/2004-June/024902.html which is not answered. ?2016-09-20?"David Lonie" ??? -----????----- ???:"David Lonie" ????:2016?09?20? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? On Sat, Sep 17, 2016 at 11:26 AM, Liu_tj wrote: Hi, I use vtkCaptionWidget to display text annotation on 3D model. My issue is the font size of the text. Below is my C# code: vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(100); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile("simsunb.ttf"); rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); Try setting it on rep.GetCaptionActor2D().GetTextProperty() instead of rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Sep 20 10:23:24 2016 From: david.lonie at kitware.com (David Lonie) Date: Tue, 20 Sep 2016 10:23:24 -0400 Subject: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? In-Reply-To: <7b3ce825.1.15747f34cb5.Coremail.tjlp@netease.com> References: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> <7b3ce825.1.15747f34cb5.Coremail.tjlp@netease.com> Message-ID: My mistake -- the method is vtkCaptionActor2D::GetCaptionTextProperty. It also looks like the caption text actor is initialized to TEXT_SCALE_TO_PROP (see vtkTextActor's TextScaleMode documentation). This will always resize the text to fit inside a specified bounding box, instead of using the font size. Try: captionActor->GetTextActor()->SetTextScaleModeToNone(); captionActor->GetCaptionTextProperty()->SetFontSize(fontSize); HTH, Dave On Tue, Sep 20, 2016 at 10:15 AM, Liu_tj wrote: > Hi, David, > > There is no member method GetTextProperty() for vtkCaptionActor2D. No > matter how much the font size is, the display is the same. And I found a > similar post http://public.kitware.com/pipermail/vtkusers/2004-June/ > 024902.html which is not answered. > > ?2016-09-20?"David Lonie" ??? > > -----????----- > *???:*"David Lonie" > *????:*2016?09?20? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take > effect? > > On Sat, Sep 17, 2016 at 11:26 AM, Liu_tj wrote: > >> Hi, >> >> I use vtkCaptionWidget to display text annotation on 3D model. My issue >> is the font size of the text. Below is my C# code: >> >> vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); >> rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); >> rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). >> SetFontSize(100); >> rep.GetCaptionActor2D().GetTextActor().GetTextProperty().Set >> FontFamily(4); >> rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). >> SetFontFile("simsunb.ttf"); >> rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); >> > > Try setting it on rep.GetCaptionActor2D().GetTextProperty() instead of > rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). > > Dave > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From midi1990 at hotmail.fr Tue Sep 20 10:38:10 2016 From: midi1990 at hotmail.fr (mehdi) Date: Tue, 20 Sep 2016 07:38:10 -0700 (MST) Subject: [vtkusers] extract actos Message-ID: <1474382290196-5740451.post@n5.nabble.com> Hello, I made a small application in which I load a 3D assembly in a STL format. Then, I'm able to extract the parts in the assembly as each part becomes a different actor. However, if I translate the 3D assembly (not the camera :-) ) before extraction, it still works but the extracted actors return to the positions that are normally obtained when the assembly is not moved. Here is a code snipet: appendFilter->AddInputData(vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput())); appendFilter->Update(); vtkPolyDataConnectivityFilter *connectivityFilter=vtkPolyDataConnectivityFilter::New(); connectivityFilter->SetInputConnection(appendFilter->GetOutputPort()); connectivityFilter->SetExtractionModeToAllRegions(); connectivityFilter->Update(); nbracteurs=connectivityFilter->GetNumberOfExtractedRegions(); connectivityFilter->SetExtractionModeToSpecifiedRegions(); for (i=0; iUpdate(); connectivityFilter->InitializeSpecifiedRegionList(); connectivityFilter->AddSpecifiedRegion(i); connectivityFilter->Update(); vtkPolyData *output = vtkPolyData::New(); output->DeepCopy(connectivityFilter->GetOutput()); vtkPolyDataMapper *mapper =vtkPolyDataMapper::New(); mapper->SetInputData(output); mapper->Update(); vtkActor *actor2=vtkActor::New(); actor2->SetMapper(mapper); m_renderer->AddActor(actor2); } -- View this message in context: http://vtk.1045678.n5.nabble.com/extract-actos-tp5740451.html Sent from the VTK - Users mailing list archive at Nabble.com. From fissell at pitt.edu Tue Sep 20 09:43:11 2016 From: fissell at pitt.edu (Kate Fissell) Date: Tue, 20 Sep 2016 09:43:11 -0400 Subject: [vtkusers] python wrapping for external function fails on init function Message-ID: <57E13CEF.1040606@pitt.edu> Hi, I am running VTK-7.0.0 on an Ubuntu platform using python 2.7. I have a cmake configuration for python wrapping that worked on VTK-6.2.0 and I am trying to port it to VTK-7. It builds ok, but when I try to import into python I get the error ImportError: dynamic module does not define init function (initlibvtkhdftIOPython) (my function is vtkhdftIO). I believe this is because vtkWrapPythonInit.c no longer has the loop #if defined(__CYGWIN__) || !defined(_WIN32) /* add a "lib" prefix for compatibility with old python scripts */ if (strcmp(prefix, "lib") != 0) { prefix = "lib"; continue; } #endif My lib is named libvtkhdftIOPython.so, libvtkhdftIOPythonD.so, but it contains initvtkhdftIOPython (from running strings on the .so). Under vtk-6.2.0 the so file contained initvtkhdftIOPython initlibvtkhdftIOPython I have tried various things with CMAKE_SHARED_LIBRARY_PREFIX to either get cmake to build the initlibvtkhdftIOPython function, or, to take the lib prefix off the .so, but have not succeeded. Can you tell me how to get the lib prefix correctly coordinated between init function and lib name ? thanks Kate From david.gobbi at gmail.com Tue Sep 20 11:31:11 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 20 Sep 2016 09:31:11 -0600 Subject: [vtkusers] python wrapping for external function fails on init function In-Reply-To: <57E13CEF.1040606@pitt.edu> References: <57E13CEF.1040606@pitt.edu> Message-ID: Hi Kate, The magic CMake incantations for python modules are as follows: set(MODULE_PYTHON_NAME vtkhdftIOPython) add_library(${MODULE_PYTHON_NAME} MODULE ${MODULE_PYTHON_NAME}Init.cxx) set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES PREFIX "") if(WIN32 AND NOT CYGWIN) set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES SUFFIX ".pyd") endif() if(CMAKE_VERSION VERSION_GREATER 2.8.8) set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES NO_SONAME 1) endif() The trick is to set the prefix specifically for vtkhdftIOPython, don't try to set a global prefix with CMAKE_SHARED_LIBRARY_PREFIX. - David On Tue, Sep 20, 2016 at 7:43 AM, Kate Fissell wrote: > Hi, > > I am running VTK-7.0.0 on an Ubuntu platform using python 2.7. > I have a cmake configuration for python wrapping that worked on VTK-6.2.0 > and I > am trying to port it to VTK-7. > > It builds ok, but when I try to import into python I get the error > ImportError: dynamic module does not define init function > (initlibvtkhdftIOPython) > (my function is vtkhdftIO). > > I believe this is because vtkWrapPythonInit.c no longer has the loop > #if defined(__CYGWIN__) || !defined(_WIN32) > /* add a "lib" prefix for compatibility with old python scripts */ > if (strcmp(prefix, "lib") != 0) > { > prefix = "lib"; > continue; > } > #endif > > > My lib is named libvtkhdftIOPython.so, libvtkhdftIOPythonD.so, but it > contains > initvtkhdftIOPython (from running strings on the .so). Under vtk-6.2.0 > the so file contained > initvtkhdftIOPython > initlibvtkhdftIOPython > > I have tried various things with CMAKE_SHARED_LIBRARY_PREFIX to either > get cmake to build the initlibvtkhdftIOPython function, or, to take the > lib prefix off > the .so, but have not succeeded. > > Can you tell me how to get the lib prefix correctly coordinated between > init > function and lib name ? > > thanks > Kate > -------------- next part -------------- An HTML attachment was scrubbed... URL: From technword at gmail.com Tue Sep 20 12:32:41 2016 From: technword at gmail.com (High Techno) Date: Tue, 20 Sep 2016 16:32:41 +0000 Subject: [vtkusers] vtkmarchingcubes error Unable to allocate ....... elements of size 2 bytes Message-ID: Hello, I am using vtkmarchingcubes class to generate one isosurface from volume (3D structured point set). the size of volume is 305 Mega octet, i have 3 gigaoctet of memory free. when i run the program i get an error "*Unable to allocate ....... elements of size 2 bytes*". I am using Qt 4.8.5 and visual studio 2010 thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 20 14:20:44 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 20 Sep 2016 14:20:44 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 Pending test failures I'll merge Wednesday or Thursday evening. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle wrote: > I count 9 votes for /** to 5 (including my own) for /// and none for /*! > or //!. > > I'll go with this then: > /** > something > blah blah blah > */ > > I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 and on > Thursday. > > Note > > David Gobbi has another big style change coming that is going to > modernizing our indentation style in implementation files. > See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 > That will go in very soon too. > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < > mike.jackson at bluequartz.net> wrote: > >> +1 for > >> > /** >> > * Document code >> > * @param >> > */ >> >> and leave them in the header file >> >> -- >> Michael A. Jackson >> BlueQuartz Software, LLC >> [e]: mike.jackson at bluequartz.net >> >> >> David Lonie wrote: >> >>> One more vote for /** ... */ with leading * on lines in-between, and >>> keeping the docs in the headers. Jumping to a header is much faster and >>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>> anyone would want to volunteer for the task of moving all the >>> docstrings, and it doesn't sound easy to script/automate. >>> >>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >> > wrote: >>> >>> I also prefer this doxygen style: >>> >>> /** >>> * Document code >>> * @param >>> */ >>> >>> as it creates a nice header for a function that contains the >>> documentation. >>> >>> I think documentation should stay in the header as it is part of the >>> interface of the module. >>> >>> >>> >>> >>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>> > >>> wrote: >>> >>> The Doxygen isn't always there, when I am hunting issues I often >>> end >>> up in the header for the class thanks to my IDE, and having the >>> Doxygen there is often helpful whether the Doxygen is somewhere >>> on the >>> machine or not. I really dislike projects that put it in the >>> implementation, and disagree on the method names being enough. I >>> hope >>> we leave it in the headers, and for the purposes of the >>> migration to >>> real Doxygen I am not sure the tools have the necessary logic to >>> move >>> documentation - just transform the style. >>> >>> I prefer the >>> >>> /** >>> * Document code >>> * @param >>> */ >>> >>> Style personally, but /// also works, never really liked the //! >>> but I >>> am sure I could adapt were that chosen. >>> >>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers >>> > wrote: >>> > Another argument for keeping all documentation in the header >>> files is so >>> > it's available in an install-tree-only situation. Some people >>> use VTK >>> > without the source tree around, and having the docs built >>> into the header >>> > files is quite nice in that scenario. If it were in the cxx >>> files, it >>> > wouldn't be available to such users. >>> > >>> > >>> > David >>> > >>> > >>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>> > >>> > wrote: >>> > >>> > Hi Andrew, >>> > >>> > ... >>> > >>> > For what it is worth, I also believe that documentation >>> should be with the >>> > declaration simply because the header files are the ones >>> people tend to >>> > first look at not the definition. This is what VTK currently >>> does. ... >>> > >>> > >>> > I think that moving method (not class) documentation out of >>> the headers >>> > makes the headers much more terse and legible. For the vast >>> majority of >>> > classes, the method names themselves are enough >>> documentation. In cases >>> > where method names are not enough, it is nice to have the >>> implementation >>> > nearby. Methods with inline or macro-generated >>> implementations would still >>> > have documentation in the header, as would enums. >>> > >>> > David >>> > >>> > _______________________________________________ >>> > 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 VTK FAQ at: >>> > http://www.vtk.org/Wiki/VTK_FAQ < >>> http://www.vtk.org/Wiki/VTK_FAQ> >>> > >>> > Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> > >>> > >>> > _______________________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> >>> > >>> > Search the list archives at: >>> http://markmail.org/search/?q=vtk-developers >>> >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> > >>> > >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtk-developers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Tue Sep 20 15:10:17 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 20 Sep 2016 15:10:17 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: That seems to generate a lot of unnecessary group ( //@{ ) markings. Isn't there a way of avoiding that? Also, I thought that this was going to be merged together with the indentation changes to avoid multiple conflicts? On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle wrote: > https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 > > Pending test failures I'll merge Wednesday or Thursday evening. > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle > wrote: > >> I count 9 votes for /** to 5 (including my own) for /// and none for /*! >> or //!. >> >> I'll go with this then: >> /** >> something >> blah blah blah >> */ >> >> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 and >> on Thursday. >> >> Note >> >> David Gobbi has another big style change coming that is going to >> modernizing our indentation style in implementation files. >> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >> That will go in very soon too. >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >> mike.jackson at bluequartz.net> wrote: >> >>> +1 for > >>> > /** >>> > * Document code >>> > * @param >>> > */ >>> >>> and leave them in the header file >>> >>> -- >>> Michael A. Jackson >>> BlueQuartz Software, LLC >>> [e]: mike.jackson at bluequartz.net >>> >>> >>> David Lonie wrote: >>> >>>> One more vote for /** ... */ with leading * on lines in-between, and >>>> keeping the docs in the headers. Jumping to a header is much faster and >>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>> anyone would want to volunteer for the task of moving all the >>>> docstrings, and it doesn't sound easy to script/automate. >>>> >>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>> > wrote: >>>> >>>> I also prefer this doxygen style: >>>> >>>> /** >>>> * Document code >>>> * @param >>>> */ >>>> >>>> as it creates a nice header for a function that contains the >>>> documentation. >>>> >>>> I think documentation should stay in the header as it is part of the >>>> interface of the module. >>>> >>>> >>>> >>>> >>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>> > >>>> wrote: >>>> >>>> The Doxygen isn't always there, when I am hunting issues I >>>> often end >>>> up in the header for the class thanks to my IDE, and having the >>>> Doxygen there is often helpful whether the Doxygen is somewhere >>>> on the >>>> machine or not. I really dislike projects that put it in the >>>> implementation, and disagree on the method names being enough. I >>>> hope >>>> we leave it in the headers, and for the purposes of the >>>> migration to >>>> real Doxygen I am not sure the tools have the necessary logic to >>>> move >>>> documentation - just transform the style. >>>> >>>> I prefer the >>>> >>>> /** >>>> * Document code >>>> * @param >>>> */ >>>> >>>> Style personally, but /// also works, never really liked the //! >>>> but I >>>> am sure I could adapt were that chosen. >>>> >>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers >>>> > wrote: >>>> > Another argument for keeping all documentation in the header >>>> files is so >>>> > it's available in an install-tree-only situation. Some people >>>> use VTK >>>> > without the source tree around, and having the docs built >>>> into the header >>>> > files is quite nice in that scenario. If it were in the cxx >>>> files, it >>>> > wouldn't be available to such users. >>>> > >>>> > >>>> > David >>>> > >>>> > >>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>> >>> >> >>>> > wrote: >>>> > >>>> > Hi Andrew, >>>> > >>>> > ... >>>> > >>>> > For what it is worth, I also believe that documentation >>>> should be with the >>>> > declaration simply because the header files are the ones >>>> people tend to >>>> > first look at not the definition. This is what VTK currently >>>> does. ... >>>> > >>>> > >>>> > I think that moving method (not class) documentation out of >>>> the headers >>>> > makes the headers much more terse and legible. For the vast >>>> majority of >>>> > classes, the method names themselves are enough >>>> documentation. In cases >>>> > where method names are not enough, it is nice to have the >>>> implementation >>>> > nearby. Methods with inline or macro-generated >>>> implementations would still >>>> > have documentation in the header, as would enums. >>>> > >>>> > David >>>> > >>>> > _______________________________________________ >>>> > 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 VTK FAQ at: >>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>> > >>>> > Search the list archives at: >>>> http://markmail.org/search/?q=vtkusers >>>> >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> > >>>> > >>>> > _______________________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> >>>> > >>>> > Search the list archives at: >>>> http://markmail.org/search/?q=vtk-developers >>>> >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/vtk-developers >>>> >>>> > >>>> > >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtk-developers >>>> >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fissell at pitt.edu Tue Sep 20 13:41:30 2016 From: fissell at pitt.edu (Kate Fissell) Date: Tue, 20 Sep 2016 13:41:30 -0400 Subject: [vtkusers] python wrapping for external function fails on init function In-Reply-To: References: <57E13CEF.1040606@pitt.edu> Message-ID: <57E174CA.6000904@pitt.edu> This worked !!! Thank you so much for your swift reply David. On 09/20/2016 11:31 AM, David Gobbi wrote: > Hi Kate, > > The magic CMake incantations for python modules are as follows: > > set(MODULE_PYTHON_NAME vtkhdftIOPython) > add_library(${MODULE_PYTHON_NAME} MODULE ${MODULE_PYTHON_NAME}Init.cxx) > set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES PREFIX "") > if(WIN32 AND NOT CYGWIN) > set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES SUFFIX ".pyd") > endif() > if(CMAKE_VERSION VERSION_GREATER 2.8.8) > set_target_properties(${MODULE_PYTHON_NAME} PROPERTIES NO_SONAME 1) > endif() > > The trick is to set the prefix specifically for vtkhdftIOPython, don't > try to set a global prefix with CMAKE_SHARED_LIBRARY_PREFIX. > > - David > > > On Tue, Sep 20, 2016 at 7:43 AM, Kate Fissell > wrote: > > Hi, > > I am running VTK-7.0.0 on an Ubuntu platform using python 2.7. > I have a cmake configuration for python wrapping that worked on > VTK-6.2.0 and I > am trying to port it to VTK-7. > > It builds ok, but when I try to import into python I get the error > ImportError: dynamic module does not define init function > (initlibvtkhdftIOPython) > (my function is vtkhdftIO). > > I believe this is because vtkWrapPythonInit.c no longer has the loop > #if defined(__CYGWIN__) || !defined(_WIN32) > /* add a "lib" prefix for compatibility with old python scripts */ > if (strcmp(prefix, "lib") != 0) > { > prefix = "lib"; > continue; > } > #endif > > > My lib is named libvtkhdftIOPython.so, libvtkhdftIOPythonD.so, but > it contains > initvtkhdftIOPython (from running strings on the .so). Under > vtk-6.2.0 > the so file contained > initvtkhdftIOPython > initlibvtkhdftIOPython > > I have tried various things with CMAKE_SHARED_LIBRARY_PREFIX to > either > get cmake to build the initlibvtkhdftIOPython function, or, to > take the lib prefix off > the .so, but have not succeeded. > > Can you tell me how to get the lib prefix correctly coordinated > between init > function and lib name ? > > thanks > Kate > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 20 15:27:45 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 20 Sep 2016 15:27:45 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: Had been planing on this one day and then the indents the next, but sure we can merge this into that branch first or the other way around. Then we'll all just have a single merge commit to jump over rather than two. I can take a stab at the groups with a better condition here: 547 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci wrote: > That seems to generate a lot of unnecessary group ( //@{ ) markings. Isn't > there a way of avoiding that? Also, I thought that this was going to be > merged together with the indentation changes to avoid multiple conflicts? > > On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle > wrote: > >> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >> >> Pending test failures I'll merge Wednesday or Thursday evening. >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> I count 9 votes for /** to 5 (including my own) for /// and none for /*! >>> or //!. >>> >>> I'll go with this then: >>> /** >>> something >>> blah blah blah >>> */ >>> >>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 and >>> on Thursday. >>> >>> Note >>> >>> David Gobbi has another big style change coming that is going to >>> modernizing our indentation style in implementation files. >>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>> That will go in very soon too. >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>> mike.jackson at bluequartz.net> wrote: >>> >>>> +1 for > >>>> > /** >>>> > * Document code >>>> > * @param >>>> > */ >>>> >>>> and leave them in the header file >>>> >>>> -- >>>> Michael A. Jackson >>>> BlueQuartz Software, LLC >>>> [e]: mike.jackson at bluequartz.net >>>> >>>> >>>> David Lonie wrote: >>>> >>>>> One more vote for /** ... */ with leading * on lines in-between, and >>>>> keeping the docs in the headers. Jumping to a header is much faster and >>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>> anyone would want to volunteer for the task of moving all the >>>>> docstrings, and it doesn't sound easy to script/automate. >>>>> >>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>> > wrote: >>>>> >>>>> I also prefer this doxygen style: >>>>> >>>>> /** >>>>> * Document code >>>>> * @param >>>>> */ >>>>> >>>>> as it creates a nice header for a function that contains the >>>>> documentation. >>>>> >>>>> I think documentation should stay in the header as it is part of >>>>> the >>>>> interface of the module. >>>>> >>>>> >>>>> >>>>> >>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>> > >>>>> wrote: >>>>> >>>>> The Doxygen isn't always there, when I am hunting issues I >>>>> often end >>>>> up in the header for the class thanks to my IDE, and having the >>>>> Doxygen there is often helpful whether the Doxygen is somewhere >>>>> on the >>>>> machine or not. I really dislike projects that put it in the >>>>> implementation, and disagree on the method names being enough. >>>>> I >>>>> hope >>>>> we leave it in the headers, and for the purposes of the >>>>> migration to >>>>> real Doxygen I am not sure the tools have the necessary logic >>>>> to >>>>> move >>>>> documentation - just transform the style. >>>>> >>>>> I prefer the >>>>> >>>>> /** >>>>> * Document code >>>>> * @param >>>>> */ >>>>> >>>>> Style personally, but /// also works, never really liked the >>>>> //! >>>>> but I >>>>> am sure I could adapt were that chosen. >>>>> >>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via vtk-developers >>>>> > >>>>> wrote: >>>>> > Another argument for keeping all documentation in the header >>>>> files is so >>>>> > it's available in an install-tree-only situation. Some >>>>> people >>>>> use VTK >>>>> > without the source tree around, and having the docs built >>>>> into the header >>>>> > files is quite nice in that scenario. If it were in the cxx >>>>> files, it >>>>> > wouldn't be available to such users. >>>>> > >>>>> > >>>>> > David >>>>> > >>>>> > >>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>> >>>> >> >>>>> > wrote: >>>>> > >>>>> > Hi Andrew, >>>>> > >>>>> > ... >>>>> > >>>>> > For what it is worth, I also believe that documentation >>>>> should be with the >>>>> > declaration simply because the header files are the ones >>>>> people tend to >>>>> > first look at not the definition. This is what VTK currently >>>>> does. ... >>>>> > >>>>> > >>>>> > I think that moving method (not class) documentation out of >>>>> the headers >>>>> > makes the headers much more terse and legible. For the vast >>>>> majority of >>>>> > classes, the method names themselves are enough >>>>> documentation. In cases >>>>> > where method names are not enough, it is nice to have the >>>>> implementation >>>>> > nearby. Methods with inline or macro-generated >>>>> implementations would still >>>>> > have documentation in the header, as would enums. >>>>> > >>>>> > David >>>>> > >>>>> > _______________________________________________ >>>>> > 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 VTK FAQ at: >>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>> > >>>>> > Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > Powered by www.kitware.com >>>>> > >>>>> > Visit other Kitware open-source projects at >>>>> > http://www.kitware.com/opensource/opensource.html >>>>> >>>>> > >>>>> > Search the list archives at: >>>>> http://markmail.org/search/?q=vtk-developers >>>>> >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/vtk-developers >>>>> >>>>> > >>>>> > >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtk-developers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q= >>>>> vtkusers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 20 16:00:09 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 20 Sep 2016 14:00:09 -0600 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: Dave, Probably the easiest thing is if you tell me when you're ready to merge the doxygen change, and then I'll use that as a base for the brace change MR (i.e. I'll re-run my script). Then when the regenerated brace-change MR is merged into VTK, the doxygen change will go with it. We obviously cannot merge the brace-change MR into the doxyen MR or vice versa... there would be thousands of conflicts. These kind of changes have to be serial. - David On Tue, Sep 20, 2016 at 1:27 PM, David E DeMarle wrote: > Had been planing on this one day and then the indents the next, but sure > we can merge this into that branch first or the other way around. > > Then we'll all just have a single merge commit to jump over rather than > two. > > I can take a stab at the groups with a better condition here: 547 > > > > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci > wrote: > >> That seems to generate a lot of unnecessary group ( //@{ ) markings. >> Isn't there a way of avoiding that? Also, I thought that this was going to >> be merged together with the indentation changes to avoid multiple conflicts? >> >> On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>> >>> Pending test failures I'll merge Wednesday or Thursday evening. >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> I count 9 votes for /** to 5 (including my own) for /// and none for >>>> /*! or //!. >>>> >>>> I'll go with this then: >>>> /** >>>> something >>>> blah blah blah >>>> */ >>>> >>>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 and >>>> on Thursday. >>>> >>>> Note >>>> >>>> David Gobbi has another big style change coming that is going to >>>> modernizing our indentation style in implementation files. >>>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>>> That will go in very soon too. >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>>> mike.jackson at bluequartz.net> wrote: >>>> >>>>> +1 for > >>>>> > /** >>>>> > * Document code >>>>> > * @param >>>>> > */ >>>>> >>>>> and leave them in the header file >>>>> >>>>> -- >>>>> Michael A. Jackson >>>>> BlueQuartz Software, LLC >>>>> [e]: mike.jackson at bluequartz.net >>>>> >>>>> >>>>> David Lonie wrote: >>>>> >>>>>> One more vote for /** ... */ with leading * on lines in-between, and >>>>>> keeping the docs in the headers. Jumping to a header is much faster >>>>>> and >>>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>>> anyone would want to volunteer for the task of moving all the >>>>>> docstrings, and it doesn't sound easy to script/automate. >>>>>> >>>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>>> > wrote: >>>>>> >>>>>> I also prefer this doxygen style: >>>>>> >>>>>> /** >>>>>> * Document code >>>>>> * @param >>>>>> */ >>>>>> >>>>>> as it creates a nice header for a function that contains the >>>>>> documentation. >>>>>> >>>>>> I think documentation should stay in the header as it is part of >>>>>> the >>>>>> interface of the module. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>>> > >>>>>> wrote: >>>>>> >>>>>> The Doxygen isn't always there, when I am hunting issues I >>>>>> often end >>>>>> up in the header for the class thanks to my IDE, and having >>>>>> the >>>>>> Doxygen there is often helpful whether the Doxygen is >>>>>> somewhere >>>>>> on the >>>>>> machine or not. I really dislike projects that put it in the >>>>>> implementation, and disagree on the method names being >>>>>> enough. I >>>>>> hope >>>>>> we leave it in the headers, and for the purposes of the >>>>>> migration to >>>>>> real Doxygen I am not sure the tools have the necessary logic >>>>>> to >>>>>> move >>>>>> documentation - just transform the style. >>>>>> >>>>>> I prefer the >>>>>> >>>>>> /** >>>>>> * Document code >>>>>> * @param >>>>>> */ >>>>>> >>>>>> Style personally, but /// also works, never really liked the >>>>>> //! >>>>>> but I >>>>>> am sure I could adapt were that chosen. >>>>>> >>>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via >>>>>> vtk-developers >>>>>> > >>>>>> wrote: >>>>>> > Another argument for keeping all documentation in the >>>>>> header >>>>>> files is so >>>>>> > it's available in an install-tree-only situation. Some >>>>>> people >>>>>> use VTK >>>>>> > without the source tree around, and having the docs built >>>>>> into the header >>>>>> > files is quite nice in that scenario. If it were in the cxx >>>>>> files, it >>>>>> > wouldn't be available to such users. >>>>>> > >>>>>> > >>>>>> > David >>>>>> > >>>>>> > >>>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>>> >>>>> .com>> >>>>>> > wrote: >>>>>> > >>>>>> > Hi Andrew, >>>>>> > >>>>>> > ... >>>>>> > >>>>>> > For what it is worth, I also believe that documentation >>>>>> should be with the >>>>>> > declaration simply because the header files are the ones >>>>>> people tend to >>>>>> > first look at not the definition. This is what VTK >>>>>> currently >>>>>> does. ... >>>>>> > >>>>>> > >>>>>> > I think that moving method (not class) documentation out of >>>>>> the headers >>>>>> > makes the headers much more terse and legible. For the vast >>>>>> majority of >>>>>> > classes, the method names themselves are enough >>>>>> documentation. In cases >>>>>> > where method names are not enough, it is nice to have the >>>>>> implementation >>>>>> > nearby. Methods with inline or macro-generated >>>>>> implementations would still >>>>>> > have documentation in the header, as would enums. >>>>>> > >>>>>> > David >>>>>> > >>>>>> > _______________________________________________ >>>>>> > 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 VTK FAQ at: >>>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>> > >>>>>> > Search the list archives at: >>>>>> http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> > >>>>>> > Follow this link to subscribe/unsubscribe: >>>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> > >>>>>> > >>>>>> > _______________________________________________ >>>>>> > Powered by www.kitware.com >>>>>> > >>>>>> > Visit other Kitware open-source projects at >>>>>> > http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> > >>>>>> > Search the list archives at: >>>>>> http://markmail.org/search/?q=vtk-developers >>>>>> >>>>>> > >>>>>> > Follow this link to subscribe/unsubscribe: >>>>>> > http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>> >>>>>> > >>>>>> > >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtk-developers >>>>>> >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>> vtkusers >>>>>> >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> _______________________________________________ >>>>> 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 VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: http://markmail.org/search/?q= >>> vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 20 16:07:37 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 20 Sep 2016 16:07:37 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: Sounds like a plan. I'll address Berk's and Dan's suggestions then hand off to you. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 20, 2016 at 4:00 PM, David Gobbi wrote: > Dave, > > Probably the easiest thing is if you tell me when you're ready to merge > the doxygen change, and then I'll use that as a base for the brace change > MR (i.e. I'll re-run my script). Then when the regenerated brace-change MR > is merged into VTK, the doxygen change will go with it. > > We obviously cannot merge the brace-change MR into the doxyen MR or vice > versa... there would be thousands of conflicts. These kind of changes have > to be serial. > > - David > > On Tue, Sep 20, 2016 at 1:27 PM, David E DeMarle > wrote: > >> Had been planing on this one day and then the indents the next, but sure >> we can merge this into that branch first or the other way around. >> >> Then we'll all just have a single merge commit to jump over rather than >> two. >> >> I can take a stab at the groups with a better condition here: 547 >> >> >> >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci >> wrote: >> >>> That seems to generate a lot of unnecessary group ( //@{ ) markings. >>> Isn't there a way of avoiding that? Also, I thought that this was going to >>> be merged together with the indentation changes to avoid multiple conflicts? >>> >>> On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>> >>>> Pending test failures I'll merge Wednesday or Thursday evening. >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >>>> dave.demarle at kitware.com> wrote: >>>> >>>>> I count 9 votes for /** to 5 (including my own) for /// and none for >>>>> /*! or //!. >>>>> >>>>> I'll go with this then: >>>>> /** >>>>> something >>>>> blah blah blah >>>>> */ >>>>> >>>>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>> and on Thursday. >>>>> >>>>> Note >>>>> >>>>> David Gobbi has another big style change coming that is going to >>>>> modernizing our indentation style in implementation files. >>>>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>>>> That will go in very soon too. >>>>> >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>>>> mike.jackson at bluequartz.net> wrote: >>>>> >>>>>> +1 for > >>>>>> > /** >>>>>> > * Document code >>>>>> > * @param >>>>>> > */ >>>>>> >>>>>> and leave them in the header file >>>>>> >>>>>> -- >>>>>> Michael A. Jackson >>>>>> BlueQuartz Software, LLC >>>>>> [e]: mike.jackson at bluequartz.net >>>>>> >>>>>> >>>>>> David Lonie wrote: >>>>>> >>>>>>> One more vote for /** ... */ with leading * on lines in-between, and >>>>>>> keeping the docs in the headers. Jumping to a header is much faster >>>>>>> and >>>>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>>>> anyone would want to volunteer for the task of moving all the >>>>>>> docstrings, and it doesn't sound easy to script/automate. >>>>>>> >>>>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>>>> > wrote: >>>>>>> >>>>>>> I also prefer this doxygen style: >>>>>>> >>>>>>> /** >>>>>>> * Document code >>>>>>> * @param >>>>>>> */ >>>>>>> >>>>>>> as it creates a nice header for a function that contains the >>>>>>> documentation. >>>>>>> >>>>>>> I think documentation should stay in the header as it is part of >>>>>>> the >>>>>>> interface of the module. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>>>> > >>>>>>> wrote: >>>>>>> >>>>>>> The Doxygen isn't always there, when I am hunting issues I >>>>>>> often end >>>>>>> up in the header for the class thanks to my IDE, and having >>>>>>> the >>>>>>> Doxygen there is often helpful whether the Doxygen is >>>>>>> somewhere >>>>>>> on the >>>>>>> machine or not. I really dislike projects that put it in the >>>>>>> implementation, and disagree on the method names being >>>>>>> enough. I >>>>>>> hope >>>>>>> we leave it in the headers, and for the purposes of the >>>>>>> migration to >>>>>>> real Doxygen I am not sure the tools have the necessary >>>>>>> logic to >>>>>>> move >>>>>>> documentation - just transform the style. >>>>>>> >>>>>>> I prefer the >>>>>>> >>>>>>> /** >>>>>>> * Document code >>>>>>> * @param >>>>>>> */ >>>>>>> >>>>>>> Style personally, but /// also works, never really liked the >>>>>>> //! >>>>>>> but I >>>>>>> am sure I could adapt were that chosen. >>>>>>> >>>>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via >>>>>>> vtk-developers >>>>>>> > >>>>>>> wrote: >>>>>>> > Another argument for keeping all documentation in the >>>>>>> header >>>>>>> files is so >>>>>>> > it's available in an install-tree-only situation. Some >>>>>>> people >>>>>>> use VTK >>>>>>> > without the source tree around, and having the docs built >>>>>>> into the header >>>>>>> > files is quite nice in that scenario. If it were in the >>>>>>> cxx >>>>>>> files, it >>>>>>> > wouldn't be available to such users. >>>>>>> > >>>>>>> > >>>>>>> > David >>>>>>> > >>>>>>> > >>>>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>>>> >>>>>> .com>> >>>>>>> > wrote: >>>>>>> > >>>>>>> > Hi Andrew, >>>>>>> > >>>>>>> > ... >>>>>>> > >>>>>>> > For what it is worth, I also believe that documentation >>>>>>> should be with the >>>>>>> > declaration simply because the header files are the ones >>>>>>> people tend to >>>>>>> > first look at not the definition. This is what VTK >>>>>>> currently >>>>>>> does. ... >>>>>>> > >>>>>>> > >>>>>>> > I think that moving method (not class) documentation out >>>>>>> of >>>>>>> the headers >>>>>>> > makes the headers much more terse and legible. For the >>>>>>> vast >>>>>>> majority of >>>>>>> > classes, the method names themselves are enough >>>>>>> documentation. In cases >>>>>>> > where method names are not enough, it is nice to have the >>>>>>> implementation >>>>>>> > nearby. Methods with inline or macro-generated >>>>>>> implementations would still >>>>>>> > have documentation in the header, as would enums. >>>>>>> > >>>>>>> > David >>>>>>> > >>>>>>> > _______________________________________________ >>>>>>> > 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 VTK FAQ at: >>>>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>>> > >>>>>>> > Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> > >>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> > >>>>>>> > >>>>>>> > _______________________________________________ >>>>>>> > Powered by www.kitware.com >>>>>>> > >>>>>>> > Visit other Kitware open-source projects at >>>>>>> > http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> > >>>>>>> > Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>> >>>>>>> > >>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>> > http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>> >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>> >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> > >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>> vtkusers >>>>>>> >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> _______________________________________________ >>>>>> 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 VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Search the list archives at: http://markmail.org/search/?q= >>>> vtk-developers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 20 16:33:33 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 20 Sep 2016 14:33:33 -0600 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: Regarding the group markings, be careful when removing them, because removing them will cause doxygen to change the order in which the methods are displayed (I seem to recall that ungrouped methods are either all displayed at the top or all displayed at the bottom or somesuch). I might even recommend that you leave them all in. On Tue, Sep 20, 2016 at 2:07 PM, David E DeMarle wrote: > Sounds like a plan. > > I'll address Berk's and Dan's suggestions then hand off to you. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Sep 20, 2016 at 4:00 PM, David Gobbi > wrote: > >> Dave, >> >> Probably the easiest thing is if you tell me when you're ready to merge >> the doxygen change, and then I'll use that as a base for the brace change >> MR (i.e. I'll re-run my script). Then when the regenerated brace-change MR >> is merged into VTK, the doxygen change will go with it. >> >> We obviously cannot merge the brace-change MR into the doxyen MR or vice >> versa... there would be thousands of conflicts. These kind of changes have >> to be serial. >> >> - David >> >> On Tue, Sep 20, 2016 at 1:27 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> Had been planing on this one day and then the indents the next, but sure >>> we can merge this into that branch first or the other way around. >>> >>> Then we'll all just have a single merge commit to jump over rather than >>> two. >>> >>> I can take a stab at the groups with a better condition here: 547 >>> >>> >>> >>> >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci >>> wrote: >>> >>>> That seems to generate a lot of unnecessary group ( //@{ ) markings. >>>> Isn't there a way of avoiding that? Also, I thought that this was going to >>>> be merged together with the indentation changes to avoid multiple conflicts? >>>> >>>> On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle < >>>> dave.demarle at kitware.com> wrote: >>>> >>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>> >>>>> Pending test failures I'll merge Wednesday or Thursday evening. >>>>> >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >>>>> dave.demarle at kitware.com> wrote: >>>>> >>>>>> I count 9 votes for /** to 5 (including my own) for /// and none for >>>>>> /*! or //!. >>>>>> >>>>>> I'll go with this then: >>>>>> /** >>>>>> something >>>>>> blah blah blah >>>>>> */ >>>>>> >>>>>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>>> and on Thursday. >>>>>> >>>>>> Note >>>>>> >>>>>> David Gobbi has another big style change coming that is going to >>>>>> modernizing our indentation style in implementation files. >>>>>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>>>>> That will go in very soon too. >>>>>> >>>>>> >>>>>> David E DeMarle >>>>>> Kitware, Inc. >>>>>> R&D Engineer >>>>>> 21 Corporate Drive >>>>>> Clifton Park, NY 12065-8662 >>>>>> Phone: 518-881-4909 >>>>>> >>>>>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>>>>> mike.jackson at bluequartz.net> wrote: >>>>>> >>>>>>> +1 for > >>>>>>> > /** >>>>>>> > * Document code >>>>>>> > * @param >>>>>>> > */ >>>>>>> >>>>>>> and leave them in the header file >>>>>>> >>>>>>> -- >>>>>>> Michael A. Jackson >>>>>>> BlueQuartz Software, LLC >>>>>>> [e]: mike.jackson at bluequartz.net >>>>>>> >>>>>>> >>>>>>> David Lonie wrote: >>>>>>> >>>>>>>> One more vote for /** ... */ with leading * on lines in-between, and >>>>>>>> keeping the docs in the headers. Jumping to a header is much faster >>>>>>>> and >>>>>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>>>>> anyone would want to volunteer for the task of moving all the >>>>>>>> docstrings, and it doesn't sound easy to script/automate. >>>>>>>> >>>>>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>>>>> > wrote: >>>>>>>> >>>>>>>> I also prefer this doxygen style: >>>>>>>> >>>>>>>> /** >>>>>>>> * Document code >>>>>>>> * @param >>>>>>>> */ >>>>>>>> >>>>>>>> as it creates a nice header for a function that contains the >>>>>>>> documentation. >>>>>>>> >>>>>>>> I think documentation should stay in the header as it is part >>>>>>>> of the >>>>>>>> interface of the module. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>>>>> > >>>>>>>> wrote: >>>>>>>> >>>>>>>> The Doxygen isn't always there, when I am hunting issues I >>>>>>>> often end >>>>>>>> up in the header for the class thanks to my IDE, and having >>>>>>>> the >>>>>>>> Doxygen there is often helpful whether the Doxygen is >>>>>>>> somewhere >>>>>>>> on the >>>>>>>> machine or not. I really dislike projects that put it in the >>>>>>>> implementation, and disagree on the method names being >>>>>>>> enough. I >>>>>>>> hope >>>>>>>> we leave it in the headers, and for the purposes of the >>>>>>>> migration to >>>>>>>> real Doxygen I am not sure the tools have the necessary >>>>>>>> logic to >>>>>>>> move >>>>>>>> documentation - just transform the style. >>>>>>>> >>>>>>>> I prefer the >>>>>>>> >>>>>>>> /** >>>>>>>> * Document code >>>>>>>> * @param >>>>>>>> */ >>>>>>>> >>>>>>>> Style personally, but /// also works, never really liked >>>>>>>> the //! >>>>>>>> but I >>>>>>>> am sure I could adapt were that chosen. >>>>>>>> >>>>>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via >>>>>>>> vtk-developers >>>>>>>> > >>>>>>>> wrote: >>>>>>>> > Another argument for keeping all documentation in the >>>>>>>> header >>>>>>>> files is so >>>>>>>> > it's available in an install-tree-only situation. Some >>>>>>>> people >>>>>>>> use VTK >>>>>>>> > without the source tree around, and having the docs built >>>>>>>> into the header >>>>>>>> > files is quite nice in that scenario. If it were in the >>>>>>>> cxx >>>>>>>> files, it >>>>>>>> > wouldn't be available to such users. >>>>>>>> > >>>>>>>> > >>>>>>>> > David >>>>>>>> > >>>>>>>> > >>>>>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>>>>> >>>>>>> .com>> >>>>>>>> > wrote: >>>>>>>> > >>>>>>>> > Hi Andrew, >>>>>>>> > >>>>>>>> > ... >>>>>>>> > >>>>>>>> > For what it is worth, I also believe that documentation >>>>>>>> should be with the >>>>>>>> > declaration simply because the header files are the ones >>>>>>>> people tend to >>>>>>>> > first look at not the definition. This is what VTK >>>>>>>> currently >>>>>>>> does. ... >>>>>>>> > >>>>>>>> > >>>>>>>> > I think that moving method (not class) documentation out >>>>>>>> of >>>>>>>> the headers >>>>>>>> > makes the headers much more terse and legible. For the >>>>>>>> vast >>>>>>>> majority of >>>>>>>> > classes, the method names themselves are enough >>>>>>>> documentation. In cases >>>>>>>> > where method names are not enough, it is nice to have the >>>>>>>> implementation >>>>>>>> > nearby. Methods with inline or macro-generated >>>>>>>> implementations would still >>>>>>>> > have documentation in the header, as would enums. >>>>>>>> > >>>>>>>> > David >>>>>>>> > >>>>>>>> > _______________________________________________ >>>>>>>> > 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 VTK FAQ at: >>>>>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>>>> > >>>>>>>> > Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> > >>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> > >>>>>>>> > >>>>>>>> > _______________________________________________ >>>>>>>> > Powered by www.kitware.com >>>>>>>> > >>>>>>>> > Visit other Kitware open-source projects at >>>>>>>> > http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> > >>>>>>>> > Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>> >>>>>>>> > >>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>> > http://public.kitware.com/mail >>>>>>>> man/listinfo/vtk-developers >>>>>>>> >>>>>>>> > >>>>>>>> > >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> >>>>>>>> Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>> >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> AQ> >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>> vtkusers >>>>>>>> >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q= >>>>> vtk-developers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>> >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgosragos at gmail.com Wed Sep 21 06:16:21 2016 From: giorgosragos at gmail.com (Giorgos Ragkousis) Date: Wed, 21 Sep 2016 11:16:21 +0100 Subject: [vtkusers] VTK-7.0.0-Python-PyQt4-vtkImplicitPlaneWidget2-InteractionEvent Message-ID: Hi vtk users, Has any of you experienced problems when trying to register the interaction event into a vtkImplicitPlaneWidget2 observer in an application with PyQt4? I can successfully register the event out of PyQt4 app. However, when I am trying to get vtkImplicitPlaneWidget2 to my PyQt4 application, the AddObserver is not registered. The widget is properly displayed but I cannot access the interaction mode. Thus, when I am moving the object, the widget disappears. In particular, I am trying to clip an unstructured grid and my clip method looks like the following: plane = vtkPlane() plane.SetOrigin(0.0, 0.0, 0.0) clipData = vtkClipDataSet() clipData.SetInputData(actUG) clipData.SetClipFunction(plane) clipData.InsideOutOn() clipData.Update() clipMapper = vtkDataSetMapper() clipMapper.ImmediateModeRenderingOn() clipMapper.SetInputData(clipData.GetOutput()) clipActor = vtkLODActor() clipActor.SetMapper(clipMapper) clipActor.VisibilityOn() clipActor.SetScale(1.01, 1.01, 1.01) # the following is my QWidget which contains the QVTKRenderWindowInteractor self.formWidgetC.iren.SetRenderWindow(self.formWidgetC.vtkWidget.GetRenderWindow()) # backFaces = vtkProperty() # backFaces.SetDiffuseColor(0.8, 0.8, 0.4) # clipActor.SetBackfaceProperty(backFaces) def callback(pw, event): print("triggered") pw.GetRepresentation().GetPlane(plane) clipActor.VisibilityOn() rep = vtkImplicitPlaneRepresentation() rep.SetPlaceFactor(1.25) rep.PlaceWidget(actUG.GetBounds()) rep.SetNormal(plane.GetNormal()) rep.VisibilityOn() rep.GetPlane(plane) planeWidget = vtkImplicitPlaneWidget2() planeWidget.SetInteractor(self.formWidgetC.iren) planeWidget.SetRepresentation(rep) planeWidget.SetEnabled(1) # planeWidget.On() # planeWidget.SetInputData(actUG) # planeWidget.Set # planeWidget.PlaceWidget() planeWidget.AddObserver("InteractionEvent", callback) planeWidget.On() self.formWidgetC.ren.AddActor(clipActor) # self.formWidgetC.iren.Initialize() self.formWidgetC.iren.Render() # self.formWidgetC.iren.Start() # self.formWidgetC.vtkWidget.GetRenderWindow().GetInteractor().Render() Any help would be much appreciated. Giorgos -------------- next part -------------- An HTML attachment was scrubbed... URL: From Federico.Miorelli at CGG.COM Wed Sep 21 05:25:15 2016 From: Federico.Miorelli at CGG.COM (Miorelli, Federico) Date: Wed, 21 Sep 2016 09:25:15 +0000 Subject: [vtkusers] vtkLookupTable does not handle NaN values with Log10 scale Message-ID: <8D478341240222479E0DB361E050CB6A7BEF5E@msy-emb04.int.cggveritas.com> Dear All, It seems like vtkLookupTable does not handle correclty NaN values when the Log10 scale is used. In this case, all the NaNs in the input are not mapped to NanColor but to the minimum range color. Unless there is a reason for this, I believe the bug is in vtkLookupTable::vtkApplyLogScale(). Here is a patch that might fix it (VTK 6.3.0) --- old/vtkLookupTable.cxx Wed Jul 13 15:11:08 2016 +++ new/vtkLookupTable.cxx Wed Sep 21 10:54:24 2016 @@ -358,6 +358,11 @@ inline double vtkApplyLogScale(double v, const double range[2], const double logRange[2]) { + if (vtkMath::IsNan(v)) + { + return v; + } + // is the range set for negative numbers? if (range[0] < 0) { Regards, Federico ______ ______ ______ Federico Miorelli Senior R&D Geophysicist Subsurface Imaging - General Geophysics Italy This email and any accompanying attachments are confidential. If you received this email by mistake, please delete it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Wed Sep 21 09:32:54 2016 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 21 Sep 2016 13:32:54 +0000 Subject: [vtkusers] Vtkplanewidget2 and multiple viewports Message-ID: <46CB11F12B9DC24D860D4082451B318A36C3F386@exchange3.microbrightfield.com> Hey all, I'm having an issue about showing the vtkimplicitplanewidget2. I have two vtkviewports and the plane widget is only showing up in one of them. If I use vtkactors, the actors show up in both viewport. Any ideas? Code: ------------------- m_sectionPlaneRepresentation = vtkImplicitPlaneRepresentation::New(); m_sectionPlaneRepresentation->OutsideBoundsOff(); m_sectionPlaneRepresentation->ScaleEnabledOff(); m_sectionPlaneRepresentation->OutlineTranslationOff(); m_sectionPlaneRepresentation->SetPlaceFactor(1.0); m_sectionPlaneRepresentation->GetPlaneProperty()->SetOpacity(0.1); m_sectionPlaneRepresentation->GetSelectedPlaneProperty()->SetOpacity(0.1); m_sectionPlaneRepresentation->GetNormalProperty()->SetOpacity(0); m_sectionPlaneRepresentation->GetSelectedNormalProperty()->SetOpacity(0); vtkSmartPointer< vtkImplicitPlaneWidget2 > planeWidget = vtkImplicitPlaneWidget2::New(); planeWidget->SetRepresentation(m_sectionPlaneRepresentation); planeWidget->SetInteractor(m_pRenderer->GetRenderWindow()->GetInteractor()); double center[3], bounds[6]; m_atlasExport->GetOutput()->GetCenter(center); m_atlasExport->GetOutput()->GetBounds(bounds); m_sectionPlaneRepresentation->NormalToZAxisOn(); m_sectionPlaneRepresentation->PlaceWidget(bounds); m_sectionPlaneRepresentation->SetOrigin(center); planeWidget->On(); ------------------- Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Wed Sep 21 09:46:48 2016 From: tjlp at netease.com (Liu_tj) Date: Wed, 21 Sep 2016 21:46:48 +0800 (CST) Subject: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? In-Reply-To: References: <5a720b8d.3.15738c1d10d.Coremail.tjlp@netease.com> <7b3ce825.1.15747f34cb5.Coremail.tjlp@netease.com> Message-ID: <707c6edb.a.1574cffb42b.Coremail.tjlp@netease.com> Hi, David, That works. Thanks you very much! ?2016-09-20?"David Lonie" ??? -----????----- ???:"David Lonie" ????:2016?09?20? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? My mistake -- the method is vtkCaptionActor2D::GetCaptionTextProperty. It also looks like the caption text actor is initialized to TEXT_SCALE_TO_PROP (see vtkTextActor's TextScaleMode documentation). This will always resize the text to fit inside a specified bounding box, instead of using the font size. Try: captionActor->GetTextActor()->SetTextScaleModeToNone(); captionActor->GetCaptionTextProperty()->SetFontSize(fontSize); HTH, Dave On Tue, Sep 20, 2016 at 10:15 AM, Liu_tj wrote: Hi, David, There is no member method GetTextProperty() for vtkCaptionActor2D. No matter how much the font size is, the display is the same. And I found a similar post http://public.kitware.com/pipermail/vtkusers/2004-June/024902.html which is not answered. ?2016-09-20?"David Lonie" ??? -----????----- ???:"David Lonie" ????:2016?09?20? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect? On Sat, Sep 17, 2016 at 11:26 AM, Liu_tj wrote: Hi, I use vtkCaptionWidget to display text annotation on 3D model. My issue is the font size of the text. Below is my C# code: vtkCaptionRepresentation rep = vtkCaptionRepresentation.New(); rep.GetCaptionActor2D().ThreeDimensionalLeaderOff(); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(100); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4); rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile("simsunb.ttf"); rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0); Try setting it on rep.GetCaptionActor2D().GetTextProperty() instead of rep.GetCaptionActor2D().GetTextActor().GetTextProperty(). Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Sep 21 10:29:23 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 21 Sep 2016 10:29:23 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: @Berk and @David I made a small change to the script that improves things substantially. I can think of cases where it still puts single items inside a group, but we can take those out manually after the fact. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 20, 2016 at 4:33 PM, David Gobbi wrote: > Regarding the group markings, be careful when removing them, because > removing them will cause doxygen to change the order in which the methods > are displayed (I seem to recall that ungrouped methods are either all > displayed at the top or all displayed at the bottom or somesuch). I might > even recommend that you leave them all in. > > On Tue, Sep 20, 2016 at 2:07 PM, David E DeMarle > wrote: > >> Sounds like a plan. >> >> I'll address Berk's and Dan's suggestions then hand off to you. >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Tue, Sep 20, 2016 at 4:00 PM, David Gobbi >> wrote: >> >>> Dave, >>> >>> Probably the easiest thing is if you tell me when you're ready to merge >>> the doxygen change, and then I'll use that as a base for the brace change >>> MR (i.e. I'll re-run my script). Then when the regenerated brace-change MR >>> is merged into VTK, the doxygen change will go with it. >>> >>> We obviously cannot merge the brace-change MR into the doxyen MR or vice >>> versa... there would be thousands of conflicts. These kind of changes have >>> to be serial. >>> >>> - David >>> >>> On Tue, Sep 20, 2016 at 1:27 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> Had been planing on this one day and then the indents the next, but >>>> sure we can merge this into that branch first or the other way around. >>>> >>>> Then we'll all just have a single merge commit to jump over rather than >>>> two. >>>> >>>> I can take a stab at the groups with a better condition here: 547 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci >>>> wrote: >>>> >>>>> That seems to generate a lot of unnecessary group ( //@{ ) markings. >>>>> Isn't there a way of avoiding that? Also, I thought that this was going to >>>>> be merged together with the indentation changes to avoid multiple conflicts? >>>>> >>>>> On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle < >>>>> dave.demarle at kitware.com> wrote: >>>>> >>>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>>> >>>>>> Pending test failures I'll merge Wednesday or Thursday evening. >>>>>> >>>>>> >>>>>> David E DeMarle >>>>>> Kitware, Inc. >>>>>> R&D Engineer >>>>>> 21 Corporate Drive >>>>>> Clifton Park, NY 12065-8662 >>>>>> Phone: 518-881-4909 >>>>>> >>>>>> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >>>>>> dave.demarle at kitware.com> wrote: >>>>>> >>>>>>> I count 9 votes for /** to 5 (including my own) for /// and none for >>>>>>> /*! or //!. >>>>>>> >>>>>>> I'll go with this then: >>>>>>> /** >>>>>>> something >>>>>>> blah blah blah >>>>>>> */ >>>>>>> >>>>>>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>>>> and on Thursday. >>>>>>> >>>>>>> Note >>>>>>> >>>>>>> David Gobbi has another big style change coming that is going to >>>>>>> modernizing our indentation style in implementation files. >>>>>>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>>>>>> That will go in very soon too. >>>>>>> >>>>>>> >>>>>>> David E DeMarle >>>>>>> Kitware, Inc. >>>>>>> R&D Engineer >>>>>>> 21 Corporate Drive >>>>>>> Clifton Park, NY 12065-8662 >>>>>>> Phone: 518-881-4909 >>>>>>> >>>>>>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>>>>>> mike.jackson at bluequartz.net> wrote: >>>>>>> >>>>>>>> +1 for > >>>>>>>> > /** >>>>>>>> > * Document code >>>>>>>> > * @param >>>>>>>> > */ >>>>>>>> >>>>>>>> and leave them in the header file >>>>>>>> >>>>>>>> -- >>>>>>>> Michael A. Jackson >>>>>>>> BlueQuartz Software, LLC >>>>>>>> [e]: mike.jackson at bluequartz.net >>>>>>>> >>>>>>>> >>>>>>>> David Lonie wrote: >>>>>>>> >>>>>>>>> One more vote for /** ... */ with leading * on lines in-between, >>>>>>>>> and >>>>>>>>> keeping the docs in the headers. Jumping to a header is much >>>>>>>>> faster and >>>>>>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>>>>>> anyone would want to volunteer for the task of moving all the >>>>>>>>> docstrings, and it doesn't sound easy to script/automate. >>>>>>>>> >>>>>>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> I also prefer this doxygen style: >>>>>>>>> >>>>>>>>> /** >>>>>>>>> * Document code >>>>>>>>> * @param >>>>>>>>> */ >>>>>>>>> >>>>>>>>> as it creates a nice header for a function that contains the >>>>>>>>> documentation. >>>>>>>>> >>>>>>>>> I think documentation should stay in the header as it is part >>>>>>>>> of the >>>>>>>>> interface of the module. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>>>>>> > >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> The Doxygen isn't always there, when I am hunting issues I >>>>>>>>> often end >>>>>>>>> up in the header for the class thanks to my IDE, and >>>>>>>>> having the >>>>>>>>> Doxygen there is often helpful whether the Doxygen is >>>>>>>>> somewhere >>>>>>>>> on the >>>>>>>>> machine or not. I really dislike projects that put it in >>>>>>>>> the >>>>>>>>> implementation, and disagree on the method names being >>>>>>>>> enough. I >>>>>>>>> hope >>>>>>>>> we leave it in the headers, and for the purposes of the >>>>>>>>> migration to >>>>>>>>> real Doxygen I am not sure the tools have the necessary >>>>>>>>> logic to >>>>>>>>> move >>>>>>>>> documentation - just transform the style. >>>>>>>>> >>>>>>>>> I prefer the >>>>>>>>> >>>>>>>>> /** >>>>>>>>> * Document code >>>>>>>>> * @param >>>>>>>>> */ >>>>>>>>> >>>>>>>>> Style personally, but /// also works, never really liked >>>>>>>>> the //! >>>>>>>>> but I >>>>>>>>> am sure I could adapt were that chosen. >>>>>>>>> >>>>>>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via >>>>>>>>> vtk-developers >>>>>>>>> > >>>>>>>>> wrote: >>>>>>>>> > Another argument for keeping all documentation in the >>>>>>>>> header >>>>>>>>> files is so >>>>>>>>> > it's available in an install-tree-only situation. Some >>>>>>>>> people >>>>>>>>> use VTK >>>>>>>>> > without the source tree around, and having the docs >>>>>>>>> built >>>>>>>>> into the header >>>>>>>>> > files is quite nice in that scenario. If it were in the >>>>>>>>> cxx >>>>>>>>> files, it >>>>>>>>> > wouldn't be available to such users. >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > David >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>>>>>> >>>>>>>> .com>> >>>>>>>>> > wrote: >>>>>>>>> > >>>>>>>>> > Hi Andrew, >>>>>>>>> > >>>>>>>>> > ... >>>>>>>>> > >>>>>>>>> > For what it is worth, I also believe that documentation >>>>>>>>> should be with the >>>>>>>>> > declaration simply because the header files are the ones >>>>>>>>> people tend to >>>>>>>>> > first look at not the definition. This is what VTK >>>>>>>>> currently >>>>>>>>> does. ... >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > I think that moving method (not class) documentation >>>>>>>>> out of >>>>>>>>> the headers >>>>>>>>> > makes the headers much more terse and legible. For the >>>>>>>>> vast >>>>>>>>> majority of >>>>>>>>> > classes, the method names themselves are enough >>>>>>>>> documentation. In cases >>>>>>>>> > where method names are not enough, it is nice to have >>>>>>>>> the >>>>>>>>> implementation >>>>>>>>> > nearby. Methods with inline or macro-generated >>>>>>>>> implementations would still >>>>>>>>> > have documentation in the header, as would enums. >>>>>>>>> > >>>>>>>>> > David >>>>>>>>> > >>>>>>>>> > _______________________________________________ >>>>>>>>> > 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 VTK FAQ at: >>>>>>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>>>>> > >>>>>>>>> > Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> > >>>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > _______________________________________________ >>>>>>>>> > Powered by www.kitware.com >>>>>>>>> > >>>>>>>>> > Visit other Kitware open-source projects at >>>>>>>>> > http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> > >>>>>>>>> > Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>> >>>>>>>>> > >>>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>>> > http://public.kitware.com/mail >>>>>>>>> man/listinfo/vtk-developers >>>>>>>>> >>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> AQ> >>>>>>>>> >>>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>>> vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>>> vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>> vtk-developers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Wed Sep 21 10:32:18 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 21 Sep 2016 10:32:18 -0400 Subject: [vtkusers] [vtk-developers] poll - vtk doxygen style In-Reply-To: References: <6BC20FED-43A4-4C0D-AE68-84F6CD8E20AD@aol.com> <57E03C30.5010803@bluequartz.net> Message-ID: Sounds great! Thanks Dave. On Wed, Sep 21, 2016 at 10:29 AM, David E DeMarle wrote: > @Berk and @David > > I made a small change to the script that improves things substantially. > I can think of cases where it still puts single items inside a group, but > we can take those out manually after the fact. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Sep 20, 2016 at 4:33 PM, David Gobbi > wrote: > >> Regarding the group markings, be careful when removing them, because >> removing them will cause doxygen to change the order in which the methods >> are displayed (I seem to recall that ungrouped methods are either all >> displayed at the top or all displayed at the bottom or somesuch). I might >> even recommend that you leave them all in. >> >> On Tue, Sep 20, 2016 at 2:07 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> Sounds like a plan. >>> >>> I'll address Berk's and Dan's suggestions then hand off to you. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Tue, Sep 20, 2016 at 4:00 PM, David Gobbi >>> wrote: >>> >>>> Dave, >>>> >>>> Probably the easiest thing is if you tell me when you're ready to merge >>>> the doxygen change, and then I'll use that as a base for the brace change >>>> MR (i.e. I'll re-run my script). Then when the regenerated brace-change MR >>>> is merged into VTK, the doxygen change will go with it. >>>> >>>> We obviously cannot merge the brace-change MR into the doxyen MR or >>>> vice versa... there would be thousands of conflicts. These kind of changes >>>> have to be serial. >>>> >>>> - David >>>> >>>> On Tue, Sep 20, 2016 at 1:27 PM, David E DeMarle < >>>> dave.demarle at kitware.com> wrote: >>>> >>>>> Had been planing on this one day and then the indents the next, but >>>>> sure we can merge this into that branch first or the other way around. >>>>> >>>>> Then we'll all just have a single merge commit to jump over rather >>>>> than two. >>>>> >>>>> I can take a stab at the groups with a better condition here: 547 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Tue, Sep 20, 2016 at 3:10 PM, Berk Geveci >>>>> wrote: >>>>> >>>>>> That seems to generate a lot of unnecessary group ( //@{ ) markings. >>>>>> Isn't there a way of avoiding that? Also, I thought that this was going to >>>>>> be merged together with the indentation changes to avoid multiple conflicts? >>>>>> >>>>>> On Tue, Sep 20, 2016 at 2:20 PM, David E DeMarle < >>>>>> dave.demarle at kitware.com> wrote: >>>>>> >>>>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>>>> >>>>>>> Pending test failures I'll merge Wednesday or Thursday evening. >>>>>>> >>>>>>> >>>>>>> David E DeMarle >>>>>>> Kitware, Inc. >>>>>>> R&D Engineer >>>>>>> 21 Corporate Drive >>>>>>> Clifton Park, NY 12065-8662 >>>>>>> Phone: 518-881-4909 >>>>>>> >>>>>>> On Tue, Sep 20, 2016 at 8:45 AM, David E DeMarle < >>>>>>> dave.demarle at kitware.com> wrote: >>>>>>> >>>>>>>> I count 9 votes for /** to 5 (including my own) for /// and none >>>>>>>> for /*! or //!. >>>>>>>> >>>>>>>> I'll go with this then: >>>>>>>> /** >>>>>>>> something >>>>>>>> blah blah blah >>>>>>>> */ >>>>>>>> >>>>>>>> I'll revise https://gitlab.kitware.com/vtk/vtk/merge_requests/1932 >>>>>>>> and on Thursday. >>>>>>>> >>>>>>>> Note >>>>>>>> >>>>>>>> David Gobbi has another big style change coming that is going to >>>>>>>> modernizing our indentation style in implementation files. >>>>>>>> See: https://gitlab.kitware.com/vtk/vtk/merge_requests/1911 >>>>>>>> That will go in very soon too. >>>>>>>> >>>>>>>> >>>>>>>> David E DeMarle >>>>>>>> Kitware, Inc. >>>>>>>> R&D Engineer >>>>>>>> 21 Corporate Drive >>>>>>>> Clifton Park, NY 12065-8662 >>>>>>>> Phone: 518-881-4909 >>>>>>>> >>>>>>>> On Mon, Sep 19, 2016 at 3:27 PM, Michael Jackson < >>>>>>>> mike.jackson at bluequartz.net> wrote: >>>>>>>> >>>>>>>>> +1 for > >>>>>>>>> > /** >>>>>>>>> > * Document code >>>>>>>>> > * @param >>>>>>>>> > */ >>>>>>>>> >>>>>>>>> and leave them in the header file >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Michael A. Jackson >>>>>>>>> BlueQuartz Software, LLC >>>>>>>>> [e]: mike.jackson at bluequartz.net >>>>>>>>> >>>>>>>>> >>>>>>>>> David Lonie wrote: >>>>>>>>> >>>>>>>>>> One more vote for /** ... */ with leading * on lines in-between, >>>>>>>>>> and >>>>>>>>>> keeping the docs in the headers. Jumping to a header is much >>>>>>>>>> faster and >>>>>>>>>> easier than opening a doxygen page with modern IDEs. Plus, I doubt >>>>>>>>>> anyone would want to volunteer for the task of moving all the >>>>>>>>>> docstrings, and it doesn't sound easy to script/automate. >>>>>>>>>> >>>>>>>>>> On Mon, Sep 19, 2016 at 9:40 AM, Dan Lipsa >>>>>>>>> > wrote: >>>>>>>>>> >>>>>>>>>> I also prefer this doxygen style: >>>>>>>>>> >>>>>>>>>> /** >>>>>>>>>> * Document code >>>>>>>>>> * @param >>>>>>>>>> */ >>>>>>>>>> >>>>>>>>>> as it creates a nice header for a function that contains the >>>>>>>>>> documentation. >>>>>>>>>> >>>>>>>>>> I think documentation should stay in the header as it is part >>>>>>>>>> of the >>>>>>>>>> interface of the module. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Sep 19, 2016 at 8:56 AM, Marcus D. Hanwell >>>>>>>>>> >>>>>>>>> .com>> wrote: >>>>>>>>>> >>>>>>>>>> The Doxygen isn't always there, when I am hunting issues >>>>>>>>>> I often end >>>>>>>>>> up in the header for the class thanks to my IDE, and >>>>>>>>>> having the >>>>>>>>>> Doxygen there is often helpful whether the Doxygen is >>>>>>>>>> somewhere >>>>>>>>>> on the >>>>>>>>>> machine or not. I really dislike projects that put it in >>>>>>>>>> the >>>>>>>>>> implementation, and disagree on the method names being >>>>>>>>>> enough. I >>>>>>>>>> hope >>>>>>>>>> we leave it in the headers, and for the purposes of the >>>>>>>>>> migration to >>>>>>>>>> real Doxygen I am not sure the tools have the necessary >>>>>>>>>> logic to >>>>>>>>>> move >>>>>>>>>> documentation - just transform the style. >>>>>>>>>> >>>>>>>>>> I prefer the >>>>>>>>>> >>>>>>>>>> /** >>>>>>>>>> * Document code >>>>>>>>>> * @param >>>>>>>>>> */ >>>>>>>>>> >>>>>>>>>> Style personally, but /// also works, never really liked >>>>>>>>>> the //! >>>>>>>>>> but I >>>>>>>>>> am sure I could adapt were that chosen. >>>>>>>>>> >>>>>>>>>> On Sat, Sep 17, 2016 at 10:37 PM, David Cole via >>>>>>>>>> vtk-developers >>>>>>>>>> > >>>>>>>>>> wrote: >>>>>>>>>> > Another argument for keeping all documentation in the >>>>>>>>>> header >>>>>>>>>> files is so >>>>>>>>>> > it's available in an install-tree-only situation. Some >>>>>>>>>> people >>>>>>>>>> use VTK >>>>>>>>>> > without the source tree around, and having the docs >>>>>>>>>> built >>>>>>>>>> into the header >>>>>>>>>> > files is quite nice in that scenario. If it were in >>>>>>>>>> the cxx >>>>>>>>>> files, it >>>>>>>>>> > wouldn't be available to such users. >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > David >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > On Sep 17, 2016, at 6:47 PM, David Thompson >>>>>>>>>> >>>>>>>>> david.thompson at kitware.com>> >>>>>>>>>> > wrote: >>>>>>>>>> > >>>>>>>>>> > Hi Andrew, >>>>>>>>>> > >>>>>>>>>> > ... >>>>>>>>>> > >>>>>>>>>> > For what it is worth, I also believe that documentation >>>>>>>>>> should be with the >>>>>>>>>> > declaration simply because the header files are the >>>>>>>>>> ones >>>>>>>>>> people tend to >>>>>>>>>> > first look at not the definition. This is what VTK >>>>>>>>>> currently >>>>>>>>>> does. ... >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > I think that moving method (not class) documentation >>>>>>>>>> out of >>>>>>>>>> the headers >>>>>>>>>> > makes the headers much more terse and legible. For the >>>>>>>>>> vast >>>>>>>>>> majority of >>>>>>>>>> > classes, the method names themselves are enough >>>>>>>>>> documentation. In cases >>>>>>>>>> > where method names are not enough, it is nice to have >>>>>>>>>> the >>>>>>>>>> implementation >>>>>>>>>> > nearby. Methods with inline or macro-generated >>>>>>>>>> implementations would still >>>>>>>>>> > have documentation in the header, as would enums. >>>>>>>>>> > >>>>>>>>>> > David >>>>>>>>>> > >>>>>>>>>> > _______________________________________________ >>>>>>>>>> > 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 VTK FAQ at: >>>>>>>>>> > http://www.vtk.org/Wiki/VTK_FAQ < >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>>>>>> > >>>>>>>>>> > Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> > >>>>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>>>> > http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > _______________________________________________ >>>>>>>>>> > Powered by www.kitware.com >>>>>>>>>> > >>>>>>>>>> > Visit other Kitware open-source projects at >>>>>>>>>> > http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> > >>>>>>>>>> > Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>> >>>>>>>>>> > >>>>>>>>>> > Follow this link to subscribe/unsubscribe: >>>>>>>>>> > http://public.kitware.com/mail >>>>>>>>>> man/listinfo/vtk-developers >>>>>>>>>> >>>>>>>>> lman/listinfo/vtk-developers> >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>> >>>>>>>>> lman/listinfo/vtk-developers> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ < >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ> >>>>>>>>>> >>>>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>>>> vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>>>> vtkusers >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>>>> vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q= >>>>>>> vtk-developers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simon.Praetorius at tu-dresden.de Wed Sep 21 11:32:19 2016 From: Simon.Praetorius at tu-dresden.de (Simon Praetorius) Date: Wed, 21 Sep 2016 15:32:19 +0000 Subject: [vtkusers] TimeValues attribute in vtkXMLReader limited to 4096 values Message-ID: <20160921153219.Horde.Qp4ttnVRH-N1eXtEu6S3xrt@mail.zih.tu-dresden.de> Hi, The VTK XML-files support an attribute of the primary element with the name "TimeValues" (see e.g. vtkXMLReader:693). This attribute is a space separated list of time values (as the name indicates). But unfortunately the number of values is restricted to 4096, i.e. an array of doubles is preallocated an then read by `vtkXMLDataElement->getVectorAttribute` that supports only double pointers as containers. This restriction is quite harsh, I would say. I often have timeseries with about 10.000 timesteps and more. Why is this implemented as an attribute instead of a block of values? There would not be this limitation, at least one could implement it without a limitation in the nr. of values. Simon (I'm referring to the source of VTK-7.0.0) -- Dr. Simon Praetorius Institut f?r Wissenschaftliches Rechnen Fachrichtung Mathematik Technische Universit?t Dresden Tel.: TUD-42377 Mail: simon.praetorius at tu-dresden.de Web: www.math.tu-dresden.de/~spraetor -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5733 bytes Desc: S/MIME-Signatur URL: From Simon.Praetorius at tu-dresden.de Wed Sep 21 11:23:30 2016 From: Simon.Praetorius at tu-dresden.de (Simon Praetorius) Date: Wed, 21 Sep 2016 15:23:30 +0000 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries Message-ID: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> Hi, When reading a VTK XML-file that includes timesteps, the `vtkXMLDataReader:282` throws an error that multiple arrays with the same name are present in the file. In general this is a valid test and the error is correct, except for the case that multiple timesteps are written in the file. An example file can be created by the test `IO/XML/Testing/Cxx/TestXMLCInterface.c`: ```xml ``` Here all DataArrays refer to the same dataset at different timesteps. Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: ``` vtkXMLDataReader.cxx, line 282: Duplicate array names. ``` Writing TimeSteps seems to be supported by the XMLReader and the XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is the structure of the vtk format changed when writing timeseries, compared to the xml-code shown above? (I'm referring to the VTK version 7.0.0, when naming line-numbers.) This issue refers to an old ParaView issue #5542 (http://www.paraview.org/Bug/view.php?id=5542). The file was readable with at least vtk-5.2 and paraview-3.6.2. Simon -- Dr. Simon Praetorius Institut f?r Wissenschaftliches Rechnen Fachrichtung Mathematik Technische Universit?t Dresden Tel.: TUD-42377 Mail: simon.praetorius at tu-dresden.de Web: www.math.tu-dresden.de/~spraetor -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5733 bytes Desc: S/MIME-Signatur URL: From qcring at googlemail.com Wed Sep 21 12:04:57 2016 From: qcring at googlemail.com (A.E. Szalo) Date: Wed, 21 Sep 2016 18:04:57 +0200 Subject: [vtkusers] Building VTK with OpenGL2 and Module_vtkRenderingExternal In-Reply-To: References: <0E95BA65-149D-4674-AEFB-ADE93B91D1FC@gmail.com> Message-ID: Thanks a lot for your support! I was able to build VTK with OpenGL2 and Module_vtkRenderingExternal. > On 19 Sep 2016, at 14:54, Sankhesh Jhaveri > wrote: > > I've pushed a change to fix the errors here: https://gitlab.kitware.com/vtk/vtk/merge_requests/1976 > > > Sankhesh Jhaveri > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > > > > On Sat, Sep 17, 2016 at 12:53 PM, A.E. Szalo via vtkusers > wrote: > Hi everyone, > > I?m working on a small open source project (check it out on GitHub if you?re interested: https://github.com/qCring/QuickVtk ) and have encountered the following issue: I?m not able to build VTK with OpenGL2 and Module_vtkRenderingExternal from more recent commits (results in configuration error in CMake). Without Module_vtkRenderingExternal I can?t access vtkExternalOpenGLRenderWindow which I need to embed VTK into my Qt/QML application. Is there an alternative way to achieve that without relying on Module_vtkRenderingExternal and also having OpenGL2 enabled instead of switching back to OpenGL? > > Thanks in advance! > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.melis at surfsara.nl Thu Sep 22 04:02:26 2016 From: paul.melis at surfsara.nl (Paul Melis) Date: Thu, 22 Sep 2016 10:02:26 +0200 Subject: [vtkusers] vtkOBJReader incorrect number of points In-Reply-To: <1474363406637-5740439.post@n5.nabble.com> References: <1474363406637-5740439.post@n5.nabble.com> Message-ID: <4ae8efaa-7230-a439-510d-7775c421f537@surfsara.nl> Hi, On 20-09-16 11:23, user192048 wrote: > I'm having trouble with some basic wavefront obj file manipulation. I can > read in and display a textured model correctly seemingly, but when I query > the number of points I get a strange number (let me explain). > > The file has vertices (v), texture coords (vt) and triangle faces (f) > specified v/vt v/vt v/vt. There are 17460 vertex points specified in the > file, and 34357. When I query the obj reader, it tells me "34537 cells, 0 > verts, 0 lines, 34537 polys, 0 strips, 103611 points". The number of points > here is exactly 3*34357. > > I had a quick look in the source for the reader and numPts is only > incremented on scanning a line starting with v, so I'm unsure why this is > happening. The major issue with this is that ultimately I want to write out > an object file that is a modified version of the original, but if the > original is wrong it won't work. > > Any ideas? Probably what is happening (haven't checked the code) is that points are duplicated during read, because there is a texture coordinate per vertex per face. When a vertex is used in more than one face its 3D position can be shared (it's the same for all faces using the vertex), but its texture coordinate per face can differ (as that is what .obj allows) and hence needs to be stored for each face the vertex occurs in. The easiest way for VTK to do this is to create vertices (points) used only in a single face, having the texture coordinates within that face. If your model contains only triangles it makes sense that the number of points after read is 3 times the number of triangles. Regards, Paul -- Paul Melis | Visualization group leader & developer | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | From david.gobbi at gmail.com Thu Sep 22 14:54:53 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 22 Sep 2016 12:54:53 -0600 Subject: [vtkusers] vtkLookupTable does not handle NaN values with Log10 scale In-Reply-To: <8D478341240222479E0DB361E050CB6A7BEF5E@msy-emb04.int.cggveritas.com> References: <8D478341240222479E0DB361E050CB6A7BEF5E@msy-emb04.int.cggveritas.com> Message-ID: Hi Federico, Thanks for the note. I've pushed a patch for this, so that it can be fixed in VTK 7.1. http://gitlab.kitware.com/vtk/vtk/merge_requests/1998 - David On Wed, Sep 21, 2016 at 3:25 AM, Miorelli, Federico < Federico.Miorelli at cgg.com> wrote: > Dear All, > > > > It seems like vtkLookupTable does not handle correclty NaN values when the > Log10 scale is used. > > In this case, all the NaNs in the input are not mapped to NanColor but to > the minimum range color. > > > > Unless there is a reason for this, I believe the bug is in vtkLookupTable:: > vtkApplyLogScale(). > > > > Here is a patch that might fix it (VTK 6.3.0) > > > > > > --- old/vtkLookupTable.cxx Wed Jul 13 15:11:08 2016 > > +++ new/vtkLookupTable.cxx Wed Sep 21 10:54:24 2016 > > @@ -358,6 +358,11 @@ > > inline double vtkApplyLogScale(double v, const double range[2], > > const double logRange[2]) > > { > > + if (vtkMath::IsNan(v)) > > + { > > + return v; > > + } > > + > > // is the range set for negative numbers? > > if (range[0] < 0) > > { > > > > > > Regards, > > Federico > > > > > > > > *______* *______* *______* > > Federico Miorelli > > > > Senior R&D Geophysicist > > *Subsurface Imaging - General Geophysics **Italy* > > > > > *This email and any accompanying attachments are confidential. If you > received this email by mistake, please delete it from your system. Any > review, disclosure, copying, distribution, or use of the email by others is > strictly prohibited.* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 22 15:20:56 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 22 Sep 2016 21:20:56 +0200 Subject: [vtkusers] vtkLookupTable does not handle NaN values with Log10 scale In-Reply-To: <8D478341240222479E0DB361E050CB6A7BEF5E@msy-emb04.int.cggveritas.com> References: <8D478341240222479E0DB361E050CB6A7BEF5E@msy-emb04.int.cggveritas.com> Message-ID: 2016-09-21 11:25 GMT+02:00 Miorelli, Federico : > Dear All, > > > > It seems like vtkLookupTable does not handle correclty NaN values when the > Log10 scale is used. > > In this case, all the NaNs in the input are not mapped to NanColor but to > the minimum range color. Sorry to hijack the thread, but since it's related and I've been meaning to ask: How is vtkPiecewiseFunction supposed to handle NaN values? It does not have a NanColor setting like vtkLookupTable and vtkColorTransferFunction has. I guess if I specify a vtkPiecewiseFunction as scalar opacity transfer function during volume rendering, I better ensure I have no NaN values (i.e. filter them out)? Elvis > > > > Unless there is a reason for this, I believe the bug is in > vtkLookupTable::vtkApplyLogScale(). > > > > Here is a patch that might fix it (VTK 6.3.0) > > > > > > --- old/vtkLookupTable.cxx Wed Jul 13 15:11:08 2016 > > +++ new/vtkLookupTable.cxx Wed Sep 21 10:54:24 2016 > > @@ -358,6 +358,11 @@ > > inline double vtkApplyLogScale(double v, const double range[2], > > const double logRange[2]) > > { > > + if (vtkMath::IsNan(v)) > > + { > > + return v; > > + } > > + > > // is the range set for negative numbers? > > if (range[0] < 0) > > { > > > > > > Regards, > > Federico > > > > > > > > ______ ______ ______ > > Federico Miorelli > > > > Senior R&D Geophysicist > > Subsurface Imaging - General Geophysics Italy > > > > This email and any accompanying attachments are confidential. If you > received this email by mistake, please delete > it from your system. Any review, disclosure, copying, distribution, or use > of the email by others is strictly prohibited. > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From mike.jackson at bluequartz.net Thu Sep 22 16:03:39 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 22 Sep 2016 16:03:39 -0400 Subject: [vtkusers] Best way to have both Debug and Release builds of Vtk Message-ID: <57E4391B.8080602@bluequartz.net> What is the current best practice for having both a Debug and Release build of Vtk on Windows with Visual Studio? For example, with ITK I was told to just point my project's CMake to the Itk build folder that was used. I did not have to actually "install" anything. Is Vtk the same way? Is there something I can turn on to "decorate" the libs with a "debug" or "d"? Thanks -- Michael A. Jackson BlueQuartz Software From magnus_elden at hotmail.com Thu Sep 22 17:45:56 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Thu, 22 Sep 2016 21:45:56 +0000 Subject: [vtkusers] How to trim a VOI to start from 0,0,0 Message-ID: I have this setup: vtkXMLImageDataReader -> vtkExtractVOI -> vtkImageCanvasSource2D What I do is that I use the VOI to extract a single slice of the volume and then draw that to a specified area in the image canvas. The image canvas has enough room in the x and the y directions, but because the VOI has a non-zero z range it crashes. How can I trim away the unwanted Z range? For example, let us sau I have the volume 0, 100; 0, 100; 0, 100. I extract the single plane of scalar values at a Z of 50. That gives me this VOI: 0, 100; 0, 100; 50, 50. I need to turn that into 0, 100; 0, 100; 0, 0. (I think this will let the image canvas' function DrawImage()) The rest seem to work just fine. All I need now is for the draw function to draw the scalar values to its area in the canvas. Thank you for your time. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Sep 23 01:36:58 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 23 Sep 2016 07:36:58 +0200 Subject: [vtkusers] Interaction with chart on top of 3D (on top of volume rendering?) Message-ID: Hi all, At the moment I have a button in my Qt UI that pops up a dialog with a render window containing vtkChartXY with some points items to control the transfer functions I use for rendering volumes in another window. I've been toying with the idea of adding a VTK button (say in the bottom left corner) in the window where I do the actual volume rendering, and have that button bring up the vtkChartXY in the same window (on top of the volume rendering), for more convenient / quick access to transfer function editing. I had a look at this test: https://github.com/Kitware/VTK/blob/master/Charts/Core/Testing/Cxx/TestChartsOn3D.cxx It shows a cube with a chart on top in the same renderer. Would this example work if the cube instead was a volume rendering? Is it possible to get interaction with the chart working seamlessly with interaction with the camera? Is there some other approach that would allow these two things? Multiple renderers? Has anyone done such a thing? Thanks in advance, Elvis From ilindsay at insigniamedical.co.uk Fri Sep 23 05:32:33 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 23 Sep 2016 02:32:33 -0700 (MST) Subject: [vtkusers] GPU Memory Detection In-Reply-To: <1474015784546-5740351.post@n5.nabble.com> References: <1473697280617-5740281.post@n5.nabble.com> <1473762391998-5740291.post@n5.nabble.com> <1474015784546-5740351.post@n5.nabble.com> Message-ID: <1474623153403-5740504.post@n5.nabble.com> Apologies for replying to my own message again - just an update on progress. I have downloaded and built the latest master version today (23rd Sept). vtkDirectXGPUInfoList is still missing in action when using OpenGL2 - I have double checked that I have the June 2010 direct X SDK installed. This results in vtkGPUVolumeRayCastMapper using its default of 128MB and therefore resampling unnecessarily. Some of the symptoms I was seeing with the 7.0 release were actually due to us setting UserMatrix on vtkVolume to be non identity - we use this to set the original data orientation (oblique slices, bottom to top slice order, etc). This resulted in only the edges of the volume being drawn. This now seems to work fine in the master build. When the out of memory messages occur, nothing gets drawn. I have hacked the default of 128 MB to be 1024MB and rebuilt for now which gets us up and running. Is this something that can be looked at for the upcoming 7.1 release? -- View this message in context: http://vtk.1045678.n5.nabble.com/GPU-Memory-Detection-tp5740281p5740504.html Sent from the VTK - Users mailing list archive at Nabble.com. From tigarmo at gmail.com Fri Sep 23 07:27:21 2016 From: tigarmo at gmail.com (Tiago Nobrega) Date: Fri, 23 Sep 2016 08:27:21 -0300 Subject: [vtkusers] vtkCaptionActor2D not filling its prop correctly Message-ID: Hello, I apologize for not reading the guidelines properly and submitting an issue on Gitlab before trying the mailing list. Here's my issue: We are in the process of updating VTK from 6.3 to 7.0 and some of our tests are failing because text actors are being rendered differently. This usually happens when we update the library (minor differences are to be expected) but in this particular case it looks like a regression. The following code (python): ```python import vtk ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) prop_1 = vtk.vtkCaptionActor2D() prop_1.SetCaption('Hello') prop_1.SetAttachmentPoint((-0.1, 0.0, 0.0)) prop_1.GetCaptionTextProperty().Modified() ren1.AddActor(prop_1) ren1.SetBackground(0, 0, 0) ren1.GetActiveCamera().SetFocalPoint(0,0,0) ren1.GetActiveCamera().SetPosition(1,0,0) ren1.GetActiveCamera().SetViewUp(0,0,1) ren1.ResetCamera() renWin.SetSize(500, 500) iren.Start() ``` ... generates two different renderings depending on the version, as shown on the following image: http://imgur.com/w8VXM8z The left side is VTK 6.3, and the right one is 7.0. Both ran on a Windows 10 machine, but the issue was replicated on our Linux boxes too. In all cases we're still using the old OpenGL backend and not the new OpenGL2 one. The behavior in version 6.3 seems more "correct" in the sense that the text is more fully filling up the rectangle, with the default scaling mode being to scale to the prop. I've investigated the commit history for the classes that seem relevant - vtkCaptionActor2D, vtkTextActor, vtkTextProperty, etc - but nothing stood out as possible "culprits". Let me know if you need further info or clarifications. Thanks. Tiago Nobrega -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigarmo at gmail.com Fri Sep 23 08:24:40 2016 From: tigarmo at gmail.com (Tiago Nobrega) Date: Fri, 23 Sep 2016 09:24:40 -0300 Subject: [vtkusers] vtkCaptionActor2D not filling its prop correctly In-Reply-To: References: Message-ID: My apologies (again): Looks like we were previously on version 6.2, and not 6.3 as I originally thought. I see that there were a few DPI-related changes in version 6.3, so I'm investigating those now. I'll report back as soon as I have a conclusion. Thank you and sorry for the noise, Tiago Nobrega On Fri, Sep 23, 2016 at 8:27 AM, Tiago Nobrega wrote: > Hello, > > I apologize for not reading the guidelines properly and submitting an > issue on Gitlab before trying the mailing list. Here's my issue: > > We are in the process of updating VTK from 6.3 to 7.0 and some of our > tests are failing because text actors are being rendered differently. This > usually happens when we update the library (minor differences are to be > expected) but in this particular case it looks like a regression. > > The following code (python): > > ```python > import vtk > > ren1 = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren1) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > prop_1 = vtk.vtkCaptionActor2D() > prop_1.SetCaption('Hello') > prop_1.SetAttachmentPoint((-0.1, 0.0, 0.0)) > > prop_1.GetCaptionTextProperty().Modified() > > ren1.AddActor(prop_1) > ren1.SetBackground(0, 0, 0) > ren1.GetActiveCamera().SetFocalPoint(0,0,0) > ren1.GetActiveCamera().SetPosition(1,0,0) > ren1.GetActiveCamera().SetViewUp(0,0,1) > ren1.ResetCamera() > renWin.SetSize(500, 500) > > iren.Start() > ``` > > ... generates two different renderings depending on the version, as shown > on the following image: > > http://imgur.com/w8VXM8z > > The left side is VTK 6.3, and the right one is 7.0. Both ran on a Windows > 10 machine, but the issue was replicated on our Linux boxes too. In all > cases we're still using the old OpenGL backend and not the new OpenGL2 one. > The behavior in version 6.3 seems more "correct" in the sense that the text > is more fully filling up the rectangle, with the default scaling mode being > to scale to the prop. I've investigated the commit history for the classes > that seem relevant - vtkCaptionActor2D, vtkTextActor, vtkTextProperty, etc > - but nothing stood out as possible "culprits". > > Let me know if you need further info or clarifications. Thanks. > > Tiago Nobrega > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Fri Sep 23 11:08:47 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 23 Sep 2016 11:08:47 -0400 Subject: [vtkusers] vtkCaptionActor2D not filling its prop correctly In-Reply-To: References: Message-ID: "That's not a bug, it's a feature" ;) VTK previously used a "tight" bounding box for aligning/sizing text, which gives better results in cases like this. However, this caused issues with animations in ParaView, since if a string changed height by gaining/losing ascenders (e.g. "T" vs "n") or descenders (e.g. "j" vs "i"), the text would jump around. So the change was made to have all strings always account for ascenders/descenders to keep the baseline consistent in such cases. Dan Lipsa very recently added the option to vtkTextProperty to use a tight bounding box: https://gitlab.kitware.com/vtk/vtk/merge_requests/1925 This is available in master, and should be in the upcoming 7.1 release. It should allow you to render strings like in the "before" image. HTH, Dave On Fri, Sep 23, 2016 at 7:27 AM, Tiago Nobrega wrote: > Hello, > > I apologize for not reading the guidelines properly and submitting an > issue on Gitlab before trying the mailing list. Here's my issue: > > We are in the process of updating VTK from 6.3 to 7.0 and some of our > tests are failing because text actors are being rendered differently. This > usually happens when we update the library (minor differences are to be > expected) but in this particular case it looks like a regression. > > The following code (python): > > ```python > import vtk > > ren1 = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren1) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > prop_1 = vtk.vtkCaptionActor2D() > prop_1.SetCaption('Hello') > prop_1.SetAttachmentPoint((-0.1, 0.0, 0.0)) > > prop_1.GetCaptionTextProperty().Modified() > > ren1.AddActor(prop_1) > ren1.SetBackground(0, 0, 0) > ren1.GetActiveCamera().SetFocalPoint(0,0,0) > ren1.GetActiveCamera().SetPosition(1,0,0) > ren1.GetActiveCamera().SetViewUp(0,0,1) > ren1.ResetCamera() > renWin.SetSize(500, 500) > > iren.Start() > ``` > > ... generates two different renderings depending on the version, as shown > on the following image: > > http://imgur.com/w8VXM8z > > The left side is VTK 6.3, and the right one is 7.0. Both ran on a Windows > 10 machine, but the issue was replicated on our Linux boxes too. In all > cases we're still using the old OpenGL backend and not the new OpenGL2 one. > The behavior in version 6.3 seems more "correct" in the sense that the text > is more fully filling up the rectangle, with the default scaling mode being > to scale to the prop. I've investigated the commit history for the classes > that seem relevant - vtkCaptionActor2D, vtkTextActor, vtkTextProperty, etc > - but nothing stood out as possible "culprits". > > Let me know if you need further info or clarifications. Thanks. > > Tiago Nobrega > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simon.Praetorius at tu-dresden.de Fri Sep 23 12:07:13 2016 From: Simon.Praetorius at tu-dresden.de (Simon Praetorius) Date: Fri, 23 Sep 2016 16:07:13 +0000 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries In-Reply-To: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> Message-ID: <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> I have found an old issue in the mantis bug-tracker addressing this topic: #15723 The answer was: "VTK file format does not support saving several time steps in a file" and a reference to the file-format description was given. This description (version 4.2.) is definitely not complete, thus it can not be an indicator for a support of writing timeseries or not. Although the file-format description does not show support for timeseries, at least in older vtk versions (before 6.3) it was supported. The source code of the XMLreader shows all the necessary parts to read the time-series, all the corresponding attributes are interpreted. The only problem is a change in the handling of duplicate names. This was done about a year ago in merge request !488. Since there is no test that reads back the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no error could be detected. The corresponding test to create the file was removed in June 2016. Thus, the questions are: - Is this feature quietly removed from VTK, or removed by accident since only few people use it? - Is the documentation of the file-format incomplete or the implementation simply not cleaned up? - Should the test for duplicate array names be rewritten in order to allow timeseries again? - There should be at least a comment in the file-format description that duplicate array names are not allowed! Maybe this issue could be forwarded to the developer mailing list. Simon Zitat von Simon Praetorius : > Hi, > > When reading a VTK XML-file that includes timesteps, the > `vtkXMLDataReader:282` throws an error that multiple arrays with the > same name are present in the file. In general this is a valid test > and the error is correct, except for the case that multiple > timesteps are written in the file. An example file can be created by > the test `IO/XML/Testing/Cxx/TestXMLCInterface.c`: > > ```xml > > > format="appended" RangeMin="0" RangeMax="0" offset="0" /> > format="appended" RangeMin="1" RangeMax="1" offset="240" /> > > > > ``` > Here all DataArrays refer to the same dataset at different timesteps. > > Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. > `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: > > ``` > vtkXMLDataReader.cxx, line 282: Duplicate array names. > ``` > > Writing TimeSteps seems to be supported by the XMLReader and the > XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any > more? Is the structure of the vtk format changed when writing > timeseries, compared to the xml-code shown above? > (I'm referring to the VTK version 7.0.0, when naming line-numbers.) > > > This issue refers to an old ParaView issue #5542 > (http://www.paraview.org/Bug/view.php?id=5542). The file was > readable with at least vtk-5.2 and paraview-3.6.2. > > Simon > > -- > Dr. Simon Praetorius > Institut f?r Wissenschaftliches Rechnen > Fachrichtung Mathematik > Technische Universit?t Dresden > Tel.: TUD-42377 > Mail: simon.praetorius at tu-dresden.de > Web: www.math.tu-dresden.de/~spraetor -- Dr. Simon Praetorius Institut f?r Wissenschaftliches Rechnen Fachrichtung Mathematik Technische Universit?t Dresden Tel.: TUD-42377 Mail: simon.praetorius at tu-dresden.de Web: www.math.tu-dresden.de/~spraetor -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5733 bytes Desc: S/MIME-Signatur URL: From cory.quammen at kitware.com Fri Sep 23 13:41:44 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 23 Sep 2016 13:41:44 -0400 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries In-Reply-To: <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> References: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> Message-ID: Simon, Thanks for your sleuthing and bug report. I don't believe your use case was known when merge request !488 was merged. TJ, Can you have a look at Simon's issue? Thanks, Cory On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < Simon.Praetorius at tu-dresden.de> wrote: > I have found an old issue in the mantis bug-tracker addressing this topic: > #15723 > > The answer was: "VTK file format does not support saving several time > steps in a file" and a reference to the file-format description was given. > This description (version 4.2.) is definitely not complete, thus it can not > be an indicator for a support of writing timeseries or not. > > Although the file-format description does not show support for timeseries, > at least in older vtk versions (before 6.3) it was supported. The source > code of the XMLreader shows all the necessary parts to read the > time-series, all the corresponding attributes are interpreted. The only > problem is a change in the handling of duplicate names. This was done about > a year ago in merge request !488. Since there is no test that reads back > the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no error > could be detected. The corresponding test to create the file was removed in > June 2016. > > Thus, the questions are: > - Is this feature quietly removed from VTK, or removed by accident since > only few people use it? > - Is the documentation of the file-format incomplete or the implementation > simply not cleaned up? > - Should the test for duplicate array names be rewritten in order to allow > timeseries again? > - There should be at least a comment in the file-format description that > duplicate array names are not allowed! > > Maybe this issue could be forwarded to the developer mailing list. > > Simon > > > Zitat von Simon Praetorius : > > > Hi, >> >> When reading a VTK XML-file that includes timesteps, the >> `vtkXMLDataReader:282` throws an error that multiple arrays with the same >> name are present in the file. In general this is a valid test and the error >> is correct, except for the case that multiple timesteps are written in the >> file. An example file can be created by the test >> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >> >> ```xml >> >> >> > format="appended" RangeMin="0" RangeMax="0" offset="0" /> >> > format="appended" RangeMin="1" RangeMax="1" offset="240" /> >> >> >> >> ``` >> Here all DataArrays refer to the same dataset at different timesteps. >> >> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >> >> ``` >> vtkXMLDataReader.cxx, line 282: Duplicate array names. >> ``` >> >> Writing TimeSteps seems to be supported by the XMLReader and the >> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is >> the structure of the vtk format changed when writing timeseries, compared >> to the xml-code shown above? >> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >> >> >> This issue refers to an old ParaView issue #5542 ( >> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >> with at least vtk-5.2 and paraview-3.6.2. >> >> Simon >> >> -- >> Dr. Simon Praetorius >> Institut f?r Wissenschaftliches Rechnen >> Fachrichtung Mathematik >> Technische Universit?t Dresden >> Tel.: TUD-42377 >> Mail: simon.praetorius at tu-dresden.de >> Web: www.math.tu-dresden.de/~spraetor >> > > > > -- > Dr. Simon Praetorius > Institut f?r Wissenschaftliches Rechnen > Fachrichtung Mathematik > Technische Universit?t Dresden > Tel.: TUD-42377 > Mail: simon.praetorius at tu-dresden.de > Web: www.math.tu-dresden.de/~spraetor > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Fri Sep 23 15:05:03 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 23 Sep 2016 15:05:03 -0400 Subject: [vtkusers] Which Compilers and Operating Systems to you require for VTK and / ParaView? Message-ID: We're trying to identify where we may have gaps in our testing infrastructure for both VTK and ParaView and how to prioritize filling those gaps. Certain compilers like GCC and Intel on Linux or Visual Studio on Windows will essentially always be supported with issues addressed ASAP. Others, however, sometimes come and go depending on available testing resources, licensing, customer demand, etc. Please take a brief moment to let us know which operating systems and compilers are important to howe you use VTK and ParaView from a testing and support standpoint. The survey is very brief and should only take a minute or two. Note: If you are a current support customer with specific critical requirements, please feel free to email me off-list. https://docs.google.com/forms/d/e/1FAIpQLSczYSEWMr90ywhTg1jLg2u6JWVNRh6zUzCLeFPRnc_Qyc13dg/viewform Thank you. ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigarmo at gmail.com Fri Sep 23 15:12:07 2016 From: tigarmo at gmail.com (Tiago Nobrega) Date: Fri, 23 Sep 2016 16:12:07 -0300 Subject: [vtkusers] vtkCaptionActor2D not filling its prop correctly In-Reply-To: References: Message-ID: Hi David, Looks like you were right on the money. After some consideration here we ended up agreeing with you guys so we'll just update the images on our end. For reference, I did pull master and try the new 'tight' bounding box setting and it did indeed generate my base image. Do we have a ballpark for 7.1's release date? Thank you for your help, Tiago On Fri, Sep 23, 2016 at 12:08 PM, David Lonie wrote: > "That's not a bug, it's a feature" ;) > > VTK previously used a "tight" bounding box for aligning/sizing text, which > gives better results in cases like this. However, this caused issues with > animations in ParaView, since if a string changed height by gaining/losing > ascenders (e.g. "T" vs "n") or descenders (e.g. "j" vs "i"), the text would > jump around. So the change was made to have all strings always account for > ascenders/descenders to keep the baseline consistent in such cases. > > Dan Lipsa very recently added the option to vtkTextProperty to use a tight > bounding box: > > https://gitlab.kitware.com/vtk/vtk/merge_requests/1925 > > This is available in master, and should be in the upcoming 7.1 release. It > should allow you to render strings like in the "before" image. > > HTH, > Dave > > On Fri, Sep 23, 2016 at 7:27 AM, Tiago Nobrega wrote: > >> Hello, >> >> I apologize for not reading the guidelines properly and submitting an >> issue on Gitlab before trying the mailing list. Here's my issue: >> >> We are in the process of updating VTK from 6.3 to 7.0 and some of our >> tests are failing because text actors are being rendered differently. This >> usually happens when we update the library (minor differences are to be >> expected) but in this particular case it looks like a regression. >> >> The following code (python): >> >> ```python >> import vtk >> >> ren1 = vtk.vtkRenderer() >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren1) >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> prop_1 = vtk.vtkCaptionActor2D() >> prop_1.SetCaption('Hello') >> prop_1.SetAttachmentPoint((-0.1, 0.0, 0.0)) >> >> prop_1.GetCaptionTextProperty().Modified() >> >> ren1.AddActor(prop_1) >> ren1.SetBackground(0, 0, 0) >> ren1.GetActiveCamera().SetFocalPoint(0,0,0) >> ren1.GetActiveCamera().SetPosition(1,0,0) >> ren1.GetActiveCamera().SetViewUp(0,0,1) >> ren1.ResetCamera() >> renWin.SetSize(500, 500) >> >> iren.Start() >> ``` >> >> ... generates two different renderings depending on the version, as shown >> on the following image: >> >> http://imgur.com/w8VXM8z >> >> The left side is VTK 6.3, and the right one is 7.0. Both ran on a Windows >> 10 machine, but the issue was replicated on our Linux boxes too. In all >> cases we're still using the old OpenGL backend and not the new OpenGL2 one. >> The behavior in version 6.3 seems more "correct" in the sense that the text >> is more fully filling up the rectangle, with the default scaling mode being >> to scale to the prop. I've investigated the commit history for the classes >> that seem relevant - vtkCaptionActor2D, vtkTextActor, vtkTextProperty, etc >> - but nothing stood out as possible "culprits". >> >> Let me know if you need further info or clarifications. Thanks. >> >> Tiago Nobrega >> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daryl at daryllee.com Fri Sep 23 20:22:34 2016 From: daryl at daryllee.com (Daryl Lee) Date: Fri, 23 Sep 2016 17:22:34 -0700 (MST) Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 Message-ID: <1474676554593-5740525.post@n5.nabble.com> I am making my first attempt, without success, to build VTK 7.0.0 on 64-bit Windows 10 for Python 3.5, following the instructions in http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the issues I'm having, should I expect to be able to do this? -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-7-0-0-on-64-bit-Windows-10-Python-3-5-tp5740525.html Sent from the VTK - Users mailing list archive at Nabble.com. From victorpereriknyberg at gmail.com Sun Sep 25 08:53:29 2016 From: victorpereriknyberg at gmail.com (Victor Nyberg) Date: Sun, 25 Sep 2016 14:53:29 +0200 Subject: [vtkusers] What is the correct way of updating an actor with changes applied to SetUserTransform? Message-ID: <7975c079-eeab-b39a-3084-9c041c161c00@gmail.com> Hi, First of all I would like to apologise in advance if this question is too simple for bothering you with via the mailing list but I have not been able to figure it out after quite some investigation. I have a poly actor which has a vtkBoxWidget that is connected to a callback as from the example in the docs: |def widget_callback(obj, event): t = vtk.vtkTransform() obj.GetTransform(t) obj.GetProp3D().SetUserTransform(t) | All works fine and I am able to move and transform the actor with the widget but the transformation is applied to the UserTransform and not processed down to the actor properties. So if I call: |actor.GetPosition() | It returns the initial position prior to making the changes with the widget. And if I call: |actor.GetUserTransform().GetPosition() | I get the updated position relative to the starting point of the first interaction. Do I have to connect it all through a vtkTransformPolyDataFilter and then update the input connection to the mapper and also calculate the coordinate space offset or is there a simpler way of doing it? ... in short: *What is the correct way of updating an actor with changes applied to SetUserTransform?* Many thanks in advance. /Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Sep 25 12:25:09 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 26 Sep 2016 00:25:09 +0800 (CST) Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget Message-ID: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> Hi, I am using Activiz .NET 7.1. In my application, I use a C# List to store the vtkCaptionWidget objects. When the application is closed, then system access violation exception is thrown. In Visual Stuido debugger, no call stack can be tracked. Then I used windbg to debug the application. Windbg show below message: ** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Personal\Code\Dev\Chaos3D.UI.Application.FE\bin\Debug\vtkInteractionWidgets-7.1.dll - vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce: 00007ff9`20d1b50c 488b00 mov rax,qword ptr [rax] ds:00000000`00000000=???????????????? The call stack is: vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce vtkInteractionWidgets_7_1!vtkBalloonWidget::vtkBalloonWidget+0x98b7d vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150ba9 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150f73 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x26ed1f vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44c356 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44ca96 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44d3cb vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44a082 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x20c52b vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x2069c2 Kitware_VTK_vtkRenderingCore_Unmanaged!vtkColorTransferFunction_GetIndexedColor_35+0x4c844 What might be the problem? What I can guess is it is about some unmanaged VTK resource release issue. Thanks. Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sun Sep 25 16:50:24 2016 From: DLRdave at aol.com (David Cole) Date: Sun, 25 Sep 2016 16:50:24 -0400 Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget In-Reply-To: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> References: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> Message-ID: Try removing all your caption widgets from your list as the window is closing. David > On Sep 25, 2016, at 12:25 PM, Liu_tj wrote: > > Hi, > > I am using Activiz .NET 7.1. In my application, I use a C# List to store the vtkCaptionWidget objects. When the application is closed, then system access violation exception is thrown. In Visual Stuido debugger, no call stack can be tracked. Then I used windbg to debug the application. Windbg show below message: > > ** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Personal\Code\Dev\Chaos3D.UI.Application.FE\bin\Debug\vtkInteractionWidgets-7.1.dll - > vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce: > 00007ff9`20d1b50c 488b00 mov rax,qword ptr [rax] ds:00000000`00000000=???????????????? > > The call stack is: > vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce > vtkInteractionWidgets_7_1!vtkBalloonWidget::vtkBalloonWidget+0x98b7d > vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150ba9 > vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150f73 > vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x26ed1f > vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44c356 > vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44ca96 > vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44d3cb > vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44a082 > vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x20c52b > vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x2069c2 > Kitware_VTK_vtkRenderingCore_Unmanaged!vtkColorTransferFunction_GetIndexedColor_35+0x4c844 > > What might be the problem? What I can guess is it is about some unmanaged VTK resource release issue. > > Thanks. > Liu Peng > > > > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Sep 25 21:16:22 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 26 Sep 2016 09:16:22 +0800 (CST) Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget In-Reply-To: References: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> Message-ID: <714ff83e.2.15764107346.Coremail.tjlp@netease.com> Hi,David, These caption widgets are used for 3d model text annotation. My code architecture is as follow: Dicom3DVolumeRenderer class (derived from C# UserControl) defines a RenderWindowControl, calls TextAnnocation class which is responsible for generate the caption widget for 3d model. UserControl_Unloaded() is added for Dicom3DVolumeRenderer to remove all these widgets. But the crash happened before this method is called. Thanks ?2016-09-26?"David Cole" ??? -----????----- ???:"David Cole" ????:2016?09?26? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget Try removing all your caption widgets from your list as the window is closing. David On Sep 25, 2016, at 12:25 PM, Liu_tj wrote: Hi, I am using Activiz .NET 7.1. In my application, I use a C# List to store the vtkCaptionWidget objects. When the application is closed, then system access violation exception is thrown. In Visual Stuido debugger, no call stack can be tracked. Then I used windbg to debug the application. Windbg show below message: ** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Personal\Code\Dev\Chaos3D.UI.Application.FE\bin\Debug\vtkInteractionWidgets-7.1.dll - vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce: 00007ff9`20d1b50c 488b00 mov rax,qword ptr [rax] ds:00000000`00000000=???????????????? The call stack is: vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce vtkInteractionWidgets_7_1!vtkBalloonWidget::vtkBalloonWidget+0x98b7d vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150ba9 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150f73 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x26ed1f vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44c356 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44ca96 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44d3cb vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44a082 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x20c52b vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x2069c2 Kitware_VTK_vtkRenderingCore_Unmanaged!vtkColorTransferFunction_GetIndexedColor_35+0x4c844 What might be the problem? What I can guess is it is about some unmanaged VTK resource release issue. Thanks. Liu Peng _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From maogui.hu at gmail.com Sun Sep 25 23:33:00 2016 From: maogui.hu at gmail.com (maogui.hu) Date: Mon, 26 Sep 2016 11:33:00 +0800 Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget References: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> Message-ID: <2016092611325692684412@gmail.com> Hi Liu Peng, I'm just wondering did you build the Activiz.NET 7.1 yourself? Now I'm trying to compile Activiz.NET 7.1, however, it failed even at the very CMake configure step: CMake Error at C:/Program Files (x86)/VTK/lib/cmake/vtk-7.1/vtkModuleAPI.cmake:90 (message): No such module: "vtkChartsCore" Call Stack (most recent call first): CMakeLists.txt:485 (vtk_module_headers_load) Could you please give me some advice? Thanks very much! Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research, CAS From: Liu_tj Date: 2016-09-26 00:25 To: vtkusers Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget Hi, I am using Activiz .NET 7.1. In my application, I use a C# List to store the vtkCaptionWidget objects. When the application is closed, then system access violation exception is thrown. In Visual Stuido debugger, no call stack can be tracked. Then I used windbg to debug the application. Windbg show below message: ** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Personal\Code\Dev\Chaos3D.UI.Application.FE\bin\Debug\vtkInteractionWidgets-7.1.dll - vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce: 00007ff9`20d1b50c 488b00 mov rax,qword ptr [rax] ds:00000000`00000000=???????????????? The call stack is: vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce vtkInteractionWidgets_7_1!vtkBalloonWidget::vtkBalloonWidget+0x98b7d vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150ba9 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150f73 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x26ed1f vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44c356 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44ca96 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44d3cb vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44a082 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x20c52b vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x2069c2 Kitware_VTK_vtkRenderingCore_Unmanaged!vtkColorTransferFunction_GetIndexedColor_35+0x4c844 What might be the problem? What I can guess is it is about some unmanaged VTK resource release issue. Thanks. Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Mon Sep 26 03:16:59 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 26 Sep 2016 15:16:59 +0800 (CST) Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget In-Reply-To: <2016092611325692684412@gmail.com> References: <1731404a.4.157622a1c90.Coremail.tjlp@netease.com> <2016092611325692684412@gmail.com> Message-ID: <319d8482.10.157655a9d73.Coremail.tjlp@netease.com> No, my colleague build it. ?2016-09-26?"maogui.hu" ??? -----????----- ???:"maogui.hu" ????:2016?09?26? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget Hi Liu Peng, I'm just wondering did you build the Activiz.NET 7.1 yourself? Now I'm trying to compile Activiz.NET 7.1, however, it failed even at the very CMake configure step: CMake Error at C:/Program Files (x86)/VTK/lib/cmake/vtk-7.1/vtkModuleAPI.cmake:90 (message): No such module: "vtkChartsCore" Call Stack (most recent call first): CMakeLists.txt:485 (vtk_module_headers_load) Could you please give me some advice? Thanks very much! Maogui Hu, Ph.D. State Key Laboratory of Resources and Environmental Information System Institute of Geographic Sciences and Natural Resources Research, CAS From: Liu_tj Date: 2016-09-26 00:25 To: vtkusers Subject: [vtkusers] vtkOpenGLRenderWindow::GetFrontBuffer throw system access violation when using vtkCaptionWidget Hi, I am using Activiz .NET 7.1. In my application, I use a C# List to store the vtkCaptionWidget objects. When the application is closed, then system access violation exception is thrown. In Visual Stuido debugger, no call stack can be tracked. Then I used windbg to debug the application. Windbg show below message: ** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Personal\Code\Dev\Chaos3D.UI.Application.FE\bin\Debug\vtkInteractionWidgets-7.1.dll - vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce: 00007ff9`20d1b50c 488b00 mov rax,qword ptr [rax] ds:00000000`00000000=???????????????? The call stack is: vtkRenderingOpenGL_7_1!vtkOpenGLRenderWindow::GetFrontBuffer+0x1b51ce vtkInteractionWidgets_7_1!vtkBalloonWidget::vtkBalloonWidget+0x98b7d vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150ba9 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x150f73 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x26ed1f vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44c356 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44ca96 vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44d3cb vtkCommonCore_7_1!vtkAnimationCue::Finalize+0x44a082 vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x20c52b vtkRenderingCore_7_1!vtkTransformInterpolator::InterpolateTransform+0x2069c2 Kitware_VTK_vtkRenderingCore_Unmanaged!vtkColorTransferFunction_GetIndexedColor_35+0x4c844 What might be the problem? What I can guess is it is about some unmanaged VTK resource release issue. Thanks. Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From manfeyn at gmail.com Mon Sep 26 05:42:22 2016 From: manfeyn at gmail.com (feynman) Date: Mon, 26 Sep 2016 17:42:22 +0800 Subject: [vtkusers] Mapping a texture to a cylinder Message-ID: Hi guys: I am trying to map a texture to a cylinder. I followed the http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/TextureMapPlane and here is my codes: http://pastebin.com/T0H0tZJL . Everything works fine except there is two lines on the cylinder. It seems like the texture is mapped twice. [image: Inline image 1] Is there something I missed? Thanks for any help. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 49040 bytes Desc: not available URL: From manfeyn at gmail.com Mon Sep 26 06:24:44 2016 From: manfeyn at gmail.com (feynman) Date: Mon, 26 Sep 2016 18:24:44 +0800 Subject: [vtkusers] Mapping a texture to a cylinder In-Reply-To: References: Message-ID: I mapped a picture to the cylinder now. It turns out the picture is mapped twice. [image: Inline image 1] On Mon, Sep 26, 2016 at 5:42 PM, feynman wrote: > Hi guys: > > I am trying to map a texture to a cylinder. I followed the > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/TextureMapPlane and > here is my codes: http://pastebin.com/T0H0tZJL . > > Everything works fine except there is two lines on the cylinder. It seems > like the texture is mapped twice. > > [image: Inline image 1] > > Is there something I missed? > > Thanks for any help. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 138921 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 49040 bytes Desc: not available URL: From jp4work at gmail.com Mon Sep 26 07:15:44 2016 From: jp4work at gmail.com (JIA Pei) Date: Mon, 26 Sep 2016 04:15:44 -0700 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... Message-ID: Hi, all: It looks like current VTK has a big change? My WikiExamples are NOT able to build for now... Can anybody give me a hand? > In file included from > /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:5:0: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h: In instantiation of ?static > vtkSmartPointer vtkSmartPointer::New() [with T = vtkFreeTypeTools]?: > /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:24:83: > required from here > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: error: no matching > function for call to > ?vtkSmartPointer::vtkSmartPointer(vtkObject*, > vtkSmartPointerBase::NoReference)? > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: candidate: > vtkSmartPointer::vtkSmartPointer(T*, const > vtkSmartPointerBase::NoReference&) [with T = vtkFreeTypeTools] > vtkSmartPointer(T* r, const NoReference& n): vtkSmartPointerBase(r, n) > {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: conversion of > argument 1 would be ill-formed: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:37: error: invalid > conversion from ?vtkObject*? to ?vtkFreeTypeTools*? [-fpermissive] > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: candidate: > template vtkSmartPointer::vtkSmartPointer(const > vtkSmartPointer&) > vtkSmartPointer(const vtkSmartPointer& r): > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: template > argument deduction/substitution failed: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: note: mismatched > types ?const vtkSmartPointer? and ?vtkObject*? > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate: > vtkSmartPointer::vtkSmartPointer(T*) [with T = vtkFreeTypeTools] > vtkSmartPointer(T* r): vtkSmartPointerBase(r) {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate > expects 1 argument, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate: > vtkSmartPointer::vtkSmartPointer() [with T = vtkFreeTypeTools] > vtkSmartPointer() {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate > expects 0 arguments, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > vtkSmartPointer::vtkSmartPointer(const > vtkSmartPointer&) > class vtkSmartPointer: public vtkSmartPointerBase > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > expects 1 argument, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > vtkSmartPointer::vtkSmartPointer(vtkSmartPointer&&) > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > expects 1 argument, 2 provided > Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/build.make:65: > recipe for target > 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o' > failed > make[2]: *** > [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o] > Error 1 > make[2]: Leaving directory '/home/VTK/VTK/build' > CMakeFiles/Makefile2:33982: recipe for target > 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all' failed > make[1]: *** > [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all] Error 2 > make[1]: Leaving directory '/home/VTK/VTK/build' > Makefile:130: recipe for target 'all' failed > make: *** [all] Error 2 > > Cheers -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fraser.callaghan at sydney.edu.au Mon Sep 26 07:52:12 2016 From: fraser.callaghan at sydney.edu.au (Fraser Callaghan) Date: Mon, 26 Sep 2016 11:52:12 +0000 Subject: [vtkusers] Count polydata in VTI voxels Message-ID: <220BE31773B69D4C985CA5660D992DB1EB9043F8@ex-mbx-pro-04> Hello, I have a dense set of polydata and would like to convert to a vtkImageData with each cell containing a count of the number of points, from the poly data, that are in that cell (returning a CellData array) (I suppose any input data would be relevant). Does a method exist that will count the points within a voxel like this? Or am I better to loop through each cell counting as I go? (or something else - I guess some clever AMR approach would be most efficient?) Note - vtkGaussianSplatter does not give the result I want - when trying to limit a point's influence to only one cell either no influence of a "bubble" effect exists. Thanks for your help. Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: From rakesh.p at tataelxsi.co.in Mon Sep 26 09:43:15 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Mon, 26 Sep 2016 13:43:15 +0000 Subject: [vtkusers] Key events in QVTKWidget2 Message-ID: Hi, I would like to know how the events are propogated in case of QVTKWidget & QVTKWidget2. Is there any difference in these two? I have an application built with QVTKWidget. I have Graphics window derived from QVTKWidget #ifndef GRAPHICSWINDOW_H #define GRAPHICSWINDOW_H #include #include "QVTKWidget.h" #include class GraphicsWindow : public QVTKWidget { Q_OBJECT vtkRenderer *currentRenderer; public: GraphicsWindow(QWidget *parent = NULL); ~GraphicsWindow(); protected: virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); }; #endif The definition for this class is as follows: GraphicsWindow::GraphicsWindow(QWidget *parent) :QVTKWidget(parent) { #ifdef QT_DEBUG vtkObject::GlobalWarningDisplayOn(); #else vtkObject::GlobalWarningDisplayOff(); #endif currentRenderer = vtkRenderer::New(); currentRenderer->SetBackground( 0.5, 0.0, 0.0); // vtkGenericOpenGLRenderWindow *glrw = vtkGenericOpenGLRenderWindow::SafeDownCast(this->GetRenderWindow()); // glrw->AddRenderer(currentRenderer); // this->SetRenderWindow(glrw); this->GetRenderWindow()->AddRenderer(currentRenderer); this->GetRenderWindow()->GetInteractor()->SetInteractorStyle(currentInteractorStyle); vtkSmartPointer cubeSource = vtkSmartPointer::New(); cubeSource->SetCenter(10, 10, 10); cubeSource->SetXLength(10); cubeSource->SetYLength(10); cubeSource->SetZLength(30); cubeSource->Update(); vtkSmartPointer cubeMapper = vtkSmartPointer::New(); cubeMapper->SetInputConnection(cubeSource->GetOutputPort()); vtkActor *cubeActor = vtkActor::New(); cubeActor->SetMapper(cubeMapper); cubeActor->GetProperty()->SetRepresentationToWireframe(); cubeActor->GetProperty()->LightingOff(); cubeActor->GetProperty()->SetColor(1, 1, 1); currentRenderer->AddActor(cubeActor); } GraphicsWindow::~GraphicsWindow() { } void GraphicsWindow::keyPressEvent(QKeyEvent *event) { std::cout << "Key press" << std::endl; } void GraphicsWindow::keyReleaseEvent(QKeyEvent *event) { std::cout << "Key release" << std::endl; } When this application is built with QVTKWidget, the keypress and keyrelease events are executing fine. But when the same code built with QVTKWidget2 there key events are not processed. Is there any differences in these two widgets? Is there anything wrong I am doing? Kindly guide me as to how to process key events using QVTKWidget2. Thanks Warm Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 26 10:00:33 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 26 Sep 2016 10:00:33 -0400 Subject: [vtkusers] Count polydata in VTI voxels In-Reply-To: <220BE31773B69D4C985CA5660D992DB1EB9043F8@ex-mbx-pro-04> References: <220BE31773B69D4C985CA5660D992DB1EB9043F8@ex-mbx-pro-04> Message-ID: Fraser, I don't know if any filter in VTK do exactly what you want. You can try using the filter vtkBinningFilter from https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter Otherwise, you can loop through and count the points in each voxel manually. You'll probably want to use a subclass of vtkAbstractPointLocator (http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html) to accelerate point queries. HTH, Cory On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan < fraser.callaghan at sydney.edu.au> wrote: > Hello, > > I have a dense set of polydata and would like to convert to a vtkImageData > with each cell containing a count of the number of points, from the poly > data, that are in that cell (returning a CellData array) (I suppose any > input data would be relevant). > > Does a method exist that will count the points within a voxel like this? > Or am I better to loop through each cell counting as I go? (or something > else ? I guess some clever AMR approach would be most efficient?) > > Note ? vtkGaussianSplatter does not give the result I want ? when trying > to limit a point?s influence to only one cell either no influence of a > ?bubble? effect exists. > > > > Thanks for your help. > > Fraser > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 26 10:39:53 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 26 Sep 2016 10:39:53 -0400 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries In-Reply-To: <010AC7DD-5ABD-45B4-B19B-CBD39350C24E@kitware.com> References: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> <010AC7DD-5ABD-45B4-B19B-CBD39350C24E@kitware.com> Message-ID: Simon, Might you be able to try TJ's merge request and see if it restores the functionality you expected? Thanks, Cory On Mon, Sep 26, 2016 at 9:34 AM, T.J. Corona wrote: > Hi Simon, > > I have created a MR (https://gitlab.kitware.com/ > vtk/vtk/merge_requests/2007) that reverts the addition of an > exit-with-error when data arrays have the same name. > > Cory, > > I believe this MR also accounts for the segfault you originally reported > when reading in data arrays that have duplicate names. > > Sincerely, > T.J. > > Thomas J. Corona, Ph.D. > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4443 > > On Sep 23, 2016, at 1:41 PM, Cory Quammen > wrote: > > Simon, > > Thanks for your sleuthing and bug report. I don't believe your use case > was known when merge request !488 was merged. > > TJ, > > Can you have a look at Simon's issue? > > Thanks, > Cory > > On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < > Simon.Praetorius at tu-dresden.de> wrote: > >> I have found an old issue in the mantis bug-tracker addressing this >> topic: #15723 >> >> The answer was: "VTK file format does not support saving several time >> steps in a file" and a reference to the file-format description was given. >> This description (version 4.2.) is definitely not complete, thus it can not >> be an indicator for a support of writing timeseries or not. >> >> Although the file-format description does not show support for >> timeseries, at least in older vtk versions (before 6.3) it was supported. >> The source code of the XMLreader shows all the necessary parts to read the >> time-series, all the corresponding attributes are interpreted. The only >> problem is a change in the handling of duplicate names. This was done about >> a year ago in merge request !488. Since there is no test that reads back >> the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no error >> could be detected. The corresponding test to create the file was removed in >> June 2016. >> >> Thus, the questions are: >> - Is this feature quietly removed from VTK, or removed by accident since >> only few people use it? >> - Is the documentation of the file-format incomplete or the >> implementation simply not cleaned up? >> - Should the test for duplicate array names be rewritten in order to >> allow timeseries again? >> - There should be at least a comment in the file-format description that >> duplicate array names are not allowed! >> >> Maybe this issue could be forwarded to the developer mailing list. >> >> Simon >> >> >> Zitat von Simon Praetorius : >> >> >> Hi, >>> >>> When reading a VTK XML-file that includes timesteps, the >>> `vtkXMLDataReader:282` throws an error that multiple arrays with the same >>> name are present in the file. In general this is a valid test and the error >>> is correct, except for the case that multiple timesteps are written in the >>> file. An example file can be created by the test >>> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >>> >>> ```xml >>> >>> >>> >> format="appended" RangeMin="0" RangeMax="0" offset="0" /> >>> >> format="appended" RangeMin="1" RangeMax="1" offset="240" /> >>> >>> >>> >>> ``` >>> Here all DataArrays refer to the same dataset at different timesteps. >>> >>> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >>> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >>> >>> ``` >>> vtkXMLDataReader.cxx, line 282: Duplicate array names. >>> ``` >>> >>> Writing TimeSteps seems to be supported by the XMLReader and the >>> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is >>> the structure of the vtk format changed when writing timeseries, compared >>> to the xml-code shown above? >>> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >>> >>> >>> This issue refers to an old ParaView issue #5542 ( >>> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >>> with at least vtk-5.2 and paraview-3.6.2. >>> >>> Simon >>> >>> -- >>> Dr. Simon Praetorius >>> Institut f?r Wissenschaftliches Rechnen >>> Fachrichtung Mathematik >>> Technische Universit?t Dresden >>> Tel.: TUD-42377 >>> Mail: simon.praetorius at tu-dresden.de >>> Web: www.math.tu-dresden.de/~spraetor >>> >> >> >> >> -- >> Dr. Simon Praetorius >> Institut f?r Wissenschaftliches Rechnen >> Fachrichtung Mathematik >> Technische Universit?t Dresden >> Tel.: TUD-42377 >> Mail: simon.praetorius at tu-dresden.de >> Web: www.math.tu-dresden.de/~spraetor >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 26 10:43:37 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 26 Sep 2016 10:43:37 -0400 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries In-Reply-To: References: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> <010AC7DD-5ABD-45B4-B19B-CBD39350C24E@kitware.com> Message-ID: One more thing, Simon. Could you contribute a small data set with more than one time step so that we can add a test that uses it? Thanks, Cory On Mon, Sep 26, 2016 at 10:39 AM, Cory Quammen wrote: > Simon, > > Might you be able to try TJ's merge request and see if it restores the > functionality you expected? > > Thanks, > Cory > > On Mon, Sep 26, 2016 at 9:34 AM, T.J. Corona > wrote: > >> Hi Simon, >> >> I have created a MR (https://gitlab.kitware.com/vt >> k/vtk/merge_requests/2007) that reverts the addition of an >> exit-with-error when data arrays have the same name. >> >> Cory, >> >> I believe this MR also accounts for the segfault you originally reported >> when reading in data arrays that have duplicate names. >> >> Sincerely, >> T.J. >> >> Thomas J. Corona, Ph.D. >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4443 >> >> On Sep 23, 2016, at 1:41 PM, Cory Quammen >> wrote: >> >> Simon, >> >> Thanks for your sleuthing and bug report. I don't believe your use case >> was known when merge request !488 was merged. >> >> TJ, >> >> Can you have a look at Simon's issue? >> >> Thanks, >> Cory >> >> On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < >> Simon.Praetorius at tu-dresden.de> wrote: >> >>> I have found an old issue in the mantis bug-tracker addressing this >>> topic: #15723 >>> >>> The answer was: "VTK file format does not support saving several time >>> steps in a file" and a reference to the file-format description was given. >>> This description (version 4.2.) is definitely not complete, thus it can not >>> be an indicator for a support of writing timeseries or not. >>> >>> Although the file-format description does not show support for >>> timeseries, at least in older vtk versions (before 6.3) it was supported. >>> The source code of the XMLreader shows all the necessary parts to read the >>> time-series, all the corresponding attributes are interpreted. The only >>> problem is a change in the handling of duplicate names. This was done about >>> a year ago in merge request !488. Since there is no test that reads back >>> the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no >>> error could be detected. The corresponding test to create the file was >>> removed in June 2016. >>> >>> Thus, the questions are: >>> - Is this feature quietly removed from VTK, or removed by accident since >>> only few people use it? >>> - Is the documentation of the file-format incomplete or the >>> implementation simply not cleaned up? >>> - Should the test for duplicate array names be rewritten in order to >>> allow timeseries again? >>> - There should be at least a comment in the file-format description that >>> duplicate array names are not allowed! >>> >>> Maybe this issue could be forwarded to the developer mailing list. >>> >>> Simon >>> >>> >>> Zitat von Simon Praetorius : >>> >>> >>> Hi, >>>> >>>> When reading a VTK XML-file that includes timesteps, the >>>> `vtkXMLDataReader:282` throws an error that multiple arrays with the same >>>> name are present in the file. In general this is a valid test and the error >>>> is correct, except for the case that multiple timesteps are written in the >>>> file. An example file can be created by the test >>>> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >>>> >>>> ```xml >>>> >>>> >>>> >>> format="appended" RangeMin="0" RangeMax="0" offset="0" /> >>>> >>> format="appended" RangeMin="1" RangeMax="1" offset="240" /> >>>> >>>> >>>> >>>> ``` >>>> Here all DataArrays refer to the same dataset at different timesteps. >>>> >>>> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >>>> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >>>> >>>> ``` >>>> vtkXMLDataReader.cxx, line 282: Duplicate array names. >>>> ``` >>>> >>>> Writing TimeSteps seems to be supported by the XMLReader and the >>>> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is >>>> the structure of the vtk format changed when writing timeseries, compared >>>> to the xml-code shown above? >>>> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >>>> >>>> >>>> This issue refers to an old ParaView issue #5542 ( >>>> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >>>> with at least vtk-5.2 and paraview-3.6.2. >>>> >>>> Simon >>>> >>>> -- >>>> Dr. Simon Praetorius >>>> Institut f?r Wissenschaftliches Rechnen >>>> Fachrichtung Mathematik >>>> Technische Universit?t Dresden >>>> Tel.: TUD-42377 >>>> Mail: simon.praetorius at tu-dresden.de >>>> Web: www.math.tu-dresden.de/~spraetor >>>> >>> >>> >>> >>> -- >>> Dr. Simon Praetorius >>> Institut f?r Wissenschaftliches Rechnen >>> Fachrichtung Mathematik >>> Technische Universit?t Dresden >>> Tel.: TUD-42377 >>> Mail: simon.praetorius at tu-dresden.de >>> Web: www.math.tu-dresden.de/~spraetor >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> >> >> > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Sep 26 10:52:52 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Sep 2016 10:52:52 -0400 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: Message-ID: Do you have VTK_USE_SYSTEM_FREETYPE ON in your CMakeCache.txt file? If so, set it to OFF. On Mon, Sep 26, 2016 at 7:15 AM, JIA Pei wrote: > > Hi, all: > > > It looks like current VTK has a big change? > My WikiExamples are NOT able to build for now... > Can anybody give me a hand? > >> >> In file included from >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:5:0: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h: In instantiation of ?static >> vtkSmartPointer vtkSmartPointer::New() [with T = vtkFreeTypeTools]?: >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:24:83: >> required from here >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: error: no matching >> function for call to >> ?vtkSmartPointer::vtkSmartPointer(vtkObject*, >> vtkSmartPointerBase::NoReference)? >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer(T*, const >> vtkSmartPointerBase::NoReference&) [with T = vtkFreeTypeTools] >> vtkSmartPointer(T* r, const NoReference& n): vtkSmartPointerBase(r, n) >> {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: conversion of >> argument 1 would be ill-formed: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:37: error: invalid >> conversion from ?vtkObject*? to ?vtkFreeTypeTools*? [-fpermissive] >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: candidate: >> template vtkSmartPointer::vtkSmartPointer(const >> vtkSmartPointer&) >> vtkSmartPointer(const vtkSmartPointer& r): >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: template >> argument deduction/substitution failed: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: note: mismatched >> types ?const vtkSmartPointer? and ?vtkObject*? >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer(T*) [with T = vtkFreeTypeTools] >> vtkSmartPointer(T* r): vtkSmartPointerBase(r) {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate >> expects 1 argument, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer() [with T = vtkFreeTypeTools] >> vtkSmartPointer() {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate >> expects 0 arguments, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: >> vtkSmartPointer::vtkSmartPointer(const >> vtkSmartPointer&) >> class vtkSmartPointer: public vtkSmartPointerBase >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate >> expects 1 argument, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: >> vtkSmartPointer::vtkSmartPointer(vtkSmartPointer&&) >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate >> expects 1 argument, 2 provided >> Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/build.make:65: >> recipe for target >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o' >> failed >> make[2]: *** >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o] >> Error 1 >> make[2]: Leaving directory '/home/VTK/VTK/build' >> CMakeFiles/Makefile2:33982: recipe for target >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all' failed >> make[1]: *** >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all] Error 2 >> make[1]: Leaving directory '/home/VTK/VTK/build' >> Makefile:130: recipe for target 'all' failed >> make: *** [all] Error 2 >> > > Cheers > -- > > Pei JIA, Ph.D. > > Email: jp4work at gmail.com > cell in Canada: +1 778-863-5816 > cell in China: +86 186-8244-3503 > > Welcome to Vision Open > http://www.visionopen.com > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.lonie at kitware.com Mon Sep 26 11:20:47 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 26 Sep 2016 11:20:47 -0400 Subject: [vtkusers] vtkCaptionActor2D not filling its prop correctly In-Reply-To: References: Message-ID: On Fri, Sep 23, 2016 at 3:12 PM, Tiago Nobrega wrote: > Hi David, > > Looks like you were right on the money. After some consideration here we > ended up agreeing with you guys so we'll just update the images on our end. > For reference, I did pull master and try the new 'tight' bounding box > setting and it did indeed generate my base image. Do we have a ballpark for > 7.1's release date? > Great, glad that worked for you! 7.1 should be fairly soon, we're expecting to branch for it any day now. After a couple release candidate cycles it will be released officially. So maybe a month or two if I had to guess. Cheers, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgirou at mediglass.net Mon Sep 26 12:14:21 2016 From: mgirou at mediglass.net (mgirou@mediglass) Date: Mon, 26 Sep 2016 11:14:21 -0500 Subject: [vtkusers] unsubscribe In-Reply-To: References: Message-ID: <029801d21811$0a95dd30$1fc19790$@net> unsub -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: Monday, September 26, 2016 11:00 AM To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 149, Issue 38 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit http://public.kitware.com/mailman/listinfo/vtkusers or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. vtkSmartPoint() changed? Current VTK-git won't build... (JIA Pei) 2. Count polydata in VTI voxels (Fraser Callaghan) 3. Key events in QVTKWidget2 (Rakesh Patil) 4. Re: Count polydata in VTI voxels (Cory Quammen) 5. Re: Possible Bug in vtkXMLReader when reading timeseries (Cory Quammen) 6. Re: Possible Bug in vtkXMLReader when reading timeseries (Cory Quammen) 7. Re: vtkSmartPoint() changed? Current VTK-git won't build... (Bill Lorensen) 8. Re: vtkCaptionActor2D not filling its prop correctly (David Lonie) ---------------------------------------------------------------------- Message: 1 Date: Mon, 26 Sep 2016 04:15:44 -0700 From: JIA Pei To: vtkusers at vtk.org Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... Message-ID: Content-Type: text/plain; charset="utf-8" Hi, all: It looks like current VTK has a big change? My WikiExamples are NOT able to build for now... Can anybody give me a hand? > In file included from > /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:5:0: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h: In instantiation of > ?static vtkSmartPointer vtkSmartPointer::New() [with T = vtkFreeTypeTools]?: > /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:24:83: > required from here > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: error: no matching > function for call to > ?vtkSmartPointer::vtkSmartPointer(vtkObject*, > vtkSmartPointerBase::NoReference)? > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: candidate: > vtkSmartPointer::vtkSmartPointer(T*, const > vtkSmartPointerBase::NoReference&) [with T = vtkFreeTypeTools] > vtkSmartPointer(T* r, const NoReference& n): vtkSmartPointerBase(r, > n) {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: conversion of > argument 1 would be ill-formed: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:37: error: invalid > conversion from ?vtkObject*? to ?vtkFreeTypeTools*? [-fpermissive] > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: candidate: > template vtkSmartPointer::vtkSmartPointer(const > vtkSmartPointer&) > vtkSmartPointer(const vtkSmartPointer& r): > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: template > argument deduction/substitution failed: > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: note: mismatched > types ?const vtkSmartPointer? and ?vtkObject*? > return vtkSmartPointer(T::New(), NoReference()); > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate: > vtkSmartPointer::vtkSmartPointer(T*) [with T = vtkFreeTypeTools] > vtkSmartPointer(T* r): vtkSmartPointerBase(r) {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate > expects 1 argument, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate: > vtkSmartPointer::vtkSmartPointer() [with T = vtkFreeTypeTools] > vtkSmartPointer() {} > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate > expects 0 arguments, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > vtkSmartPointer::vtkSmartPointer(const > vtkSmartPointer&) > class vtkSmartPointer: public vtkSmartPointerBase > ^ > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > expects 1 argument, 2 provided > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > vtkSmartPointer::vtkSmartPointer(vtkSmartPointer&&) > /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > expects 1 argument, 2 provided > Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/build.make:65: > recipe for target > 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o ' > failed > make[2]: *** > [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText > .cxx.o] > Error 1 > make[2]: Leaving directory '/home/VTK/VTK/build' > CMakeFiles/Makefile2:33982: recipe for target > 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all' > failed > make[1]: *** > [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all] > Error 2 > make[1]: Leaving directory '/home/VTK/VTK/build' > Makefile:130: recipe for target 'all' failed > make: *** [all] Error 2 > > Cheers -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 26 Sep 2016 11:52:12 +0000 From: Fraser Callaghan To: "vtkusers at vtk.org" Subject: [vtkusers] Count polydata in VTI voxels Message-ID: <220BE31773B69D4C985CA5660D992DB1EB9043F8 at ex-mbx-pro-04> Content-Type: text/plain; charset="us-ascii" Hello, I have a dense set of polydata and would like to convert to a vtkImageData with each cell containing a count of the number of points, from the poly data, that are in that cell (returning a CellData array) (I suppose any input data would be relevant). Does a method exist that will count the points within a voxel like this? Or am I better to loop through each cell counting as I go? (or something else - I guess some clever AMR approach would be most efficient?) Note - vtkGaussianSplatter does not give the result I want - when trying to limit a point's influence to only one cell either no influence of a "bubble" effect exists. Thanks for your help. Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Mon, 26 Sep 2016 13:43:15 +0000 From: "Rakesh Patil" To: "vtkusers at vtk.org" Subject: [vtkusers] Key events in QVTKWidget2 Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, I would like to know how the events are propogated in case of QVTKWidget & QVTKWidget2. Is there any difference in these two? I have an application built with QVTKWidget. I have Graphics window derived from QVTKWidget #ifndef GRAPHICSWINDOW_H #define GRAPHICSWINDOW_H #include #include "QVTKWidget.h" #include class GraphicsWindow : public QVTKWidget { Q_OBJECT vtkRenderer *currentRenderer; public: GraphicsWindow(QWidget *parent = NULL); ~GraphicsWindow(); protected: virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); }; #endif The definition for this class is as follows: GraphicsWindow::GraphicsWindow(QWidget *parent) :QVTKWidget(parent) { #ifdef QT_DEBUG vtkObject::GlobalWarningDisplayOn(); #else vtkObject::GlobalWarningDisplayOff(); #endif currentRenderer = vtkRenderer::New(); currentRenderer->SetBackground( 0.5, 0.0, 0.0); // vtkGenericOpenGLRenderWindow *glrw = vtkGenericOpenGLRenderWindow::SafeDownCast(this->GetRenderWindow()); // glrw->AddRenderer(currentRenderer); // this->SetRenderWindow(glrw); this->GetRenderWindow()->AddRenderer(currentRenderer); this->GetRenderWindow()->GetInteractor()->SetInteractorStyle(currentInteract orStyle); vtkSmartPointer cubeSource = vtkSmartPointer::New(); cubeSource->SetCenter(10, 10, 10); cubeSource->SetXLength(10); cubeSource->SetYLength(10); cubeSource->SetZLength(30); cubeSource->Update(); vtkSmartPointer cubeMapper = vtkSmartPointer::New(); cubeMapper->SetInputConnection(cubeSource->GetOutputPort()); vtkActor *cubeActor = vtkActor::New(); cubeActor->SetMapper(cubeMapper); cubeActor->GetProperty()->SetRepresentationToWireframe(); cubeActor->GetProperty()->LightingOff(); cubeActor->GetProperty()->SetColor(1, 1, 1); currentRenderer->AddActor(cubeActor); } GraphicsWindow::~GraphicsWindow() { } void GraphicsWindow::keyPressEvent(QKeyEvent *event) { std::cout << "Key press" << std::endl; } void GraphicsWindow::keyReleaseEvent(QKeyEvent *event) { std::cout << "Key release" << std::endl; } When this application is built with QVTKWidget, the keypress and keyrelease events are executing fine. But when the same code built with QVTKWidget2 there key events are not processed. Is there any differences in these two widgets? Is there anything wrong I am doing? Kindly guide me as to how to process key events using QVTKWidget2. Thanks Warm Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 4 Date: Mon, 26 Sep 2016 10:00:33 -0400 From: Cory Quammen To: Fraser Callaghan Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] Count polydata in VTI voxels Message-ID: Content-Type: text/plain; charset="utf-8" Fraser, I don't know if any filter in VTK do exactly what you want. You can try using the filter vtkBinningFilter from https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter Otherwise, you can loop through and count the points in each voxel manually. You'll probably want to use a subclass of vtkAbstractPointLocator (http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html) to accelerate point queries. HTH, Cory On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan < fraser.callaghan at sydney.edu.au> wrote: > Hello, > > I have a dense set of polydata and would like to convert to a > vtkImageData with each cell containing a count of the number of > points, from the poly data, that are in that cell (returning a > CellData array) (I suppose any input data would be relevant). > > Does a method exist that will count the points within a voxel like this? > Or am I better to loop through each cell counting as I go? (or > something else ? I guess some clever AMR approach would be most > efficient?) > > Note ? vtkGaussianSplatter does not give the result I want ? when > trying to limit a point?s influence to only one cell either no > influence of a ?bubble? effect exists. > > > > Thanks for your help. > > Fraser > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 5 Date: Mon, 26 Sep 2016 10:39:53 -0400 From: Cory Quammen To: "T.J. Corona" Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries Message-ID: Content-Type: text/plain; charset="utf-8" Simon, Might you be able to try TJ's merge request and see if it restores the functionality you expected? Thanks, Cory On Mon, Sep 26, 2016 at 9:34 AM, T.J. Corona wrote: > Hi Simon, > > I have created a MR (https://gitlab.kitware.com/ > vtk/vtk/merge_requests/2007) that reverts the addition of an > exit-with-error when data arrays have the same name. > > Cory, > > I believe this MR also accounts for the segfault you originally > reported when reading in data arrays that have duplicate names. > > Sincerely, > T.J. > > Thomas J. Corona, Ph.D. > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4443 > > On Sep 23, 2016, at 1:41 PM, Cory Quammen > wrote: > > Simon, > > Thanks for your sleuthing and bug report. I don't believe your use > case was known when merge request !488 was merged. > > TJ, > > Can you have a look at Simon's issue? > > Thanks, > Cory > > On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < > Simon.Praetorius at tu-dresden.de> wrote: > >> I have found an old issue in the mantis bug-tracker addressing this >> topic: #15723 >> >> The answer was: "VTK file format does not support saving several time >> steps in a file" and a reference to the file-format description was given. >> This description (version 4.2.) is definitely not complete, thus it >> can not be an indicator for a support of writing timeseries or not. >> >> Although the file-format description does not show support for >> timeseries, at least in older vtk versions (before 6.3) it was supported. >> The source code of the XMLreader shows all the necessary parts to >> read the time-series, all the corresponding attributes are >> interpreted. The only problem is a change in the handling of >> duplicate names. This was done about a year ago in merge request >> !488. Since there is no test that reads back the files generated by >> `IO/XML/Testing/Cxx/TestXMLCInterface.c` no error could be detected. >> The corresponding test to create the file was removed in June 2016. >> >> Thus, the questions are: >> - Is this feature quietly removed from VTK, or removed by accident >> since only few people use it? >> - Is the documentation of the file-format incomplete or the >> implementation simply not cleaned up? >> - Should the test for duplicate array names be rewritten in order to >> allow timeseries again? >> - There should be at least a comment in the file-format description >> that duplicate array names are not allowed! >> >> Maybe this issue could be forwarded to the developer mailing list. >> >> Simon >> >> >> Zitat von Simon Praetorius : >> >> >> Hi, >>> >>> When reading a VTK XML-file that includes timesteps, the >>> `vtkXMLDataReader:282` throws an error that multiple arrays with the >>> same name are present in the file. In general this is a valid test >>> and the error is correct, except for the case that multiple >>> timesteps are written in the file. An example file can be created by >>> the test >>> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >>> >>> ```xml >>> >>> >>> >> format="appended" RangeMin="0" RangeMax="0" offset="0" /> >>> >> format="appended" RangeMin="1" RangeMax="1" offset="240" /> >>> >>> >>> >>> ``` >>> Here all DataArrays refer to the same dataset at different timesteps. >>> >>> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >>> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >>> >>> ``` >>> vtkXMLDataReader.cxx, line 282: Duplicate array names. >>> ``` >>> >>> Writing TimeSteps seems to be supported by the XMLReader and the >>> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any >>> more? Is the structure of the vtk format changed when writing >>> timeseries, compared to the xml-code shown above? >>> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >>> >>> >>> This issue refers to an old ParaView issue #5542 ( >>> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >>> with at least vtk-5.2 and paraview-3.6.2. >>> >>> Simon >>> >>> -- >>> Dr. Simon Praetorius >>> Institut f?r Wissenschaftliches Rechnen Fachrichtung Mathematik >>> Technische Universit?t Dresden >>> Tel.: TUD-42377 >>> Mail: simon.praetorius at tu-dresden.de >>> Web: www.math.tu-dresden.de/~spraetor >>> >> >> >> >> -- >> Dr. Simon Praetorius >> Institut f?r Wissenschaftliches Rechnen >> Fachrichtung Mathematik >> Technische Universit?t Dresden >> Tel.: TUD-42377 >> Mail: simon.praetorius at tu-dresden.de >> Web: www.math.tu-dresden.de/~spraetor >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 6 Date: Mon, 26 Sep 2016 10:43:37 -0400 From: Cory Quammen To: "T.J. Corona" Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries Message-ID: Content-Type: text/plain; charset="utf-8" One more thing, Simon. Could you contribute a small data set with more than one time step so that we can add a test that uses it? Thanks, Cory On Mon, Sep 26, 2016 at 10:39 AM, Cory Quammen wrote: > Simon, > > Might you be able to try TJ's merge request and see if it restores the > functionality you expected? > > Thanks, > Cory > > On Mon, Sep 26, 2016 at 9:34 AM, T.J. Corona > wrote: > >> Hi Simon, >> >> I have created a MR (https://gitlab.kitware.com/vt >> k/vtk/merge_requests/2007) that reverts the addition of an >> exit-with-error when data arrays have the same name. >> >> Cory, >> >> I believe this MR also accounts for the segfault you originally reported >> when reading in data arrays that have duplicate names. >> >> Sincerely, >> T.J. >> >> Thomas J. Corona, Ph.D. >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4443 >> >> On Sep 23, 2016, at 1:41 PM, Cory Quammen >> wrote: >> >> Simon, >> >> Thanks for your sleuthing and bug report. I don't believe your use case >> was known when merge request !488 was merged. >> >> TJ, >> >> Can you have a look at Simon's issue? >> >> Thanks, >> Cory >> >> On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < >> Simon.Praetorius at tu-dresden.de> wrote: >> >>> I have found an old issue in the mantis bug-tracker addressing this >>> topic: #15723 >>> >>> The answer was: "VTK file format does not support saving several time >>> steps in a file" and a reference to the file-format description was given. >>> This description (version 4.2.) is definitely not complete, thus it can not >>> be an indicator for a support of writing timeseries or not. >>> >>> Although the file-format description does not show support for >>> timeseries, at least in older vtk versions (before 6.3) it was supported. >>> The source code of the XMLreader shows all the necessary parts to read the >>> time-series, all the corresponding attributes are interpreted. The only >>> problem is a change in the handling of duplicate names. This was done about >>> a year ago in merge request !488. Since there is no test that reads back >>> the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no >>> error could be detected. The corresponding test to create the file was >>> removed in June 2016. >>> >>> Thus, the questions are: >>> - Is this feature quietly removed from VTK, or removed by accident since >>> only few people use it? >>> - Is the documentation of the file-format incomplete or the >>> implementation simply not cleaned up? >>> - Should the test for duplicate array names be rewritten in order to >>> allow timeseries again? >>> - There should be at least a comment in the file-format description that >>> duplicate array names are not allowed! >>> >>> Maybe this issue could be forwarded to the developer mailing list. >>> >>> Simon >>> >>> >>> Zitat von Simon Praetorius : >>> >>> >>> Hi, >>>> >>>> When reading a VTK XML-file that includes timesteps, the >>>> `vtkXMLDataReader:282` throws an error that multiple arrays with the same >>>> name are present in the file. In general this is a valid test and the error >>>> is correct, except for the case that multiple timesteps are written in the >>>> file. An example file can be created by the test >>>> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >>>> >>>> ```xml >>>> >>>> >>>> >>> format="appended" RangeMin="0" RangeMax="0" offset="0" /> >>>> >>> format="appended" RangeMin="1" RangeMax="1" offset="240" /> >>>> >>>> >>>> >>>> ``` >>>> Here all DataArrays refer to the same dataset at different timesteps. >>>> >>>> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >>>> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >>>> >>>> ``` >>>> vtkXMLDataReader.cxx, line 282: Duplicate array names. >>>> ``` >>>> >>>> Writing TimeSteps seems to be supported by the XMLReader and the >>>> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is >>>> the structure of the vtk format changed when writing timeseries, compared >>>> to the xml-code shown above? >>>> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >>>> >>>> >>>> This issue refers to an old ParaView issue #5542 ( >>>> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >>>> with at least vtk-5.2 and paraview-3.6.2. >>>> >>>> Simon >>>> >>>> -- >>>> Dr. Simon Praetorius >>>> Institut f?r Wissenschaftliches Rechnen >>>> Fachrichtung Mathematik >>>> Technische Universit?t Dresden >>>> Tel.: TUD-42377 >>>> Mail: simon.praetorius at tu-dresden.de >>>> Web: www.math.tu-dresden.de/~spraetor >>>> >>> >>> >>> >>> -- >>> Dr. Simon Praetorius >>> Institut f?r Wissenschaftliches Rechnen >>> Fachrichtung Mathematik >>> Technische Universit?t Dresden >>> Tel.: TUD-42377 >>> Mail: simon.praetorius at tu-dresden.de >>> Web: www.math.tu-dresden.de/~spraetor >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> >> >> > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 7 Date: Mon, 26 Sep 2016 10:52:52 -0400 From: Bill Lorensen To: JIA Pei Cc: VTK Users Subject: Re: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... Message-ID: Content-Type: text/plain; charset=UTF-8 Do you have VTK_USE_SYSTEM_FREETYPE ON in your CMakeCache.txt file? If so, set it to OFF. On Mon, Sep 26, 2016 at 7:15 AM, JIA Pei wrote: > > Hi, all: > > > It looks like current VTK has a big change? > My WikiExamples are NOT able to build for now... > Can anybody give me a hand? > >> >> In file included from >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:5:0: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h: In instantiation of ?static >> vtkSmartPointer vtkSmartPointer::New() [with T = vtkFreeTypeTools]?: >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:24:83: >> required from here >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: error: no matching >> function for call to >> ?vtkSmartPointer::vtkSmartPointer(vtkObject*, >> vtkSmartPointerBase::NoReference)? >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer(T*, const >> vtkSmartPointerBase::NoReference&) [with T = vtkFreeTypeTools] >> vtkSmartPointer(T* r, const NoReference& n): vtkSmartPointerBase(r, n) >> {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: conversion of >> argument 1 would be ill-formed: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:37: error: invalid >> conversion from ?vtkObject*? to ?vtkFreeTypeTools*? [-fpermissive] >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: candidate: >> template vtkSmartPointer::vtkSmartPointer(const >> vtkSmartPointer&) >> vtkSmartPointer(const vtkSmartPointer& r): >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: template >> argument deduction/substitution failed: >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: note: mismatched >> types ?const vtkSmartPointer? and ?vtkObject*? >> return vtkSmartPointer(T::New(), NoReference()); >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer(T*) [with T = vtkFreeTypeTools] >> vtkSmartPointer(T* r): vtkSmartPointerBase(r) {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate >> expects 1 argument, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate: >> vtkSmartPointer::vtkSmartPointer() [with T = vtkFreeTypeTools] >> vtkSmartPointer() {} >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate >> expects 0 arguments, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: >> vtkSmartPointer::vtkSmartPointer(const >> vtkSmartPointer&) >> class vtkSmartPointer: public vtkSmartPointerBase >> ^ >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate >> expects 1 argument, 2 provided >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: >> vtkSmartPointer::vtkSmartPointer(vtkSmartPointer&&) >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate >> expects 1 argument, 2 provided >> Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/build.make:65: >> recipe for target >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o ' >> failed >> make[2]: *** >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText.cxx.o ] >> Error 1 >> make[2]: Leaving directory '/home/VTK/VTK/build' >> CMakeFiles/Makefile2:33982: recipe for target >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all' failed >> make[1]: *** >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all] Error 2 >> make[1]: Leaving directory '/home/VTK/VTK/build' >> Makefile:130: recipe for target 'all' failed >> make: *** [all] Error 2 >> > > Cheers > -- > > Pei JIA, Ph.D. > > Email: jp4work at gmail.com > cell in Canada: +1 778-863-5816 > cell in China: +86 186-8244-3503 > > Welcome to Vision Open > http://www.visionopen.com > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com ------------------------------ Message: 8 Date: Mon, 26 Sep 2016 11:20:47 -0400 From: David Lonie To: Tiago Nobrega Cc: "vtkusers at vtk.org" Subject: Re: [vtkusers] vtkCaptionActor2D not filling its prop correctly Message-ID: Content-Type: text/plain; charset="utf-8" On Fri, Sep 23, 2016 at 3:12 PM, Tiago Nobrega wrote: > Hi David, > > Looks like you were right on the money. After some consideration here we > ended up agreeing with you guys so we'll just update the images on our end. > For reference, I did pull master and try the new 'tight' bounding box > setting and it did indeed generate my base image. Do we have a ballpark for > 7.1's release date? > Great, glad that worked for you! 7.1 should be fairly soon, we're expecting to branch for it any day now. After a couple release candidate cycles it will be released officially. So maybe a month or two if I had to guess. Cheers, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ------------------------------ End of vtkusers Digest, Vol 149, Issue 38 ***************************************** From ben.boeckel at kitware.com Mon Sep 26 13:59:31 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Sep 2016 13:59:31 -0400 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: <1474676554593-5740525.post@n5.nabble.com> References: <1474676554593-5740525.post@n5.nabble.com> Message-ID: <20160926175931.GA20729@megas.kitware.com> On Fri, Sep 23, 2016 at 17:22:34 -0700, Daryl Lee wrote: > I am making my first attempt, without success, to build VTK 7.0.0 on 64-bit > Windows 10 for Python 3.5, following the instructions in > http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the issues > I'm having, should I expect to be able to do this? We test Python 3.4 on Windows 7 (and 3.5 on Linux) now. At the time of 7.0.0's release, we were testing 3.2 on Windows 7 (and 3.4 on Linux), so I don't know the state of 3.5 for the release, but I don't think there were any changes for 3.5 specifically. What errors are you seeing? Also, what CMake/Visual Studio versions? --Ben From chuck.atkins at kitware.com Mon Sep 26 14:01:38 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Mon, 26 Sep 2016 14:01:38 -0400 Subject: [vtkusers] Which Compilers and Operating Systems to you require for VTK and / ParaView? In-Reply-To: References: Message-ID: Just as a follow-up, I will be leaving this survey open all week and stop accepting responses on Friday, October 30. ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Fri, Sep 23, 2016 at 3:05 PM, Chuck Atkins wrote: > We're trying to identify where we may have gaps in our testing > infrastructure for both VTK and ParaView and how to prioritize filling > those gaps. Certain compilers like GCC and Intel on Linux or Visual Studio > on Windows will essentially always be supported with issues addressed > ASAP. Others, however, sometimes come and go depending on available > testing resources, licensing, customer demand, etc. > > Please take a brief moment to let us know which operating systems and > compilers are important to howe you use VTK and ParaView from a testing and > support standpoint. The survey is very brief and should only take a minute > or two. > > Note: If you are a current support customer with specific critical > requirements, please feel free to email me off-list. > > https://docs.google.com/forms/d/e/1FAIpQLSczYSEWMr90ywhTg1jL > g2u6JWVNRh6zUzCLeFPRnc_Qyc13dg/viewform > > Thank you. > > ---------- > Chuck Atkins > Staff R&D Engineer, Scientific Computing > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Sep 26 15:03:58 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Sep 2016 15:03:58 -0400 Subject: [vtkusers] [vtk-developers] Which Compilers and Operating Systems to you require for VTK and / ParaView? In-Reply-To: References: Message-ID: <20160926190358.GA20771@megas.kitware.com> On Mon, Sep 26, 2016 at 14:01:38 -0400, Chuck Atkins wrote: > Just as a follow-up, I will be leaving this survey open all week and stop > accepting responses on Friday, October 30. I assume you mean September 30? --Ben From daryl at daryllee.com Mon Sep 26 16:01:45 2016 From: daryl at daryllee.com (Daryl Lee) Date: Mon, 26 Sep 2016 14:01:45 -0600 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: <20160926175931.GA20729@megas.kitware.com> References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> Message-ID: On 9/26/16 11:59 AM, Ben Boeckel wrote: > On Fri, Sep 23, 2016 at 17:22:34 -0700, Daryl Lee wrote: >> I am making my first attempt, without success, to build VTK 7.0.0 on 64-bit >> Windows 10 for Python 3.5, following the instructions in >> http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the issues >> I'm having, should I expect to be able to do this? > We test Python 3.4 on Windows 7 (and 3.5 on Linux) now. At the time of > 7.0.0's release, we were testing 3.2 on Windows 7 (and 3.4 on Linux), so > I don't know the state of 3.5 for the release, but I don't think there > were any changes for 3.5 specifically. > > What errors are you seeing? Also, what CMake/Visual Studio versions? > > --Ben Thanks for the response. Environment: CMake 3.6.2 Visual Studio 2015 14.0.25431.01 Update 3 Windows 10 Home Version 1511 (64-bit) 1. I get a couple hundred warnings on exception processing, with the suggestion to set the /EHsc option, but I can't figure out in Visual Studio where to set that. I've explored the ALL_BUILD options and can't find any place for that, nor can I find it in any of the individual projects I examined. 2. The first of a long list of actual errors is in lookup3.c, where is found this sequence at line 57: #ifndef WIN32 #include #endif where it can't find sys/param.h. My guess is that since this is a 64-bit machine, WIN32 may not be defined, but since it's a Windows machine, param.h may not exist. Any help would be appreciated. -- Daryl Lee We dance round in a ring and suppose, but the Secret sits in the center and knows. -- Robert Frost From ben.boeckel at kitware.com Mon Sep 26 16:35:53 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Sep 2016 16:35:53 -0400 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> Message-ID: <20160926203553.GA6330@rotor.kitware.com> On Mon, Sep 26, 2016 at 14:01:45 -0600, Daryl Lee wrote: > Environment: > CMake 3.6.2 > Visual Studio 2015 14.0.25431.01 Update 3 > Windows 10 Home Version 1511 (64-bit) > > 1. I get a couple hundred warnings on exception processing, with the > suggestion to set the /EHsc option, but I can't figure out in Visual > Studio where to set that. I've explored the ALL_BUILD options and can't > find any place for that, nor can I find it in any of the individual > projects I examined. You can set it in CMake by adding it to CMAKE_CXX_FLAGS (which works better anyways since editing the .vcxproj files will be overridden by CMake when it reruns). > 2. The first of a long list of actual errors is in lookup3.c, where is > found this sequence at line 57: > > #ifndef WIN32 > #include > #endif > > where it can't find sys/param.h. My guess is that since this is a > 64-bit machine, WIN32 may not be defined, but since it's a Windows > machine, param.h may not exist. > > Any help would be appreciated. Hrm. It's probably supposed to be `_WIN32` (which is the standard define for detecting Windows). Could you open a bug? We have a VS 2015 buildbot, but it is Windows 7 (not that I think that's a big difference for this problem) and it is building vtknetcdf (where it looks like that file exists). https://gitlab.kitware.com/vtk/vtk/issues --Ben From david.gobbi at gmail.com Mon Sep 26 16:36:26 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Sep 2016 14:36:26 -0600 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> Message-ID: Hi Daryl, The value of WIN32 and _WIN32 should be the same for 64-bit as 32-bit (in any case, the important thing is whether you're building for a 64-bit vs 32-bit target, not whether you're building on a 64-bit vs 32-bit machine). I've built VTK with Visual Studio 2015 Update 3 (on Windows 7 Pro 64-bit), with Python 3.4, but I'm sure that Python is a red herring as far as your situation is concerned. Python 3.5 works just fine with VTK. My suspicion is that your compiler has become mis-configured somehow if it is spewing a ton of warnings and then dying with an error so early in the build. Start with something simple like building a cmake-based "hello world" program, then try VTK without Python or any other extra options, and if that works then try building VTK with Python. - David On Mon, Sep 26, 2016 at 2:01 PM, Daryl Lee wrote: > On 9/26/16 11:59 AM, Ben Boeckel wrote: > >> On Fri, Sep 23, 2016 at 17:22:34 -0700, Daryl Lee wrote: >> >>> I am making my first attempt, without success, to build VTK 7.0.0 on >>> 64-bit >>> Windows 10 for Python 3.5, following the instructions in >>> http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the >>> issues >>> I'm having, should I expect to be able to do this? >>> >> We test Python 3.4 on Windows 7 (and 3.5 on Linux) now. At the time of >> 7.0.0's release, we were testing 3.2 on Windows 7 (and 3.4 on Linux), so >> I don't know the state of 3.5 for the release, but I don't think there >> were any changes for 3.5 specifically. >> >> What errors are you seeing? Also, what CMake/Visual Studio versions? >> >> --Ben >> > > Thanks for the response. > > Environment: > CMake 3.6.2 > Visual Studio 2015 14.0.25431.01 Update 3 > Windows 10 Home Version 1511 (64-bit) > > 1. I get a couple hundred warnings on exception processing, with the > suggestion to set the /EHsc option, but I can't figure out in Visual Studio > where to set that. I've explored the ALL_BUILD options and can't find any > place for that, nor can I find it in any of the individual projects I > examined. > > 2. The first of a long list of actual errors is in lookup3.c, where is > found this sequence at line 57: > > #ifndef WIN32 > #include > #endif > > where it can't find sys/param.h. My guess is that since this is a 64-bit > machine, WIN32 may not be defined, but since it's a Windows machine, > param.h may not exist. > > Any help would be appreciated. > > -- > Daryl Lee > We dance round in a ring and suppose, but the Secret sits in the center > and knows. -- Robert Frost > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daryl at daryllee.com Mon Sep 26 16:41:38 2016 From: daryl at daryllee.com (Daryl Lee) Date: Mon, 26 Sep 2016 14:41:38 -0600 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> Message-ID: Changing WIN32 to _WIN32 in lookup3.c did indeed allow compilation to proceed. There are a few similar constructs in other files, which I can take care of on my own (and report the complete list later). The next curious error is "constant too big" in nc4hdf.c. The offending line is 3666, where X_FLOAT_MAX and X_FLOAT_MIN are used. On 9/26/16 2:23 PM, Andras Lasso wrote: > WIN32 is not necessarily defined (depends on what SDK you use, what files are included, etc), so to determine if MSVC is used it's more reliable to use _WIN32 (as that is defined by the compiler). > > Can you try if compilation proceeds if you change #ifndef WIN32 to #ifndef _WIN32 in lookup3.c? > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Daryl Lee > Sent: September 26, 2016 16:02 > To: ben.boeckel at kitware.com > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 > > On 9/26/16 11:59 AM, Ben Boeckel wrote: >> On Fri, Sep 23, 2016 at 17:22:34 -0700, Daryl Lee wrote: >>> I am making my first attempt, without success, to build VTK 7.0.0 on >>> 64-bit Windows 10 for Python 3.5, following the instructions in >>> http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the >>> issues I'm having, should I expect to be able to do this? >> We test Python 3.4 on Windows 7 (and 3.5 on Linux) now. At the time of >> 7.0.0's release, we were testing 3.2 on Windows 7 (and 3.4 on Linux), >> so I don't know the state of 3.5 for the release, but I don't think >> there were any changes for 3.5 specifically. >> >> What errors are you seeing? Also, what CMake/Visual Studio versions? >> >> --Ben > Thanks for the response. > > Environment: > CMake 3.6.2 > Visual Studio 2015 14.0.25431.01 Update 3 > Windows 10 Home Version 1511 (64-bit) > > 1. I get a couple hundred warnings on exception processing, with the suggestion to set the /EHsc option, but I can't figure out in Visual Studio where to set that. I've explored the ALL_BUILD options and can't find any place for that, nor can I find it in any of the individual projects I examined. > > 2. The first of a long list of actual errors is in lookup3.c, where is found this sequence at line 57: > > #ifndef WIN32 > #include > #endif > > where it can't find sys/param.h. My guess is that since this is a 64-bit machine, WIN32 may not be defined, but since it's a Windows machine, param.h may not exist. > > Any help would be appreciated. > > -- > Daryl Lee > We dance round in a ring and suppose, but the Secret sits in the center and knows. -- Robert Frost > > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Daryl Lee We dance round in a ring and suppose, but the Secret sits in the center and knows. -- Robert Frost From daryl at daryllee.com Mon Sep 26 16:45:58 2016 From: daryl at daryllee.com (Daryl Lee) Date: Mon, 26 Sep 2016 14:45:58 -0600 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: <20160926203553.GA6330@rotor.kitware.com> References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> <20160926203553.GA6330@rotor.kitware.com> Message-ID: <8203182a-63a4-4fad-807a-bb1f62cdf292@daryllee.com> On 9/26/16 2:35 PM, Ben Boeckel wrote: > On Mon, Sep 26, 2016 at 14:01:45 -0600, Daryl Lee wrote: >> Environment: >> CMake 3.6.2 >> Visual Studio 2015 14.0.25431.01 Update 3 >> Windows 10 Home Version 1511 (64-bit) >> >> 1. I get a couple hundred warnings on exception processing, with the >> suggestion to set the /EHsc option, but I can't figure out in Visual >> Studio where to set that. I've explored the ALL_BUILD options and can't >> find any place for that, nor can I find it in any of the individual >> projects I examined. > You can set it in CMake by adding it to CMAKE_CXX_FLAGS (which works > better anyways since editing the .vcxproj files will be overridden by > CMake when it reruns). I'll give that a try. I'm new to CMake, so this is a good learning experience. >> 2. The first of a long list of actual errors is in lookup3.c, where is >> found this sequence at line 57: >> >> #ifndef WIN32 >> #include >> #endif >> >> where it can't find sys/param.h. My guess is that since this is a >> 64-bit machine, WIN32 may not be defined, but since it's a Windows >> machine, param.h may not exist. >> >> Any help would be appreciated. > Hrm. It's probably supposed to be `_WIN32` (which is the standard define > for detecting Windows). Could you open a bug? We have a VS 2015 > buildbot, but it is Windows 7 (not that I think that's a big difference > for this problem) and it is building vtknetcdf (where it looks like that > file exists). > > https://gitlab.kitware.com/vtk/vtk/issues > > --Ben Will do. -- Daryl Lee We dance round in a ring and suppose, but the Secret sits in the center and knows. -- Robert Frost From lasso at queensu.ca Mon Sep 26 16:23:55 2016 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 26 Sep 2016 20:23:55 +0000 Subject: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 In-Reply-To: References: <1474676554593-5740525.post@n5.nabble.com> <20160926175931.GA20729@megas.kitware.com> Message-ID: WIN32 is not necessarily defined (depends on what SDK you use, what files are included, etc), so to determine if MSVC is used it's more reliable to use _WIN32 (as that is defined by the compiler). Can you try if compilation proceeds if you change #ifndef WIN32 to #ifndef _WIN32 in lookup3.c? Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Daryl Lee Sent: September 26, 2016 16:02 To: ben.boeckel at kitware.com Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Building 7.0.0 on 64-bit Windows 10 Python 3.5 On 9/26/16 11:59 AM, Ben Boeckel wrote: > On Fri, Sep 23, 2016 at 17:22:34 -0700, Daryl Lee wrote: >> I am making my first attempt, without success, to build VTK 7.0.0 on >> 64-bit Windows 10 for Python 3.5, following the instructions in >> http://www.vtk.org/Wiki/VTK/Configure_and_Build. Before I detail the >> issues I'm having, should I expect to be able to do this? > We test Python 3.4 on Windows 7 (and 3.5 on Linux) now. At the time of > 7.0.0's release, we were testing 3.2 on Windows 7 (and 3.4 on Linux), > so I don't know the state of 3.5 for the release, but I don't think > there were any changes for 3.5 specifically. > > What errors are you seeing? Also, what CMake/Visual Studio versions? > > --Ben Thanks for the response. Environment: CMake 3.6.2 Visual Studio 2015 14.0.25431.01 Update 3 Windows 10 Home Version 1511 (64-bit) 1. I get a couple hundred warnings on exception processing, with the suggestion to set the /EHsc option, but I can't figure out in Visual Studio where to set that. I've explored the ALL_BUILD options and can't find any place for that, nor can I find it in any of the individual projects I examined. 2. The first of a long list of actual errors is in lookup3.c, where is found this sequence at line 57: #ifndef WIN32 #include #endif where it can't find sys/param.h. My guess is that since this is a 64-bit machine, WIN32 may not be defined, but since it's a Windows machine, param.h may not exist. Any help would be appreciated. -- Daryl Lee We dance round in a ring and suppose, but the Secret sits in the center and knows. -- Robert Frost _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From fraser.callaghan at sydney.edu.au Mon Sep 26 17:59:53 2016 From: fraser.callaghan at sydney.edu.au (Fraser Callaghan) Date: Mon, 26 Sep 2016 21:59:53 +0000 Subject: [vtkusers] Count polydata in VTI voxels In-Reply-To: References: <220BE31773B69D4C985CA5660D992DB1EB9043F8@ex-mbx-pro-04> Message-ID: <220BE31773B69D4C985CA5660D992DB1EB905DCA@ex-mbx-pro-04> Thanks for the tips Cory. I also received this morning the latest Kitware blog on Scalable Point Processing in VTK: https://blog.kitware.com/scalable-point-processing-in-vtk/ Will look into and follow this closely also. Thanks all From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: Tuesday, 27 September 2016 12:01 AM To: Fraser Callaghan Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Count polydata in VTI voxels Fraser, I don't know if any filter in VTK do exactly what you want. You can try using the filter vtkBinningFilter from https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter Otherwise, you can loop through and count the points in each voxel manually. You'll probably want to use a subclass of vtkAbstractPointLocator (http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html) to accelerate point queries. HTH, Cory On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan > wrote: Hello, I have a dense set of polydata and would like to convert to a vtkImageData with each cell containing a count of the number of points, from the poly data, that are in that cell (returning a CellData array) (I suppose any input data would be relevant). Does a method exist that will count the points within a voxel like this? Or am I better to loop through each cell counting as I go? (or something else ? I guess some clever AMR approach would be most efficient?) Note ? vtkGaussianSplatter does not give the result I want ? when trying to limit a point?s influence to only one cell either no influence of a ?bubble? effect exists. Thanks for your help. Fraser _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Sep 26 20:07:59 2016 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 27 Sep 2016 09:07:59 +0900 Subject: [vtkusers] Berger-Rigoutsos algorithm in VTK Message-ID: Hi all, I want to use VTK AMR data-structures for an Adaptive-Grid Cartesian Cut-Cell method. Since in VTK, the AMR data-structure is implemented as a Structured AMR dataset (Berger-Collela AMR), for my purpose, I may require the Berger-Rigoutsos algorithm to be commonly used for clustering tagged-cells where they are intersecting with input surfaces. So, I create a filter inherited from vtkOverlappingAMRAlgorithm to execute BR algorithm and test it. But the results for a closed surface input are unexpected, that is, the patch grids contained in interior of the closed surface on each level are not hierarchical but uniform. I don't know whether the results are correct or not, because I am not at all familiar. If someone experienced Berger-Rigoutsos algorithm, please let me know the correct behaviors or the correct implementation in VTK. Regards, yoshimi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BR_results.png Type: image/png Size: 43673 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EB_cutcells.gif Type: image/gif Size: 73966 bytes Desc: not available URL: From rccm.kyoshimi at gmail.com Mon Sep 26 20:38:03 2016 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 27 Sep 2016 09:38:03 +0900 Subject: [vtkusers] vtkEnSightWriter In-Reply-To: References: Message-ID: Hi Andy, I completely agree with you. This is very inconvenient as I always manually create .case file... Thanks 2016-09-17 5:52 GMT+09:00 Andy Bauer : > Hi, > > Does anyone use the vtkEnSightWriter or familiar with the EnSight file > format? I'm wondering why the WriteCaseFile() method needs to be specially > called in order to write out the .case file. This is the file that seems to > need to be read into VTK and also seems like the .case file should be > automatically written out by default. > > Thanks, > Andy > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From jp4work at gmail.com Tue Sep 27 03:22:10 2016 From: jp4work at gmail.com (JIA Pei) Date: Tue, 27 Sep 2016 00:22:10 -0700 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: Message-ID: Thanks Bill. Thank you ... 1) VTK is the toughest package for building I've ever met. Seriously. Even now, I myself have NO idea how I successfully built VTK before. I always want to enable the packages/functionalities that come with the system, Ubuntu 16.04.1 So, is there a brief summary to clarify: what can be enabled? and what can NOT be enabled? 2) In addition, I noticed that current python support is still 2.7.x. What about 3.5.x ? I transformed python files to be 3.x compatible by command "2to3?, it seems to be OK, but I'm NOT 100% sure about that. Thank you Bill On Mon, Sep 26, 2016 at 7:52 AM, Bill Lorensen wrote: > Do you have VTK_USE_SYSTEM_FREETYPE ON in your CMakeCache.txt file? > > If so, set it to OFF. > > > On Mon, Sep 26, 2016 at 7:15 AM, JIA Pei wrote: > > > > Hi, all: > > > > > > It looks like current VTK has a big change? > > My WikiExamples are NOT able to build for now... > > Can anybody give me a hand? > > > >> > >> In file included from > >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:5:0: > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h: In instantiation of > ?static > >> vtkSmartPointer vtkSmartPointer::New() [with T = > vtkFreeTypeTools]?: > >> /home/VTK/VTK/Remote/WikiExamples/Cxx/Images/ImageText.cxx:24:83: > >> required from here > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: error: no matching > >> function for call to > >> ?vtkSmartPointer::vtkSmartPointer(vtkObject*, > >> vtkSmartPointerBase::NoReference)? > >> return vtkSmartPointer(T::New(), NoReference()); > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: candidate: > >> vtkSmartPointer::vtkSmartPointer(T*, const > >> vtkSmartPointerBase::NoReference&) [with T = vtkFreeTypeTools] match> > >> vtkSmartPointer(T* r, const NoReference& n): vtkSmartPointerBase(r, > n) > >> {} > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:167:3: note: conversion > of > >> argument 1 would be ill-formed: > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:37: error: invalid > >> conversion from ?vtkObject*? to ?vtkFreeTypeTools*? [-fpermissive] > >> return vtkSmartPointer(T::New(), NoReference()); > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: candidate: > >> template vtkSmartPointer::vtkSmartPointer(const > >> vtkSmartPointer&) > >> vtkSmartPointer(const vtkSmartPointer& r): > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:42:3: note: template > >> argument deduction/substitution failed: > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:117:54: note: mismatched > >> types ?const vtkSmartPointer? and ?vtkObject*? > >> return vtkSmartPointer(T::New(), NoReference()); > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate: > >> vtkSmartPointer::vtkSmartPointer(T*) [with T = vtkFreeTypeTools] > >> vtkSmartPointer(T* r): vtkSmartPointerBase(r) {} > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:36:3: note: candidate > >> expects 1 argument, 2 provided > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate: > >> vtkSmartPointer::vtkSmartPointer() [with T = vtkFreeTypeTools] > >> vtkSmartPointer() {} > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:32:3: note: candidate > >> expects 0 arguments, 2 provided > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > >> vtkSmartPointer::vtkSmartPointer(const > >> vtkSmartPointer&) > >> class vtkSmartPointer: public vtkSmartPointerBase > >> ^ > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > >> expects 1 argument, 2 provided > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate: > >> vtkSmartPointer::vtkSmartPointer(vtkSmartPointer< > vtkFreeTypeTools>&&) > >> /home/VTK/VTK/Common/Core/vtkSmartPointer.h:26:7: note: candidate > >> expects 1 argument, 2 provided > >> Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/build.make: > 65: > >> recipe for target > >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText. > cxx.o' > >> failed > >> make[2]: *** > >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/ImageText. > cxx.o] > >> Error 1 > >> make[2]: Leaving directory '/home/VTK/VTK/build' > >> CMakeFiles/Makefile2:33982: recipe for target > >> 'Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all' > failed > >> make[1]: *** > >> [Remote/WikiExamples/Cxx/Images/CMakeFiles/wikiImageText.dir/all] > Error 2 > >> make[1]: Leaving directory '/home/VTK/VTK/build' > >> Makefile:130: recipe for target 'all' failed > >> make: *** [all] Error 2 > >> > > > > Cheers > > -- > > > > Pei JIA, Ph.D. > > > > Email: jp4work at gmail.com > > cell in Canada: +1 778-863-5816 > > cell in China: +86 186-8244-3503 > > > > Welcome to Vision Open > > http://www.visionopen.com > > > > _______________________________________________ > > 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 VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simon.Praetorius at tu-dresden.de Tue Sep 27 03:49:04 2016 From: Simon.Praetorius at tu-dresden.de (Simon Praetorius) Date: Tue, 27 Sep 2016 07:49:04 +0000 Subject: [vtkusers] Possible Bug in vtkXMLReader when reading timeseries In-Reply-To: References: <20160921152330.Horde.z_qnD8wpciaqFRiyKCr2IJf@mail.zih.tu-dresden.de> <20160923160713.Horde.MdE1jTMJKe6xVy8WeHrrfdz@mail.zih.tu-dresden.de> <010AC7DD-5ABD-45B4-B19B-CBD39350C24E@kitware.com> Message-ID: <20160927074904.Horde.cWO3PBS8IynT4-mB39oezZj@mail.zih.tu-dresden.de> Thanks for the work on this issue! The merge request seems to solve the problem. My first test was the file `cube.vtu` generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` in the VTK source. It contains 8 timesteps of data with a fixed very simple mesh. It was previously not possible to read this file back again by a standard VtkXMLReader. Now this works fine without errors. Maybe this file can be used for a real test implementation. I have also tested a private much larger data-set, also in combination with a ParaView, compiled using the modified VTK, and it works as well. -> Instead of having a collection of .vtu files and a corresponding .pvd file, timeseries can now be stored again as a single .vtu file. -> This allows to store the mesh only once (if it does not change) and just modify the data fields in each timestep So, very nice! Thanks! Simon Zitat von Cory Quammen : > One more thing, Simon. Could you contribute a small data set with more than > one time step so that we can add a test that uses it? > > Thanks, > Cory > > On Mon, Sep 26, 2016 at 10:39 AM, Cory Quammen > wrote: > >> Simon, >> >> Might you be able to try TJ's merge request and see if it restores the >> functionality you expected? >> >> Thanks, >> Cory >> >> On Mon, Sep 26, 2016 at 9:34 AM, T.J. Corona >> wrote: >> >>> Hi Simon, >>> >>> I have created a MR (https://gitlab.kitware.com/vt >>> k/vtk/merge_requests/2007) that reverts the addition of an >>> exit-with-error when data arrays have the same name. >>> >>> Cory, >>> >>> I believe this MR also accounts for the segfault you originally reported >>> when reading in data arrays that have duplicate names. >>> >>> Sincerely, >>> T.J. >>> >>> Thomas J. Corona, Ph.D. >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4443 >>> >>> On Sep 23, 2016, at 1:41 PM, Cory Quammen >>> wrote: >>> >>> Simon, >>> >>> Thanks for your sleuthing and bug report. I don't believe your use case >>> was known when merge request !488 was merged. >>> >>> TJ, >>> >>> Can you have a look at Simon's issue? >>> >>> Thanks, >>> Cory >>> >>> On Fri, Sep 23, 2016 at 12:07 PM, Simon Praetorius < >>> Simon.Praetorius at tu-dresden.de> wrote: >>> >>>> I have found an old issue in the mantis bug-tracker addressing this >>>> topic: #15723 >>>> >>>> The answer was: "VTK file format does not support saving several time >>>> steps in a file" and a reference to the file-format description was given. >>>> This description (version 4.2.) is definitely not complete, thus >>>> it can not >>>> be an indicator for a support of writing timeseries or not. >>>> >>>> Although the file-format description does not show support for >>>> timeseries, at least in older vtk versions (before 6.3) it was supported. >>>> The source code of the XMLreader shows all the necessary parts to read the >>>> time-series, all the corresponding attributes are interpreted. The only >>>> problem is a change in the handling of duplicate names. This was >>>> done about >>>> a year ago in merge request !488. Since there is no test that reads back >>>> the files generated by `IO/XML/Testing/Cxx/TestXMLCInterface.c` no >>>> error could be detected. The corresponding test to create the file was >>>> removed in June 2016. >>>> >>>> Thus, the questions are: >>>> - Is this feature quietly removed from VTK, or removed by accident since >>>> only few people use it? >>>> - Is the documentation of the file-format incomplete or the >>>> implementation simply not cleaned up? >>>> - Should the test for duplicate array names be rewritten in order to >>>> allow timeseries again? >>>> - There should be at least a comment in the file-format description that >>>> duplicate array names are not allowed! >>>> >>>> Maybe this issue could be forwarded to the developer mailing list. >>>> >>>> Simon >>>> >>>> >>>> Zitat von Simon Praetorius : >>>> >>>> >>>> Hi, >>>>> >>>>> When reading a VTK XML-file that includes timesteps, the >>>>> `vtkXMLDataReader:282` throws an error that multiple arrays with the same >>>>> name are present in the file. In general this is a valid test >>>>> and the error >>>>> is correct, except for the case that multiple timesteps are >>>>> written in the >>>>> file. An example file can be created by the test >>>>> `IO/XML/Testing/Cxx/TestXMLCInterface.c`: >>>>> >>>>> ```xml >>>>> >>>>> >>>>> >>>> format="appended" RangeMin="0" RangeMax="0" offset="0" /> >>>>> >>>> format="appended" RangeMin="1" RangeMax="1" offset="240" /> >>>>> >>>>> >>>>> >>>>> ``` >>>>> Here all DataArrays refer to the same dataset at different timesteps. >>>>> >>>>> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g. >>>>> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above: >>>>> >>>>> ``` >>>>> vtkXMLDataReader.cxx, line 282: Duplicate array names. >>>>> ``` >>>>> >>>>> Writing TimeSteps seems to be supported by the XMLReader and the >>>>> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any more? Is >>>>> the structure of the vtk format changed when writing timeseries, compared >>>>> to the xml-code shown above? >>>>> (I'm referring to the VTK version 7.0.0, when naming line-numbers.) >>>>> >>>>> >>>>> This issue refers to an old ParaView issue #5542 ( >>>>> http://www.paraview.org/Bug/view.php?id=5542). The file was readable >>>>> with at least vtk-5.2 and paraview-3.6.2. >>>>> >>>>> Simon >>>>> >>>>> -- >>>>> Dr. Simon Praetorius >>>>> Institut f?r Wissenschaftliches Rechnen >>>>> Fachrichtung Mathematik >>>>> Technische Universit?t Dresden >>>>> Tel.: TUD-42377 >>>>> Mail: simon.praetorius at tu-dresden.de >>>>> Web: www.math.tu-dresden.de/~spraetor >>>>> >>>> >>>> >>>> >>>> -- >>>> Dr. Simon Praetorius >>>> Institut f?r Wissenschaftliches Rechnen >>>> Fachrichtung Mathematik >>>> Technische Universit?t Dresden >>>> Tel.: TUD-42377 >>>> Mail: simon.praetorius at tu-dresden.de >>>> Web: www.math.tu-dresden.de/~spraetor >>>> >>>> _______________________________________________ >>>> 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 VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> >>> >>> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. -- Dr. Simon Praetorius Institut f?r Wissenschaftliches Rechnen Fachrichtung Mathematik Technische Universit?t Dresden Tel.: TUD-42377 Mail: simon.praetorius at tu-dresden.de Web: www.math.tu-dresden.de/~spraetor -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5733 bytes Desc: S/MIME-Signatur URL: From ilindsay at insigniamedical.co.uk Tue Sep 27 06:59:42 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 27 Sep 2016 03:59:42 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa Message-ID: <1474973982908-5740561.post@n5.nabble.com> Hi all, I am attempting to use VTK built with the new OpenGL2 backend on a virtualised environment (Windows Server 2012 R2 running on VirtualBox). Unsurprisingly this does not work due to the limitations of VirtualBox's OpenGL driver (the old OpenGL backend did work however). To address this to allow testing, I have downloaded and built Mesa 12.0.3, 64 bit target for Windows (Gallium?) with the intention of getting the application running so I can do some debugging. I accept that performance will not be great. I have little experience with this, so it is likely that I will have done something wrong, but I seem to get the following error from VTK, even though glview (OpenGL Extensions Viewer 4.4.4) claims that the extension the error is talking about (gpu_shader4) is implemented by Mesa: ERROR: In D:\Build\VTK\VTK 7.1.x 23_09_2016\VTKSource\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 640 vtkWin32OpenGLRenderWindow (0000007421E0B9A0): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2. I am a bit confused about the final part of the error message about the 'driver in Mesa' needing to support OpenGL 3.2, glview states that the version supported fully is 3.0, although 3.2 is 80% supported. Does this mean that the new back end is not yet supported by the latest version of Mesa? Has anyone else attempted this yet? I have installed Mesa by just copying the built opengl32.dll to the local directory and I have verified that this is the one being loaded rather than the system one. Are there any options I need to set when building Mesa to implement the required extensions? Thanks in advance, Ian See below for a screenshot of glview: -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Tue Sep 27 07:59:50 2016 From: daviddoria at gmail.com (David Doria) Date: Tue, 27 Sep 2016 06:59:50 -0500 Subject: [vtkusers] Count polydata in VTI voxels In-Reply-To: <220BE31773B69D4C985CA5660D992DB1EB905DCA@ex-mbx-pro-04> References: <220BE31773B69D4C985CA5660D992DB1EB9043F8@ex-mbx-pro-04> <220BE31773B69D4C985CA5660D992DB1EB905DCA@ex-mbx-pro-04> Message-ID: On Mon, Sep 26, 2016 at 4:59 PM, Fraser Callaghan < fraser.callaghan at sydney.edu.au> wrote: > Thanks for the tips Cory. > > I also received this morning the latest Kitware blog on Scalable Point > Processing in VTK: > > https://blog.kitware.com/scalable-point-processing-in-vtk/ > > Will look into and follow this closely also. > > Thanks all > > > > > > *From:* Cory Quammen [mailto:cory.quammen at kitware.com] > *Sent:* Tuesday, 27 September 2016 12:01 AM > *To:* Fraser Callaghan > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Count polydata in VTI voxels > > > > Fraser, > > > > I don't know if any filter in VTK do exactly what you want. You can try > using the filter vtkBinningFilter from > > > > https://github.com/MADAI/MADAIWorkbench/tree/master/Plugins/BinningFilter > > > > Otherwise, you can loop through and count the points in each voxel > manually. You'll probably want to use a subclass of vtkAbstractPointLocator > (http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html) > to accelerate point queries. > > > > HTH, > > Cory > > > > > > > > On Mon, Sep 26, 2016 at 7:52 AM, Fraser Callaghan < > fraser.callaghan at sydney.edu.au> wrote: > > Hello, > > I have a dense set of polydata and would like to convert to a vtkImageData > with each cell containing a count of the number of points, from the poly > data, that are in that cell (returning a CellData array) (I suppose any > input data would be relevant). > > Does a method exist that will count the points within a voxel like this? > Or am I better to loop through each cell counting as I go? (or something > else ? I guess some clever AMR approach would be most efficient?) > > Note ? vtkGaussianSplatter does not give the result I want ? when trying > to limit a point?s influence to only one cell either no influence of a > ?bubble? effect exists. > > > > Thanks for your help. > > Fraser > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > You could do it a little bit manually like this: http://www.vtk.org/Wiki/VTK/Examples/Broken/GridPointCloud Or I believe that's what the new vtkVoxelGrid is for: https://gitlab.kitware.com/vtk/vtk/tree/master/Filters/Points David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Sep 27 08:36:52 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 27 Sep 2016 08:36:52 -0400 Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <1474973982908-5740561.post@n5.nabble.com> References: <1474973982908-5740561.post@n5.nabble.com> Message-ID: It looks like your version of mesa is using softpipe. I believe the better choice these days is llvmpipe. I think llvmpipe and SWR are the two main options we use for software rendering now. On Tue, Sep 27, 2016 at 6:59 AM, ianl wrote: > Hi all, > > I am attempting to use VTK built with the new OpenGL2 backend on a > virtualised environment (Windows Server 2012 R2 running on VirtualBox). > Unsurprisingly this does not work due to the limitations of VirtualBox's > OpenGL driver (the old OpenGL backend did work however). > > To address this to allow testing, I have downloaded and built Mesa 12.0.3, > 64 bit target for Windows (Gallium?) with the intention of getting the > application running so I can do some debugging. I accept that performance > will not be great. > > I have little experience with this, so it is likely that I will have done > something wrong, but I seem to get the following error from VTK, even > though > glview (OpenGL Extensions Viewer 4.4.4) claims that the extension the error > is talking about (gpu_shader4) is implemented by Mesa: > > ERROR: In D:\Build\VTK\VTK 7.1.x > 23_09_2016\VTKSource\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 640 > vtkWin32OpenGLRenderWindow (0000007421E0B9A0): GL version 2.1 with the > gpu_shader4 extension is not supported by your graphics driver but is > required for the new OpenGL rendering backend. Please update your OpenGL > driver. If you are using Mesa please make sure you have version 10.6.5 or > later and make sure your driver in Mesa supports OpenGL 3.2. > > I am a bit confused about the final part of the error message about the > 'driver in Mesa' needing to support OpenGL 3.2, glview states that the > version supported fully is 3.0, although 3.2 is 80% supported. Does this > mean that the new back end is not yet supported by the latest version of > Mesa? > > Has anyone else attempted this yet? I have installed Mesa by just copying > the built opengl32.dll to the local directory and I have verified that this > is the one being loaded rather than the system one. Are there any options I > need to set when building Mesa to implement the required extensions? > > Thanks in advance, > Ian > > See below for a screenshot of glview: > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/OpenGL2-using-mesa-tp5740561.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Tue Sep 27 08:40:39 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Tue, 27 Sep 2016 08:40:39 -0400 Subject: [vtkusers] [vtk-developers] Which Compilers and Operating Systems to you require for VTK and / ParaView? In-Reply-To: <20160926190358.GA20771@megas.kitware.com> References: <20160926190358.GA20771@megas.kitware.com> Message-ID: Yes. Off by a month, my mistake. The intent is to let the survey run for a week. ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Mon, Sep 26, 2016 at 3:03 PM, Ben Boeckel wrote: > On Mon, Sep 26, 2016 at 14:01:38 -0400, Chuck Atkins wrote: > > Just as a follow-up, I will be leaving this survey open all week and stop > > accepting responses on Friday, October 30. > > I assume you mean September 30? > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Tue Sep 27 09:05:57 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Tue, 27 Sep 2016 09:05:57 -0400 Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: References: <1474973982908-5740561.post@n5.nabble.com> Message-ID: Hi Ian, Ken is right in that your Mesa is using softpipe instead of llvmpipe (see the line that says "Renderer: Gallium 0.4 on softpipe"), which won't give you the necessary OpenGL version, at least not out of the box. There are a few things you can try though to make it work as is. See if you can force the use of llvmpipe instead by setting the environment variable GALLIUM_DRIVER=llvmpipe. If your Mesa build contains that driver then it should force it's use. Also, try forcing the OpenGL version by setting MESA_GL_VERSION_OVERRIDE=3.3. This can work in certain scenarios where the full openGL spec might not be available but enough of it is for VTK to use. Where are the Mesa binaries you're using coming from? ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Tue, Sep 27, 2016 at 8:36 AM, Ken Martin wrote: > It looks like your version of mesa is using softpipe. I believe the better > choice these days is llvmpipe. I think llvmpipe and SWR are the two main > options we use for software rendering now. > > On Tue, Sep 27, 2016 at 6:59 AM, ianl > wrote: > >> Hi all, >> >> I am attempting to use VTK built with the new OpenGL2 backend on a >> virtualised environment (Windows Server 2012 R2 running on VirtualBox). >> Unsurprisingly this does not work due to the limitations of VirtualBox's >> OpenGL driver (the old OpenGL backend did work however). >> >> To address this to allow testing, I have downloaded and built Mesa 12.0.3, >> 64 bit target for Windows (Gallium?) with the intention of getting the >> application running so I can do some debugging. I accept that performance >> will not be great. >> >> I have little experience with this, so it is likely that I will have done >> something wrong, but I seem to get the following error from VTK, even >> though >> glview (OpenGL Extensions Viewer 4.4.4) claims that the extension the >> error >> is talking about (gpu_shader4) is implemented by Mesa: >> >> ERROR: In D:\Build\VTK\VTK 7.1.x >> 23_09_2016\VTKSource\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line >> 640 >> vtkWin32OpenGLRenderWindow (0000007421E0B9A0): GL version 2.1 with the >> gpu_shader4 extension is not supported by your graphics driver but is >> required for the new OpenGL rendering backend. Please update your OpenGL >> driver. If you are using Mesa please make sure you have version 10.6.5 or >> later and make sure your driver in Mesa supports OpenGL 3.2. >> >> I am a bit confused about the final part of the error message about the >> 'driver in Mesa' needing to support OpenGL 3.2, glview states that the >> version supported fully is 3.0, although 3.2 is 80% supported. Does this >> mean that the new back end is not yet supported by the latest version of >> Mesa? >> >> Has anyone else attempted this yet? I have installed Mesa by just copying >> the built opengl32.dll to the local directory and I have verified that >> this >> is the one being loaded rather than the system one. Are there any options >> I >> need to set when building Mesa to implement the required extensions? >> >> Thanks in advance, >> Ian >> >> See below for a screenshot of glview: >> >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/OpenGL2-using-mesa-tp5740561.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Sep 27 09:41:47 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 27 Sep 2016 09:41:47 -0400 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: Message-ID: <20160927134147.GA9541@megas.kitware.com> On Tue, Sep 27, 2016 at 00:22:10 -0700, JIA Pei wrote: > 2) In addition, I noticed that current python support is still 2.7.x. > What about 3.5.x ? I transformed python files to be 3.x compatible by > command "2to3?, it seems to be OK, but I'm NOT 100% sure about that. We support and test Python3 (3.3, 3.4, and 3.5). There is the VTK_PYTHON_VERSION variable which you can use to select which one to use. In any case, there is CPython code that 2to3 wouldn't have touched. --Ben From ilindsay at insigniamedical.co.uk Tue Sep 27 10:06:35 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 27 Sep 2016 07:06:35 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: References: <1474973982908-5740561.post@n5.nabble.com> Message-ID: <1474985195187-5740568.post@n5.nabble.com> Hi, thanks for the replies. The build of Mesa I have is a result of following the instructions on the Mesa website for building for Windows. This does not seem to include LLVMPipe by default, but there are some more instructions on how to do this, so I am currently trying these. The give away line in the build output is "warning: LLVM disabled: not building llvmpipe" early on in the Mesa build process. I'll pursue getting LLVMPipe built myself as the pre-built Clang version for Windows does not seem to play nicely with the Mesa build process (lots of errors about looking for include files that don't exist). I will try also try the environment variables you mention, Chuck, and let you know how I got on. A voyage of discovery... -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740568.html Sent from the VTK - Users mailing list archive at Nabble.com. From chuck.atkins at kitware.com Tue Sep 27 10:12:32 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Tue, 27 Sep 2016 10:12:32 -0400 Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <1474985195187-5740568.post@n5.nabble.com> References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> Message-ID: I'm assuming you already went down the route of explicitly enabling 3D acceleration in the VM's video configuration and are using the "VirtualBox Guest Additions" video driver? ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Tue, Sep 27, 2016 at 10:06 AM, ianl wrote: > Hi, thanks for the replies. > > The build of Mesa I have is a result of following the instructions on the > Mesa website for building for Windows. This does not seem to include > LLVMPipe by default, but there are some more instructions on how to do > this, > so I am currently trying these. The give away line in the build output is > "warning: LLVM disabled: not building llvmpipe" early on in the Mesa build > process. > > I'll pursue getting LLVMPipe built myself as the pre-built Clang version > for > Windows does not seem to play nicely with the Mesa build process (lots of > errors about looking for include files that don't exist). > > I will try also try the environment variables you mention, Chuck, and let > you know how I got on. > > A voyage of discovery... > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.c > om/OpenGL2-using-mesa-tp5740561p5740568.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Sep 27 10:26:20 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 27 Sep 2016 07:26:20 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> Message-ID: <1474986380344-5740570.post@n5.nabble.com> Hi, yes, I am using the latest guest additions (5.1.6) and I have explicitly set the video driver in Windows to the latest VirtualBox one (also version 5.1.6). The environment variables didn't help, I'm afraid, even after a reboot. This probably makes sense as Mesa was built totally without LLVMPipe. Interestingly, glview now reports that it supports OpenGL 3.3 fully, so VTK is obviously not fooled, but glview was! -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740570.html Sent from the VTK - Users mailing list archive at Nabble.com. From spir.robert at gmail.com Tue Sep 27 10:46:29 2016 From: spir.robert at gmail.com (=?iso-8859-2?B?UvNiZXJ0IKlwaXI=?=) Date: Tue, 27 Sep 2016 16:46:29 +0200 Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <1474986380344-5740570.post@n5.nabble.com> References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> <1474986380344-5740570.post@n5.nabble.com> Message-ID: <006d01d218cd$ef375970$cda60c50$@gmail.com> Hi, I compiled mesa opengl32.dll with llvmpipe using this guide https://wiki.qt.io/Cross_compiling_Mesa_for_Windows and I can run vtk with opengl2 backend using software rendering. It shows that opengl error but otherwise it runs fine (albeit slow). The error can be disabled using vtkObject::GlobalWarningDisplayOff(); Just be sure that you set the multisampling of renderwindow to 0, otherwise it will crash. Robert -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of ianl Sent: Tuesday, September 27, 2016 4:26 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] OpenGL2 using mesa Hi, yes, I am using the latest guest additions (5.1.6) and I have explicitly set the video driver in Windows to the latest VirtualBox one (also version 5.1.6). The environment variables didn't help, I'm afraid, even after a reboot. This probably makes sense as Mesa was built totally without LLVMPipe. Interestingly, glview now reports that it supports OpenGL 3.3 fully, so VTK is obviously not fooled, but glview was! -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740570.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From rakesh.p at tataelxsi.co.in Tue Sep 27 11:20:56 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Tue, 27 Sep 2016 15:20:56 +0000 Subject: [vtkusers] Key events in QVTKWidget2 In-Reply-To: References: Message-ID: Hi, In order to check what is blocking Key events I compared QVTKWidget & QVTKWidget2 source files. I found the following line in QVTKWidget: this->setFocusPolicy(Qt::StrongFocus); And this was missing in QVTKWidget2. Is there any specific reason as why it was removed from QVTKWidget2? By adding this statement in my application, key events are working. Warm Regards Rakesh Patil ________________________________ From: vtkusers on behalf of Rakesh Patil Sent: Monday, September 26, 2016 7:13:15 PM To: vtkusers at vtk.org Subject: [vtkusers] Key events in QVTKWidget2 Hi, I would like to know how the events are propogated in case of QVTKWidget & QVTKWidget2. Is there any difference in these two? I have an application built with QVTKWidget. I have Graphics window derived from QVTKWidget #ifndef GRAPHICSWINDOW_H #define GRAPHICSWINDOW_H #include #include "QVTKWidget.h" #include class GraphicsWindow : public QVTKWidget { Q_OBJECT vtkRenderer *currentRenderer; public: GraphicsWindow(QWidget *parent = NULL); ~GraphicsWindow(); protected: virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); }; #endif The definition for this class is as follows: GraphicsWindow::GraphicsWindow(QWidget *parent) :QVTKWidget(parent) { #ifdef QT_DEBUG vtkObject::GlobalWarningDisplayOn(); #else vtkObject::GlobalWarningDisplayOff(); #endif currentRenderer = vtkRenderer::New(); currentRenderer->SetBackground( 0.5, 0.0, 0.0); // vtkGenericOpenGLRenderWindow *glrw = vtkGenericOpenGLRenderWindow::SafeDownCast(this->GetRenderWindow()); // glrw->AddRenderer(currentRenderer); // this->SetRenderWindow(glrw); this->GetRenderWindow()->AddRenderer(currentRenderer); this->GetRenderWindow()->GetInteractor()->SetInteractorStyle(currentInteractorStyle); vtkSmartPointer cubeSource = vtkSmartPointer::New(); cubeSource->SetCenter(10, 10, 10); cubeSource->SetXLength(10); cubeSource->SetYLength(10); cubeSource->SetZLength(30); cubeSource->Update(); vtkSmartPointer cubeMapper = vtkSmartPointer::New(); cubeMapper->SetInputConnection(cubeSource->GetOutputPort()); vtkActor *cubeActor = vtkActor::New(); cubeActor->SetMapper(cubeMapper); cubeActor->GetProperty()->SetRepresentationToWireframe(); cubeActor->GetProperty()->LightingOff(); cubeActor->GetProperty()->SetColor(1, 1, 1); currentRenderer->AddActor(cubeActor); } GraphicsWindow::~GraphicsWindow() { } void GraphicsWindow::keyPressEvent(QKeyEvent *event) { std::cout << "Key press" << std::endl; } void GraphicsWindow::keyReleaseEvent(QKeyEvent *event) { std::cout << "Key release" << std::endl; } When this application is built with QVTKWidget, the keypress and keyrelease events are executing fine. But when the same code built with QVTKWidget2 there key events are not processed. Is there any differences in these two widgets? Is there anything wrong I am doing? Kindly guide me as to how to process key events using QVTKWidget2. Thanks Warm Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Sep 27 12:03:43 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 27 Sep 2016 09:03:43 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <006d01d218cd$ef375970$cda60c50$@gmail.com> References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> <1474986380344-5740570.post@n5.nabble.com> <006d01d218cd$ef375970$cda60c50$@gmail.com> Message-ID: <1474992223541-5740573.post@n5.nabble.com> Hi, thanks. I would ideally like to build it on Windows as I have gone through the pain of getting the build environment (lex, yacc, python, VS 2015 etc) set up, and I am also most familliar here. I seem to have been able to get LLVM 3.9 to build, release mode 64 bit, but I can't seem to get Mesa to link properly now, it complains about not being able to find LLVMipa.lib. I guess I will ask a question on the Mesa discussion boards. Surely this can't be this difficult? What am I missing? -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740573.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcus.hanwell at kitware.com Tue Sep 27 14:18:08 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Tue, 27 Sep 2016 14:18:08 -0400 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: <20160927134147.GA9541@megas.kitware.com> References: <20160927134147.GA9541@megas.kitware.com> Message-ID: On Tue, Sep 27, 2016 at 9:41 AM, Ben Boeckel wrote: > > On Tue, Sep 27, 2016 at 00:22:10 -0700, JIA Pei wrote: > > 2) In addition, I noticed that current python support is still 2.7.x. > > What about 3.5.x ? I transformed python files to be 3.x compatible by > > command "2to3?, it seems to be OK, but I'm NOT 100% sure about that. > > We support and test Python3 (3.3, 3.4, and 3.5). There is the > VTK_PYTHON_VERSION variable which you can use to select which one to > use. > > In any case, there is CPython code that 2to3 wouldn't have touched. I usually build with Python 3, and use system libraries including FreeType. I just checked master, and I am able to compile with system FreeType, Python 3 and the OpenGL 2 backend with no issues. This sounds like something more specific to the remote examples module. From marcus.hanwell at kitware.com Tue Sep 27 14:21:48 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Tue, 27 Sep 2016 14:21:48 -0400 Subject: [vtkusers] Interaction with chart on top of 3D (on top of volume rendering?) In-Reply-To: References: Message-ID: On Fri, Sep 23, 2016 at 1:36 AM, Elvis Stansvik wrote: > At the moment I have a button in my Qt UI that pops up a dialog with a > render window containing vtkChartXY with some points items to control > the transfer functions I use for rendering volumes in another window. > > I've been toying with the idea of adding a VTK button (say in the > bottom left corner) in the window where I do the actual volume > rendering, and have that button bring up the vtkChartXY in the same > window (on top of the volume rendering), for more convenient / quick > access to transfer function editing. > > I had a look at this test: > > https://github.com/Kitware/VTK/blob/master/Charts/Core/Testing/Cxx/TestChartsOn3D.cxx > > It shows a cube with a chart on top in the same renderer. Yeah, I added that. > > Would this example work if the cube instead was a volume rendering? Probably. > > Is it possible to get interaction with the chart working seamlessly > with interaction with the camera? No, this is something I was hoping to revisit but I could not get the interaction events to switch from the 2D scene to the 3D. This was my ideal, and what I had in mind when writing the test. > > Is there some other approach that would allow these two things? > Multiple renderers? Has anyone done such a thing? > Not that I know of, if they have I would love to see how they achieved it. I think the main obstacle is getting the interaction events to the 2D or 3D interactor observer depending upon where the mouse is. I don't think it is that hard, but we never had a project pushing for it. The widgets do something on this level, where they intercept the events when they are in an active region so that is probably a good place to go looking. From bill.lorensen at gmail.com Tue Sep 27 14:31:16 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 27 Sep 2016 14:31:16 -0400 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: <20160927134147.GA9541@megas.kitware.com> Message-ID: I'll take a look, On Tue, Sep 27, 2016 at 2:18 PM, Marcus D. Hanwell wrote: > On Tue, Sep 27, 2016 at 9:41 AM, Ben Boeckel wrote: >> >> On Tue, Sep 27, 2016 at 00:22:10 -0700, JIA Pei wrote: >> > 2) In addition, I noticed that current python support is still 2.7.x. >> > What about 3.5.x ? I transformed python files to be 3.x compatible by >> > command "2to3?, it seems to be OK, but I'm NOT 100% sure about that. >> >> We support and test Python3 (3.3, 3.4, and 3.5). There is the >> VTK_PYTHON_VERSION variable which you can use to select which one to >> use. >> >> In any case, there is CPython code that 2to3 wouldn't have touched. > > I usually build with Python 3, and use system libraries including > FreeType. I just checked master, and I am able to compile with system > FreeType, Python 3 and the OpenGL 2 backend with no issues. This > sounds like something more specific to the remote examples module. > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From hjchen.work at gmail.com Tue Sep 27 15:06:54 2016 From: hjchen.work at gmail.com (hchen) Date: Tue, 27 Sep 2016 12:06:54 -0700 (MST) Subject: [vtkusers] change contour color Message-ID: <1475003214417-5740578.post@n5.nabble.com> Hi, Using vtkMarchingSquares, I have a set of contours, how do I change the default contour color? And, similarly, how do I change the default surface color resulted from vtkMarchingCubes? I am using VTK7.0+python3.5 Thanks! Chen -- View this message in context: http://vtk.1045678.n5.nabble.com/change-contour-color-tp5740578.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Wed Sep 28 01:52:54 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 28 Sep 2016 07:52:54 +0200 Subject: [vtkusers] Interaction with chart on top of 3D (on top of volume rendering?) In-Reply-To: References: Message-ID: 2016-09-27 20:21 GMT+02:00 Marcus D. Hanwell : > On Fri, Sep 23, 2016 at 1:36 AM, Elvis Stansvik > wrote: >> At the moment I have a button in my Qt UI that pops up a dialog with a >> render window containing vtkChartXY with some points items to control >> the transfer functions I use for rendering volumes in another window. >> >> I've been toying with the idea of adding a VTK button (say in the >> bottom left corner) in the window where I do the actual volume >> rendering, and have that button bring up the vtkChartXY in the same >> window (on top of the volume rendering), for more convenient / quick >> access to transfer function editing. >> >> I had a look at this test: >> >> https://github.com/Kitware/VTK/blob/master/Charts/Core/Testing/Cxx/TestChartsOn3D.cxx >> >> It shows a cube with a chart on top in the same renderer. > > Yeah, I added that. >> >> Would this example work if the cube instead was a volume rendering? > > Probably. >> >> Is it possible to get interaction with the chart working seamlessly >> with interaction with the camera? > > No, this is something I was hoping to revisit but I could not get the > interaction events to switch from the 2D scene to the 3D. This was my > ideal, and what I had in mind when writing the test. >> >> Is there some other approach that would allow these two things? >> Multiple renderers? Has anyone done such a thing? >> > Not that I know of, if they have I would love to see how they achieved > it. I think the main obstacle is getting the interaction events to the > 2D or 3D interactor observer depending upon where the mouse is. I > don't think it is that hard, but we never had a project pushing for > it. The widgets do something on this level, where they intercept the > events when they are in an active region so that is probably a good > place to go looking. Alright, thanks a lot for the answers. This idea is low on my priority list, but I thought I'd ask at least. And now I know that in theory it's probably doable. If someone else has gone through the trouble, please chime in :) Elvis From jp4work at gmail.com Wed Sep 28 07:00:02 2016 From: jp4work at gmail.com (JIA Pei) Date: Wed, 28 Sep 2016 04:00:02 -0700 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: <20160927134147.GA9541@megas.kitware.com> Message-ID: I have VTK successfully built now... But, I really cannot remember what to enable, and what to disable ... Well, now, I got as for "FreeType", the one came with system shouldn't be enabled. In addition, for another package ITK, I dare NOT to enable even one module. I believe the users need your clear documentation, particularly for people like me, who would always like to build everything from scratch. Thank you On Tue, Sep 27, 2016 at 11:31 AM, Bill Lorensen wrote: > I'll take a look, > > > On Tue, Sep 27, 2016 at 2:18 PM, Marcus D. Hanwell > wrote: > > On Tue, Sep 27, 2016 at 9:41 AM, Ben Boeckel > wrote: > >> > >> On Tue, Sep 27, 2016 at 00:22:10 -0700, JIA Pei wrote: > >> > 2) In addition, I noticed that current python support is still 2.7.x. > >> > What about 3.5.x ? I transformed python files to be 3.x compatible by > >> > command "2to3?, it seems to be OK, but I'm NOT 100% sure about that. > >> > >> We support and test Python3 (3.3, 3.4, and 3.5). There is the > >> VTK_PYTHON_VERSION variable which you can use to select which one to > >> use. > >> > >> In any case, there is CPython code that 2to3 wouldn't have touched. > > > > I usually build with Python 3, and use system libraries including > > FreeType. I just checked master, and I am able to compile with system > > FreeType, Python 3 and the OpenGL 2 backend with no issues. This > > sounds like something more specific to the remote examples module. > > _______________________________________________ > > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Wed Sep 28 10:19:39 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Wed, 28 Sep 2016 10:19:39 -0400 Subject: [vtkusers] vtkSmartPoint() changed? Current VTK-git won't build... In-Reply-To: References: <20160927134147.GA9541@megas.kitware.com> Message-ID: On Wed, Sep 28, 2016 at 7:00 AM, JIA Pei wrote: > > I have VTK successfully built now... > But, I really cannot remember what to enable, and what to disable ... > > Well, now, I got as for "FreeType", the one came with system shouldn't be > enabled. > > In addition, for another package ITK, I dare NOT to enable even one module. > I believe the users need your clear documentation, particularly for people > like me, who would always like to build everything from scratch. > The simple fact is that the default build options are likely to give you a build that works, this is true for ITK and VTK. The more things you change the more likely you are to hit a bug or corner case that is not tested. We have a large number of dashboard machines testing a number of configurations, if you want to build from source and change default options, enable remote modules, etc you may hit issues and this is far from unique. Default build options are the recommended options to get up and running quickly, tend to be better tested, and that is why we spent time deciding on reasonable defaults as almost all projects do. Our goal, or at least mine, is to make all configurations work, and disable anything that is known to be broken, or at least issue a configure time warning. You can take a look at the Tomviz superbuild where we configure ParaView (and thus VTK), ITK, SciPy, and a number of other projects on WIndows, Mac and Linux, creating binary installers. That took time, and is still something that needs tweaking/testing. From marcus.hanwell at kitware.com Wed Sep 28 10:21:42 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Wed, 28 Sep 2016 10:21:42 -0400 Subject: [vtkusers] Interaction with chart on top of 3D (on top of volume rendering?) In-Reply-To: References: Message-ID: On Wed, Sep 28, 2016 at 1:52 AM, Elvis Stansvik wrote: > 2016-09-27 20:21 GMT+02:00 Marcus D. Hanwell : >> On Fri, Sep 23, 2016 at 1:36 AM, Elvis Stansvik >> wrote: >>> At the moment I have a button in my Qt UI that pops up a dialog with a >>> render window containing vtkChartXY with some points items to control >>> the transfer functions I use for rendering volumes in another window. >>> >>> I've been toying with the idea of adding a VTK button (say in the >>> bottom left corner) in the window where I do the actual volume >>> rendering, and have that button bring up the vtkChartXY in the same >>> window (on top of the volume rendering), for more convenient / quick >>> access to transfer function editing. >>> >>> I had a look at this test: >>> >>> https://github.com/Kitware/VTK/blob/master/Charts/Core/Testing/Cxx/TestChartsOn3D.cxx >>> >>> It shows a cube with a chart on top in the same renderer. >> >> Yeah, I added that. >>> >>> Would this example work if the cube instead was a volume rendering? >> >> Probably. >>> >>> Is it possible to get interaction with the chart working seamlessly >>> with interaction with the camera? >> >> No, this is something I was hoping to revisit but I could not get the >> interaction events to switch from the 2D scene to the 3D. This was my >> ideal, and what I had in mind when writing the test. >>> >>> Is there some other approach that would allow these two things? >>> Multiple renderers? Has anyone done such a thing? >>> >> Not that I know of, if they have I would love to see how they achieved >> it. I think the main obstacle is getting the interaction events to the >> 2D or 3D interactor observer depending upon where the mouse is. I >> don't think it is that hard, but we never had a project pushing for >> it. The widgets do something on this level, where they intercept the >> events when they are in an active region so that is probably a good >> place to go looking. > > Alright, thanks a lot for the answers. > > This idea is low on my priority list, but I thought I'd ask at least. > And now I know that in theory it's probably doable. > > If someone else has gone through the trouble, please chime in :) > I really think it would make for some compelling interfaces, and hope I find some time at some point to come back to this. Currently that is looking unlikely, and I would be very interested in anything others have done. From utkarsh.ayachit at kitware.com Wed Sep 28 11:43:00 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 28 Sep 2016 11:43:00 -0400 Subject: [vtkusers] Please nominate ParaView for for the 2016 HPCwire Readers' Choice Awards In-Reply-To: References: Message-ID: A quick reminder: today is the last day to cast your vote. https://www.hpcwire.com/2016-hpcwire-readers-choice-awards/ Thank you! On Wed, Sep 7, 2016 at 5:15 PM, David E DeMarle wrote: > Thank you to everyone who nominated ParaView for the HPCwire Readers? Choice > Awards. > > The survey is now open for voting, and ParaView is included in the ?Best HPC > Visualization Product or Technology? category.? To vote for ParaView, please > visit https://www.hpcwire.com/2016-hpcwire-readers-choice-awards/. > > Thank you for your continued support! > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Aug 2, 2016 at 11:54 AM, David E DeMarle > wrote: >> >> We would like to thank everyone who contributed to version 5.1.2 of >> ParaView. To acknowledge the growth of ParaView, please join us in >> nominating the fruit of our combined efforts for a 2016 HPCwire Readers? >> Award in the ?Best HPC Visualization Product or Technology? category. >> >> Nominations can be made at >> http://www.hpcwire.com/2015-hpcwire-readers-choice-awards. Thank you for >> your support! >> >> For reference, here are some recent updates made to ParaView: >> >> Enabled ray tracing through OSPRay >> Added ?Point Interpolation? filters >> Introduced the capability to render picture-in-picture visualizations >> Launched a welcome screen with a link to ?ParaView Getting Started Guide? >> Improved ParaView Catalyst and Cinema for In-Situ processing at extreme >> scales >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 > > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From elvis.stansvik at orexplore.com Thu Sep 29 03:29:37 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 09:29:37 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? Message-ID: I'd like to read a PNG from an in-memory buffer. Looking at vtkPNGReader, it seems it only works with files in the file system. In general, is there some way to use the reader classes in VTK with in-memory data, or would I have to write my own custom reader? My need for this is not great, I was simply hoping to be able to keep this particular PNG in the Qt resource system (so in the end, embedded in my executable), load it using Qt file facilities, and use VTK on the read in-memory data. Elvis From elvis.stansvik at orexplore.com Thu Sep 29 04:48:04 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 10:48:04 +0200 Subject: [vtkusers] GetWidth() on vtkActor2D always returns 0.5 Message-ID: I'm trying to position a vtkActor2D 5 pixels from the window edges in the bottom right corner of the window when the window is modified: void SegmentWidget::onRenderWindowModified() { auto windowSize = GetRenderWindow()->GetSize(); // FIXME: Don't hardcode the width of the image (80) here. // ..but m_logoActor->GetWidth() always returns 0.5 (!) m_logoActor->SetPosition(windowSize[0] - 80 - 5, 5); GetRenderWindow()->Render(); } Here I'm hardcoding the width of the actor (80 pixels) in the position calculation. I was planning on using GetWidth on the actor, but for some reason it always returns 0.5. The docs says it should return the width of the actor as a fraction of the viewport, but the actor is always a much larger fraction of the viewport width, so I don't know where the 0.5 is coming from. And it's not changing when I resize the window, it's always 0.5. How can I get the width of the vtkActor2D in display coordinates? (That's what I want in the end). Thanks in advance, Elvis PS. The vtkActor2D is backed by a vtkPNGReader -> vtkImageMapper. From elvis.stansvik at orexplore.com Thu Sep 29 05:35:57 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 11:35:57 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: 2016-09-29 9:29 GMT+02:00 Elvis Stansvik : > I'd like to read a PNG from an in-memory buffer. Looking at > vtkPNGReader, it seems it only works with files in the file system. In > general, is there some way to use the reader classes in VTK with > in-memory data, or would I have to write my own custom reader? > > My need for this is not great, I was simply hoping to be able to keep > this particular PNG in the Qt resource system (so in the end, embedded > in my executable), load it using Qt file facilities, and use VTK on > the read in-memory data. I realize now that I can probable use QImage to load/decompress the image, and pass the uncompressed data to a vtkImageImport, but I can't find any docs on what format vtkImageImport expects for the pixels. Anyone know? Elvis > > Elvis From elvis.stansvik at orexplore.com Thu Sep 29 07:29:47 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 13:29:47 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: 2016-09-29 11:35 GMT+02:00 Elvis Stansvik : > 2016-09-29 9:29 GMT+02:00 Elvis Stansvik : >> I'd like to read a PNG from an in-memory buffer. Looking at >> vtkPNGReader, it seems it only works with files in the file system. In >> general, is there some way to use the reader classes in VTK with >> in-memory data, or would I have to write my own custom reader? >> >> My need for this is not great, I was simply hoping to be able to keep >> this particular PNG in the Qt resource system (so in the end, embedded >> in my executable), load it using Qt file facilities, and use VTK on >> the read in-memory data. > > I realize now that I can probable use QImage to load/decompress the > image, and pass the uncompressed data to a vtkImageImport, but I can't > find any docs on what format vtkImageImport expects for the pixels. > Anyone know? I had a go at this approach, using QImage::Format_RGBA8888 as I think (?) that's the format vtkImportImage wants, but the resulting image looks garbled when shown in VTK: // Load image with QImage QImage image(":/images/orexplore-logo-80x47.png"); // Convert to RGBA8888 image = image.convertToFormat(QImage::Format_RGBA8888); // Have a look at the image to make sure it's OK auto debugLabel = new QLabel(); debugLabel->setPixmap(QPixmap::fromImage(image)); debugLabel->show(); // Import into a vtkImageData auto imageImport = vtkSmartPointer::New(); imageImport->SetDataSpacing(1, 1, 1); imageImport->SetDataOrigin(0, 0, 0); imageImport->SetWholeExtent(0, image.width() - 1, 0, image.height() - 1, 0, 0); imageImport->SetDataExtentToWholeExtent(); imageImport->SetDataScalarTypeToUnsignedChar(); imageImport->SetNumberOfScalarComponents(4); imageImport->SetImportVoidPointer(image.bits(), 1); // Note: QImage::bits() deep copies imageImport->Update(); auto mapper = vtkSmartPointer::New(); mapper->SetInputData(imageImport->GetOutput()); auto actor = vtkSmartPointer::New(); actor->SetMapper(mapper); Anyone know exactly what format vtkImageImport expects, or, if it expects RGBA (unsigned char), why the above won't work? Elvis > > Elvis > >> >> Elvis From fehereszter at gmail.com Thu Sep 29 07:31:22 2016 From: fehereszter at gmail.com (=?UTF-8?Q?Eszter_Feh=C3=A9r?=) Date: Thu, 29 Sep 2016 13:31:22 +0200 Subject: [vtkusers] question about vtk 7.1.0 Message-ID: Dear All, I have written a code using the previous version of VTK (7.0.0). Since the 7.1.0 version is released, the documentations of the previous versions are not available. It seems to me, that I had better update always to the latest version. However some of the methods I use in my code are not available in this latest version. Should I rewrite and redesign my code? Is there any other option? I don't know what someone can do if this problem occurs in a huge program with thousands of lines of code. In detail, my problem is with the "New Data Array Layouts" announced on their website. I was trying to find the method getValue for the vtkFloatArray, but couldn't find. Is it worth to immerse myself in the new documentation and adapt my code to these new Layouts? Eszter -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 29 07:32:27 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 13:32:27 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: 2016-09-29 13:29 GMT+02:00 Elvis Stansvik : > 2016-09-29 11:35 GMT+02:00 Elvis Stansvik : >> 2016-09-29 9:29 GMT+02:00 Elvis Stansvik : >>> I'd like to read a PNG from an in-memory buffer. Looking at >>> vtkPNGReader, it seems it only works with files in the file system. In >>> general, is there some way to use the reader classes in VTK with >>> in-memory data, or would I have to write my own custom reader? >>> >>> My need for this is not great, I was simply hoping to be able to keep >>> this particular PNG in the Qt resource system (so in the end, embedded >>> in my executable), load it using Qt file facilities, and use VTK on >>> the read in-memory data. >> >> I realize now that I can probable use QImage to load/decompress the >> image, and pass the uncompressed data to a vtkImageImport, but I can't >> find any docs on what format vtkImageImport expects for the pixels. >> Anyone know? > > I had a go at this approach, using QImage::Format_RGBA8888 as I think > (?) that's the format vtkImportImage wants, but the resulting image > looks garbled when shown in VTK: > > // Load image with QImage > QImage image(":/images/orexplore-logo-80x47.png"); > > // Convert to RGBA8888 > image = image.convertToFormat(QImage::Format_RGBA8888); > > // Have a look at the image to make sure it's OK > auto debugLabel = new QLabel(); > debugLabel->setPixmap(QPixmap::fromImage(image)); > debugLabel->show(); > > // Import into a vtkImageData > auto imageImport = vtkSmartPointer::New(); > imageImport->SetDataSpacing(1, 1, 1); > imageImport->SetDataOrigin(0, 0, 0); > imageImport->SetWholeExtent(0, image.width() - 1, 0, > image.height() - 1, 0, 0); > imageImport->SetDataExtentToWholeExtent(); > imageImport->SetDataScalarTypeToUnsignedChar(); > imageImport->SetNumberOfScalarComponents(4); > imageImport->SetImportVoidPointer(image.bits(), 1); // Note: > QImage::bits() deep copies > imageImport->Update(); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputData(imageImport->GetOutput()); > > auto actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > Anyone know exactly what format vtkImageImport expects, or, if it > expects RGBA (unsigned char), why the above won't work? Whoa. Just found http://www.vtk.org/doc/nightly/html/classvtkQImageToImageSource.html :) I'll of course use that. Sorry for the noise. Still interested in why the above approach wouldn't work, out of curiosity. Elvis > > Elvis > >> >> Elvis >> >>> >>> Elvis From david.gobbi at gmail.com Thu Sep 29 08:01:02 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 29 Sep 2016 06:01:02 -0600 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: You mentioned that QImage.bits() does a "deep copy", but that seems meaningless for your use case because Qt owns all copies and the returned pointer will become invalid when the QImage destructs. It would be different if you were passing the pointer to another Qt image, because then Qt could "track" the pointer. VTK should be the one to create the copy. imageImport->CopyImportVoidPointer(image.constBits(), image.byteCount()); Other than that, your usage of vtkImageImport looks fine. - David On Thu, Sep 29, 2016 at 5:32 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-09-29 13:29 GMT+02:00 Elvis Stansvik : > > 2016-09-29 11:35 GMT+02:00 Elvis Stansvik > : > >> 2016-09-29 9:29 GMT+02:00 Elvis Stansvik > : > >>> I'd like to read a PNG from an in-memory buffer. Looking at > >>> vtkPNGReader, it seems it only works with files in the file system. In > >>> general, is there some way to use the reader classes in VTK with > >>> in-memory data, or would I have to write my own custom reader? > >>> > >>> My need for this is not great, I was simply hoping to be able to keep > >>> this particular PNG in the Qt resource system (so in the end, embedded > >>> in my executable), load it using Qt file facilities, and use VTK on > >>> the read in-memory data. > >> > >> I realize now that I can probable use QImage to load/decompress the > >> image, and pass the uncompressed data to a vtkImageImport, but I can't > >> find any docs on what format vtkImageImport expects for the pixels. > >> Anyone know? > > > > I had a go at this approach, using QImage::Format_RGBA8888 as I think > > (?) that's the format vtkImportImage wants, but the resulting image > > looks garbled when shown in VTK: > > > > // Load image with QImage > > QImage image(":/images/orexplore-logo-80x47.png"); > > > > // Convert to RGBA8888 > > image = image.convertToFormat(QImage::Format_RGBA8888); > > > > // Have a look at the image to make sure it's OK > > auto debugLabel = new QLabel(); > > debugLabel->setPixmap(QPixmap::fromImage(image)); > > debugLabel->show(); > > > > // Import into a vtkImageData > > auto imageImport = vtkSmartPointer::New(); > > imageImport->SetDataSpacing(1, 1, 1); > > imageImport->SetDataOrigin(0, 0, 0); > > imageImport->SetWholeExtent(0, image.width() - 1, 0, > > image.height() - 1, 0, 0); > > imageImport->SetDataExtentToWholeExtent(); > > imageImport->SetDataScalarTypeToUnsignedChar(); > > imageImport->SetNumberOfScalarComponents(4); > > imageImport->SetImportVoidPointer(image.bits(), 1); // Note: > > QImage::bits() deep copies > > imageImport->Update(); > > > > auto mapper = vtkSmartPointer::New(); > > mapper->SetInputData(imageImport->GetOutput()); > > > > auto actor = vtkSmartPointer::New(); > > actor->SetMapper(mapper); > > > > Anyone know exactly what format vtkImageImport expects, or, if it > > expects RGBA (unsigned char), why the above won't work? > > Whoa. Just found > http://www.vtk.org/doc/nightly/html/classvtkQImageToImageSource.html > :) I'll of course use that. Sorry for the noise. > > Still interested in why the above approach wouldn't work, out of curiosity. > > Elvis > > > > > Elvis > > > >> > >> Elvis > >> > >>> > >>> Elvis > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Thu Sep 29 08:22:44 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Thu, 29 Sep 2016 05:22:44 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <1474992223541-5740573.post@n5.nabble.com> References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> <1474986380344-5740570.post@n5.nabble.com> <006d01d218cd$ef375970$cda60c50$@gmail.com> <1474992223541-5740573.post@n5.nabble.com> Message-ID: <1475151764285-5740585.post@n5.nabble.com> Hi, I have now managed to get Mesa to build with LLVM 3.7.1 (yay!), thanks to this post: https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/opengl-vulkan-mesa-gallium3d/883984-windows-binaries-for-mesa-12-llvmpipe-and-openswr Apparently LLVMipa seems to have been dropped in the newer releases - CMake does not even generate a project for it. This prevents Mesa from linking - not sure what is going on here. However, LLVM 3.7.1 does produce this library and Mesa goes on to build successfully with it. I have verified with glview that LLVMPipe is being used. However, I still have the warning (as expected from RobertS's post?), and I get a crash when I set the render window to off screen mode via SetOffScreenRendering(1). I have checked that I have called SetMultiSamples(0) on the render window. I expect the next thing you will tell me is that Mesa does not support offscreen rendering. I have seen mention of OSMesa (Off Screen Mesa?) in the VTK CMake config - is this worth pursuing? An interesting additional piece of information here is that the old build of VTK we were using (6.1) works fine (with off screen rendering) with the new Mesa opengl.dll built above (but slowly as you would expect). Any further ideas, or am I flogging a dead horse here? -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740585.html Sent from the VTK - Users mailing list archive at Nabble.com. From ilindsay at insigniamedical.co.uk Thu Sep 29 08:28:34 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Thu, 29 Sep 2016 05:28:34 -0700 (MST) Subject: [vtkusers] OpenGL driver issue with VTK 7.0 In-Reply-To: <1475081188518-5740581.post@n5.nabble.com> References: <35d826a4.16.15375cddc12.Coremail.tjlp@netease.com> <7f3c22d7.4.15377ced08a.Coremail.tjlp@netease.com> <1475081188518-5740581.post@n5.nabble.com> Message-ID: <1475152114300-5740586.post@n5.nabble.com> I expect this will be an issue for us too as some of our sites still use these chipsets. Will this make it into 7.1? -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL-driver-issue-with-VTK-7-0-tp5737190p5740586.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Sep 29 08:36:41 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 29 Sep 2016 08:36:41 -0400 Subject: [vtkusers] OpenGL driver issue with VTK 7.0 In-Reply-To: <1475152114300-5740586.post@n5.nabble.com> References: <35d826a4.16.15375cddc12.Coremail.tjlp@netease.com> <7f3c22d7.4.15377ced08a.Coremail.tjlp@netease.com> <1475081188518-5740581.post@n5.nabble.com> <1475152114300-5740586.post@n5.nabble.com> Message-ID: The support for Intel HD2000/3000 chips on Windows will be in 7.1 as it was merged to master a couple months ago. I'm not sure if we have any systems that test that case though.. So if you do, it would be good to test VTK master against it to make sure it still works prior to cutting 7.1 Thanks Ken On Thu, Sep 29, 2016 at 8:28 AM, ianl wrote: > I expect this will be an issue for us too as some of our sites still use > these chipsets. Will this make it into 7.1? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/OpenGL-driver-issue-with-VTK-7-0-tp5737190p5740586.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Sep 29 08:57:26 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 29 Sep 2016 08:57:26 -0400 Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: <1475151764285-5740585.post@n5.nabble.com> References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> <1474986380344-5740570.post@n5.nabble.com> <006d01d218cd$ef375970$cda60c50$@gmail.com> <1474992223541-5740573.post@n5.nabble.com> <1475151764285-5740585.post@n5.nabble.com> Message-ID: You should not be getting that error. Mesa should be providing at least a 3.2 context. That error is for cases when your OpenGL is not providing a 3.2 context. I have no experience with Mesa on windows so I'm not sure how much of the Window specific calls they have implemented. VTK with the OpenGL2 backend makes use of newer wgl calls such as wglCreateContextAttributesARB. If mesa has not provided that function then at runtime it will fall back on trying to use an older context creation method that probably will return an old context without the needed support and fail. We had this issue with OSMesa and the Mesa folks were great and worked with us to add the method we needed into newer releases. I'l post something to the Mesa list and see if it rings a bell. I would bet that is the issue. On a different track, if you are doing software rendering and running into issues with systems that don't have newer OpenGL support, could you use the old OpenGL backend (by building VTK with VTK_RENDERING_BACKEND set to OpenGL ? Would that solve the issue? On Thu, Sep 29, 2016 at 8:22 AM, ianl wrote: > Hi, I have now managed to get Mesa to build with LLVM 3.7.1 (yay!), thanks > to > this post: > https://www.phoronix.com/forums/forum/linux-graphics-x- > org-drivers/opengl-vulkan-mesa-gallium3d/883984-windows- > binaries-for-mesa-12-llvmpipe-and-openswr > > Apparently LLVMipa seems to have been dropped in the newer releases - CMake > does not even generate a project for it. This prevents Mesa from linking - > not sure what is going on here. However, LLVM 3.7.1 does produce this > library and Mesa goes on to build successfully with it. > > I have verified with glview that LLVMPipe is being used. > > However, I still have the warning (as expected from RobertS's post?), and I > get a crash when I set the render window to off screen mode via > SetOffScreenRendering(1). I have checked that I have called > SetMultiSamples(0) on the render window. > > I expect the next thing you will tell me is that Mesa does not support > offscreen rendering. I have seen mention of OSMesa (Off Screen Mesa?) in > the > VTK CMake config - is this worth pursuing? > > An interesting additional piece of information here is that the old build > of > VTK we were using (6.1) works fine (with off screen rendering) with the new > Mesa opengl.dll built above (but slowly as you would expect). > > Any further ideas, or am I flogging a dead horse here? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/OpenGL2-using-mesa-tp5740561p5740585.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigarmo at gmail.com Thu Sep 29 09:25:26 2016 From: tigarmo at gmail.com (Tiago Nobrega) Date: Thu, 29 Sep 2016 10:25:26 -0300 Subject: [vtkusers] question about vtk 7.1.0 In-Reply-To: References: Message-ID: I don't know about the data array layouts, but as far as docs for 7.0 I think this is expected to be a permanent-ish link: http://www.vtk.org/doc/release/7.0/html/ For what it's worth, we tend to update the VTK version that we use about once a year or so. Tiago On Thu, Sep 29, 2016 at 8:31 AM, Eszter Feh?r wrote: > Dear All, > > I have written a code using the previous version of VTK (7.0.0). Since the > 7.1.0 version is released, the documentations of the previous versions are > not available. It seems to me, that I had better update always to the > latest version. However some of the methods I use in my code are not > available in this latest version. Should I rewrite and redesign my code? Is > there any other option? I don't know what someone can do if this problem > occurs in a huge program with thousands of lines of code. > > In detail, my problem is with the "New Data Array Layouts" announced on > their website. I was trying to find the method getValue for the > vtkFloatArray, but couldn't find. Is it worth to immerse myself in the new > documentation and adapt my code to these new Layouts? > > Eszter > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Sep 29 09:44:00 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 29 Sep 2016 09:44:00 -0400 Subject: [vtkusers] question about vtk 7.1.0 In-Reply-To: References: Message-ID: Eszter, GetValue should still be there http://www.vtk.org/doc/nightly/html/classvtkAOSDataArrayTemplate.html#a52803185567b597f33f5e9277b6d41cd Dan On Thu, Sep 29, 2016 at 9:25 AM, Tiago Nobrega wrote: > I don't know about the data array layouts, but as far as docs for 7.0 I > think this is expected to be a permanent-ish link: http://www.vtk.org/doc/ > release/7.0/html/ > > For what it's worth, we tend to update the VTK version that we use about > once a year or so. > > Tiago > > On Thu, Sep 29, 2016 at 8:31 AM, Eszter Feh?r > wrote: > >> Dear All, >> >> I have written a code using the previous version of VTK (7.0.0). Since >> the 7.1.0 version is released, the documentations of the previous versions >> are not available. It seems to me, that I had better update always to the >> latest version. However some of the methods I use in my code are not >> available in this latest version. Should I rewrite and redesign my code? Is >> there any other option? I don't know what someone can do if this problem >> occurs in a huge program with thousands of lines of code. >> >> In detail, my problem is with the "New Data Array Layouts" announced on >> their website. I was trying to find the method getValue for the >> vtkFloatArray, but couldn't find. Is it worth to immerse myself in the new >> documentation and adapt my code to these new Layouts? >> >> Eszter >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Sep 29 10:06:22 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 29 Sep 2016 10:06:22 -0400 Subject: [vtkusers] question about vtk 7.1.0 In-Reply-To: References: Message-ID: Regarding upgrades... * http://www.vtk.org/documentation/ #has links to the doxygen pages from the past N releases. Under that you will find ... * http://www.vtk.org/doc/nightly/html/VTK-7-1-Changes.html # code changes documented by developers under $VTKSRC/Documentation/ * http://www.vtk.org/Wiki/VTK/Roadmap # summaries of each release that the community puts together. Under that you will find ... * http://www.vtk.org/Wiki/VTK/API_Changes_6_3_0_to_7_0_0 #changes to the API that a script finds at each release None of these are a perfect summary and upgrade guide, but they are intended to be helpful. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 29, 2016 at 9:44 AM, Dan Lipsa wrote: > Eszter, > GetValue should still be there > > http://www.vtk.org/doc/nightly/html/classvtkAOSDataArrayTemplate.html# > a52803185567b597f33f5e9277b6d41cd > > Dan > > > > On Thu, Sep 29, 2016 at 9:25 AM, Tiago Nobrega wrote: > >> I don't know about the data array layouts, but as far as docs for 7.0 I >> think this is expected to be a permanent-ish link: >> http://www.vtk.org/doc/release/7.0/html/ >> >> For what it's worth, we tend to update the VTK version that we use about >> once a year or so. >> >> Tiago >> >> On Thu, Sep 29, 2016 at 8:31 AM, Eszter Feh?r >> wrote: >> >>> Dear All, >>> >>> I have written a code using the previous version of VTK (7.0.0). Since >>> the 7.1.0 version is released, the documentations of the previous versions >>> are not available. It seems to me, that I had better update always to the >>> latest version. However some of the methods I use in my code are not >>> available in this latest version. Should I rewrite and redesign my code? Is >>> there any other option? I don't know what someone can do if this problem >>> occurs in a huge program with thousands of lines of code. >>> >>> In detail, my problem is with the "New Data Array Layouts" announced on >>> their website. I was trying to find the method getValue for the >>> vtkFloatArray, but couldn't find. Is it worth to immerse myself in the new >>> documentation and adapt my code to these new Layouts? >>> >>> Eszter >>> >>> _______________________________________________ >>> 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 VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Sep 29 10:29:46 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 16:29:46 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: 2016-09-29 14:01 GMT+02:00 David Gobbi : > You mentioned that QImage.bits() does a "deep copy", but that seems > meaningless for your use case because Qt owns all copies and the returned > pointer will become invalid when the QImage destructs. It would be > different if you were passing the pointer to another Qt image, because then > Qt could "track" the pointer. You're absolutely right, I misread this passage in the QImage::bits docs: "Note that QImage uses implicit data sharing. This function performs a deep copy of the shared pixel data, thus ensuring that this QImage is the only one using the current return value." I thought it meant that the function will return a newly allocated copy (to be owned by me as a caller), when in fact it just means it'll detach the underlying shared pointer. So Qt will still own the data. Now that I found the vtkQImageToImageSource convenience class, I'll of course that instead. Thanks! Elvis > > VTK should be the one to create the copy. > > imageImport->CopyImportVoidPointer(image.constBits(), > image.byteCount()); > > Other than that, your usage of vtkImageImport looks fine. > > - David > > On Thu, Sep 29, 2016 at 5:32 AM, Elvis Stansvik > wrote: >> >> 2016-09-29 13:29 GMT+02:00 Elvis Stansvik : >> > 2016-09-29 11:35 GMT+02:00 Elvis Stansvik >> > : >> >> 2016-09-29 9:29 GMT+02:00 Elvis Stansvik >> >> : >> >>> I'd like to read a PNG from an in-memory buffer. Looking at >> >>> vtkPNGReader, it seems it only works with files in the file system. In >> >>> general, is there some way to use the reader classes in VTK with >> >>> in-memory data, or would I have to write my own custom reader? >> >>> >> >>> My need for this is not great, I was simply hoping to be able to keep >> >>> this particular PNG in the Qt resource system (so in the end, embedded >> >>> in my executable), load it using Qt file facilities, and use VTK on >> >>> the read in-memory data. >> >> >> >> I realize now that I can probable use QImage to load/decompress the >> >> image, and pass the uncompressed data to a vtkImageImport, but I can't >> >> find any docs on what format vtkImageImport expects for the pixels. >> >> Anyone know? >> > >> > I had a go at this approach, using QImage::Format_RGBA8888 as I think >> > (?) that's the format vtkImportImage wants, but the resulting image >> > looks garbled when shown in VTK: >> > >> > // Load image with QImage >> > QImage image(":/images/orexplore-logo-80x47.png"); >> > >> > // Convert to RGBA8888 >> > image = image.convertToFormat(QImage::Format_RGBA8888); >> > >> > // Have a look at the image to make sure it's OK >> > auto debugLabel = new QLabel(); >> > debugLabel->setPixmap(QPixmap::fromImage(image)); >> > debugLabel->show(); >> > >> > // Import into a vtkImageData >> > auto imageImport = vtkSmartPointer::New(); >> > imageImport->SetDataSpacing(1, 1, 1); >> > imageImport->SetDataOrigin(0, 0, 0); >> > imageImport->SetWholeExtent(0, image.width() - 1, 0, >> > image.height() - 1, 0, 0); >> > imageImport->SetDataExtentToWholeExtent(); >> > imageImport->SetDataScalarTypeToUnsignedChar(); >> > imageImport->SetNumberOfScalarComponents(4); >> > imageImport->SetImportVoidPointer(image.bits(), 1); // Note: >> > QImage::bits() deep copies >> > imageImport->Update(); >> > >> > auto mapper = vtkSmartPointer::New(); >> > mapper->SetInputData(imageImport->GetOutput()); >> > >> > auto actor = vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > Anyone know exactly what format vtkImageImport expects, or, if it >> > expects RGBA (unsigned char), why the above won't work? >> >> Whoa. Just found >> http://www.vtk.org/doc/nightly/html/classvtkQImageToImageSource.html >> :) I'll of course use that. Sorry for the noise. >> >> Still interested in why the above approach wouldn't work, out of >> curiosity. >> >> Elvis >> >> > >> > Elvis >> > >> >> >> >> Elvis >> >> >> >>> >> >>> Elvis >> _______________________________________________ >> 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 VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > From elvis.stansvik at orexplore.com Thu Sep 29 10:32:28 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 29 Sep 2016 16:32:28 +0200 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: 2016-09-29 13:42 GMT+02:00 Andras Lasso : > You can use libpng directly (it's included with VTK). See how it is done in the PLUS toolkit: > DecodePngImage(unsigned char* pngBuffer, unsigned int pngBufferSize, vtkImageData* decodedImage) > https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusDataCollection/BkProFocus/vtkPlusBkProFocusOemVideoSource.cxx#ln549 Thanks for the pointer Andras. In my case I was interested in reading the PNG from the Qt resource system, and I found the vtkQImageToImageSource helper class which fits like a glove. Had I not found it, I might have gone down the route of writing my own VTK "from memory" reader class using libpng. Elvis > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis Stansvik > Sent: September 29, 2016 7:32 > To: VTK Users > Subject: Re: [vtkusers] Read PNG from in-memory buffer? > > 2016-09-29 13:29 GMT+02:00 Elvis Stansvik : >> 2016-09-29 11:35 GMT+02:00 Elvis Stansvik : >>> 2016-09-29 9:29 GMT+02:00 Elvis Stansvik : >>>> I'd like to read a PNG from an in-memory buffer. Looking at >>>> vtkPNGReader, it seems it only works with files in the file system. >>>> In general, is there some way to use the reader classes in VTK with >>>> in-memory data, or would I have to write my own custom reader? >>>> >>>> My need for this is not great, I was simply hoping to be able to >>>> keep this particular PNG in the Qt resource system (so in the end, >>>> embedded in my executable), load it using Qt file facilities, and >>>> use VTK on the read in-memory data. >>> >>> I realize now that I can probable use QImage to load/decompress the >>> image, and pass the uncompressed data to a vtkImageImport, but I >>> can't find any docs on what format vtkImageImport expects for the pixels. >>> Anyone know? >> >> I had a go at this approach, using QImage::Format_RGBA8888 as I think >> (?) that's the format vtkImportImage wants, but the resulting image >> looks garbled when shown in VTK: >> >> // Load image with QImage >> QImage image(":/images/orexplore-logo-80x47.png"); >> >> // Convert to RGBA8888 >> image = image.convertToFormat(QImage::Format_RGBA8888); >> >> // Have a look at the image to make sure it's OK >> auto debugLabel = new QLabel(); >> debugLabel->setPixmap(QPixmap::fromImage(image)); >> debugLabel->show(); >> >> // Import into a vtkImageData >> auto imageImport = vtkSmartPointer::New(); >> imageImport->SetDataSpacing(1, 1, 1); >> imageImport->SetDataOrigin(0, 0, 0); >> imageImport->SetWholeExtent(0, image.width() - 1, 0, >> image.height() - 1, 0, 0); >> imageImport->SetDataExtentToWholeExtent(); >> imageImport->SetDataScalarTypeToUnsignedChar(); >> imageImport->SetNumberOfScalarComponents(4); >> imageImport->SetImportVoidPointer(image.bits(), 1); // Note: >> QImage::bits() deep copies >> imageImport->Update(); >> >> auto mapper = vtkSmartPointer::New(); >> mapper->SetInputData(imageImport->GetOutput()); >> >> auto actor = vtkSmartPointer::New(); >> actor->SetMapper(mapper); >> >> Anyone know exactly what format vtkImageImport expects, or, if it >> expects RGBA (unsigned char), why the above won't work? > > Whoa. Just found > http://www.vtk.org/doc/nightly/html/classvtkQImageToImageSource.html > :) I'll of course use that. Sorry for the noise. > > Still interested in why the above approach wouldn't work, out of curiosity. > > Elvis > >> >> Elvis >> >>> >>> Elvis >>> >>>> >>>> Elvis > _______________________________________________ > 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From lasso at queensu.ca Thu Sep 29 07:42:45 2016 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 29 Sep 2016 11:42:45 +0000 Subject: [vtkusers] Read PNG from in-memory buffer? In-Reply-To: References: Message-ID: You can use libpng directly (it's included with VTK). See how it is done in the PLUS toolkit: DecodePngImage(unsigned char* pngBuffer, unsigned int pngBufferSize, vtkImageData* decodedImage) https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusDataCollection/BkProFocus/vtkPlusBkProFocusOemVideoSource.cxx#ln549 Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Elvis Stansvik Sent: September 29, 2016 7:32 To: VTK Users Subject: Re: [vtkusers] Read PNG from in-memory buffer? 2016-09-29 13:29 GMT+02:00 Elvis Stansvik : > 2016-09-29 11:35 GMT+02:00 Elvis Stansvik : >> 2016-09-29 9:29 GMT+02:00 Elvis Stansvik : >>> I'd like to read a PNG from an in-memory buffer. Looking at >>> vtkPNGReader, it seems it only works with files in the file system. >>> In general, is there some way to use the reader classes in VTK with >>> in-memory data, or would I have to write my own custom reader? >>> >>> My need for this is not great, I was simply hoping to be able to >>> keep this particular PNG in the Qt resource system (so in the end, >>> embedded in my executable), load it using Qt file facilities, and >>> use VTK on the read in-memory data. >> >> I realize now that I can probable use QImage to load/decompress the >> image, and pass the uncompressed data to a vtkImageImport, but I >> can't find any docs on what format vtkImageImport expects for the pixels. >> Anyone know? > > I had a go at this approach, using QImage::Format_RGBA8888 as I think > (?) that's the format vtkImportImage wants, but the resulting image > looks garbled when shown in VTK: > > // Load image with QImage > QImage image(":/images/orexplore-logo-80x47.png"); > > // Convert to RGBA8888 > image = image.convertToFormat(QImage::Format_RGBA8888); > > // Have a look at the image to make sure it's OK > auto debugLabel = new QLabel(); > debugLabel->setPixmap(QPixmap::fromImage(image)); > debugLabel->show(); > > // Import into a vtkImageData > auto imageImport = vtkSmartPointer::New(); > imageImport->SetDataSpacing(1, 1, 1); > imageImport->SetDataOrigin(0, 0, 0); > imageImport->SetWholeExtent(0, image.width() - 1, 0, > image.height() - 1, 0, 0); > imageImport->SetDataExtentToWholeExtent(); > imageImport->SetDataScalarTypeToUnsignedChar(); > imageImport->SetNumberOfScalarComponents(4); > imageImport->SetImportVoidPointer(image.bits(), 1); // Note: > QImage::bits() deep copies > imageImport->Update(); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputData(imageImport->GetOutput()); > > auto actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > Anyone know exactly what format vtkImageImport expects, or, if it > expects RGBA (unsigned char), why the above won't work? Whoa. Just found http://www.vtk.org/doc/nightly/html/classvtkQImageToImageSource.html :) I'll of course use that. Sorry for the noise. Still interested in why the above approach wouldn't work, out of curiosity. Elvis > > Elvis > >> >> Elvis >> >>> >>> Elvis _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From wuzhengwang1984 at gmail.com Thu Sep 29 12:26:35 2016 From: wuzhengwang1984 at gmail.com (Zhengwang Wu) Date: Thu, 29 Sep 2016 12:26:35 -0400 Subject: [vtkusers] Confusing about the vtk file format Message-ID: <002901d21a6e$3f368cb0$bda3a610$@gmail.com> Hi, I'm really confused about the explanation of the VTK file format in: http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf. Especially the part about the sacalars and colortable. We could define a specified colortable. But how could we build the correspondence between the scalars and the colortable. The most convenient example is the example 1 (The cube with 8 vertices and 6 polygons) in the VTK file format document from the above website. For the point attributes in that vtk file, each vertex is corresponds to a value. And they also used a specified colortable (my_table). But it seems there is no link between them. Especially when I visualize this in the paraview. Then how can we link the scalars and the color_table? Many thanks for anyone's kind help. Best. Zhengwang -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed1996 at gmail.com Thu Sep 29 15:48:34 2016 From: ed1996 at gmail.com (EdwardWang) Date: Thu, 29 Sep 2016 12:48:34 -0700 (MST) Subject: [vtkusers] vtkDijkstraGraphGeodesicPath in Python Message-ID: <1475178514932-5740606.post@n5.nabble.com> First off I want to apologize because I posted this in VTK-Dev first, and then deleted it and moved it here. Please let me know if that's bad etiquette. Hi, I am trying to use the vtkDijkstraGraphGeodesicPath to create a geodesic contour on my vtkPolyData model. The model itself is exported from Slicer3D. I know that there are some examples of this in C++, but I have not been able to find any in Python. I figured I would first used the vtkDijkstraGraphGeodesicPath class to get my values, and then worry about the contours later. The point data of my polydata has no lines or triangles, only polygons. According to the documentation, the input polydata must consist of only triangle cells, which I don't know how to verify. However, I think the polydata is in the right format, because I implemented the class as shown below and got some values: dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputData(polydata) dijkstra.SetStartVertex(0) dijkstra.Update() weights = vtk.vtkDoubleArray() dijkstra.GetCumulativeWeights(weights) length = weights.GetMaxId()+1 numericArray = np.zeros(length) for i in range(length): numericArray[i] = weights.GetTuple(i)[0] I believe numeric array holds the geodesic computed from each point to the start vertex. This is what the colormap looks like: colormap.PNG It's about what you'd expect, except that I've noticed that sometimes the geodesic value is -1. I've experimented with different files and it seems that less than .05% of the geodesics failed. I found the vertices at which the geodesic failed, and when I set them as the start vertex, the program fails with exit code -1073740777 (0xC0000417). My guess is that something is wrong with my input polydata, and I've tried to apply both vtkCleanPolyData and vtkTriangleFilter, but they didn't seem to make any changes. Maybe my implementation is wrong? cleanFilter = vtk.vtkCleanPolyData() cleanFilter.SetInputData(polydata) cleanFilter.Update() cleanFilter.UpdateDataObject() polydata = cleanFilter.GetOutput() Any help is much appreciated. Thanks, Edward Remove Ads -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDijkstraGraphGeodesicPath-in-Python-tp5740606.html Sent from the VTK - Users mailing list archive at Nabble.com. From philip.simons at sjubb.com Fri Sep 30 02:06:12 2016 From: philip.simons at sjubb.com (Philip Simons) Date: Thu, 29 Sep 2016 23:06:12 -0700 (MST) Subject: [vtkusers] vtkActor2D's not shown on Windows In-Reply-To: <1474613085610-5740503.post@n5.nabble.com> References: <1474613085610-5740503.post@n5.nabble.com> Message-ID: <1475215572665-5740607.post@n5.nabble.com> Correct: the graphics card on the windows machine where the vtkActor2D's are not shown is not a NVidia card but an Intel HD card. Anyone with the same experience (and a solution)? Philip -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkActor2D-s-not-shown-on-Windows-tp5740503p5740607.html Sent from the VTK - Users mailing list archive at Nabble.com. From ilindsay at insigniamedical.co.uk Fri Sep 30 05:41:23 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 30 Sep 2016 02:41:23 -0700 (MST) Subject: [vtkusers] OpenGL2 using mesa In-Reply-To: References: <1474973982908-5740561.post@n5.nabble.com> <1474985195187-5740568.post@n5.nabble.com> <1474986380344-5740570.post@n5.nabble.com> <006d01d218cd$ef375970$cda60c50$@gmail.com> <1474992223541-5740573.post@n5.nabble.com> <1475151764285-5740585.post@n5.nabble.com> Message-ID: <1475228483513-5740608.post@n5.nabble.com> Hi, thanks for raising it with the Mesa people. Their reply looks promising. I think that going back to using the old OpenGL back end may be the best route for now to get us up and running. The new version seems to not be able to query the graphics card for it's available memory at the moment - see my separate post on this subject (GPU Memory Detection), so this would solve this for now too. The gold plated solution would be for the backend to drop back to the old one automatically if there is not enough support, I expect that this is probably quite tricky though. I guess at some stage you have to stop supporting older hardware. -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL2-using-mesa-tp5740561p5740608.html Sent from the VTK - Users mailing list archive at Nabble.com. From ilindsay at insigniamedical.co.uk Fri Sep 30 05:47:38 2016 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 30 Sep 2016 02:47:38 -0700 (MST) Subject: [vtkusers] OpenGL driver issue with VTK 7.0 In-Reply-To: References: <35d826a4.16.15375cddc12.Coremail.tjlp@netease.com> <7f3c22d7.4.15377ced08a.Coremail.tjlp@netease.com> <1475081188518-5740581.post@n5.nabble.com> <1475152114300-5740586.post@n5.nabble.com> Message-ID: <1475228858351-5740609.post@n5.nabble.com> Hi, we have a couple of systems that have the HD 2000 series onboard graphics chipsets here. I will have a go at testing on these when they are not in use as I will have to disable the normal GPU and plug the monitor into the on-board one. I will let you know the results. -- View this message in context: http://vtk.1045678.n5.nabble.com/OpenGL-driver-issue-with-VTK-7-0-tp5737190p5740609.html Sent from the VTK - Users mailing list archive at Nabble.com. From adrian.harwood at manchester.ac.uk Fri Sep 30 07:22:20 2016 From: adrian.harwood at manchester.ac.uk (Adrian Harwood) Date: Fri, 30 Sep 2016 11:22:20 +0000 Subject: [vtkusers] vtkCleanUnstructuredGrid in VTK 7? Message-ID: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076ABE1@MBXP07.ds.man.ac.uk> Hi All, I'm writing a C++ post-processor using VTK 7 and I cannot find vtkCleanUnstructuredGrid to clean my mesh of redundant points. The documentation is there but the code is not. Has this been removed/never added? Thanks Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.harwood at manchester.ac.uk Fri Sep 30 07:24:02 2016 From: adrian.harwood at manchester.ac.uk (Adrian Harwood) Date: Fri, 30 Sep 2016 11:24:02 +0000 Subject: [vtkusers] vtkCleanUnstructuredGrid in VTK 7? Message-ID: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076AC09@MBXP07.ds.man.ac.uk> Hi All, I'm writing a C++ post-processor using VTK 7 and I cannot find vtkCleanUnstructuredGrid to clean my mesh of redundant points. The documentation is there but the code is not. Has this been removed/never added? Thanks Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Fri Sep 30 07:40:04 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 30 Sep 2016 13:40:04 +0200 Subject: [vtkusers] vtkCleanUnstructuredGrid in VTK 7? In-Reply-To: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076AC09@MBXP07.ds.man.ac.uk> References: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076AC09@MBXP07.ds.man.ac.uk> Message-ID: Hello It's part of ParaView, not VTK. paraview/ParaViewCore/VTKExtensions/Default/vtkCleanUnstructuredGrid.cxx Regards, Mathieu Westphal On Fri, Sep 30, 2016 at 1:24 PM, Adrian Harwood < adrian.harwood at manchester.ac.uk> wrote: > Hi All, > > > > I?m writing a C++ post-processor using VTK 7 and I cannot find > vtkCleanUnstructuredGrid to clean my mesh of redundant points. The > documentation is there but the code is not. Has this been removed/never > added? > > > > Thanks > > Adrian > > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.harwood at manchester.ac.uk Fri Sep 30 07:47:33 2016 From: adrian.harwood at manchester.ac.uk (Adrian Harwood) Date: Fri, 30 Sep 2016 11:47:33 +0000 Subject: [vtkusers] vtkCleanUnstructuredGrid in VTK 7? In-Reply-To: References: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076AC09@MBXP07.ds.man.ac.uk> Message-ID: <0DE2A2AC7B71EC4D86C4D089EB9012E201C076AC5D@MBXP07.ds.man.ac.uk> Ah, ok. My mistake. Thank you! Adrian From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: 30 September 2016 12:40 To: Adrian Harwood Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkCleanUnstructuredGrid in VTK 7? Hello It's part of ParaView, not VTK. paraview/ParaViewCore/VTKExtensions/Default/vtkCleanUnstructuredGrid.cxx Regards, Mathieu Westphal On Fri, Sep 30, 2016 at 1:24 PM, Adrian Harwood > wrote: Hi All, I?m writing a C++ post-processor using VTK 7 and I cannot find vtkCleanUnstructuredGrid to clean my mesh of redundant points. The documentation is there but the code is not. Has this been removed/never added? Thanks Adrian _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlb at ConceptsNrec.com Fri Sep 30 09:44:51 2016 From: dlb at ConceptsNrec.com (Daryl L. Bonhaus) Date: Fri, 30 Sep 2016 13:44:51 +0000 Subject: [vtkusers] Switching between point data and cell data for vtkGlyph3D Message-ID: <868F6BE859952F43B44866EA40924D4EBCA79DE7@WILEXCH.CetiNrec.com> We have a data set (a structured grid) that has velocity vectors defined at points and direction vectors defined in cells. We want to use a Glyph3D to display the selected vectors, but I can't get it to switch between cell and point data. How is this done? Thanks, Daryl Bonhaus Director, CFD Software Development Concepts NREC http://www.conceptsnrec.com/ ________________________________ Please consider the environment before printing this email. ________________________________ The information contained in this communication and any attachment(s) and/or link(s) hereto may contain proprietary and/or confidential information, which may be privileged or otherwise protected from disclosure, and is intended only for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure, or distribution is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christianmol at gmail.com Fri Sep 30 09:45:18 2016 From: christianmol at gmail.com (Christian Mol) Date: Fri, 30 Sep 2016 13:45:18 +0000 Subject: [vtkusers] Reading image with vtkMetaImageReader from different thread Message-ID: Hi, Currently I am writing a small webservice (using the Casablanca rest library from Microsoft) that should output a png image from a metaimage I have stored on disk. Problem seems to be however that when I call the folllowing code in the thread that handles the web request, it just hangs on the Update call vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("image.mhd"); reader->SetFileLowerLeft(true); reader->Update(); When I run this code in the main thread of my application it does read the image, but when I put the code in the handler for the http requests (I guess different thread) it hangs. When stepping through the code it seems that it hangs at the fflush(NULL) line in MetaObject::ReadStream. vtkmetaio-7.0.dll!vtkmetaio::MetaObject::ReadStream(int _nDims, std::basic_ifstream > * _stream) Line 319 C++ vtkmetaio-7.0.dll!vtkmetaio::MetaImage::ReadStream(int _nDims, std::basic_ifstream > * _stream, bool _readElements, void * _buffer) Line 1283 C++ vtkmetaio-7.0.dll!vtkmetaio::MetaImage::Read(const char * _headerName, bool _readElements, void * _buffer) Line 1252 C++ vtkIOImage-7.0.dll!vtkMetaImageReader::ExecuteInformation() Line 82 C++ vtkIOImage-7.0.dll!vtkMetaImageReader::RequestInformation(vtkInformation * __formal, vtkInformationVector * * __formal, vtkInformationVector * outputVector) Line 252 C++ vtkCommonExecutionModel-7.0.dll!vtkImageAlgorithm::ProcessRequest(vtkInformation * request, vtkInformationVector * * inputVector, vtkInformationVector * outputVector) Line 109 C++ vtkCommonExecutionModel-7.0.dll!vtkExecutive::CallAlgorithm(vtkInformation * request, int direction, vtkInformationVector * * inInfo, vtkInformationVector * outInfo) Line 775 C++ vtkCommonExecutionModel-7.0.dll!vtkDemandDrivenPipeline::ExecuteInformation(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 481 C++ vtkCommonExecutionModel-7.0.dll!vtkStreamingDemandDrivenPipeline::ExecuteInformation(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 412 C++ vtkCommonExecutionModel-7.0.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 237 C++ vtkCommonExecutionModel-7.0.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation * request, vtkInformationVector * * inInfoVec, vtkInformationVector * outInfoVec) Line 336 C++ vtkCommonExecutionModel-7.0.dll!vtkDemandDrivenPipeline::UpdateInformation() Line 406 C++ vtkCommonExecutionModel-7.0.dll!vtkStreamingDemandDrivenPipeline::Update(int port) Line 347 C++ vtkCommonExecutionModel-7.0.dll!vtkAlgorithm::Update(int port) Line 1456 C++ vtkCommonExecutionModel-7.0.dll!vtkAlgorithm::Update() Line 1450 C++ Service_d.exe!Service::images(web::http::http_request message) Line 501 C++ Does anyone have any hints as to why this would happen? Would replacing fflush(NULL) with fflush(_stream) help at that specific location? Kind regards, Christian Mol -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Fri Sep 30 09:54:43 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 30 Sep 2016 15:54:43 +0200 Subject: [vtkusers] Switching between point data and cell data for vtkGlyph3D In-Reply-To: <868F6BE859952F43B44866EA40924D4EBCA79DE7@WILEXCH.CetiNrec.com> References: <868F6BE859952F43B44866EA40924D4EBCA79DE7@WILEXCH.CetiNrec.com> Message-ID: Hello Add a "Glyph" Filter, (not 3D Glyph Representation) You wan then switch the "vectors" property in the panel, considering you have cell data vectors and point data vectors in you data. Regards, Mathieu Westphal On Fri, Sep 30, 2016 at 3:44 PM, Daryl L. Bonhaus wrote: > We have a data set (a structured grid) that has velocity vectors defined > at points and direction vectors defined in cells. We want to use a Glyph3D > to display the selected vectors, but I can?t get it to switch between cell > and point data. How is this done? > > > > Thanks, > > Daryl Bonhaus > > Director, CFD Software Development > > Concepts NREC > > http://www.conceptsnrec.com/ > > > > ------------------------------ > > Please consider the environment before printing this email. > > ------------------------------ > > The information contained in this communication and any attachment(s) > and/or link(s) hereto may contain proprietary and/or confidential > information, which may be privileged or otherwise protected from > disclosure, and is intended only for the sole use of the intended > recipient(s). Any unauthorized review, use, disclosure, or distribution is > strictly prohibited. If you have received this communication in error, > please return it to the sender immediately and delete the original message > from your computer system. If you have any questions concerning this > message, please contact the sender. > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlb at ConceptsNrec.com Fri Sep 30 10:04:48 2016 From: dlb at ConceptsNrec.com (Daryl L. Bonhaus) Date: Fri, 30 Sep 2016 14:04:48 +0000 Subject: [vtkusers] Switching between point data and cell data for vtkGlyph3D In-Reply-To: References: <868F6BE859952F43B44866EA40924D4EBCA79DE7@WILEXCH.CetiNrec.com> Message-ID: <868F6BE859952F43B44866EA40924D4EBCA79E08@WILEXCH.CetiNrec.com> We have a custom pipeline in our application, so I need to do this programmatically. Our pipeline looks like this: vtkStructuredGrid -> vtkExtractGrid -> vtkGlyph3D -> vtkPolyDataMapper -> vtkActor Thanks, Daryl From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Friday, September 30, 2016 9:55 AM To: Daryl L. Bonhaus Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Switching between point data and cell data for vtkGlyph3D Hello Add a "Glyph" Filter, (not 3D Glyph Representation) You wan then switch the "vectors" property in the panel, considering you have cell data vectors and point data vectors in you data. Regards, Mathieu Westphal On Fri, Sep 30, 2016 at 3:44 PM, Daryl L. Bonhaus > wrote: We have a data set (a structured grid) that has velocity vectors defined at points and direction vectors defined in cells. We want to use a Glyph3D to display the selected vectors, but I can't get it to switch between cell and point data. How is this done? Thanks, Daryl Bonhaus Director, CFD Software Development Concepts NREC http://www.conceptsnrec.com/ ________________________________ Please consider the environment before printing this email. ________________________________ The information contained in this communication and any attachment(s) and/or link(s) hereto may contain proprietary and/or confidential information, which may be privileged or otherwise protected from disclosure, and is intended only for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure, or distribution is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message from your computer system. If you have any questions concerning this message, please contact the sender. _______________________________________________ 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ________________________________ Please consider the environment before printing this email. ________________________________ The information contained in this communication and any attachment(s) and/or link(s) hereto may contain proprietary and/or confidential information, which may be privileged or otherwise protected from disclosure, and is intended only for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure, or distribution is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Fri Sep 30 10:27:57 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 30 Sep 2016 16:27:57 +0200 Subject: [vtkusers] Switching between point data and cell data for vtkGlyph3D In-Reply-To: <868F6BE859952F43B44866EA40924D4EBCA79E08@WILEXCH.CetiNrec.com> References: <868F6BE859952F43B44866EA40924D4EBCA79DE7@WILEXCH.CetiNrec.com> <868F6BE859952F43B44866EA40924D4EBCA79E08@WILEXCH.CetiNrec.com> Message-ID: Hello you should be able to use vtkGlyph3D::SetInputArrayToProcess and use a cell data vector without problems. Regards, Mathieu Westphal On Fri, Sep 30, 2016 at 4:04 PM, Daryl L. Bonhaus wrote: > We have a custom pipeline in our application, so I need to do this > programmatically. Our pipeline looks like this: > > vtkStructuredGrid -> vtkExtractGrid -> vtkGlyph3D -> vtkPolyDataMapper -> > vtkActor > > > > Thanks, > > Daryl > > > > *From:* Mathieu Westphal [mailto:mathieu.westphal at kitware.com] > *Sent:* Friday, September 30, 2016 9:55 AM > *To:* Daryl L. Bonhaus > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Switching between point data and cell data for > vtkGlyph3D > > > > Hello > > Add a "Glyph" Filter, (not 3D Glyph Representation) > > You wan then switch the "vectors" property in the panel, considering you > have cell data vectors and point data vectors in you data. > > Regards, > > > Mathieu Westphal > > > > On Fri, Sep 30, 2016 at 3:44 PM, Daryl L. Bonhaus > wrote: > > We have a data set (a structured grid) that has velocity vectors defined > at points and direction vectors defined in cells. We want to use a Glyph3D > to display the selected vectors, but I can?t get it to switch between cell > and point data. How is this done? > > > > Thanks, > > Daryl Bonhaus > > Director, CFD Software Development > > Concepts NREC > > http://www.conceptsnrec.com/ > > > > > ------------------------------ > > > Please consider the environment before printing this email. > ------------------------------ > > > The information contained in this communication and any attachment(s) > and/or link(s) hereto may contain proprietary and/or confidential > information, which may be privileged or otherwise protected from > disclosure, and is intended only for the sole use of the intended > recipient(s). Any unauthorized review, use, disclosure, or distribution is > strictly prohibited. If you have received this communication in error, > please return it to the sender immediately and delete the original message > from your computer system. If you have any questions concerning this > message, please contact the sender. > > > _______________________________________________ > 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 VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ------------------------------ > > Please consider the environment before printing this email. > > ------------------------------ > > The information contained in this communication and any attachment(s) > and/or link(s) hereto may contain proprietary and/or confidential > information, which may be privileged or otherwise protected from > disclosure, and is intended only for the sole use of the intended > recipient(s). Any unauthorized review, use, disclosure, or distribution is > strictly prohibited. If you have received this communication in error, > please return it to the sender immediately and delete the original message > from your computer system. If you have any questions concerning this > message, please contact the sender. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Fri Sep 30 10:29:59 2016 From: inglis.dl at gmail.com (Dean Inglis) Date: Fri, 30 Sep 2016 10:29:59 -0400 Subject: [vtkusers] Fwd: temporal data In-Reply-To: References: Message-ID: Hi, I am trying to animate a waveform with x,y data pairs where x is time and y is amplitude. I read the data with vtkDelimitedTextReader from .csv files, but I need some kind of filter that possesses pipeline information about time steps, time range etc so that a downstream playback widget that maintains a timer can get what it needs from a pipeline. Anyone have a suggestion for this scenario? thanks Dean -------------- next part -------------- An HTML attachment was scrubbed... URL: From alisaad05 at gmail.com Fri Sep 30 13:10:13 2016 From: alisaad05 at gmail.com (alisaad05) Date: Fri, 30 Sep 2016 10:10:13 -0700 (MST) Subject: [vtkusers] How to use vtkFeatureEdges? In-Reply-To: <1340609906778-5714190.post@n5.nabble.com> References: <1340491106345-5714174.post@n5.nabble.com> <1340609906778-5714190.post@n5.nabble.com> Message-ID: <1475255413734-5740620.post@n5.nabble.com> nspx wrote > Hi Wenlong, > > Maybe you can have a look at this example, it might be your solution. > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExternalContour > > Bye Hi all, I've been struggling lately to achieve the same effect shown in the quoted example, but I need a surface silhouette instead of the line silhouette, which the consequence of using the image filter. I want to extract the outermost region with its original topology from a vtkPolyData (loaded from STL for instance) ignoring all internal surfaces, whether they are manifold or non-manifold. Can I use vtkFeatureEdges to flag internal triangles and delete them ? I have already tested simple pipelines using vtkDataSetSurfaceFilter and vtkGeometryFilter, but none is able to extract outer surface only, instead all internal features are kept in the result. Any help is appreciated, regards Ali -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkFeatureEdges-tp5714174p5740620.html Sent from the VTK - Users mailing list archive at Nabble.com. From annamdanko at gmail.com Fri Sep 30 13:27:35 2016 From: annamdanko at gmail.com (Anna Danko) Date: Fri, 30 Sep 2016 11:27:35 -0600 Subject: [vtkusers] Interaction Window Not Catching Keyboard Events Message-ID: Hello all, I am trying to extract part of a mesh with VTK. In particular I am hoping to use vtkInteractorStyleRubberBandPick. However, the VTK Interaction window does not catch some keyboard events. I am able to shift+click to drag, ctrl+click to rotate and shift+ctrl+click to zoom, but if I press down on any other key, such as ?r?, my input gets sent to the terminal instead of entering selection mode. This problem is present not only in my own code but for all the examples I tried (and it isn't working when I try to use vtkInteractorStyleTrackballCamera either). I did find that by modifying the SimpleCocoaVTK.xcodeproj example, I was able to get the rubber band pick to work the vtkCocoaRenderWindowInteractor. However I would rather not have to use Cocoa. I would greatly appreciate help in learning possible reasons why the interaction window does not catch these events. I have no issues during compilation and everything seems to be called ok. I am using a Mac OS 10.12 (recently updated, but it wasn?t working with 10.10 either), VTK 6.1 and I am using Xcode 7.2.1 to build. Thank you Anna -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 30 13:36:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 30 Sep 2016 11:36:35 -0600 Subject: [vtkusers] Interaction Window Not Catching Keyboard Events In-Reply-To: References: Message-ID: Hi Anna, For an OS X program to receive all events, it must be part of an app bundle. If you're using cmake to build your program, this is done like so: add_executable(program MACOSX_BUNDLE ${source_files}) - David On Fri, Sep 30, 2016 at 11:27 AM, Anna Danko wrote: > Hello all, > > I am trying to extract part of a mesh with VTK. In particular I am hoping > to use vtkInteractorStyleRubberBandPick. However, the VTK Interaction > window does not catch some keyboard events. I am able to shift+click to > drag, ctrl+click to rotate and shift+ctrl+click to zoom, but if I press > down on any other key, such as ?r?, my input gets sent to the terminal > instead of entering selection mode. This problem is present not only in my > own code but for all the examples I tried (and it isn't working when I try > to use vtkInteractorStyleTrackballCamera either). > > I did find that by modifying the SimpleCocoaVTK.xcodeproj example, I was > able to get the rubber band pick to work the vtkCocoaRenderWindowInteractor. > However I would rather not have to use Cocoa. > > I would greatly appreciate help in learning possible reasons why the > interaction window does not catch these events. I have no issues during > compilation and everything seems to be called ok. I am using a Mac OS > 10.12 (recently updated, but it wasn?t working with 10.10 either), VTK 6.1 > and I am using Xcode 7.2.1 to build. > > > Thank you > > Anna > -------------- next part -------------- An HTML attachment was scrubbed... URL: From technword at gmail.com Fri Sep 30 18:45:03 2016 From: technword at gmail.com (High Techno) Date: Fri, 30 Sep 2016 22:45:03 +0000 Subject: [vtkusers] unable to allocate memory error in vtkrenderwindow Message-ID: Hi I'm using vtkmarvhingcubes for rendering 512*512*600 voxels of size 4 bytes. But I get an error "Unable to allocate ....... elements of size 4 bytes" i have 8 Giga of memory and 5 free for rendering . Can somebody give me a logical case and explain why is this happened? Many thanks for anyone taking time to answer my question. Best -------------- next part -------------- An HTML attachment was scrubbed... URL: From edrecon at gmail.com Fri Sep 30 19:57:29 2016 From: edrecon at gmail.com (=?UTF-8?Q?Edson_Contreras_C=C3=A1rdenas?=) Date: Fri, 30 Sep 2016 20:57:29 -0300 Subject: [vtkusers] Extracting points and point data from structure edges Message-ID: Hello everyone, I was using VTK-5.10, I recently moved to VTK-7.0 and I'm getting different results. Previously, I was using a vtkCutter with a vtkPlane in order to extract the data, however if I was reaching the structure edge, the data started to get weird. I'm wondering if there is another way to proceed as with vtkProbeFilter using a vtkPolyLine (because with probe filter I get the vtkPointData but not the correct vtkPoints). Could you give me a suggestion or a procedure in order to get the correct data extracted? [Note: I am attaching a few images of what I try to accomplish for reference] Thanks for all your help. -- Atte. Edson Ren? Contreras C?rdenas Ingeniero Civil Electr?nico -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mesh-line-points-1.png Type: image/png Size: 8672 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mesh-line-points-2.png Type: image/png Size: 6258 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mesh-line-points-3.png Type: image/png Size: 5601 bytes Desc: not available URL: From bebe0705 at colorado.edu Fri Sep 30 22:49:08 2016 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 30 Sep 2016 19:49:08 -0700 (MST) Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) In-Reply-To: <20160708150519.GB5418@megas.kitware.com> References: <1467824973975-5739142.post@n5.nabble.com> <20160708144525.GC26651@megas.kitware.com> <1467990195610-5739181.post@n5.nabble.com> <20160708150519.GB5418@megas.kitware.com> Message-ID: <1475290148232-5740626.post@n5.nabble.com> Hello all, for those interested, I can confirm that the following workaround works: http://public.kitware.com/pipermail/vtkusers/2015-February/090117.html Cheers, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Widget-and-Retina-MacBook-High-DPI-screen-tp5739142p5740626.html Sent from the VTK - Users mailing list archive at Nabble.com.