From dave.demarle at kitware.com Tue Nov 1 06:38:33 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 1 Nov 2016 06:38:33 -0400 Subject: [vtkusers] vtk static link in codeblocks In-Reply-To: References: Message-ID: Unsure. Take a look at the verbose output of both cmake driven and code blocks driven make process. I suspect the code blocks one is missing one or more vtk's static libraries. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 27, 2016 at 8:08 AM, fabio riot wrote: > Dear All, > > I have built vtk 7.0 successfully, both static and dynamic lib (.so and > .a) in two different folders > > So I create a project in codeblocks, copy the example cone.cxx into the > project. > I set the include path and the static library ( lib.a) path. > But at the end of the project building i have a lot of: > undefined reference errors.... > > The problem doesn't occur when I set the linker path to the dynamic libs > (.so). > > Furthermore, If I use cmake to generate a codeBlocks-unix makefile, it > works both using static and dynamic linking, > > I would like to know why creating a project directly with codeblocks and > using static linking the build fails? Do I miss some setting or linker > option? > > Regards, > Fabio > > > _______________________________________________ > 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 ken.martin at kitware.com Tue Nov 1 08:54:41 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 1 Nov 2016 08:54:41 -0400 Subject: [vtkusers] vtkOpenGLTexture GetIndex In-Reply-To: References: Message-ID: I'm guessing this is with the OpenGL1 backend. Looking at the code it looks like it gets set when Load is called which in turn is called by Render. So when the texture is rendered it will be set. Prior to then it looks like it is initialized to zero. On Mon, Oct 31, 2016 at 2:28 PM, Terry Farnham wrote: > I am very new to using vtk. I am interested in getting access to the > underlying OpenGL texture index from vtkOpenGLTexture. Currently, when I > initially create and load a texture, the call to GetIndex() always returns > zero. After rendering a frame or more, the GetIndex() appears to become > valid and then I can make my OpenGL calls using it. Is there an event that > indicates when this index becomes valid, or is there some other way to know > exactly when glGenTextures occurs so I can make my modifications? > > _______________________________________________ > 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 jose.de.paula at live.com Tue Nov 1 14:46:26 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 1 Nov 2016 11:46:26 -0700 (MST) Subject: [vtkusers] problem vtkimageactor with mhd Message-ID: <1478025986124-5740995.post@n5.nabble.com> Hi guys, I'm changing my components vtkimageviewer2 for vtkImageActor. I use SliceFaceCameraOn and SliceAtFocalPointOn. When I will try move the image (switch between a cut and others) nothing ever happens. code: vetImageActor.push_back(vtkImageActor::New()); vtkImageActor* imageActor = vetImageActor[vetImageActor.size() - 1]; imageActor->GetProperty()->SetColorWindow(3347); imageActor->GetProperty()->SetColorLevel(876); vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SliceFacesCameraOn(); vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SliceAtFocalPointOn(); vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SetSliceNumber(n); imageActor->SetInputData(readerCorte->GetOutput()); vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SetOrientationToX(); renderer->AddActor(imageActor); renderer->SetViewport(0, 0, .333, .4); renderer->ResetCamera(); renderer->GetActiveCamera()->Roll(-90); Does anyone know why this is? -- View this message in context: http://vtk.1045678.n5.nabble.com/problem-vtkimageactor-with-mhd-tp5740995.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Tue Nov 1 14:59:04 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 1 Nov 2016 11:59:04 -0700 (MST) Subject: [vtkusers] problem with vtkactor In-Reply-To: References: <1477940358047-5740983.post@n5.nabble.com> <1477942400967-5740985.post@n5.nabble.com> Message-ID: <1478026744370-5740996.post@n5.nabble.com> Thanks Ken. I created everything in a single renderwindow and did a control with SetViewport of vtkRenderer. Now everything works fine. -- View this message in context: http://vtk.1045678.n5.nabble.com/problem-with-vtkactor-tp5740983p5740996.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Nov 1 15:10:18 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 1 Nov 2016 12:10:18 -0700 Subject: [vtkusers] Missing texture file in vtkTexturedSphere example? In-Reply-To: <1477856022934-5740976.post@n5.nabble.com> References: <1477704364766-5740971.post@n5.nabble.com> <1477856022934-5740976.post@n5.nabble.com> Message-ID: Ben, In 2012, a careless developer introduced a bug in the texture coordinate calculation. I have a patch under review to fix the bug: https://gitlab.kitware.com/vtk/vtk/merge_requests/2129 I'm surprised that no one noticed this bug. Looks like the regression baseline images were adjusted to match the bug. That developer has been admonished by me and if he does this again, I will personally revoke his check in privileges. Rather than embarrass him on this list, you will see his name in the git commit message. Thanks for reporting this bug. Bill On Sun, Oct 30, 2016 at 12:33 PM, BBerco wrote: > Bill, > > thanks a lot! > Ben > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Missing-texture-file-in-vtkTexturedSphere-example-tp5740971p5740976.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 bebe0705 at colorado.edu Tue Nov 1 15:29:52 2016 From: bebe0705 at colorado.edu (BBerco) Date: Tue, 1 Nov 2016 12:29:52 -0700 (MST) Subject: [vtkusers] Missing texture file in vtkTexturedSphere example? In-Reply-To: References: <1477704364766-5740971.post@n5.nabble.com> <1477856022934-5740976.post@n5.nabble.com> Message-ID: <1478028592343-5740998.post@n5.nabble.com> Glad I could somehow contribute to VTK ;) Don't be too hard on the culprit. Last time I checked he was just an unpaid intern. Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Missing-texture-file-in-vtkTexturedSphere-example-tp5740971p5740998.html Sent from the VTK - Users mailing list archive at Nabble.com. From mikewithascarf at yahoo.com Tue Nov 1 18:15:04 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Tue, 1 Nov 2016 22:15:04 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> Message-ID: <1010687120.2146639.1478038504220@mail.yahoo.com> I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()->GetRenderers()->GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()->IsDrawable()) window->GetRenderWindow()->Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()->RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation -------------- next part -------------- An HTML attachment was scrubbed... URL: From tluisrs at gmail.com Tue Nov 1 19:19:13 2016 From: tluisrs at gmail.com (Thales Luis Rodrigues Sabino) Date: Tue, 1 Nov 2016 21:19:13 -0200 Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: <1010687120.2146639.1478038504220@mail.yahoo.com> References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> Message-ID: This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers < vtkusers at vtk.org> wrote: > I'm using QT with VTK for a fairly complex application. Everything works > fine > normally, but if I try to use a function to 'clear' the QVTKWidget, and > then > add a new pipeline, I run into lots of OpenGL errors. What would be the > appropriate way to clear the window/renderer? Here is the code I've been > trying, where window is of type QVTKWidget: > > vtkSmartPointer ren_old = > window->GetRenderWindow()->GetRenderers()->GetFirstRenderer(); > if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from > renderer > if (window->isVisible() && window->GetRenderWindow()->IsDrawable()) > window->GetRenderWindow()->Render(); // Update the window so it is blank > if (ren_old) window->GetRenderWindow()->RemoveRenderer(ren_old); // Remove > the renderer > > > > I'm using multiple QVTKWidgets in one app, and each might have a pipeline > that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are > the OpenGL errors reported in the vtkOutputWindow: > > ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > _______________________________________________ > 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 > > -- Thales Luis Rodrigues Sabino PhD Student at PGMC-UFJF Lattes | LinkedIn | ResearchGate -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikewithascarf at yahoo.com Tue Nov 1 20:00:04 2016 From: mikewithascarf at yahoo.com (mikewithascarf) Date: Tue, 1 Nov 2016 17:00:04 -0700 (MST) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220@mail.yahoo.com> Message-ID: <1478044804235-5741002.post@n5.nabble.com> That's right, the problem only happens if there are more than one QVTKWidget. I've managed to create a fairly simple example to reproduce the problem: https://drive.google.com/open?id=0BxalkOjn2_PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me: 1. Click the button. 2. Manually rotate both spheres. 3. Click the button. 4. Manually rotate both spheres. 5. Click the button. 6. Manually rotate both spheres. (You'll get the errors here) Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window). #include "SideBySideRenderWindowsQt.h" void addsphere(vtkSmartPointer renwin) { vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->SetCenter(0.0, 0.0, 0.0); sphereSource->SetRadius(5.0); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer ren = vtkSmartPointer::New(); ren->AddActor(actor); ren->ResetCameraClippingRange(); renwin->AddRenderer(ren); renwin->Render(); } void clear(vtkSmartPointer renwin) { // clear renderer vtkSmartPointer ren = renwin->GetRenderers()->GetFirstRenderer(); if (ren) { ren->RemoveAllViewProps(); renwin->Render(); renwin->RemoveRenderer(ren); } } // Constructor SideBySideRenderWindowsQt::SideBySideRenderWindowsQt() { this->setupUi(this); QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); // Set up action signals and slots connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); } void SideBySideRenderWindowsQt::slot_b1() { clear(this->qvtkWidgetLeft->GetRenderWindow()); addsphere(this->qvtkWidgetLeft->GetRenderWindow()); this->qvtkWidgetLeft->GetRenderWindow()->Render(); clear(this->qvtkWidgetRight->GetRenderWindow()); addsphere(this->qvtkWidgetRight->GetRenderWindow()); this->qvtkWidgetRight->GetRenderWindow()->Render(); } void SideBySideRenderWindowsQt::slotExit() { qApp->exit(); } -- View this message in context: http://vtk.1045678.n5.nabble.com/QT-VTK-OpenGL-errors-tp5740999p5741002.html Sent from the VTK - Users mailing list archive at Nabble.com. From mikewithascarf at yahoo.com Tue Nov 1 20:01:23 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Wed, 2 Nov 2016 00:01:23 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> Message-ID: <466269722.6367.1478044883728@mail.yahoo.com> That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open?id=0BxalkOjn2_PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer?renwin)? {? ? ? ? ? vtkSmartPointer?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer::New();? ? ? ? ? mapper->SetInputConnection(sphereSource->GetOutputPort());? ? ? ? ? vtkSmartPointer?actor =? ? ? ? ? ? ? ? ? vtkSmartPointer::New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer?ren = vtkSmartPointer::New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange();? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer?ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()->GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt::SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt::slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft->GetRenderWindow());? ? ? ? ? addsphere(this->qvtkWidgetLeft->GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft->GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight->GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this->qvtkWidgetRight->GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight->GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt::slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 1 20:59:55 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 1 Nov 2016 20:59:55 -0400 Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: <466269722.6367.1478044883728@mail.yahoo.com> References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> Message-ID: What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks! Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers < vtkusers at vtk.org> wrote: > That's right, the problem only happens if there are more than one > QVTKWidget. > > I've managed to create a fairly simple example to reproduce the problem: > > https://drive.google.com/open?id=0BxalkOjn2_PecG5kUUZrN2djMlU > > It's a very basic modification of the SideBySideRenderWindowsQt example > provided by VTK. I've simply added a button, and when it's clicked it will > clear the left window and add a sphere, then clear the right window and add > a sphere. If I do the following it produces the OpenGL errors every time > for me: > > 1. Click the button. > 2. Manually rotate both spheres. > 3. Click the button. > 4. Manually rotate both spheres. > 5. Click the button. > 6. Manually rotate both spheres. (You'll get the errors here) > > Here's the code below. Interestingly if I move both clear calls before > both of the addsphere calls it works fine. Unfortunately that approach > won't work for my app (needs to be able to change a single window). > > > #include "SideBySideRenderWindowsQt.h" > > void addsphere(vtkSmartPointer renwin) > { > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->ResetCameraClippingRange(); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()->GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt::SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt::slot_b1() > { > clear(this->qvtkWidgetLeft->GetRenderWindow()); > > addsphere(this->qvtkWidgetLeft->GetRenderWindow()); > this->qvtkWidgetLeft->GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight->GetRenderWindow()); > > addsphere(this->qvtkWidgetRight->GetRenderWindow()); > this->qvtkWidgetRight->GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt::slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Thales Luis Rodrigues Sabino > *To:* Mike Withascarf > *Cc:* "vtkusers at vtk.org" > *Sent:* Tuesday, November 1, 2016 7:19 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > This looks like an OpenGL resource sharing issue. I don't know exactly how > VTK handles multiples windows in a Qt application but it looks like it is > trying to bind a texture that is not registered in a certain context. > > Can tell if this happens when you have a single window or this happens > only when you add a second window? > > On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > I'm using QT with VTK for a fairly complex application. Everything works > fine > normally, but if I try to use a function to 'clear' the QVTKWidget, and > then > add a new pipeline, I run into lots of OpenGL errors. What would be the > appropriate way to clear the window/renderer? Here is the code I've been > trying, where window is of type QVTKWidget: > > vtkSmartPointer ren_old = > window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); > if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from > renderer > if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) > window->GetRenderWindow()-> Render(); // Update the window so it is blank > if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove > the renderer > > > > I'm using multiple QVTKWidgets in one app, and each might have a pipeline > that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are > the OpenGL errors reported in the vtkOutputWindow: > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > ______________________________ _________________ > 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 > > > > > > -- > Thales Luis Rodrigues Sabino > > PhD Student at PGMC-UFJF > Lattes | LinkedIn > | ResearchGate > > > > > _______________________________________________ > 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 mikewithascarf at yahoo.com Tue Nov 1 21:20:30 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Wed, 2 Nov 2016 01:20:30 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> Message-ID: <625852627.56514.1478049630378@mail.yahoo.com> I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 1 21:21:46 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 1 Nov 2016 21:21:46 -0400 Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: <625852627.56514.1478049630378@mail.yahoo.com> References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> Message-ID: Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: > I'm on 7.0.0 currently. > > Mike > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Tuesday, November 1, 2016 8:59 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > What version of VTK are you using? There were some fixes related to that > type of issue a few weeks ago. > > Thanks! > Ken > > On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > That's right, the problem only happens if there are more than one > QVTKWidget. > > I've managed to create a fairly simple example to reproduce the problem: > > https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU > > > It's a very basic modification of the SideBySideRenderWindowsQt example > provided by VTK. I've simply added a button, and when it's clicked it will > clear the left window and add a sphere, then clear the right window and add > a sphere. If I do the following it produces the OpenGL errors every time > for me: > > 1. Click the button. > 2. Manually rotate both spheres. > 3. Click the button. > 4. Manually rotate both spheres. > 5. Click the button. > 6. Manually rotate both spheres. (You'll get the errors here) > > Here's the code below. Interestingly if I move both clear calls before > both of the addsphere calls it works fine. Unfortunately that approach > won't work for my app (needs to be able to change a single window). > > > #include "SideBySideRenderWindowsQt.h" > > void addsphere(vtkSmartPointer< vtkRenderWindow> renwin) > { > vtkSmartPointer< vtkSphereSource> sphereSource = > vtkSmartPointer< vtkSphereSource>::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer< vtkPolyDataMapper> mapper = > vtkSmartPointer< vtkPolyDataMapper>::New(); > mapper->SetInputConnection( sphereSource->GetOutputPort()) ; > > vtkSmartPointer actor = > vtkSmartPointer:: New(); > actor->SetMapper(mapper); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->ResetCameraClippingRange( ); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer< vtkRenderWindow> renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()-> GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt:: slot_b1() > { > clear(this->qvtkWidgetLeft-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetLeft-> GetRenderWindow()); > this->qvtkWidgetLeft-> GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetRight-> GetRenderWindow()); > this->qvtkWidgetRight-> GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt:: slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Thales Luis Rodrigues Sabino > *To:* Mike Withascarf > *Cc:* "vtkusers at vtk.org" > *Sent:* Tuesday, November 1, 2016 7:19 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > This looks like an OpenGL resource sharing issue. I don't know exactly how > VTK handles multiples windows in a Qt application but it looks like it is > trying to bind a texture that is not registered in a certain context. > > Can tell if this happens when you have a single window or this happens > only when you add a second window? > > On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > I'm using QT with VTK for a fairly complex application. Everything works > fine > normally, but if I try to use a function to 'clear' the QVTKWidget, and > then > add a new pipeline, I run into lots of OpenGL errors. What would be the > appropriate way to clear the window/renderer? Here is the code I've been > trying, where window is of type QVTKWidget: > > vtkSmartPointer ren_old = > window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); > if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from > renderer > if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) > window->GetRenderWindow()-> Render(); // Update the window so it is blank > if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove > the renderer > > > > I'm using multiple QVTKWidgets in one app, and each might have a pipeline > that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are > the OpenGL errors reported in the vtkOutputWindow: > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > ______________________________ _________________ > 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 > > > > > > -- > Thales Luis Rodrigues Sabino > > PhD Student at PGMC-UFJF > Lattes | LinkedIn > | ResearchGate > > > > > ______________________________ _________________ > 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 leonid_dulman at yahoo.co.uk Wed Nov 2 04:42:50 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Wed, 2 Nov 2016 08:42:50 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> Message-ID: <1012125959.236945.1478076170444@mail.yahoo.com> Hi to AllI built VTK 7.1.0(OpenGL2) with Qt 5.8.0 and test samples with two QVtkWindows in Qt application. All works fine.I would be ?like to ?test ??SideBySideRenderWindowsQT example and need?SideBySideRenderWindowsQt.h and?SideBySideRenderWindowsQt.cxx filesThank you. Leonid ?? From: Ken Martin To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Wednesday, November 2, 2016 3:21 AM Subject: Re: [vtkusers] QT VTK OpenGL errors Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately 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 mikewithascarf at yahoo.com Wed Nov 2 11:45:43 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Wed, 2 Nov 2016 15:45:43 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> Message-ID: <1322934901.408784.1478101543892@mail.yahoo.com> That seems to have solved the problem for me. Thanks! From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 9:21 PM Subject: Re: [vtkusers] QT VTK OpenGL errors Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikewithascarf at yahoo.com Wed Nov 2 12:25:07 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Wed, 2 Nov 2016 16:25:07 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> Message-ID: <812818641.461017.1478103907694@mail.yahoo.com> Seems I spoke too soon. That solved the problem for the basic example, but not for my larger application. It now takes longer to get the OpenGL Errors to appear, but they do still appear. I'll see if I can create another basic example that can reproduce the problem... From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 9:21 PM Subject: Re: [vtkusers] QT VTK OpenGL errors Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timofey.mukha at it.uu.se Wed Nov 2 12:43:47 2016 From: timofey.mukha at it.uu.se (Timofey Mukha) Date: Wed, 2 Nov 2016 17:43:47 +0100 Subject: [vtkusers] Choosing time for vtkOpenFOAMReader Message-ID: <4add4fb0-cd3a-2278-c64d-10bdcbd8f64f@it.uu.se> Hello! I am trying to write a python script for doing some stuff with an OpenFOAM case. Everything works great, except that I can't choose the time-value that I want the reader to get the data for. I have found the SetTimeValue() function which is supposed to do the job I think, but it doesn't -- the first availbale time-value is always used. Here is how I use the reader: reader = vtk.vtkOpenFOAMReader() reader.SetFileName(path) reader.CreateCellToPointOff() reader.DisableAllPointArrays() reader.Update() print(vtk_to_numpy(reader.GetTimeValues())) # Grab the available timesteps reader.SetTimeValue(vtk_to_numpy(reader.GetTimeValues())[-1]) # Try to load the latest time reader.Update() I use the version provided by the Anaconda python disstro, 6.3.0 I believe. Thanks in advance, Timofey From dave.demarle at kitware.com Wed Nov 2 13:40:45 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 2 Nov 2016 13:40:45 -0400 Subject: [vtkusers] Choosing time for vtkOpenFOAMReader In-Reply-To: <4add4fb0-cd3a-2278-c64d-10bdcbd8f64f@it.uu.se> References: <4add4fb0-cd3a-2278-c64d-10bdcbd8f64f@it.uu.se> Message-ID: In vtk 6.3 it was: anAlgorithm->UpdateInformation(); anAlgorithm->SetUpdateTimeStep(0.5); anAlgorithm->Update(); Try that. In vtk 7.1 it is: anAlgorithm->UpdateTimeSep(0.5); Since Berk cleaned up the parts of the pipeline that caused issues like you are seeing. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Nov 2, 2016 at 12:43 PM, Timofey Mukha wrote: > Hello! > > I am trying to write a python script for doing some stuff with an OpenFOAM > case. Everything works great, except that I can't choose the time-value > that I want the reader to get the data for. > > I have found the SetTimeValue() function which is supposed to do the job I > think, but it doesn't -- the first availbale time-value is always used. > Here is how I use the reader: > > reader = vtk.vtkOpenFOAMReader() > reader.SetFileName(path) > reader.CreateCellToPointOff() > reader.DisableAllPointArrays() > reader.Update() > print(vtk_to_numpy(reader.GetTimeValues())) # Grab the available timesteps > reader.SetTimeValue(vtk_to_numpy(reader.GetTimeValues())[-1]) # Try to > load the latest time > reader.Update() > > I use the version provided by the Anaconda python disstro, 6.3.0 I believe. > > Thanks in advance, > > Timofey > > > _______________________________________________ > 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 fboli94 at gmail.com Wed Nov 2 17:33:08 2016 From: fboli94 at gmail.com (fblupi) Date: Wed, 2 Nov 2016 14:33:08 -0700 (MST) Subject: [vtkusers] QVTKWidget shows black window on Linux Message-ID: <1478122388234-5741017.post@n5.nabble.com> I'm trying to show a serie of DICOM files in a Qt application. I've found an example (https://github.com/fblupi/read-dicom-series-vtk-qt). But it didn't work, because QVTKWidget shows a black window when render the image. I've installed the same version of VTK (7.0) and Qt (5.7) on Windows and everything works fine. In CMake I use these options: BUILD_SHARED_LIBS Module_vtkGUISupportQt Module_vtkGUISupportQtOpenGL Module_vtkGUISupportQtSQL Module_vtkGUISupportQtWebkit Module_vtkRenderingQt Module_vtkViewsQt VTK_Group_Qt I've tried with another versions of Qt (4.8.7 and 5.2.1) but nothing worked. Anyone can help me? I want to work in Ubuntu instead of Windows -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-shows-black-window-on-Linux-tp5741017.html Sent from the VTK - Users mailing list archive at Nabble.com. From nour_sn at hotmail.fr Thu Nov 3 02:06:11 2016 From: nour_sn at hotmail.fr (jaki19) Date: Wed, 2 Nov 2016 23:06:11 -0700 (MST) Subject: [vtkusers] Add new vertexes inside 3D structure Message-ID: <1478153171718-5741022.post@n5.nabble.com> Hallo, I'm trying to add more vertexes in my 3D structure stored in vtkpolydata using vtkTessellatorFilter but i don't know why I have 0 triangles in the output!!! vtkSTLReader reader = new vtkSTLReader(); reader.SetFileName(path3d); reader.Update(); vtkPolyData input = new vtkPolyData(); input = reader.GetOutput(); System.out.print(input.GetNumberOfPoints() + " voxels.\n"); ----> 4500 voxels. System.out.print(input.GetNumberOfPolys() + " triangles.\n");-----> 6580 triangles. vtkTessellatorFilter tesela= new vtkTessellatorFilter(); tesela.SetInputData(input); tesla.Update(); System.out.print(subdivised.GetNumberOfPoints() + " voxels.\n");----> 4500 voxels. System.out.print(subdivised.GetNumberOfPolys() + " triangles.\n");-----> 0 triangles. -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-new-vertexes-inside-3D-structure-tp5741022.html Sent from the VTK - Users mailing list archive at Nabble.com. From sur.chiranjib at gmail.com Thu Nov 3 02:13:58 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 3 Nov 2016 11:43:58 +0530 Subject: [vtkusers] Add new vertexes inside 3D structure In-Reply-To: <1478153171718-5741022.post@n5.nabble.com> References: <1478153171718-5741022.post@n5.nabble.com> Message-ID: Hi, Looks like you are missing the operation which will "tessellate" the input data and add more triangles (polygons). See the inlined comments below. Thanks, Chiranjib On Thu, Nov 3, 2016 at 11:36 AM, jaki19 wrote: > Hallo, > > I'm trying to add more vertexes in my 3D structure stored in vtkpolydata > using vtkTessellatorFilter but i don't know why I have 0 triangles in the > output!!! > > > vtkSTLReader reader = new vtkSTLReader(); > reader.SetFileName(path3d); > reader.Update(); > vtkPolyData input = new vtkPolyData(); > input = reader.GetOutput(); > System.out.print(input.GetNumberOfPoints() + " voxels.\n"); ----> 4500 > voxels. > System.out.print(input.GetNumberOfPolys() + " triangles.\n");-----> 6580 > triangles. > vtkTessellatorFilter tesela= new vtkTessellatorFilter(); > tesela.SetInputData(input); > ***** Looks like the Tesselation operation is missing ******** > tesla.Update(); > System.out.print(subdivised.GetNumberOfPoints() + " voxels.\n");----> 4500 > voxels. > System.out.print(subdivised.GetNumberOfPolys() + " triangles.\n");-----> 0 > triangles. > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Add-new-vertexes-inside-3D-structure-tp5741022.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 nour_sn at hotmail.fr Thu Nov 3 02:22:24 2016 From: nour_sn at hotmail.fr (jaki19) Date: Wed, 2 Nov 2016 23:22:24 -0700 (MST) Subject: [vtkusers] Add new vertexes inside 3D structure In-Reply-To: References: <1478153171718-5741022.post@n5.nabble.com> Message-ID: <1478154144718-5741024.post@n5.nabble.com> which function do I have to use for the operations? -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-new-vertexes-inside-3D-structure-tp5741022p5741024.html Sent from the VTK - Users mailing list archive at Nabble.com. From sur.chiranjib at gmail.com Thu Nov 3 02:43:55 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 3 Nov 2016 12:13:55 +0530 Subject: [vtkusers] Add new vertexes inside 3D structure In-Reply-To: <1478154144718-5741024.post@n5.nabble.com> References: <1478153171718-5741022.post@n5.nabble.com> <1478154144718-5741024.post@n5.nabble.com> Message-ID: Hi, You might be interested to lookinto the example http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/General/Testing/Cxx/TestTessellator.cxx#l3650 the line number 3650 onwards. You will get an idea how the filter operates on a dataset. Fro your example what I understand, that you are setting the input data on which the filter will work tesela.SetInputData(input); And then immediately, you are updating the pipeline in the following way tesla.Update(); In between the filter is not doing any operations on the dataset. The example link I have provided above will give you an idea about the operations that the filter can do. You can use the existing member functions or design your own. Hope this helps. Best wishes, Chiranjib On Thu, Nov 3, 2016 at 11:52 AM, jaki19 wrote: > which function do I have to use for the operations? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Add-new-vertexes-inside-3D-structure-tp5741022p5741024.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 timofey.mukha at it.uu.se Thu Nov 3 07:21:56 2016 From: timofey.mukha at it.uu.se (Timofey Mukha) Date: Thu, 3 Nov 2016 12:21:56 +0100 Subject: [vtkusers] Choosing time for vtkOpenFOAMReader In-Reply-To: References: <4add4fb0-cd3a-2278-c64d-10bdcbd8f64f@it.uu.se> Message-ID: Dear David, Thank you for the fast reply! I am trying to use your tip, but since I am very new to VTK it is not working out well for me. Could you elaborate a bit, what would "anAlgorithm" be. A child to vtkAlgorithm? The thing is none of the objects I create seem to have the SetUpdateTimeStep() as a member. Browsing doxygen made me think that it is a member of vtkStreamingDemandDrivenPipeline, is that something I should have in the script? Kind regards, Timofey On 2016-11-02 18:40, David E DeMarle wrote: > In vtk 6.3 it was: > anAlgorithm->UpdateInformation(); > anAlgorithm->SetUpdateTimeStep(0.5); > anAlgorithm->Update(); > Try that. > > In vtk 7.1 it is: > anAlgorithm->UpdateTimeSep(0.5); > Since Berk cleaned up the parts of the pipeline that caused issues > like you are seeing. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Nov 2, 2016 at 12:43 PM, Timofey Mukha > wrote: > > Hello! > > I am trying to write a python script for doing some stuff with an > OpenFOAM case. Everything works great, except that I can't choose > the time-value that I want the reader to get the data for. > > I have found the SetTimeValue() function which is supposed to do > the job I think, but it doesn't -- the first availbale time-value > is always used. Here is how I use the reader: > > reader = vtk.vtkOpenFOAMReader() > reader.SetFileName(path) > reader.CreateCellToPointOff() > reader.DisableAllPointArrays() > reader.Update() > print(vtk_to_numpy(reader.GetTimeValues())) # Grab the available > timesteps > reader.SetTimeValue(vtk_to_numpy(reader.GetTimeValues())[-1]) # > Try to load the latest time > reader.Update() > > I use the version provided by the Anaconda python disstro, 6.3.0 I > believe. > > Thanks in advance, > > Timofey > > > _______________________________________________ > 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 stephenthomas1 at boisestate.edu Thu Nov 3 14:47:44 2016 From: stephenthomas1 at boisestate.edu (Stephen Thomas) Date: Thu, 3 Nov 2016 12:47:44 -0600 Subject: [vtkusers] Undefined reference error while compiling with VTK shared libraries in Ubuntu 16.04 Message-ID: Hi, I am trying to build a C++ code called LAMMPS which uses VTK for writing vtk files. I am getting errors that seem like linking errors. I am able to compile VTK successfully, but when I compile the LAMMPS code, I get the following errors from the line vtkSmartPointer writer = vtkSmartPointer< vtkXMLPolyDataWriter>::New(); : mpicxx -g -O -L/home/sthomas/projects/VTK-build/lib dump_custom_vtk.o .......................................... -lvtkCommonCore-6.3 -lvtkIOCore-6.3 -lvtkIOXML-6.3 -lvtkIOLegacy-6.3 -lvtkCommonDataModel-6.3 -lblas -llapack -o ../lmp_mpi dump_custom_vtk.o: In function `vtkSmartPointer< vtkXMLPPolyDataWriter>::New()': /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to `vtkXMLPPolyDataWriter::New()' dump_custom_vtk.o: In function `vtkSmartPointer< vtkXMLPUnstructuredGridWriter>::New()': /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to ` vtkXMLPUnstructuredGridWriter::New()' collect2: error: ld returned 1 exit status This is the first time I am writing to this forum. I may be missing some supporting information. Please let me know if more information is required. I must also point out that I have another code installed on the machine which has also installed VTK 7.0 and its shared libraries. I am not sure if these are somehow interfering. I am assuming that the -L/path_to_lib as seen above should take care of pointing to the right libraries. Thank you, Stephen Thomas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Nov 3 15:13:22 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 3 Nov 2016 15:13:22 -0400 Subject: [vtkusers] Undefined reference error while compiling with VTK shared libraries in Ubuntu 16.04 In-Reply-To: References: Message-ID: Stephen, It seems that you are reading libraries from your own VTK: -L/home/sthomas/projects/VTK-build/lib but the headers are from the system installed VTK: /usr/local/include/vtk-6.3/ I suggest uninstalling the system VTK or make sure that the correct headers are picked up by LAMMPS. On Thu, Nov 3, 2016 at 2:47 PM, Stephen Thomas < stephenthomas1 at boisestate.edu> wrote: > Hi, > > I am trying to build a C++ code called LAMMPS which uses VTK for writing > vtk files. I am getting errors that seem like linking errors. I am able to > compile VTK successfully, but when I compile the LAMMPS code, I get the > following errors from the line > vtkSmartPointer writer = vtkSmartPointer< > vtkXMLPolyDataWriter>::New(); > : > > mpicxx -g -O -L/home/sthomas/projects/VTK-build/lib dump_custom_vtk.o > .......................................... -lvtkCommonCore-6.3 > -lvtkIOCore-6.3 -lvtkIOXML-6.3 -lvtkIOLegacy-6.3 -lvtkCommonDataModel-6.3 > -lblas -llapack -o ../lmp_mpi > dump_custom_vtk.o: In function `vtkSmartPointer taWriter>::New()': > /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to > `vtkXMLPPolyDataWriter::New()' > dump_custom_vtk.o: In function `vtkSmartPointer cturedGridWriter>::New()': > /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to > `vtkXMLPUnstructuredGridWriter::New()' > collect2: error: ld returned 1 exit status > > This is the first time I am writing to this forum. I may be missing some > supporting information. Please let me know if more information is required. > > I must also point out that I have another code installed on the machine > which has also installed VTK 7.0 and its shared libraries. I am not sure if > these are somehow interfering. I am assuming that the -L/path_to_lib as > seen above should take care of pointing to the right libraries. > > Thank you, > Stephen Thomas. > > > _______________________________________________ > 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 stephenthomas1 at boisestate.edu Thu Nov 3 15:19:03 2016 From: stephenthomas1 at boisestate.edu (Stephen Thomas) Date: Thu, 3 Nov 2016 13:19:03 -0600 Subject: [vtkusers] Undefined reference error while compiling with VTK shared libraries in Ubuntu 16.04 In-Reply-To: References: Message-ID: Hi Dan, Thanks for the quick response. Yes, you are right, I used the command "make -j8 install" to copy the header files to the /usr/local/include/vtk-6.3/". But I pointed to the build folder for the libraries. How do I uninstall the system VTK? I have also tried to install vtk 6 and vtk 5 using the "sudo apt-get install libvtk6-dev" and "sudo apt-get install libvtk5-dev". Thank you, Stephen Thomas. On Thu, Nov 3, 2016 at 1:13 PM, Dan Lipsa wrote: > Stephen, > It seems that you are reading libraries from your own > VTK: -L/home/sthomas/projects/VTK-build/lib > but the headers are from the system installed > VTK: /usr/local/include/vtk-6.3/ > > I suggest uninstalling the system VTK or make sure that the correct > headers are picked up by LAMMPS. > > On Thu, Nov 3, 2016 at 2:47 PM, Stephen Thomas < > stephenthomas1 at boisestate.edu> wrote: > >> Hi, >> >> I am trying to build a C++ code called LAMMPS which uses VTK for writing >> vtk files. I am getting errors that seem like linking errors. I am able to >> compile VTK successfully, but when I compile the LAMMPS code, I get the >> following errors from the line >> vtkSmartPointer writer = vtkSmartPointer< >> vtkXMLPolyDataWriter>::New(); >> : >> >> mpicxx -g -O -L/home/sthomas/projects/VTK-build/lib dump_custom_vtk.o >> .......................................... -lvtkCommonCore-6.3 >> -lvtkIOCore-6.3 -lvtkIOXML-6.3 -lvtkIOLegacy-6.3 -lvtkCommonDataModel-6.3 >> -lblas -llapack -o ../lmp_mpi >> dump_custom_vtk.o: In function `vtkSmartPointer> taWriter>::New()': >> /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to >> `vtkXMLPPolyDataWriter::New()' >> dump_custom_vtk.o: In function `vtkSmartPointer> cturedGridWriter>::New()': >> /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference to >> `vtkXMLPUnstructuredGridWriter::New()' >> collect2: error: ld returned 1 exit status >> >> This is the first time I am writing to this forum. I may be missing some >> supporting information. Please let me know if more information is required. >> >> I must also point out that I have another code installed on the machine >> which has also installed VTK 7.0 and its shared libraries. I am not sure if >> these are somehow interfering. I am assuming that the -L/path_to_lib as >> seen above should take care of pointing to the right libraries. >> >> Thank you, >> Stephen Thomas. >> >> >> _______________________________________________ >> 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 nour_sn at hotmail.fr Thu Nov 3 16:53:16 2016 From: nour_sn at hotmail.fr (jaki19) Date: Thu, 3 Nov 2016 13:53:16 -0700 (MST) Subject: [vtkusers] Add new vertexes inside 3D structure In-Reply-To: References: <1478153171718-5741022.post@n5.nabble.com> <1478154144718-5741024.post@n5.nabble.com> Message-ID: <1478206396407-5741038.post@n5.nabble.com> the documentations are not very clear for me, I don't understand the result where are my polys?? vtkSTLReader reader = new vtkSTLReader(); reader.SetFileName(path3d); reader.Update(); vtkPolyData input = new vtkPolyData(); input = reader.GetOutput(); System.out.println("Before subdivision" ); System.out.println("-----------------"); System.out.print("points: "+input.GetNumberOfPoints() + "\n");/---->points: 4500/ System.out.print("polys: "+input.GetNumberOfPolys() + "\n");/------>polys: 6580/ System.out.println("Cells: "+input.GetNumberOfCells());/------>Cells: 6580/ System.out.println("verts: "+input.GetNumberOfVerts());/------>verts: 0/ System.out.println("lines: "+input.GetNumberOfLines());/------>lines: 0/ System.out.println("Strips: "+input.GetNumberOfStrips());------>Strips: 0 System.out.println("pieces: "+input.GetNumberOfPieces());------>pieces: 1 vtkRandomAttributeGenerator rag =new vtkRandomAttributeGenerator(); rag.SetInputData(input); vtkTessellatorFilter tesla= new vtkTessellatorFilter(); tesla.SetInputConnection(rag.GetOutputPort()); tesla.MergePointsOn(); tesla.Update(); for ( int odim = 1; odim < 4; ++odim ) { tesla.SetOutputDimension( odim ); tesla.Update(); } tesla.MergePointsOff(); tesla.Update(); vtkPolyData subdivised = new vtkPolyData(); subdivised.ShallowCopy(tesla.GetOutput()); System.out.println("After Tessellation" ); System.out.println("-----------------"); System.out.print("points"+subdivised.GetNumberOfPoints() + "\n"); ---->points: 19740 System.out.print("polys"+subdivised.GetNumberOfPolys() + "\n");------>polys:0 System.out.println("Cells"+subdivised.GetNumberOfCells());------>Cells: 0 System.out.println("verts"+subdivised.GetNumberOfVerts());------>verts: 0 System.out.println("lines"+subdivised.GetNumberOfLines());------>lines: 0 System.out.println("Strips"+subdivised.GetNumberOfStrips());------>Strips: 0 System.out.println("pieces"+subdivised.GetNumberOfPieces());------>pieces: 1 -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-new-vertexes-inside-3D-structure-tp5741022p5741038.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Thu Nov 3 16:57:19 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 3 Nov 2016 16:57:19 -0400 Subject: [vtkusers] Undefined reference error while compiling with VTK shared libraries in Ubuntu 16.04 In-Reply-To: References: Message-ID: > > > How do I uninstall the system VTK? I have also tried to install vtk 6 and > vtk 5 using the "sudo apt-get install libvtk6-dev" and "sudo apt-get > install libvtk5-dev". > > You can use an interface such as synaptic to make things easier. You can search for all packages that have vtk in their name and uninstall them. > Thank you, > Stephen Thomas. > > On Thu, Nov 3, 2016 at 1:13 PM, Dan Lipsa wrote: > >> Stephen, >> It seems that you are reading libraries from your own >> VTK: -L/home/sthomas/projects/VTK-build/lib >> but the headers are from the system installed >> VTK: /usr/local/include/vtk-6.3/ >> >> I suggest uninstalling the system VTK or make sure that the correct >> headers are picked up by LAMMPS. >> >> On Thu, Nov 3, 2016 at 2:47 PM, Stephen Thomas < >> stephenthomas1 at boisestate.edu> wrote: >> >>> Hi, >>> >>> I am trying to build a C++ code called LAMMPS which uses VTK for writing >>> vtk files. I am getting errors that seem like linking errors. I am able to >>> compile VTK successfully, but when I compile the LAMMPS code, I get the >>> following errors from the line >>> vtkSmartPointer writer = vtkSmartPointer< >>> vtkXMLPolyDataWriter>::New(); >>> : >>> >>> mpicxx -g -O -L/home/sthomas/projects/VTK-build/lib dump_custom_vtk.o >>> .......................................... -lvtkCommonCore-6.3 >>> -lvtkIOCore-6.3 -lvtkIOXML-6.3 -lvtkIOLegacy-6.3 -lvtkCommonDataModel-6.3 >>> -lblas -llapack -o ../lmp_mpi >>> dump_custom_vtk.o: In function `vtkSmartPointer>> taWriter>::New()': >>> /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference >>> to `vtkXMLPPolyDataWriter::New()' >>> dump_custom_vtk.o: In function `vtkSmartPointer>> cturedGridWriter>::New()': >>> /usr/local/include/vtk-6.3/vtkSmartPointer.h:117: undefined reference >>> to `vtkXMLPUnstructuredGridWriter::New()' >>> collect2: error: ld returned 1 exit status >>> >>> This is the first time I am writing to this forum. I may be missing some >>> supporting information. Please let me know if more information is required. >>> >>> I must also point out that I have another code installed on the machine >>> which has also installed VTK 7.0 and its shared libraries. I am not sure if >>> these are somehow interfering. I am assuming that the -L/path_to_lib as >>> seen above should take care of pointing to the right libraries. >>> >>> Thank you, >>> Stephen Thomas. >>> >>> >>> _______________________________________________ >>> 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 mikewithascarf at yahoo.com Thu Nov 3 17:06:29 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Thu, 3 Nov 2016 21:06:29 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> Message-ID: <291182218.684905.1478207190025@mail.yahoo.com> In order to reproduce the issue in the latest version of VTK, take the same example I posted before but this time also add a caption to the rendering each time addsphere is called (code below). Then follow the same steps of pushing the button and interacting with the spheres, and it reliably produces the error for me. #include "SideBySideRenderWindowsQt.h"?#include #include void addsphere(vtkSmartPointer renwin)?{?? ? ? ? vtkSmartPointer sphereSource =?? ? ? ? ? ? ? ? vtkSmartPointer::New();?? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);?? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer mapper =?? ? ? ? ? ? ? ? vtkSmartPointer::New();?? ? ? ? mapper->SetInputConnection(sphereSource->GetOutputPort());? ? ? ? ? vtkSmartPointer actor =?? ? ? ? ? ? ? ? vtkSmartPointer::New();?? ? ? ? actor->SetMapper(mapper);? vtkSmartPointer actor_text = vtkSmartPointer::New(); std::string caption; caption = "Testing"; actor_text->SetInput(caption.c_str()); actor_text->SetPosition(8, 8); actor_text->GetTextProperty()->SetFontSize(11); actor_text->GetTextProperty()->SetColor(1.0, 1.0, 1.0); ? ? ? ? vtkSmartPointer ren = vtkSmartPointer::New();?? ? ? ? ren->AddActor(actor);? ren->AddActor(actor_text);? ? ? ? ren->ResetCameraClippingRange();? ? ? ? ? renwin->AddRenderer(ren);?? ? ? ? renwin->Render();?}? void clear(vtkSmartPointer renwin)?{?? ? ? ? // clear renderer?? ? ? ? vtkSmartPointer ren =?? ? ? ? ? ? ? ? renwin->GetRenderers()->GetFirstRenderer();?? ? ? ? if (ren)?? ? ? ? {?? ? ? ? ? ? ? ? ren->RemoveAllViewProps();?? ? ? ? ? ? ? ? renwin->Render();?? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);?? ? ? ? }?}? // Constructor?SideBySideRenderWindowsQt::SideBySideRenderWindowsQt()?{?? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots?? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));?}? void SideBySideRenderWindowsQt::slot_b1()?{?? ? ? ? clear(this->qvtkWidgetLeft->GetRenderWindow());? ? ? ? ? addsphere(this->qvtkWidgetLeft->GetRenderWindow());?? ? ? ? this->qvtkWidgetLeft->GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight->GetRenderWindow());?? ? ? ??? ? ? ? addsphere(this->qvtkWidgetRight->GetRenderWindow());?? ? ? ? this->qvtkWidgetRight->GetRenderWindow()->Render();?}? void SideBySideRenderWindowsQt::slotExit()?{?? qApp->exit();?}? From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 9:21 PM Subject: Re: [vtkusers] QT VTK OpenGL errors Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffsp at gmail.com Thu Nov 3 18:05:11 2016 From: jeffsp at gmail.com (jeffsp) Date: Thu, 3 Nov 2016 15:05:11 -0700 (MST) Subject: [vtkusers] Speed Up Rendering Colored Point Cloud Message-ID: <1478210711543-5741041.post@n5.nabble.com> I have used the VTK/Examples/Cxx/PolyData/ColoredPoints example as a starting point to create an application that renders a colored point cloud. It works great, except when the point cloud gets big. With tens of millions of points, it's not usable. Can someone make a recommendation for speeding things up? VTK 6.1 Linux RHEL 7.2 -- View this message in context: http://vtk.1045678.n5.nabble.com/Speed-Up-Rendering-Colored-Point-Cloud-tp5741041.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Thu Nov 3 18:52:42 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 3 Nov 2016 18:52:42 -0400 Subject: [vtkusers] Speed Up Rendering Colored Point Cloud In-Reply-To: <1478210711543-5741041.post@n5.nabble.com> References: <1478210711543-5741041.post@n5.nabble.com> Message-ID: Use vtk 7, it was made for this sort of workload. On Nov 3, 2016 6:05 PM, "jeffsp" wrote: > I have used the VTK/Examples/Cxx/PolyData/ColoredPoints example as a > starting > point to create an application that renders a colored point cloud. > > It works great, except when the point cloud gets big. With tens of millions > of points, it's not usable. > > Can someone make a recommendation for speeding things up? > > VTK 6.1 > Linux RHEL 7.2 > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Speed-Up-Rendering-Colored-Point-Cloud-tp5741041.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 ken.martin at kitware.com Thu Nov 3 19:05:20 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 3 Nov 2016 19:05:20 -0400 Subject: [vtkusers] Speed Up Rendering Colored Point Cloud In-Reply-To: References: <1478210711543-5741041.post@n5.nabble.com> Message-ID: If you want to go to the extreme and you are willing to hack around a little bit you can use vtkLODPointCloudMapper. It is a bit behind VTK so the build may need to be modified. But it can render a 100 million point dataset at a rate of 1 billion points/second without much grief on my laptop (gtx 960M) You can find some talk about it here... http://vtk.1045678.n5.nabble.com/30-million-points-and-Render-td5737692.html and http://vtk.1045678.n5.nabble.com/Qt-based-sample-point-viewer-application-td5737771.html On Thu, Nov 3, 2016 at 6:52 PM, David E DeMarle wrote: > Use vtk 7, it was made for this sort of workload. > > On Nov 3, 2016 6:05 PM, "jeffsp" wrote: > >> I have used the VTK/Examples/Cxx/PolyData/ColoredPoints example as a >> starting >> point to create an application that renders a colored point cloud. >> >> It works great, except when the point cloud gets big. With tens of >> millions >> of points, it's not usable. >> >> Can someone make a recommendation for speeding things up? >> >> VTK 6.1 >> Linux RHEL 7.2 >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/Speed-Up-Rendering-Colored-Point-Cloud-tp5741041.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 >> > > _______________________________________________ > 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 dave.demarle at kitware.com Thu Nov 3 20:38:41 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 3 Nov 2016 20:38:41 -0400 Subject: [vtkusers] announce: vtk 7.1.0 release candidate 2 is ready Message-ID: Hello, The next release candidate in the VTK 7.1 release cycle is ready for you to try. Thank you everyone who tried and provided feedback and updates based on rc1. As usual you can find the source, data, and vtkpython binary packages here: http://www.vtk.org/download/#candidate Please try this version of VTK and report any issues the the gitlab issue tracker so that we can try to address them before VTK 7.1.0 final in a few weeks time. The changes from rc1 are as follows: David C. Lonie (2): Prevent crash in HiddenLineRemovalPass. Reset extents pointer in SurfaceLICComposite. David Gobbi (2): 16870: Fix origin when TransformInputSamplingOff() is used. Add a simple Cxx test for vtkImageReslice Ken Martin (6): fix ios getpixeldata calls rebassed fix for front buffer draw pixels not showing better handling of how to get an OpenGL context win32 try fix for offscreen rendering on Windows memory leak in ExtractHierarchicalBins fix memory leax in vtkPlotParallelCoordinates Michael Fogleman (1): use vtkMath::IsNan Sankhesh Jhaveri (13): Clamp volume component weights to between 0.0 and 1.0 More changes with regards to doxygen documentation in smart volume mapper Provided ivar getter function for vector mode Modify behavior of average intensity projected volume rendering Improve documentation for volume mapper classes Validity of render checks for volume mappers Add missing doxygen decorator Improve volume shader code Added tests for multi-component additive and average intensity volumes Fix documentation for shading in volume rendering Added volume test for different blend modes Minor volume shader optimization Fix unused variable warning Sean McBride (1): Removed doxygen deprecation comment on vtkImageData methods Shawn Waldon (2): Disable TBB's implicit linking with #pragmas Update Xdmf3 tests for python3 Will Schroeder (2): Fixed memory leak Fixed memory leak 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 priyavashistha2 at gmail.com Thu Nov 3 22:49:51 2016 From: priyavashistha2 at gmail.com (Priya Vashistha) Date: Thu, 3 Nov 2016 21:49:51 -0500 Subject: [vtkusers] "no override found for 'vtkPolyDataMapper'" Message-ID: Hey Guys, Has anyone been able to find a solution to the following: Generic Warning: In /home/direction/Downloads/VTK-7.0.0/Rendering/Core/vtkPolyDataMapper.cxx, line 28 Error: no override found for 'vtkPolyDataMapper'. I am using VTK7.0.0 (on win 10) and running a project in Visual studio 15 express. This error appears in vtkOutputWindow. I saw that this has also been posted on forum online but I wasn't able to find a clear solution. Any help would be greatly appreciated. Thank You, Priya -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Fri Nov 4 08:28:09 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 04 Nov 2016 08:28:09 -0400 Subject: [vtkusers] HiDPI not working on VTK 7.1.0 rc2 Message-ID: <581C7ED9.90003@bluequartz.net> I just tried the HiDPI support on VTK 7.1.0-rc2 and I get the usual VTK rendering canvas that is half the size of the widget that it is embedded into. We are using Qt 5.6.2 on macOS 10.10.5. I compiled my original pull request (way back in Aug 2016) and that patch gives me a full size canvas. But when compiling the latest VTK 7.1.0-rc2 I get the half size canvas. I thought the branch was merged on Sept 28 2016 but I guess I got busy and never actually tested it on a retina screen. Most likely I am doing something wrong in the initialization in my code but just in case can anyone else confirm with Qt 5.6.x that they can actually get a Retina/HiDPI canvas? Thanks -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net From christophe_vandijck at hotmail.com Fri Nov 4 08:38:43 2016 From: christophe_vandijck at hotmail.com (Christophe Van Dijck) Date: Fri, 4 Nov 2016 12:38:43 +0000 Subject: [vtkusers] Bug in vtkKdTreePointLocator for distant points Message-ID: Hi, I discovered a possible bug in the vtkKdTreePointLocator for distant points. I included a small example in python. For compatibility reasons, I'm still at commit 2d7055f19972012e8120281d50604d5bfd2a9be2 so it might be already solved... It only occurs when the point is further than double the distance of the maxDist of the target dataset (in the example > 2*10+5) and if there are significant number of points so that multiple regions exist. Regards, Christophe Code: import vtk # Setup point coordinates source = vtk.vtkSphereSource() source.SetCenter(0,0,0) source.SetRadius(5.0) source.SetThetaResolution(120) source.SetPhiResolution(70) source.Update() polydata = vtk.vtkPolyData() polydata.DeepCopy(source.GetOutput()) # Create the tree kDTree = vtk.vtkKdTreePointLocator() kDTree.SetDataSet(polydata) kDTree.BuildLocator() testPoint = [0.0, 0.0, 25.] # all points up to [0., 0., 24.9999...] give [0., 0., 5.] as closest point print("Test point: ", ', '.join([str(x) for x in testPoint])) # Find the closest points to TestPoint iD = kDTree.FindClosestPoint(testPoint) print("\nThe closest point is point %d" % iD) #Get the coordinates of the closest point closestPoint = [0.0, 0.0, 0.0] kDTree.GetDataSet().GetPoint(iD, closestPoint) print("Coordinates: %f, %f, %f" % (closestPoint[0], closestPoint[1], closestPoint[2])) # Should be [0., 0., 5.] but returns [-2.452237, -1.985783, -3.878556] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Nov 4 09:10:38 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 4 Nov 2016 09:10:38 -0400 Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: <291182218.684905.1478207190025@mail.yahoo.com> References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> <291182218.684905.1478207190025@mail.yahoo.com> Message-ID: Awesome! Given the changes you made I'm 90% sure I know what the problem is and it is a fairly easy fix. Here is a merge request that contains a fix (not tested on your example so if you have a sec to test it please do) https://gitlab.kitware.com/vtk/vtk/merge_requests/2144 On Thu, Nov 3, 2016 at 5:06 PM, Mike Withascarf wrote: > In order to reproduce the issue in the latest version of VTK, take the > same example I posted before but this time also add a caption to the > rendering each time addsphere is called (code below). Then follow the same > steps of pushing the button and interacting with the spheres, and it > reliably produces the error for me. > > #include "SideBySideRenderWindowsQt.h" > #include > #include > > void addsphere(vtkSmartPointer renwin) > { > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > vtkSmartPointer actor_text = vtkSmartPointer: > :New(); > std::string caption; > caption = "Testing"; > actor_text->SetInput(caption.c_str()); > actor_text->SetPosition(8, 8); > actor_text->GetTextProperty()->SetFontSize(11); > actor_text->GetTextProperty()->SetColor(1.0, 1.0, 1.0); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->AddActor(actor_text); > ren->ResetCameraClippingRange(); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()->GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt::SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt::slot_b1() > { > clear(this->qvtkWidgetLeft->GetRenderWindow()); > > addsphere(this->qvtkWidgetLeft->GetRenderWindow()); > this->qvtkWidgetLeft->GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight->GetRenderWindow()); > > addsphere(this->qvtkWidgetRight->GetRenderWindow()); > this->qvtkWidgetRight->GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt::slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Tuesday, November 1, 2016 9:21 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > Ahh, it very well may be fixed in VTK now. I definitely added some new > ways of handling freeing resources to avoid the type of issue you are > bumping into. > > On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf > wrote: > > I'm on 7.0.0 currently. > > Mike > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Tuesday, November 1, 2016 8:59 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > What version of VTK are you using? There were some fixes related to that > type of issue a few weeks ago. > > Thanks! > Ken > > On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > That's right, the problem only happens if there are more than one > QVTKWidget. > > I've managed to create a fairly simple example to reproduce the problem: > > https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU > > > It's a very basic modification of the SideBySideRenderWindowsQt example > provided by VTK. I've simply added a button, and when it's clicked it will > clear the left window and add a sphere, then clear the right window and add > a sphere. If I do the following it produces the OpenGL errors every time > for me: > > 1. Click the button. > 2. Manually rotate both spheres. > 3. Click the button. > 4. Manually rotate both spheres. > 5. Click the button. > 6. Manually rotate both spheres. (You'll get the errors here) > > Here's the code below. Interestingly if I move both clear calls before > both of the addsphere calls it works fine. Unfortunately that approach > won't work for my app (needs to be able to change a single window). > > > #include "SideBySideRenderWindowsQt.h" > > void addsphere(vtkSmartPointer< vtkRenderWindow> renwin) > { > vtkSmartPointer< vtkSphereSource> sphereSource = > vtkSmartPointer< vtkSphereSource>::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer< vtkPolyDataMapper> mapper = > vtkSmartPointer< vtkPolyDataMapper>::New(); > mapper->SetInputConnection( sphereSource->GetOutputPort()) ; > > vtkSmartPointer actor = > vtkSmartPointer:: New(); > actor->SetMapper(mapper); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->ResetCameraClippingRange( ); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer< vtkRenderWindow> renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()-> GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt:: slot_b1() > { > clear(this->qvtkWidgetLeft-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetLeft-> GetRenderWindow()); > this->qvtkWidgetLeft-> GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetRight-> GetRenderWindow()); > this->qvtkWidgetRight-> GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt:: slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Thales Luis Rodrigues Sabino > *To:* Mike Withascarf > *Cc:* "vtkusers at vtk.org" > *Sent:* Tuesday, November 1, 2016 7:19 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > This looks like an OpenGL resource sharing issue. I don't know exactly how > VTK handles multiples windows in a Qt application but it looks like it is > trying to bind a texture that is not registered in a certain context. > > Can tell if this happens when you have a single window or this happens > only when you add a second window? > > On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > I'm using QT with VTK for a fairly complex application. Everything works > fine > normally, but if I try to use a function to 'clear' the QVTKWidget, and > then > add a new pipeline, I run into lots of OpenGL errors. What would be the > appropriate way to clear the window/renderer? Here is the code I've been > trying, where window is of type QVTKWidget: > > vtkSmartPointer ren_old = > window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); > if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from > renderer > if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) > window->GetRenderWindow()-> Render(); // Update the window so it is blank > if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove > the renderer > > > > I'm using multiple QVTKWidgets in one app, and each might have a pipeline > that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are > the OpenGL errors reported in the vtkOutputWindow: > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > ______________________________ _________________ > 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 > > > > > > -- > Thales Luis Rodrigues Sabino > > PhD Student at PGMC-UFJF > Lattes | LinkedIn > | ResearchGate > > > > > ______________________________ _________________ > 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 david.lonie at kitware.com Fri Nov 4 10:20:48 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 4 Nov 2016 10:20:48 -0400 Subject: [vtkusers] "no override found for 'vtkPolyDataMapper'" In-Reply-To: References: Message-ID: Make sure your executable is linked to either the vtkRenderingOpenGL or vtkRenderingOpenGL2 library, depending on which backend you're using. Those provide the class override for vtkPolyDataMapper. HTH, Dave On Thu, Nov 3, 2016 at 10:49 PM, Priya Vashistha wrote: > Hey Guys, > > Has anyone been able to find a solution to the following: > > Generic Warning: In /home/direction/Downloads/VTK-7.0.0/Rendering/Core/vtkPolyDataMapper.cxx, > line 28 > Error: no override found for 'vtkPolyDataMapper'. > > I am using VTK7.0.0 (on win 10) and running a project in Visual studio 15 > express. This error appears in vtkOutputWindow. > > I saw that this has also been posted on forum online but I wasn't able to > find a clear solution. > > Any help would be greatly appreciated. > > Thank You, > Priya > > > _______________________________________________ > 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 enzo.matsumiya at gmail.com Fri Nov 4 10:49:41 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Fri, 4 Nov 2016 12:49:41 -0200 Subject: [vtkusers] How to keep the distance text of vtkDistanceWidget always visible? In-Reply-To: <70fbbda8.11.1581b4bed22.Coremail.tjlp@netease.com> References: <70fbbda8.11.1581b4bed22.Coremail.tjlp@netease.com> Message-ID: Hi, I need to do the same thing and I'm having the same problem. Please do share if you find a solution. Thanks On 31 October 2016 at 13:11, Liu_tj wrote: > Hi, > > I am using vtkDistanceWidget for measure the distance on 3D model. I use > vtkDistanceRepresentation3D for this widget because the widget should be > rotated when I rotate the 3D model. So, with the > vtkDistanceRepresentation3D, the distance text can't be always visible > because at some position it will be covered by the 3D model. How can I make > the distance text always visible? > > 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 > > -- Enzo Ferlin Matsumiya enzo.matsumiya AT gmail DOT com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Fri Nov 4 11:27:54 2016 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 4 Nov 2016 08:27:54 -0700 (MST) Subject: [vtkusers] Speed up strategies for ray casting using vtkOBBTree? Message-ID: <1478273274390-5741052.post@n5.nabble.com> Dear all, I'm working on some ray casting applications with the help of vtkOBBTree. This class does a fine job as it is easy to use and does exactly what I want, but I was wondering if I could speed up the ray-casting process when large data sets are involved. I am dealing with ray-tracing from a LIDAR focal plane comprised of 128 x 128 elements to a target potentially comprised of hundreds of thousands of vertices (833538 in my example). Illuminating it with each of the 128 x 128 = 16384 pixels in the focal plane takes more than 15 minutes (as my timer is still running!). Obviously this is a computationally intensive problem, but I was wondering if there were some alternative strategies that could speed up the process. Specifically, because I am casting each ray by going through the focal plane rows by rows, the facet hit by the ray corresponding to pixel [i,j] should be pretty close to the facet hit by the ray coming from pixel[i,j+1] (if not the same). So here's my first question: is their a way to restrict the ray-facet intersect search to the neighbors of a given facet? This way, only the very first pixel of the focal plane would require a global search through the vtkOBBTree: the rest of the intersects could be searched inside the neighbors of the impacted cells (and not inside the complete shape). I guess I could somehow implement manually, but i'd rather not reinvent the wheel. Besides this idea, if there any ray casting strategy using built-in VTK features more adapted to large datasets such as those I am dealing with? Thanks! Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/Speed-up-strategies-for-ray-casting-using-vtkOBBTree-tp5741052.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.lonie at kitware.com Fri Nov 4 12:13:05 2016 From: david.lonie at kitware.com (David Lonie) Date: Fri, 4 Nov 2016 12:13:05 -0400 Subject: [vtkusers] "no override found for 'vtkPolyDataMapper'" In-Reply-To: References: Message-ID: On Fri, Nov 4, 2016 at 11:12 AM, Priya Vashistha wrote: > Thanks Dave, but I am not sure how to check that. Any suggestions? > > I'm afraid I don't know enough about windows development to answer that. Someone on the list should know more, but linked libraries are usually specified in the build configuration, and I think you can use Dependency Walker to identify libraries required by an existing executable. HTH, Dave > Thank you, > Priya > > On Nov 4, 2016 9:21 AM, "David Lonie" wrote: > >> Make sure your executable is linked to either the vtkRenderingOpenGL or >> vtkRenderingOpenGL2 library, depending on which backend you're using. Those >> provide the class override for vtkPolyDataMapper. >> >> HTH, >> Dave >> >> On Thu, Nov 3, 2016 at 10:49 PM, Priya Vashistha < >> priyavashistha2 at gmail.com> wrote: >> >>> Hey Guys, >>> >>> Has anyone been able to find a solution to the following: >>> >>> Generic Warning: In /home/direction/Downloads/VTK- >>> 7.0.0/Rendering/Core/vtkPolyDataMapper.cxx, line 28 >>> Error: no override found for 'vtkPolyDataMapper'. >>> >>> I am using VTK7.0.0 (on win 10) and running a project in Visual studio >>> 15 express. This error appears in vtkOutputWindow. >>> >>> I saw that this has also been posted on forum online but I wasn't able >>> to find a clear solution. >>> >>> Any help would be greatly appreciated. >>> >>> Thank You, >>> Priya >>> >>> >>> _______________________________________________ >>> 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 mikewithascarf at yahoo.com Fri Nov 4 14:12:44 2016 From: mikewithascarf at yahoo.com (Mike Withascarf) Date: Fri, 4 Nov 2016 18:12:44 +0000 (UTC) Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> <291182218.684905.1478207190025@mail.yahoo.com> Message-ID: <1642251263.346557.1478283164934@mail.yahoo.com> That does appear to have solved it. Thanks for all your help! Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Friday, November 4, 2016 9:10 AM Subject: Re: [vtkusers] QT VTK OpenGL errors Awesome!? Given the changes you made I'm 90% sure I know what the problem is and it is a fairly easy fix. Here is a merge request that contains a fix (not tested on your example so if you have a sec to test it please do) https://gitlab.kitware.com/vtk/vtk/merge_requests/2144 On Thu, Nov 3, 2016 at 5:06 PM, Mike Withascarf wrote: In order to reproduce the issue in the latest version of VTK, take the same example I posted before but this time also add a caption to the rendering each time addsphere is called (code below). Then follow the same steps of pushing the button and interacting with the spheres, and it reliably produces the error for me. #include "SideBySideRenderWindowsQt.h"?#include #include void addsphere(vtkSmartPointer< vtkRenderWindow> renwin)?{?? ? ? ? vtkSmartPointer< vtkSphereSource> sphereSource =?? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();?? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);?? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper> mapper =?? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();?? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer actor =?? ? ? ? ? ? ? ? vtkSmartPointer:: New();?? ? ? ? actor->SetMapper(mapper);? vtkSmartPointer actor_text = vtkSmartPointer: :New(); std::string caption; caption = "Testing"; actor_text->SetInput(caption. c_str()); actor_text->SetPosition(8, 8); actor_text->GetTextProperty()- >SetFontSize(11); actor_text->GetTextProperty()- >SetColor(1.0, 1.0, 1.0); ? ? ? ? vtkSmartPointer ren = vtkSmartPointer:: New();?? ? ? ? ren->AddActor(actor);? ren->AddActor(actor_text);? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);?? ? ? ? renwin->Render();?}? void clear(vtkSmartPointer< vtkRenderWindow> renwin)?{?? ? ? ? // clear renderer?? ? ? ? vtkSmartPointer ren =?? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();?? ? ? ? if (ren)?? ? ? ? {?? ? ? ? ? ? ? ? ren->RemoveAllViewProps();?? ? ? ? ? ? ? ? renwin->Render();?? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);?? ? ? ? }?}? // Constructor?SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()?{?? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots?? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));?}? void SideBySideRenderWindowsQt:: slot_b1()?{?? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());?? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());?? ? ? ??? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());?? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();?}? void SideBySideRenderWindowsQt:: slotExit()?{?? qApp->exit();?}? From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 9:21 PM Subject: Re: [vtkusers] QT VTK OpenGL errors Ahh, it very well may be fixed in VTK now. I definitely added some new ways of handling freeing resources to avoid the type of issue you are bumping into. On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf wrote: I'm on 7.0.0 currently. Mike From: Ken Martin To: Mike Withascarf Cc: Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 8:59 PM Subject: Re: [vtkusers] QT VTK OpenGL errors What version of VTK are you using? There were some fixes related to that type of issue a few weeks ago. Thanks!Ken On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers wrote: That's right, the problem only happens if there are more than one QVTKWidget.? I've managed to create a fairly simple example to reproduce the problem:? https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU It's a very basic modification of the SideBySideRenderWindowsQt example provided by VTK. I've simply added a button, and when it's clicked it will clear the left window and add a sphere, then clear the right window and add a sphere. If I do the following it produces the OpenGL errors every time for me:? 1. Click the button.? 2. Manually rotate both spheres.? 3. Click the button.? 4. Manually rotate both spheres.? 5. Click the button.? 6. Manually rotate both spheres. (You'll get the errors here)? Here's the code below. Interestingly if I move both clear calls before both of the addsphere calls it works fine. Unfortunately that approach won't work for my app (needs to be able to change a single window).? #include "SideBySideRenderWindowsQt.h"? void addsphere(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? vtkSmartPointer< vtkSphereSource>?sphereSource =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkSphereSource>::New();? ? ? ? ? sphereSource->SetCenter(0.0, 0.0, 0.0);? ? ? ? ? sphereSource->SetRadius(5.0);? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>?mapper =? ? ? ? ? ? ? ? ? vtkSmartPointer< vtkPolyDataMapper>::New();? ? ? ? ? mapper->SetInputConnection( sphereSource->GetOutputPort()) ;? ? ? ? ? vtkSmartPointer? actor =? ? ? ? ? ? ? ? ? vtkSmartPointer:: New();? ? ? ? ? actor->SetMapper(mapper);? ? ? ? ? vtkSmartPointer? ren = vtkSmartPointer:: New();? ? ? ? ? ren->AddActor(actor);? ? ? ? ? ren->ResetCameraClippingRange( );? ? ? ? ? renwin->AddRenderer(ren);? ? ? ? ? renwin->Render();? }? void clear(vtkSmartPointer< vtkRenderWindow>?renwin)? {? ? ? ? ? // clear renderer? ? ? ? ? vtkSmartPointer? ren =? ? ? ? ? ? ? ? ? renwin->GetRenderers()-> GetFirstRenderer();? ? ? ? ? if (ren)? ? ? ? ? {? ? ? ? ? ? ? ? ? ren->RemoveAllViewProps();? ? ? ? ? ? ? ? ? renwin->Render();? ? ? ? ? ? ? ? ? renwin->RemoveRenderer(ren);? ? ? ? ? }? }? // Constructor? SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt()? {? ? this->setupUi(this);? ? QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1()));? ? // Set up action signals and slots? ? connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));? }? void SideBySideRenderWindowsQt:: slot_b1()? {? ? ? ? ? clear(this->qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? addsphere(this-> qvtkWidgetLeft-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetLeft-> GetRenderWindow()->Render();? ? ? ? ? clear(this->qvtkWidgetRight-> GetRenderWindow());? ? ? ? ?? ? ? ? ? addsphere(this-> qvtkWidgetRight-> GetRenderWindow());? ? ? ? ? this->qvtkWidgetRight-> GetRenderWindow()->Render();? }? void SideBySideRenderWindowsQt:: slotExit()? {? ? qApp->exit();? }? From: Thales Luis Rodrigues Sabino To: Mike Withascarf Cc: "vtkusers at vtk.org" Sent: Tuesday, November 1, 2016 7:19 PM Subject: Re: [vtkusers] QT VTK OpenGL errors This looks like an OpenGL resource sharing issue. I don't know exactly how VTK handles multiples windows in a Qt application but it looks like it is trying to bind a texture that is not registered in a certain context. Can tell if this happens when you have a single window or this happens only when you add a second window? On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers wrote: I'm using QT with VTK for a fairly complex application. Everything works fine normally, but if I try to use a function to 'clear' the QVTKWidget, and then add a new pipeline, I run into lots of OpenGL errors. What would be the appropriate way to clear the window/renderer? Here is the code I've been trying, where window is of type QVTKWidget: vtkSmartPointer ren_old = window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from renderer if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) window->GetRenderWindow()-> Render(); // Update the window so it is blank if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove the renderer I'm using multiple QVTKWidgets in one app, and each might have a pipeline that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are the OpenGL errors reported in the vtkOutputWindow: ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL errors detected ? 0 : (1282) Invalid operation ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL errors detected ? 0 : (1282) Invalid operation ______________________________ _________________ 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 -- Thales Luis Rodrigues Sabino PhD Student at?PGMC-UFJFLattes | LinkedIn | ResearchGate ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -- Ken Martin PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Nov 4 14:14:20 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 4 Nov 2016 14:14:20 -0400 Subject: [vtkusers] QT VTK OpenGL errors In-Reply-To: <1642251263.346557.1478283164934@mail.yahoo.com> References: <1010687120.2146639.1478038504220.ref@mail.yahoo.com> <1010687120.2146639.1478038504220@mail.yahoo.com> <466269722.6367.1478044883728@mail.yahoo.com> <625852627.56514.1478049630378@mail.yahoo.com> <291182218.684905.1478207190025@mail.yahoo.com> <1642251263.346557.1478283164934@mail.yahoo.com> Message-ID: Great, thanks for your help in tracking it down! On Fri, Nov 4, 2016 at 2:12 PM, Mike Withascarf wrote: > That does appear to have solved it. Thanks for all your help! > > Mike > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Friday, November 4, 2016 9:10 AM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > Awesome! Given the changes you made I'm 90% sure I know what the problem > is and it is a fairly easy fix. Here is a merge request that contains a fix > (not tested on your example so if you have a sec to test it please do) > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2144 > > > > On Thu, Nov 3, 2016 at 5:06 PM, Mike Withascarf > wrote: > > In order to reproduce the issue in the latest version of VTK, take the > same example I posted before but this time also add a caption to the > rendering each time addsphere is called (code below). Then follow the same > steps of pushing the button and interacting with the spheres, and it > reliably produces the error for me. > > #include "SideBySideRenderWindowsQt.h" > #include > #include > > void addsphere(vtkSmartPointer< vtkRenderWindow> renwin) > { > vtkSmartPointer< vtkSphereSource> sphereSource = > vtkSmartPointer< vtkSphereSource>::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer< vtkPolyDataMapper> mapper = > vtkSmartPointer< vtkPolyDataMapper>::New(); > mapper->SetInputConnection( sphereSource->GetOutputPort()) ; > > vtkSmartPointer actor = > vtkSmartPointer:: New(); > actor->SetMapper(mapper); > vtkSmartPointer actor_text = vtkSmartPointer: > :New(); > std::string caption; > caption = "Testing"; > actor_text->SetInput(caption. c_str()); > actor_text->SetPosition(8, 8); > actor_text->GetTextProperty()- >SetFontSize(11); > actor_text->GetTextProperty()- >SetColor(1.0, 1.0, 1.0); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->AddActor(actor_text); > ren->ResetCameraClippingRange( ); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer< vtkRenderWindow> renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()-> GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt:: slot_b1() > { > clear(this->qvtkWidgetLeft-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetLeft-> GetRenderWindow()); > this->qvtkWidgetLeft-> GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetRight-> GetRenderWindow()); > this->qvtkWidgetRight-> GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt:: slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Tuesday, November 1, 2016 9:21 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > Ahh, it very well may be fixed in VTK now. I definitely added some new > ways of handling freeing resources to avoid the type of issue you are > bumping into. > > On Tue, Nov 1, 2016 at 9:20 PM, Mike Withascarf > wrote: > > I'm on 7.0.0 currently. > > Mike > > > ------------------------------ > *From:* Ken Martin > *To:* Mike Withascarf > *Cc:* Thales Luis Rodrigues Sabino ; "vtkusers at vtk.org" > > *Sent:* Tuesday, November 1, 2016 8:59 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > What version of VTK are you using? There were some fixes related to that > type of issue a few weeks ago. > > Thanks! > Ken > > On Tue, Nov 1, 2016 at 8:01 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > That's right, the problem only happens if there are more than one > QVTKWidget. > > I've managed to create a fairly simple example to reproduce the problem: > > https://drive.google.com/open? id=0BxalkOjn2_ PecG5kUUZrN2djMlU > > > It's a very basic modification of the SideBySideRenderWindowsQt example > provided by VTK. I've simply added a button, and when it's clicked it will > clear the left window and add a sphere, then clear the right window and add > a sphere. If I do the following it produces the OpenGL errors every time > for me: > > 1. Click the button. > 2. Manually rotate both spheres. > 3. Click the button. > 4. Manually rotate both spheres. > 5. Click the button. > 6. Manually rotate both spheres. (You'll get the errors here) > > Here's the code below. Interestingly if I move both clear calls before > both of the addsphere calls it works fine. Unfortunately that approach > won't work for my app (needs to be able to change a single window). > > > #include "SideBySideRenderWindowsQt.h" > > void addsphere(vtkSmartPointer< vtkRenderWindow> renwin) > { > vtkSmartPointer< vtkSphereSource> sphereSource = > vtkSmartPointer< vtkSphereSource>::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > > vtkSmartPointer< vtkPolyDataMapper> mapper = > vtkSmartPointer< vtkPolyDataMapper>::New(); > mapper->SetInputConnection( sphereSource->GetOutputPort()) ; > > vtkSmartPointer actor = > vtkSmartPointer:: New(); > actor->SetMapper(mapper); > > vtkSmartPointer ren = vtkSmartPointer:: > New(); > ren->AddActor(actor); > ren->ResetCameraClippingRange( ); > > renwin->AddRenderer(ren); > renwin->Render(); > } > > void clear(vtkSmartPointer< vtkRenderWindow> renwin) > { > // clear renderer > vtkSmartPointer ren = > renwin->GetRenderers()-> GetFirstRenderer(); > if (ren) > { > ren->RemoveAllViewProps(); > renwin->Render(); > renwin->RemoveRenderer(ren); > } > } > > // Constructor > SideBySideRenderWindowsQt:: SideBySideRenderWindowsQt() > { > this->setupUi(this); > > QObject::connect(b1, SIGNAL(released()), this, SLOT(slot_b1())); > > // Set up action signals and slots > connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); > } > > void SideBySideRenderWindowsQt:: slot_b1() > { > clear(this->qvtkWidgetLeft-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetLeft-> GetRenderWindow()); > this->qvtkWidgetLeft-> GetRenderWindow()->Render(); > > clear(this->qvtkWidgetRight-> GetRenderWindow()); > > addsphere(this-> qvtkWidgetRight-> GetRenderWindow()); > this->qvtkWidgetRight-> GetRenderWindow()->Render(); > } > > void SideBySideRenderWindowsQt:: slotExit() > { > qApp->exit(); > } > > > ------------------------------ > *From:* Thales Luis Rodrigues Sabino > *To:* Mike Withascarf > *Cc:* "vtkusers at vtk.org" > *Sent:* Tuesday, November 1, 2016 7:19 PM > *Subject:* Re: [vtkusers] QT VTK OpenGL errors > > This looks like an OpenGL resource sharing issue. I don't know exactly how > VTK handles multiples windows in a Qt application but it looks like it is > trying to bind a texture that is not registered in a certain context. > > Can tell if this happens when you have a single window or this happens > only when you add a second window? > > On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers < > vtkusers at vtk.org> wrote: > > I'm using QT with VTK for a fairly complex application. Everything works > fine > normally, but if I try to use a function to 'clear' the QVTKWidget, and > then > add a new pipeline, I run into lots of OpenGL errors. What would be the > appropriate way to clear the window/renderer? Here is the code I've been > trying, where window is of type QVTKWidget: > > vtkSmartPointer ren_old = > window->GetRenderWindow()-> GetRenderers()-> GetFirstRenderer(); > if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from > renderer > if (window->isVisible() && window->GetRenderWindow()-> IsDrawable()) > window->GetRenderWindow()-> Render(); // Update the window so it is blank > if (ren_old) window->GetRenderWindow()-> RemoveRenderer(ren_old); // Remove > the renderer > > > > I'm using multiple QVTKWidgets in one app, and each might have a pipeline > that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are > the OpenGL errors reported in the vtkOutputWindow: > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 540 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL > errors > detected > 0 : (1282) Invalid operation > > > ERROR: In C:\vtk\src\Rendering\OpenGL2\ vtkTextureObject.cxx, line 554 > vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1282) Invalid operation > > ______________________________ _________________ > 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 > > > > > > -- > Thales Luis Rodrigues Sabino > > PhD Student at PGMC-UFJF > Lattes | LinkedIn > | ResearchGate > > > > > ______________________________ _________________ > 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 sur.chiranjib at gmail.com Fri Nov 4 15:12:22 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Sat, 5 Nov 2016 00:42:22 +0530 Subject: [vtkusers] Add new vertexes inside 3D structure In-Reply-To: <1478206396407-5741038.post@n5.nabble.com> References: <1478153171718-5741022.post@n5.nabble.com> <1478154144718-5741024.post@n5.nabble.com> <1478206396407-5741038.post@n5.nabble.com> Message-ID: I think the best way to understand and learn is to run the example and then start tunning parameters in the example code to get a much better feeling and understanding of the function calls. I wish I have time to do it and show some cases to you :( Best wishes. HTH, Chiranjib On Fri, Nov 4, 2016 at 2:23 AM, jaki19 wrote: > the documentations are not very clear for me, I don't understand the result > where are my polys?? > > > > vtkSTLReader reader = new vtkSTLReader(); > reader.SetFileName(path3d); > > reader.Update(); > vtkPolyData input = new vtkPolyData(); > input = reader.GetOutput(); > > System.out.println("Before subdivision" ); > System.out.println("-----------------"); > System.out.print("points: "+input.GetNumberOfPoints() + > "\n");/---->points: 4500/ > System.out.print("polys: "+input.GetNumberOfPolys() + > "\n");/------>polys: 6580/ > System.out.println("Cells: > "+input.GetNumberOfCells());/------>Cells: 6580/ > System.out.println("verts: > "+input.GetNumberOfVerts());/------>verts: 0/ > System.out.println("lines: > "+input.GetNumberOfLines());/------>lines: 0/ > System.out.println("Strips: > "+input.GetNumberOfStrips());------>Strips: 0 > System.out.println("pieces: > "+input.GetNumberOfPieces());------>pieces: 1 > > vtkRandomAttributeGenerator rag =new > vtkRandomAttributeGenerator(); > rag.SetInputData(input); > > > vtkTessellatorFilter tesla= new vtkTessellatorFilter(); > tesla.SetInputConnection(rag.GetOutputPort()); > tesla.MergePointsOn(); > tesla.Update(); > > for ( int odim = 1; odim < 4; ++odim ) > { > tesla.SetOutputDimension( odim ); > tesla.Update(); > } > > tesla.MergePointsOff(); > tesla.Update(); > > > vtkPolyData subdivised = new vtkPolyData(); > subdivised.ShallowCopy(tesla.GetOutput()); > > > System.out.println("After Tessellation" ); > System.out.println("-----------------"); > System.out.print("points"+subdivised.GetNumberOfPoints() + > "\n"); ---->points: 19740 > System.out.print("polys"+subdivised.GetNumberOfPolys() + > "\n");------>polys:0 > > System.out.println("Cells"+subdivised.GetNumberOfCells());------>Cells: 0 > > System.out.println("verts"+subdivised.GetNumberOfVerts());------>verts: 0 > > System.out.println("lines"+subdivised.GetNumberOfLines());------>lines: 0 > > System.out.println("Strips"+subdivised.GetNumberOfStrips());------>Strips: > 0 > > System.out.println("pieces"+subdivised.GetNumberOfPieces());------>pieces: > 1 > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Add-new-vertexes-inside-3D-structure-tp5741022p5741038.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 daviddoria at gmail.com Fri Nov 4 16:11:09 2016 From: daviddoria at gmail.com (David Doria) Date: Fri, 4 Nov 2016 15:11:09 -0500 Subject: [vtkusers] Speed up strategies for ray casting using vtkOBBTree? In-Reply-To: <1478273274390-5741052.post@n5.nabble.com> References: <1478273274390-5741052.post@n5.nabble.com> Message-ID: On Fri, Nov 4, 2016 at 10:27 AM, BBerco wrote: > Dear all, > I'm working on some ray casting applications with the help of vtkOBBTree. > This class does a fine job as it is easy to use and does exactly what I > want, but I was wondering if I could speed up the ray-casting process when > large data sets are involved. > > I am dealing with ray-tracing from a LIDAR focal plane comprised of 128 x > 128 elements to a target potentially comprised of hundreds of thousands of > vertices (833538 in my example). Illuminating it with each of the 128 x 128 > = 16384 pixels in the focal plane takes more than 15 minutes (as my timer > is > still running!). Obviously this is a computationally intensive problem, but > I was wondering if there were some alternative strategies that could speed > up the process. > > Specifically, because I am casting each ray by going through the focal > plane > rows by rows, the facet hit by the ray corresponding to pixel [i,j] should > be pretty close to the facet hit by the ray coming from pixel[i,j+1] (if > not the same). So here's my first question: is their a way to restrict the > ray-facet intersect search to the neighbors of a given facet? This way, > only > the very first pixel of the focal plane would require a global search > through the vtkOBBTree: the rest of the intersects could be searched inside > the neighbors of the impacted cells (and not inside the complete shape). > > I guess I could somehow implement manually, but i'd rather not reinvent the > wheel. > > Besides this idea, if there any ray casting strategy using built-in VTK > features more adapted to large datasets such as those I am dealing with? > > Thanks! > > Ben > If you're intersecting rays with meshes, try vtkModifiedBSPTree - it is (or at least used to be) much faster. https://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTreeIntersectWithLine David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Fri Nov 4 20:03:19 2016 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 4 Nov 2016 17:03:19 -0700 (MST) Subject: [vtkusers] Speed up strategies for ray casting using vtkOBBTree? In-Reply-To: References: <1478273274390-5741052.post@n5.nabble.com> Message-ID: <1478304199270-5741064.post@n5.nabble.com> David, huge improvement indeed, thanks! I am going to try to see if I can implement the method I mentioned earlier. I'm pretty sure I can get an even faster process by only retaining cells neighbouring the one impacted by the first ray. Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/Speed-up-strategies-for-ray-casting-using-vtkOBBTree-tp5741052p5741064.html Sent from the VTK - Users mailing list archive at Nabble.com. From f_magician at mac.com Sat Nov 5 09:56:03 2016 From: f_magician at mac.com (Magician) Date: Sat, 05 Nov 2016 22:56:03 +0900 Subject: [vtkusers] Partitioning VTK PolyData for Multi-Processing Message-ID: <0FED05ED-4466-458A-8194-D2F08A2B3EFC@mac.com> Hi all, I'm using VTK 7.1.0 (pvpython with ParaView 5.2.0 RC3) for processing VTK PolyData. The data consists of billions of point coordinates, point cells and point values. I'd like to partition the data for multi-processing, but there are not enough informations. Now I'm splitting data and writing *.pvtp files manually. Is there a easy way to convert *.vtp to *.pvtp includes several partitions, or extract data by rectangular (or other geometric) regions? Magician From bakkari.abdelkhalek at hotmail.fr Mon Nov 7 08:55:06 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 7 Nov 2016 13:55:06 +0000 Subject: [vtkusers] Mouse release and mapping (x,y) to slice (i,j) In-Reply-To: References: Message-ID: Dear VTK users, I am using QT and VTK. I created a mouse release method to use it inside a QVTKWidget : void MyQVTKWidget::mouseReleaseEvent(QMouseEvent* event) { if (pMainWindow) { ((MainWindow *)pMainWindow)->myMouseReleaseEvent(event); } // call the super class to avoid troubles QVTKWidget::mouseReleaseEvent(event); } Now, I would like to map (x,y) to slice (i,j). Generally, mouse position should be mapped into ( i, j) of current slice. It depends on the zoom factor, aspect ratio of the slice and the window size. But, I am wondering about how can I solve this issue. Thanks in advance! Best regards, Abdelkhalek Bakkari Ph.D candidate in Computer Science Institute of Applied Computer Science Lodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Mon Nov 7 09:13:49 2016 From: inglis.dl at gmail.com (Dean Inglis) Date: Mon, 7 Nov 2016 09:13:49 -0500 Subject: [vtkusers] Mouse release and mapping (x,y) to slice (i,j) In-Reply-To: References: Message-ID: Hi here's one way to do what you want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/PickingAPixel2 You do not have to involve Qt events ... add a VTK callback that listens to VTK events. - Dean On Mon, Nov 7, 2016 at 8:55 AM, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > > Dear VTK users, > > > > I am using QT and VTK. I created a mouse release method to use it inside a > QVTKWidget : > > void MyQVTKWidget::mouseReleaseEvent(QMouseEvent* event) > > { > > if (pMainWindow){ > > ((MainWindow *)pMainWindow)->myMouseReleaseEvent(event);} > > // call the super class to avoid troubles > > QVTKWidget::mouseReleaseEvent(event); > > } > > Now, I would like to map (x,y) to slice (i,j). Generally, mouse position > should be mapped into ( i, j) of current slice. It depends on the zoom > factor, aspect ratio of the slice and the window size. > > > But, I am wondering about how can I solve this issue. > > > > Thanks in advance! > Best regards, > > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > > > > _______________________________________________ > 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 bakkari.abdelkhalek at hotmail.fr Mon Nov 7 09:53:59 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 7 Nov 2016 14:53:59 +0000 Subject: [vtkusers] Mouse release and mapping (x,y) to slice (i,j) In-Reply-To: References: , Message-ID: Hi Dean, Thank you for your help. This example is not suitable with what I am asking about. Abdelkhalek Bakkari Ph.D candidate in Computer Science Institute of Applied Computer Science Lodz University of Technology, Poland ________________________________ From: Dean Inglis Sent: 07 November 2016 15:13 To: Abdelkhalek Bakkari Cc: VTK Mailing List Subject: Re: [vtkusers] Mouse release and mapping (x,y) to slice (i,j) Hi here's one way to do what you want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/PickingAPixel2 You do not have to involve Qt events ... add a VTK callback that listens to VTK events. - Dean On Mon, Nov 7, 2016 at 8:55 AM, Abdelkhalek Bakkari > wrote: Dear VTK users, I am using QT and VTK. I created a mouse release method to use it inside a QVTKWidget : void MyQVTKWidget::mouseReleaseEvent(QMouseEvent* event) { if (pMainWindow) { ((MainWindow *)pMainWindow)->myMouseReleaseEvent(event); } // call the super class to avoid troubles QVTKWidget::mouseReleaseEvent(event); } Now, I would like to map (x,y) to slice (i,j). Generally, mouse position should be mapped into ( i, j) of current slice. It depends on the zoom factor, aspect ratio of the slice and the window size. But, I am wondering about how can I solve this issue. Thanks in advance! Best regards, Abdelkhalek Bakkari Ph.D candidate in Computer Science Institute of Applied Computer Science Lodz University of Technology, Poland _______________________________________________ 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 zloy.smiertniy2 at gmail.com Tue Nov 8 04:23:04 2016 From: zloy.smiertniy2 at gmail.com (Leslie Solorzano) Date: Tue, 8 Nov 2016 10:23:04 +0100 Subject: [vtkusers] Fwd: VTK coloring tube filter with connectivity information In-Reply-To: References: Message-ID: Hello. I hope I am going in the right direction here I have a molecule I want to represent with spheres and tubes connecting them. I'd like to color the tubes according to connectivity information. Meaning that I have various disconnected regions or disconnected components I would like to color differently per region. So far I have this, in python and it works. I have commented what I tried to do to achieve this. The variable data is a PolyData array that contains points, scalars and cells with the connectivity information. tube = vtk.vtkTubeFilter() tube.SetInput(data) tube.SetNumberOfSides(5); #tube.SetVaryRadiusToVaryRadiusByAbsoluteScalar() tube.SetVaryRadiusToVaryRadiusOff() tube.SetRadius(0.1) """appendFilter = vtk.vtkAppendPolyData() appendFilter.AddInputConnection(tube.GetOutputPort()) appendFilter.Update() connectivityFilter = vtk.vtkPolyDataConnectivityFilter() connectivityFilter.SetInputConnection(appendFilter.GetOutput()) connectivityFilter.ScalarConnectivityOn() connectivityFilter.FullScalarConnectivityOn() connectivityFilter.SetExtractionModeToAllRegions() connectivityFilter.ColorRegionsOn() connectivityFilter.Update() """ #print (connectivityFilter.GetNumberOfExtractedRegions()) tubeMapper = vtk.vtkPolyDataMapper() tubeMapper.SetInputConnection(tube.GetOutputPort()) tubeMapper.Update() And this is how it looks so far. https://i.stack.imgur.com/XnmrO.png The connectivity filter actually works and finds all the connected components I just have not figured out how to color the tubes with a different color each. Thank you world -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.zimmer at rwth-aachen.de Tue Nov 8 13:08:40 2016 From: andre.zimmer at rwth-aachen.de (Andre Zimmer) Date: Tue, 8 Nov 2016 19:08:40 +0100 Subject: [vtkusers] HELP Wanted: Visualizing data from an OpenFOAM simulation Message-ID: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> Hi, by now I have spend days trying to visualize data from the OpenFOAM sample function object. Here is a small test case: https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 No matter what I do I always get a gray car. I have tried specifically setting the scalar, vector, array, transforming and all kinds of stuff without success. In the simplest form I think the Python code should look like this: import vtk file_name = "U_nearWalls.vtk" reader = vtk.vtkPolyDataReader() reader.SetFileName(file_name) reader.ReadAllScalarsOn() reader.ReadAllVectorsOn() reader.Update() mapper=vtk.vtkPolyDataMapper() mapper.SetInputConnection(reader.GetOutputPort()) actor=vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(0.1, 0.2, 0.4) render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) render_window.SetSize(300, 300) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(render_window) interactor.Initialize() render_window.Render() interactor.Start() I am using Fedora 24, Python 2.7, VTK 6.3. I assume it is only a small mistake I am making so hopefully someone can help. Thank you in advance, Andr? From bill.lorensen at gmail.com Tue Nov 8 14:52:57 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 8 Nov 2016 14:52:57 -0500 Subject: [vtkusers] HELP Wanted: Visualizing data from an OpenFOAM simulation In-Reply-To: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> References: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> Message-ID: You need to set the active scalar for the point data and specify the range of the scalars for the mapper. See: #! import vtk file_name = "U_nearWalls.vtk" reader = vtk.vtkPolyDataReader() reader.SetFileName(file_name) reader.ReadAllScalarsOn() reader.ReadAllVectorsOn() reader.Update() reader.GetOutput().GetPointData().SetActiveScalars("U") mapper=vtk.vtkPolyDataMapper() mapper.SetInputConnection(reader.GetOutputPort()) mapper.SetScalarRange(reader.GetOutput().GetPointData().GetScalars().GetRange()) actor=vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(0.1, 0.2, 0.4) render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) render_window.SetSize(300, 300) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(render_window) interactor.Initialize() render_window.Render() interactor.Start() On Tue, Nov 8, 2016 at 1:08 PM, Andre Zimmer wrote: > Hi, > by now I have spend days trying to visualize data from the OpenFOAM sample > function object. > Here is a small test case: > https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 > > No matter what I do I always get a gray car. I have tried specifically > setting the scalar, vector, array, transforming and all kinds of stuff > without success. > In the simplest form I think the Python code should look like this: > > import vtk > file_name = "U_nearWalls.vtk" > > reader = vtk.vtkPolyDataReader() > reader.SetFileName(file_name) > reader.ReadAllScalarsOn() > reader.ReadAllVectorsOn() > reader.Update() > > mapper=vtk.vtkPolyDataMapper() > mapper.SetInputConnection(reader.GetOutputPort()) > > actor=vtk.vtkActor() > actor.SetMapper(mapper) > > renderer = vtk.vtkRenderer() > renderer.AddActor(actor) > renderer.SetBackground(0.1, 0.2, 0.4) > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > render_window.SetSize(300, 300) > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(render_window) > > interactor.Initialize() > render_window.Render() > interactor.Start() > > > I am using Fedora 24, Python 2.7, VTK 6.3. > I assume it is only a small mistake I am making so hopefully someone can > help. > > Thank you in advance, > Andr? > _______________________________________________ > 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 Tue Nov 8 14:54:18 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 8 Nov 2016 14:54:18 -0500 Subject: [vtkusers] HELP Wanted: Visualizing data from an OpenFOAM simulation In-Reply-To: References: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> Message-ID: Andre, BTW: Thanks for providing a runnable script and data. Makes it easier to help. Enjoy VTK, Bill On Tue, Nov 8, 2016 at 2:52 PM, Bill Lorensen wrote: > You need to set the active scalar for the point data and specify the > range of the scalars for the mapper. > > See: > #! > import vtk > file_name = "U_nearWalls.vtk" > > reader = vtk.vtkPolyDataReader() > reader.SetFileName(file_name) > reader.ReadAllScalarsOn() > reader.ReadAllVectorsOn() > reader.Update() > reader.GetOutput().GetPointData().SetActiveScalars("U") > mapper=vtk.vtkPolyDataMapper() > mapper.SetInputConnection(reader.GetOutputPort()) > mapper.SetScalarRange(reader.GetOutput().GetPointData().GetScalars().GetRange()) > actor=vtk.vtkActor() > actor.SetMapper(mapper) > > renderer = vtk.vtkRenderer() > renderer.AddActor(actor) > renderer.SetBackground(0.1, 0.2, 0.4) > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > render_window.SetSize(300, 300) > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(render_window) > > interactor.Initialize() > render_window.Render() > interactor.Start() > > On Tue, Nov 8, 2016 at 1:08 PM, Andre Zimmer > wrote: >> Hi, >> by now I have spend days trying to visualize data from the OpenFOAM sample >> function object. >> Here is a small test case: >> https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 >> >> No matter what I do I always get a gray car. I have tried specifically >> setting the scalar, vector, array, transforming and all kinds of stuff >> without success. >> In the simplest form I think the Python code should look like this: >> >> import vtk >> file_name = "U_nearWalls.vtk" >> >> reader = vtk.vtkPolyDataReader() >> reader.SetFileName(file_name) >> reader.ReadAllScalarsOn() >> reader.ReadAllVectorsOn() >> reader.Update() >> >> mapper=vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(reader.GetOutputPort()) >> >> actor=vtk.vtkActor() >> actor.SetMapper(mapper) >> >> renderer = vtk.vtkRenderer() >> renderer.AddActor(actor) >> renderer.SetBackground(0.1, 0.2, 0.4) >> render_window = vtk.vtkRenderWindow() >> render_window.AddRenderer(renderer) >> render_window.SetSize(300, 300) >> interactor = vtk.vtkRenderWindowInteractor() >> interactor.SetRenderWindow(render_window) >> >> interactor.Initialize() >> render_window.Render() >> interactor.Start() >> >> >> I am using Fedora 24, Python 2.7, VTK 6.3. >> I assume it is only a small mistake I am making so hopefully someone can >> help. >> >> Thank you in advance, >> Andr? >> _______________________________________________ >> 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 nour_sn at hotmail.fr Tue Nov 8 15:36:02 2016 From: nour_sn at hotmail.fr (jaki19) Date: Tue, 8 Nov 2016 13:36:02 -0700 (MST) Subject: [vtkusers] How to change the position of vertex of an stl file? Message-ID: <1478637362454-5741103.post@n5.nabble.com> Hello, How can I change the position of a vertex connected with several triangles and maintaining the connectivity of my structure? vtkSTLReader reader = new vtkSTLReader(); reader.SetFileName(path3D); reader.Update(); vtkPolyData input=new vtkPolyData(); input=reader.GetOutput(); Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-change-the-position-of-vertex-of-an-stl-file-tp5741103.html Sent from the VTK - Users mailing list archive at Nabble.com. From chris.marsh at usask.ca Tue Nov 8 18:15:03 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 8 Nov 2016 17:15:03 -0600 Subject: [vtkusers] Extra meta data in pvd Message-ID: Hi, I would like to add some extra meta-data to a pvd file. Specifically, a proj4 string containing information about the coordinate system projection of the data contained in a vtu file. Is there a recommended way to do this? Cheers Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Nov 8 20:11:40 2016 From: tjlp at netease.com (Liu_tj) Date: Wed, 9 Nov 2016 09:11:40 +0800 (CST) Subject: [vtkusers] How to pick a widget object and delete it if there are several kinds of widgets on the 3D model Message-ID: <2a153235.1.15846a3f730.Coremail.tjlp@netease.com> Hi, At present in my project, there are point widget, vtkDistanceWidget, vtkCaptionWidget and vtkAnglewidget on the 3D model. How can I know what widget I select and delete it? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Nov 9 02:31:17 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 9 Nov 2016 02:31:17 -0500 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Hi Chris, Usually we stuff this kind of data into the generic field data (arrays not associated with points of cells) in the data set. The VTU reader/writer supports reading/writing field data. HTH, Cory On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh wrote: > Hi, > > I would like to add some extra meta-data to a pvd file. Specifically, a > proj4 string containing information about the coordinate system projection > of the data contained in a vtu file. > > Is there a recommended way to do this? > > Cheers > Chris > > _______________________________________________ > 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 f.nellmeldin at open-engineering.com Wed Nov 9 03:26:10 2016 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Wed, 9 Nov 2016 09:26:10 +0100 Subject: [vtkusers] SetActiveVectors when there are many pipelines that use different arrays In-Reply-To: References: Message-ID: Hello. Sorry for the delay. I couldn't find the source of the problem. It seemed like when I did the mirroring, one time the data was mirrored and the next time no. As I saw in the source code of vtkReflectionFilter, only the ActiveVectors are mirrored using reflection filter, and that is a limitation for what I would like to do (because I want to reflect all the vectorial data). Finally, the solution I found was to do the trick of mirroring graphically. This means that I mirror (duplicate and scale (1,-1,1)) the actors of my scene. This works like a charm, and it is faster than doing the reflection on the mesh.. Anyway, problem solved! Thank you very much! On 27 October 2016 at 15:56, Dan Lipsa wrote: > Hi Fernando, > I am not sure what is going on. > I would save VTK datasets at points in your pipeline to narrow down where > the problem is. For instance, save the datasets after the passarray filter. > Also save the datasets before and after your append filter that produces > the wrong result. > You can load those datasets in paraview and to see exactly what you get > after each filter. > > I use the following function in Python. You'll need to convert this to C++. > > def debugWriteGrid(grid, name): > writer = vtk.vtkXMLDataSetWriter() > gridType = grid.GetDataObjectType() > if (gridType == vtk.VTK_STRUCTURED_GRID): > ext = ".vts" > elif (gridType == vtk.VTK_UNSTRUCTURED_GRID): > ext = ".vtu" > elif (gridType == vtk.VTK_POLY_DATA): > ext = ".vtp" > else: > print "Unknown grid type: %d" % gridType > ext = ".vtk" > writer.SetFileName(name + ext) > writer.SetInputData(grid) > writer.Write() > > > > On Thu, Oct 27, 2016 at 4:38 AM, Fernando Nellmeldin engineering.com> wrote: > >> Hello, I am still having problems.... >> I added the casting as you suggested: >> >> ----- >> // given that model is first an UnstructuredGrid1 and then >> UnstructuredGridFull >> vtkSmartPointer passArrays = vtkSmartPointer >> ::New(); >> passArrays->SetInput(model); >> passArrays->UseFieldTypesOn(); // restrict to only pass what I say >> passArrays->AddFieldType(vtkDataObject::POINT); >> passArrays->AddArray(fieldType, "nameOfArray"); >> passArrays->Update(); >> >> // modelForFilter is a vtkUnstructuredGrid >> modelForFilter = vtkUnstructuredGrid::SafeDow >> nCast(passArrays->GetOutput()); // cast to UnstructuredGrid >> modelForFilter->GetPointData()->SetActiveVectors("nameOfArray"); // set >> the active vectors in the new data >> modelForFilter->Update(); >> >> //warping vector is a vtkWarpVector >> warpingVector->SetInputConnection(modelForFilter->GetProducerPort()); >> warpingVector->SetInputArrayToProcess(0, 0, >> 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "nameOfArray"); >> // the rest of the pipeline is the same... >> ----- >> The result is the same. I put some modelForFilter->Print(std::cout) and >> I can see that the selected array is indeed the active vectors... >> >> Other thing I tried: >> modelForFilter->DeepCopy(model); // full copy the model to the new >> modelForFilter->GetPointData()->SetActiveVectors("nameOfArray"); // set >> the active in the new >> modelForFilter->Update(); >> Still, same result. >> >> The only thing that works is: >> modelForFilter = model; >> But of course, here I only copy the vtkSmartPointer and not the data, so >> this is the thing I want to avoid. >> >> Any ideas? >> Thank you! >> >> On 26 October 2016 at 16:54, Dan Lipsa wrote: >> >>> Can you cast the data object to an unstructured grid and then set the >>> active vector on it? Make sure you call update before you do that. >>> >>> Dan >>> >>> >>> On Wed, Oct 26, 2016 at 10:44 AM, Fernando Nellmeldin < >>> f.nellmeldin at open-engineering.com> wrote: >>> >>>> Hello and thank you for your reply! >>>> >>>> After your suggestion, I tried using vtkPassArray, but I can't find how >>>> to set the Active Vectors. The output is a vtkDataObject*, which of course >>>> doesn't have the PointsData and therefore no setActiveVectors. >>>> The result is the same as before, when I change the input to Full, I >>>> see the wrong deformed mesh. >>>> >>>> This is my modified code: >>>> >>>> // given that model is first an UnstructuredGrid1 and then >>>> UnstructuredGridFull >>>> vtkSmartPointer passArrays = >>>> vtkSmartPointer::New(); >>>> passArrays->SetInput(model); >>>> passArrays->UseFieldTypesOn(); // restrict to only pass what I say >>>> passArrays->AddFieldType(vtkDataObject::POINT); >>>> passArrays->AddArray(fieldType, "nameOfArray"); >>>> passArrays->Update(); >>>> >>>> //warping vector is a vtkWarpVector >>>> warpingVector->SetInputConnection(passArrays->GetProducerPort()); >>>> warpingVector->SetInputArrayToProcess(0, 0, >>>> 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "nameOfArray"); // I don't >>>> know why this line is needed to see something >>>> // the rest of the pipeline is the same... >>>> >>>> Am I missing something? >>>> >>>> Thank you. >>>> >>>> >>>> >>>> On 26 October 2016 at 15:40, Dan Lipsa wrote: >>>> >>>>> Fernando, >>>>> Can you try vtkPassArray to pass the proper vector array to each of >>>>> your pipelines? Then you can set the active vector on the output of this >>>>> algorithm. >>>>> >>>>> Dan >>>>> >>>>> >>>>> On Wed, Oct 26, 2016 at 6:23 AM, Fernando Nellmeldin < >>>>> f.nellmeldin at open-engineering.com> wrote: >>>>> >>>>>> Hello. >>>>>> I would like to show the deformed mesh of a model based on the values >>>>>> of a point data array of dimension 3 (vectorial data). >>>>>> >>>>>> I have the following pipeline: >>>>>> UnstructuredGrid1 -> WarpVector -> GeometryFilter -> ExtractEdges -> >>>>>> PolyDataMapper -> Actor >>>>>> In the WarpVector, I call to say which array to use >>>>>> WarpVector->SetInputArrayToProcess(0,0,0, >>>>>> FIELD_ASSOCIATION_POINTS,"nameOfArray"); >>>>>> >>>>>> The first time I load the actor in screen, everything is OK. >>>>>> >>>>>> Later, I would like to mirror the input UnstructuredGrid1 because it >>>>>> represents half the model. So I do the following: >>>>>> UnstructuredGrid1 -> ReflectionFilter -> UnstructuredGrid2 >>>>>> {UnstructuredGrid1, UnstructuredGrid2} -> AppendFilter -> >>>>>> UnstructuredGridFull >>>>>> >>>>>> Then, I replace the input of WarpVector by UnstructuredGridFull, and >>>>>> I reload the actor. >>>>>> However, what I see on screen is the same deformed mesh than before, >>>>>> plus another deformed mesh that is not its mirror, it's something different >>>>>> and not correct, of course. >>>>>> >>>>>> If, however, I call: >>>>>> At the beginning: UnstructuredGrid1->GetPointDat >>>>>> a()->SetActiveVectors("nameOfArray"); >>>>>> After I did the mirroring: UnstructuredGridFull->GetPoint >>>>>> Data()->SetActiveVectors("nameOfArray"); >>>>>> I don't have the problem and everything works OK. >>>>>> >>>>>> Problem is, I don't want to call setActiveVectors because I can have >>>>>> more than one pipeline that makes uses of the same UnstructuredGrid with >>>>>> different vectorial data, and I noticed that each call to setActive* will >>>>>> modify all the pipelines that makes use of the Scalars/Vectors/Tensors. So >>>>>> this doesn't seem an option. >>>>>> >>>>>> What is the alternative to use here to solve the problem? >>>>>> >>>>>> I tried with vtkAssignAttributes but didn't work. >>>>>> vtkSmartPointer aa = >>>>>> vtkSmartPointer::New(); >>>>>> aa->SetInput(UnstructuredGridFull); >>>>>> aa->Assign("nameOfArray", vtkDataSetAttributes::VECTORS, >>>>>> vtkAssignAttribute::POINT_DATA); >>>>>> aa->Update(); >>>>>> >>>>>> And then: >>>>>> AssignAttribute -> WarpVector instead of UnstructuredGridFull -> >>>>>> WarpVector. >>>>>> but same result... >>>>>> >>>>>> Thank you. >>>>>> >>>>>> -- >>>>>> *Fernando NELLMELDIN* >>>>>> Software Engineer >>>>>> *_______________________________________________________________* >>>>>> >>>>>> *Open Engineering s.a.* >>>>>> >>>>>> Rue Bois Saint-Jean 15/1 >>>>>> B-4102 Seraing (Belgium) >>>>>> Tel: +32.4.353.30.34 >>>>>> >>>>>> http://www.open-engineering.com >>>>>> https://www.linkedin.com/company/open-engineering?trk=biz-co >>>>>> mpanies-cym >>>>>> >>>>>> >>>>>> *_________________________________________________________________________* >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> *Fernando NELLMELDIN* >>>> Software Engineer >>>> *_______________________________________________________________* >>>> >>>> *Open Engineering s.a.* >>>> >>>> Rue Bois Saint-Jean 15/1 >>>> B-4102 Seraing (Belgium) >>>> Tel: +32.4.353.30.34 >>>> >>>> http://www.open-engineering.com >>>> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >>>> >>>> >>>> *_________________________________________________________________________* >>>> >>> >>> >> >> >> -- >> *Fernando NELLMELDIN* >> Software Engineer >> *_______________________________________________________________* >> >> *Open Engineering s.a.* >> >> Rue Bois Saint-Jean 15/1 >> B-4102 Seraing (Belgium) >> Tel: +32.4.353.30.34 >> >> http://www.open-engineering.com >> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >> >> >> *_________________________________________________________________________* >> > > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Nov 9 09:39:25 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 9 Nov 2016 09:39:25 -0500 Subject: [vtkusers] Choosing time for vtkOpenFOAMReader In-Reply-To: References: <4add4fb0-cd3a-2278-c64d-10bdcbd8f64f@it.uu.se> Message-ID: The problem appears to be that SetUpdateTimeStep helper method on the vtkAlgorithm was not wrapped in python for some reason so you can't get it directly from reader (or any other algorithm). This is the vtk 6.3 python API. reader.UpdateInformation() outinfo = reader.GetExecutive().GetOutputInformation(0) infkey = vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP() outinfo.Set(infkey, 0.5) reader.Update(). And no worries about being new to VTK, even for an old timer like me it took me some head scratching to figure it out. Yet another reason to try 7.1 if you can. The new API is just: reader->UpdateTimeStep(0.5) David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Nov 3, 2016 at 7:21 AM, Timofey Mukha wrote: > Dear David, > > Thank you for the fast reply! I am trying to use your tip, but since I am > very new to VTK it is not working out well for me. > > Could you elaborate a bit, what would "anAlgorithm" be. A child to > vtkAlgorithm? The thing is none of the objects I create seem to have the > SetUpdateTimeStep() as a member. Browsing doxygen made me think that it is > a member of vtkStreamingDemandDrivenPipeline, is that something I should > have in the script? > > Kind regards, > > Timofey > > On 2016-11-02 18:40, David E DeMarle wrote: > > In vtk 6.3 it was: > anAlgorithm->UpdateInformation(); > anAlgorithm->SetUpdateTimeStep(0.5); > anAlgorithm->Update(); > Try that. > > In vtk 7.1 it is: > anAlgorithm->UpdateTimeSep(0.5); > Since Berk cleaned up the parts of the pipeline that caused issues like > you are seeing. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Nov 2, 2016 at 12:43 PM, Timofey Mukha > wrote: > >> Hello! >> >> I am trying to write a python script for doing some stuff with an >> OpenFOAM case. Everything works great, except that I can't choose the >> time-value that I want the reader to get the data for. >> >> I have found the SetTimeValue() function which is supposed to do the job >> I think, but it doesn't -- the first availbale time-value is always used. >> Here is how I use the reader: >> >> reader = vtk.vtkOpenFOAMReader() >> reader.SetFileName(path) >> reader.CreateCellToPointOff() >> reader.DisableAllPointArrays() >> reader.Update() >> print(vtk_to_numpy(reader.GetTimeValues())) # Grab the available >> timesteps >> reader.SetTimeValue(vtk_to_numpy(reader.GetTimeValues())[-1]) # Try to >> load the latest time >> reader.Update() >> >> I use the version provided by the Anaconda python disstro, 6.3.0 I >> believe. >> >> Thanks in advance, >> >> Timofey >> >> >> _______________________________________________ >> 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 shawnoah.pollock at gmail.com Wed Nov 9 11:32:34 2016 From: shawnoah.pollock at gmail.com (Shawnoah Pollock) Date: Wed, 9 Nov 2016 11:32:34 -0500 Subject: [vtkusers] vtkPolyDataSilhouette to vtkPolyData (in Python) Message-ID: Hello, I am working with VTK 6.3.0 in Python. I am importing an stl model and creating a vtkActor. Then I am taking that actor and creating a silhouette with vtkPolyDataSilhouette. Once I have the silhouette created, I am able to make it map it's output to an actor and render it in the scene. This works just great. My problem is that I also want to create another copy of this silhouette and project it from a specified viewpoint onto a plane. If I could somehow get a vtkPolyData as an output from vtkPolyDataSilhouette, I could do a deepcopy to a new vtkPolyData, do the projection and map that to a new vtkActor. For some reason, everytime I try to get a vtkPolyData from the vtkPolyDataSilhouette it is empty (no cells, no points, no lines, no anything). I am sure I am just missing something simple, but I have been looking for 2 days and am stumped. Doesn't help that I am new to VTK. Here is a code snippet: silhouette = vtk.vtkPolyDataSilhouette() silhouette.ReleaseDataFlagOff() silhouette.SetInputData(actor.GetMapper().GetInputAsDataSet()) silhouette.SetCamera(camera) silhouette.SetEnableFeatureAngle(0) silhouette_mapper = vtk.vtkPolyDataMapper() silhouette_mapper.SetInputConnection(silhouette.GetOutputPort()) silhouette_actor = vtk.vtkActor() silhouette_actor.SetMapper(silhouette_mapper) self.renderer.AddActor(silhouette_actor) self.viewer.Render() To get the vtkPolyData, I have tried polydata = silhouette.GetOutput() as well as silhouette_actor.GetMapper().GetInputAsDataSet(). I've tried to connect the output of the vtkSilhouette to another algorithm and grab the output... nothing seems to return anything but an empty polydata... yet, the silhouette_actor renders as expected. Please help... SHAWN -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Nov 9 13:50:16 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 9 Nov 2016 13:50:16 -0500 Subject: [vtkusers] SetActiveVectors when there are many pipelines that use different arrays In-Reply-To: References: Message-ID: Fernando, Great to hear that you found a solution. Maybe mirroring the data would only be useful if you need to do additional processing. Otherwise your solution is best. Dan On Wed, Nov 9, 2016 at 3:26 AM, Fernando Nellmeldin < f.nellmeldin at open-engineering.com> wrote: > Hello. Sorry for the delay. > I couldn't find the source of the problem. It seemed like when I did the > mirroring, one time the data was mirrored and the next time no. As I saw in > the source code of vtkReflectionFilter, only the ActiveVectors are mirrored > using reflection filter, and that is a limitation for what I would like to > do (because I want to reflect all the vectorial data). > Finally, the solution I found was to do the trick of mirroring > graphically. This means that I mirror (duplicate and scale (1,-1,1)) the > actors of my scene. This works like a charm, and it is faster than doing > the reflection on the mesh.. > > Anyway, problem solved! > Thank you very much! > > On 27 October 2016 at 15:56, Dan Lipsa wrote: > >> Hi Fernando, >> I am not sure what is going on. >> I would save VTK datasets at points in your pipeline to narrow down where >> the problem is. For instance, save the datasets after the passarray filter. >> Also save the datasets before and after your append filter that produces >> the wrong result. >> You can load those datasets in paraview and to see exactly what you get >> after each filter. >> >> I use the following function in Python. You'll need to convert this to >> C++. >> >> def debugWriteGrid(grid, name): >> writer = vtk.vtkXMLDataSetWriter() >> gridType = grid.GetDataObjectType() >> if (gridType == vtk.VTK_STRUCTURED_GRID): >> ext = ".vts" >> elif (gridType == vtk.VTK_UNSTRUCTURED_GRID): >> ext = ".vtu" >> elif (gridType == vtk.VTK_POLY_DATA): >> ext = ".vtp" >> else: >> print "Unknown grid type: %d" % gridType >> ext = ".vtk" >> writer.SetFileName(name + ext) >> writer.SetInputData(grid) >> writer.Write() >> >> >> >> On Thu, Oct 27, 2016 at 4:38 AM, Fernando Nellmeldin < >> f.nellmeldin at open-engineering.com> wrote: >> >>> Hello, I am still having problems.... >>> I added the casting as you suggested: >>> >>> ----- >>> // given that model is first an UnstructuredGrid1 and then >>> UnstructuredGridFull >>> vtkSmartPointer passArrays = >>> vtkSmartPointer::New(); >>> passArrays->SetInput(model); >>> passArrays->UseFieldTypesOn(); // restrict to only pass what I say >>> passArrays->AddFieldType(vtkDataObject::POINT); >>> passArrays->AddArray(fieldType, "nameOfArray"); >>> passArrays->Update(); >>> >>> // modelForFilter is a vtkUnstructuredGrid >>> modelForFilter = vtkUnstructuredGrid::SafeDow >>> nCast(passArrays->GetOutput()); // cast to UnstructuredGrid >>> modelForFilter->GetPointData()->SetActiveVectors("nameOfArray"); // set >>> the active vectors in the new data >>> modelForFilter->Update(); >>> >>> //warping vector is a vtkWarpVector >>> warpingVector->SetInputConnection(modelForFilter->GetProducerPort()); >>> warpingVector->SetInputArrayToProcess(0, 0, >>> 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "nameOfArray"); >>> // the rest of the pipeline is the same... >>> ----- >>> The result is the same. I put some modelForFilter->Print(std::cout) and >>> I can see that the selected array is indeed the active vectors... >>> >>> Other thing I tried: >>> modelForFilter->DeepCopy(model); // full copy the model to the new >>> modelForFilter->GetPointData()->SetActiveVectors("nameOfArray"); // set >>> the active in the new >>> modelForFilter->Update(); >>> Still, same result. >>> >>> The only thing that works is: >>> modelForFilter = model; >>> But of course, here I only copy the vtkSmartPointer and not the data, so >>> this is the thing I want to avoid. >>> >>> Any ideas? >>> Thank you! >>> >>> On 26 October 2016 at 16:54, Dan Lipsa wrote: >>> >>>> Can you cast the data object to an unstructured grid and then set the >>>> active vector on it? Make sure you call update before you do that. >>>> >>>> Dan >>>> >>>> >>>> On Wed, Oct 26, 2016 at 10:44 AM, Fernando Nellmeldin < >>>> f.nellmeldin at open-engineering.com> wrote: >>>> >>>>> Hello and thank you for your reply! >>>>> >>>>> After your suggestion, I tried using vtkPassArray, but I can't find >>>>> how to set the Active Vectors. The output is a vtkDataObject*, which of >>>>> course doesn't have the PointsData and therefore no setActiveVectors. >>>>> The result is the same as before, when I change the input to Full, I >>>>> see the wrong deformed mesh. >>>>> >>>>> This is my modified code: >>>>> >>>>> // given that model is first an UnstructuredGrid1 and then >>>>> UnstructuredGridFull >>>>> vtkSmartPointer passArrays = >>>>> vtkSmartPointer::New(); >>>>> passArrays->SetInput(model); >>>>> passArrays->UseFieldTypesOn(); // restrict to only pass what I say >>>>> passArrays->AddFieldType(vtkDataObject::POINT); >>>>> passArrays->AddArray(fieldType, "nameOfArray"); >>>>> passArrays->Update(); >>>>> >>>>> //warping vector is a vtkWarpVector >>>>> warpingVector->SetInputConnection(passArrays->GetProducerPort()); >>>>> warpingVector->SetInputArrayToProcess(0, 0, >>>>> 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "nameOfArray"); // I >>>>> don't know why this line is needed to see something >>>>> // the rest of the pipeline is the same... >>>>> >>>>> Am I missing something? >>>>> >>>>> Thank you. >>>>> >>>>> >>>>> >>>>> On 26 October 2016 at 15:40, Dan Lipsa wrote: >>>>> >>>>>> Fernando, >>>>>> Can you try vtkPassArray to pass the proper vector array to each of >>>>>> your pipelines? Then you can set the active vector on the output of this >>>>>> algorithm. >>>>>> >>>>>> Dan >>>>>> >>>>>> >>>>>> On Wed, Oct 26, 2016 at 6:23 AM, Fernando Nellmeldin < >>>>>> f.nellmeldin at open-engineering.com> wrote: >>>>>> >>>>>>> Hello. >>>>>>> I would like to show the deformed mesh of a model based on the >>>>>>> values of a point data array of dimension 3 (vectorial data). >>>>>>> >>>>>>> I have the following pipeline: >>>>>>> UnstructuredGrid1 -> WarpVector -> GeometryFilter -> ExtractEdges -> >>>>>>> PolyDataMapper -> Actor >>>>>>> In the WarpVector, I call to say which array to use >>>>>>> WarpVector->SetInputArrayToProcess(0,0,0, >>>>>>> FIELD_ASSOCIATION_POINTS,"nameOfArray"); >>>>>>> >>>>>>> The first time I load the actor in screen, everything is OK. >>>>>>> >>>>>>> Later, I would like to mirror the input UnstructuredGrid1 because it >>>>>>> represents half the model. So I do the following: >>>>>>> UnstructuredGrid1 -> ReflectionFilter -> UnstructuredGrid2 >>>>>>> {UnstructuredGrid1, UnstructuredGrid2} -> AppendFilter -> >>>>>>> UnstructuredGridFull >>>>>>> >>>>>>> Then, I replace the input of WarpVector by UnstructuredGridFull, and >>>>>>> I reload the actor. >>>>>>> However, what I see on screen is the same deformed mesh than before, >>>>>>> plus another deformed mesh that is not its mirror, it's something different >>>>>>> and not correct, of course. >>>>>>> >>>>>>> If, however, I call: >>>>>>> At the beginning: UnstructuredGrid1->GetPointDat >>>>>>> a()->SetActiveVectors("nameOfArray"); >>>>>>> After I did the mirroring: UnstructuredGridFull->GetPoint >>>>>>> Data()->SetActiveVectors("nameOfArray"); >>>>>>> I don't have the problem and everything works OK. >>>>>>> >>>>>>> Problem is, I don't want to call setActiveVectors because I can have >>>>>>> more than one pipeline that makes uses of the same UnstructuredGrid with >>>>>>> different vectorial data, and I noticed that each call to setActive* will >>>>>>> modify all the pipelines that makes use of the Scalars/Vectors/Tensors. So >>>>>>> this doesn't seem an option. >>>>>>> >>>>>>> What is the alternative to use here to solve the problem? >>>>>>> >>>>>>> I tried with vtkAssignAttributes but didn't work. >>>>>>> vtkSmartPointer aa = >>>>>>> vtkSmartPointer::New(); >>>>>>> aa->SetInput(UnstructuredGridFull); >>>>>>> aa->Assign("nameOfArray", vtkDataSetAttributes::VECTORS, >>>>>>> vtkAssignAttribute::POINT_DATA); >>>>>>> aa->Update(); >>>>>>> >>>>>>> And then: >>>>>>> AssignAttribute -> WarpVector instead of UnstructuredGridFull -> >>>>>>> WarpVector. >>>>>>> but same result... >>>>>>> >>>>>>> Thank you. >>>>>>> >>>>>>> -- >>>>>>> *Fernando NELLMELDIN* >>>>>>> Software Engineer >>>>>>> *_______________________________________________________________* >>>>>>> >>>>>>> *Open Engineering s.a.* >>>>>>> >>>>>>> Rue Bois Saint-Jean 15/1 >>>>>>> B-4102 Seraing (Belgium) >>>>>>> Tel: +32.4.353.30.34 >>>>>>> >>>>>>> http://www.open-engineering.com >>>>>>> https://www.linkedin.com/company/open-engineering?trk=biz-co >>>>>>> mpanies-cym >>>>>>> >>>>>>> >>>>>>> *_________________________________________________________________________* >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Fernando NELLMELDIN* >>>>> Software Engineer >>>>> *_______________________________________________________________* >>>>> >>>>> *Open Engineering s.a.* >>>>> >>>>> Rue Bois Saint-Jean 15/1 >>>>> B-4102 Seraing (Belgium) >>>>> Tel: +32.4.353.30.34 >>>>> >>>>> http://www.open-engineering.com >>>>> https://www.linkedin.com/company/open-engineering?trk=biz-co >>>>> mpanies-cym >>>>> >>>>> >>>>> *_________________________________________________________________________* >>>>> >>>> >>>> >>> >>> >>> -- >>> *Fernando NELLMELDIN* >>> Software Engineer >>> *_______________________________________________________________* >>> >>> *Open Engineering s.a.* >>> >>> Rue Bois Saint-Jean 15/1 >>> B-4102 Seraing (Belgium) >>> Tel: +32.4.353.30.34 >>> >>> http://www.open-engineering.com >>> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >>> >>> >>> *_________________________________________________________________________* >>> >> >> > > > -- > *Fernando NELLMELDIN* > Software Engineer > *_______________________________________________________________* > > *Open Engineering s.a.* > > Rue Bois Saint-Jean 15/1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 > > http://www.open-engineering.com > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > *_________________________________________________________________________* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotterluke at gmail.com Wed Nov 9 14:20:40 2016 From: lotterluke at gmail.com (lp) Date: Wed, 9 Nov 2016 12:20:40 -0700 (MST) Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data Message-ID: <1478719240610-5741121.post@n5.nabble.com> Hello, I am playing around with the new feature in vtk7.1 to render edges and vertices as tubes and spheres (as described in https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/). This is a very nice feature, but I have found one issue: When the mapper is set to color by cellData (mapper->SetScalarModeToUseCellData()), only the edges are shown as tubes but the spheres at the vertices are not rendered. For SetScalarModeToUsePointData it works as expected (both, tubes and spheres are rendered). So my question: Is it possible to show the vertex spheres, when coloring by cellData? Example code (based on VTK Sphere example) attached. Regards, Lukas CMakeLists.txt Sphere.cxx -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK7-1-render-points-as-spheres-does-not-work-when-coloring-by-cell-data-tp5741121.html Sent from the VTK - Users mailing list archive at Nabble.com. From dkxls23 at gmail.com Wed Nov 9 15:48:16 2016 From: dkxls23 at gmail.com (Armin Wehrfritz) Date: Wed, 9 Nov 2016 22:48:16 +0200 Subject: [vtkusers] Convert a structured to an unstructured grid Message-ID: <651b60cf-cc0a-f1dd-7418-52e7b560560e@gmail.com> Hi, I'm trying to convert a structured to an unstructured grid and don't seem to get it right. I'm attempting to use the vtkThreshold filter to do the actual conversion, but somehow I'm ending up with 0 cells in my unstructured grid and the writer ends with a segmentation fault. I attached a script that demonstrates what I'm trying to accomplish. The .vts appears to be correct (or at least ParaView doesn't complain). Any hint on what I'm doing wrong is appreciated. Thanks! -Armin -------------- next part -------------- A non-text attachment was scrubbed... Name: structuredToUnstructuredGrid.py Type: text/x-python-script Size: 1489 bytes Desc: not available URL: From chris.marsh at usask.ca Wed Nov 9 16:54:57 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 9 Nov 2016 15:54:57 -0600 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Hi Cory, Thanks for the reply. This looks like a perfect way forward. I am following this http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData and am having troubles with this approach. The field data doesn't seem to be set properly. I can see the field data *name* in paraview when I load my mesh, but it has an NA value. What I'm doing is: std::string _srs_wkt = "my projection data here"; vtkSmartPointer proj4 = vtkSmartPointer::New(); proj4->SetNumberOfComponents(1); proj4->SetName("proj4"); proj4->InsertNextValue(_srs_wkt); vtkSmartPointer _vtk_unstructuredGrid = vtkSmartPointer::New(); //... build up _vtk_unstructuredGrid etc. _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); //validate vtkStringArray* test = vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetFieldData()->GetArray("proj4")); //test is NULL any ideas? Thanks Chris Marsh PhD Candidate chrismarsh.ca 13 Kirk Hall University of Saskatchewan On 9 November 2016 at 01:31, Cory Quammen wrote: > Hi Chris, > > Usually we stuff this kind of data into the generic field data (arrays > not associated with points of cells) in the data set. The VTU > reader/writer supports reading/writing field data. > > HTH, > Cory > > On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh wrote: > > Hi, > > > > I would like to add some extra meta-data to a pvd file. Specifically, a > > proj4 string containing information about the coordinate system > projection > > of the data contained in a vtu file. > > > > Is there a recommended way to do this? > > > > Cheers > > Chris > > > > _______________________________________________ > > 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 dkxls23 at gmail.com Thu Nov 10 04:30:26 2016 From: dkxls23 at gmail.com (Armin Wehrfritz) Date: Thu, 10 Nov 2016 11:30:26 +0200 Subject: [vtkusers] Convert a structured to an unstructured grid In-Reply-To: <651b60cf-cc0a-f1dd-7418-52e7b560560e@gmail.com> References: <651b60cf-cc0a-f1dd-7418-52e7b560560e@gmail.com> Message-ID: <31c6f001-54e2-de0b-1db7-7abe52e8fc6b@gmail.com> To follow up on my own post: I figured out the problem. It was a matter of setting the scalar array in the structured grid correctly, i.e changing > sg.GetPointData().AddArray(a) to > sg.GetPointData().SetScalars(a) fixed the problem. I included my final version of the script for reference below. -Armin #!/usr/bin/env python from __future__ import division, print_function import numpy as np import vtk from vtk.numpy_interface import algorithms as algs from vtk.numpy_interface import dataset_adapter as dsa Nx = 11 Ny = 21 # Generate a grid using numpy tx = np.linspace(0, 1, Ny) ty = np.linspace(0, 1, Nx) x1, y1 = np.linspace(0, 1, Nx), np.linspace(0, 2, Ny) x2, y2 = x1, y1 x = x1[None,:] + np.outer(tx, (x2 - x1)) y = y1[:,None] + np.outer((y2 - y1), ty) z = np.zeros_like(x) # Generate the vtk points coordinates = algs.make_vector(np.stack((x, x)).ravel(), np.stack((y, y)).ravel(), np.stack((z, z + 0.1)).ravel()) pts = vtk.vtkPoints() pts.SetData(dsa.numpyTovtkDataArray(coordinates, "Points")) # Generate a structured grid sg = vtk.vtkStructuredGrid() sg.SetDimensions(Nx, Ny, 2) sg.SetPoints(pts) sg.GetCellData().SetScalars(dsa.numpyTovtkDataArray(np.arange((Nx-1)*(Ny-1)), "CellID")) print('#Cells (structured):', sg.GetNumberOfCells()) # Write the structured grid sw = vtk.vtkXMLStructuredGridWriter() sw.SetDataModeToAscii() sw.SetFileName('grid.vts') sw.SetInputDataObject(sg) sw.Write() # Generate an unstructured grid using the threshold filter t = vtk.vtkThreshold() t.SetInputDataObject(sg) t.ThresholdByUpper(-1) t.Update() print('#Cells (unstructured):', t.GetOutput().GetNumberOfCells()) # Write the unstructured grid uw = vtk.vtkXMLUnstructuredGridWriter() uw.SetDataModeToAscii() uw.SetFileName('grid.vtu') uw.SetInputConnection(t.GetOutputPort()) uw.Write() From andre.zimmer at rwth-aachen.de Thu Nov 10 04:49:28 2016 From: andre.zimmer at rwth-aachen.de (Andre Zimmer) Date: Thu, 10 Nov 2016 10:49:28 +0100 Subject: [vtkusers] vtkSurfaceLICPainter Message-ID: <091bf1b6-5a49-c7e6-e801-7198a6873dd4@rwth-aachen.de> Hi, I would like to use surfaceLIC like I do in Paraview but using VTK 6.3 in Python 2.7. After a lot of research I have found nothing useful other than that I probably need to somehow use vtkSurfaceLICPainter. Here is a test case and a small script that loads the velocity field of a VTK file generated by OpenFOAM: https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 #! import vtk file_name = "U_nearWalls.vtk" reader = vtk.vtkPolyDataReader() reader.SetFileName(file_name) reader.ReadAllScalarsOn() reader.ReadAllVectorsOn() reader.Update() reader.GetOutput().GetPointData().SetActiveScalars("U") mapper=vtk.vtkPolyDataMapper() mapper.SetInputConnection(reader.GetOutputPort()) mapper.SetScalarRange(reader.GetOutput().GetPointData().GetScalars().GetRange()) actor=vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(0.1, 0.2, 0.4) render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) render_window.SetSize(300, 300) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(render_window) interactor.Initialize() render_window.Render() interactor.Start() Thank you, Andr? From ken.martin at kitware.com Thu Nov 10 08:30:39 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 10 Nov 2016 08:30:39 -0500 Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data In-Reply-To: <1478719240610-5741121.post@n5.nabble.com> References: <1478719240610-5741121.post@n5.nabble.com> Message-ID: Yes you can render the vertices using cell coloring but it is a bit odd. Let me jump back a bit. The sphere source produces triangles as cells. So the cell data will be one color per triangle. The sphere source does not produce any cells that are verts. The triangles have vertices which we can render but in VTKs terminology they are not cells. The EdgeVisibility and VertexVisibility makes the edges and vertices of cells visible but they themselves are not cells, so no cell coloring. Another way to see the issue is that a triangle consists of three vertices. Those vertices in turn are shared by typically 6 triangles each with their own cell color. So there is no clear mapping of triangle cell color to shared vertices, we have to use a cell to point filter or something like that. So how would you get cell data showing up on vertices? Well you need to create verts as cells. SphereSource produces cells that are triangles. But you can use the GlyphFilter on any dataset with points to convert those points into verts as follows. sphereSource ss // optionally if you have cell data on the triangles you can do a CellToPoint filter // to convert that to point data suitable for the next glyph filter. glyph3dFilter glyph glyphSource2d gs gs->SetGlyphTypeToVertex() glyph->SetInputConnection(ss->GetOutputPort()) glyph->SetSource(gs->GetOutputPort()); // add cell data in here for the verts, one entry per vert mapper->SetInputConnection(glyph->GetOutputPort()); mapper->RenderPointsAsSpheres() // Keep vertex visibility off If you want the surface and the verts then add another mapper for the surface ala mapper2->SetInputConnection(ss->GetOutputPort()); Hope that helps! Thanks Ken On Wed, Nov 9, 2016 at 2:20 PM, lp wrote: > Hello, > > I am playing around with the new feature in vtk7.1 to render edges and > vertices as tubes and spheres (as described in > https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/). > > This is a very nice feature, but I have found one issue: When the mapper is > set to color by cellData (mapper->SetScalarModeToUseCellData()), only the > edges are shown as tubes but the spheres at the vertices are not rendered. > For SetScalarModeToUsePointData it works as expected (both, tubes and > spheres are rendered). > > So my question: Is it possible to show the vertex spheres, when coloring by > cellData? > > Example code (based on VTK Sphere example) attached. > > Regards, > Lukas > > CMakeLists.txt > > Sphere.cxx > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/VTK7-1-render-points-as-spheres-does-not-work-when- > coloring-by-cell-data-tp5741121.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 jmax.red at gmail.com Thu Nov 10 08:36:15 2016 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Thu, 10 Nov 2016 14:36:15 +0100 Subject: [vtkusers] Adding points at the begining of a polyline Message-ID: Hi ! First, I would like to thanks people who works on VTK. This is a great piece of software, very fast, very efficient ! I'm currently working on a viewer that is supposed to display dynamically the polylines calculated by my algorithms. To do that, I relied on this post : http://public.kitware.com/pipermail/vtkusers/2010-July/061781.html This works fine to append points to the polyline, but due to my algorithms, I need also to prepend points at the beginning of the polyline. I can't figure out how to do that. Any help would be gracefully appreciated. jMax === Here is my test code. The first loop works fine, but the second one is a mess. package vtktest; import java.awt.BorderLayout; public class PolyLineTest extends JFrame { private static final long serialVersionUID = 1L; static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { } vtkNativeLibrary.DisableOutputWindow(null); } private Random random = new Random(); private vtkRenderWindowPanel canvas; private vtkRenderer renderer; private vtkRenderWindowInteractor iren; private JPanel mainPanel; public static void main(String[] args) { new PolyLineTest(); } public PolyLineTest() { this.canvas = new vtkRenderWindowPanel(); this.renderer = canvas.GetRenderer(); this.iren = canvas.getRenderWindowInteractor(); this.setTitle("VTK Test"); // First we'll create an initial point to build on vtkPoints points = new vtkPoints(); points.InsertPoint(0, 0.0, 0.0, 0.0); // The cell array can be thought of as a connectivity list. Here we // specify the number of points followed by that number of point // ids. This can be repeated as many times as there are primitives in // the list. // This first one is just a point to connect to as we add more points vtkCellArray lines = new vtkCellArray(); lines.InsertNextCell(1); // number of points lines.InsertCellPoint(0); vtkPolyData track = new vtkPolyData(); track.SetPoints(points); track.SetLines(lines); vtkPolyDataMapper mapper = new vtkPolyDataMapper(); mapper.SetInputData(track); vtkActor actor = new vtkActor(); actor.SetMapper(mapper); actor.GetProperty().SetColor(0.3800, 0.7000, 0.1600); renderer.AddActor(actor); renderer.ResetCamera(); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(canvas, BorderLayout.CENTER); this.getContentPane().add(mainPanel); this.setSize(800, 800); this.setLocationRelativeTo(null); // Center on desktop this.setVisible(true); // Loop to add points to line System.out.println("Appending"); for (int i = 1; i < 10; i++) { try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } double[] prev_pt = points.GetPoint(i - 1); double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); // Insert the new point // then tell VTK that the data has been modified so the Render() // call will update the view with the new data points.InsertPoint(i, new_x, new_y, new_z); points.Modified(); // To get lines we need a beginning and end point in the // connectivity list, // then again tell VTK that the data has been modified lines.InsertNextCell(2); lines.InsertCellPoint(i - 1); lines.InsertCellPoint(i); lines.Modified(); canvas.repaint(); } System.out.println("Prepending"); for (int i = 1; i < 10; i++) { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } double[] prev_pt = points.GetPoint(0); double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); points.InsertPoint(0, new_x, new_y, new_z); points.Modified(); lines.InsertNextCell(2); lines.UpdateCellCount (2); lines.InsertCellPoint(0); lines.InsertCellPoint(1); lines.Modified(); canvas.repaint(); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From f_magician at mac.com Thu Nov 10 08:53:04 2016 From: f_magician at mac.com (Magician) Date: Thu, 10 Nov 2016 22:53:04 +0900 Subject: [vtkusers] Partitioning VTK PolyData for Multi-Processing In-Reply-To: <581998b0-d122-5923-6cf9-d74906bc2e97@ebi.ac.uk> References: <0FED05ED-4466-458A-8194-D2F08A2B3EFC@mac.com> <581998b0-d122-5923-6cf9-d74906bc2e97@ebi.ac.uk> Message-ID: <55C7E1C4-3CEF-4999-BD95-E4298B1E632B@mac.com> Hi Paul, I checked the VTK User?s Guide, but couldn?t partition my datasets with vtkPolyDataStreamer. Today I found the similar thread on the mailing list. It says the distributed data filter and parallel writer are used for the purpose. So I tried the sample python on 2 CPUs: import vtk source = vtk.vtkPointSource() source.SetCenter((0.0, 0.0, 0.0)) source.SetNumberOfPoints(1000000) source.SetRadius(1.0) source.Update() d3 = vtk.vtkDistributedDataFilter() d3.SetInputData(source.GetOutput()) d3.SetBoundaryMode(0) d3.Update() writer = vtk.vtkXMLPUnstructuredGridWriter() writer.SetInputData(d3.GetOutput()) writer.SetFileName(?test.pvtu?) writer.SetNumberOfPieces(2) writer.WriteSummaryFileOn() writer.SetStartPiece(0) writer.SetEndPiece(1) writer.Write() ?but the exported *.vtu-s are exactly same. Both have 1,000,000 points, and not partitioned. Maybe the usage of the vtkDistributedDataFilter is wrong. How to pass the partitioned data to the parallel writer? Magician > On Nov 8, 2016, at 00:37, Paul Korir wrote: > > Hi Magician, > > You could have a look at the Visualization Toolkit 4th Ed. pg. 96 and pg. 389. > > It talks about using streamers such as vtkPolyDataStreamer (http://www.vtk.org/doc/release/7.0/html/classvtkPolyDataStreamer.html#details ). > > HTH, > > Paul > > On 05/11/2016 13:56, Magician wrote: >> Hi all, >> >> >> I'm using VTK 7.1.0 (pvpython with ParaView 5.2.0 RC3) >> for processing VTK PolyData. >> The data consists of billions of point coordinates, point cells and point values. >> >> I'd like to partition the data for multi-processing, >> but there are not enough informations. >> Now I'm splitting data and writing *.pvtp files manually. >> >> Is there a easy way to convert *.vtp to *.pvtp includes several partitions, >> or extract data by rectangular (or other geometric) regions? >> >> >> Magician >> _______________________________________________ >> 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 > > -- > Paul x4422 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.marsh at usask.ca Thu Nov 10 14:15:22 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Thu, 10 Nov 2016 13:15:22 -0600 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Hi all, Following the advice here http://public.kitware.com/pipermail/paraview/2012-September/026100.html worked. That is, in Python, the following works my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) On 9 November 2016 at 15:54, Chris Marsh wrote: > Hi Cory, > Thanks for the reply. This looks like a perfect way forward. > > I am following this > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > > and am having troubles with this approach. The field data doesn't seem to > be set properly. I can see the field data *name* in paraview when I load my > mesh, but it has an NA value. > > > What I'm doing is: > > std::string _srs_wkt = "my projection data here"; > vtkSmartPointer proj4 = vtkSmartPointer >::New(); > proj4->SetNumberOfComponents(1); > proj4->SetName("proj4"); > proj4->InsertNextValue(_srs_wkt); > > vtkSmartPointer _vtk_unstructuredGrid = > vtkSmartPointer::New(); > > //... build up _vtk_unstructuredGrid etc. > > _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); > > //validate > vtkStringArray* test = vtkStringArray::SafeDownCast(_ > vtk_unstructuredGrid->GetFieldData()->GetArray("proj4")); > > //test is NULL > > any ideas? > Thanks > > > Chris Marsh > PhD Candidate > chrismarsh.ca > > 13 Kirk Hall > University of Saskatchewan > > On 9 November 2016 at 01:31, Cory Quammen > wrote: > >> Hi Chris, >> >> Usually we stuff this kind of data into the generic field data (arrays >> not associated with points of cells) in the data set. The VTU >> reader/writer supports reading/writing field data. >> >> HTH, >> Cory >> >> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh wrote: >> > Hi, >> > >> > I would like to add some extra meta-data to a pvd file. Specifically, a >> > proj4 string containing information about the coordinate system >> projection >> > of the data contained in a vtu file. >> > >> > Is there a recommended way to do this? >> > >> > Cheers >> > Chris >> > >> > _______________________________________________ >> > 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 lotterluke at gmail.com Thu Nov 10 15:10:40 2016 From: lotterluke at gmail.com (lp) Date: Thu, 10 Nov 2016 13:10:40 -0700 (MST) Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data In-Reply-To: References: <1478719240610-5741121.post@n5.nabble.com> Message-ID: <1478808640955-5741133.post@n5.nabble.com> Hello Ken, Thank you for your swift reply. Let me apologize for not being clear enough in my initial post. I will try to clarify. I do not want to color the vertices by cell data. I just want to turn on the tubes for the cell edges and the spheres for the vertices, while the cells are colored by values in a cell data array. Both cell edges and vertex spheres should just be colored by the constant color set with SetEdgeColor and SetVertexColor on the actor property. In the example that I send before, the sphere has a double array added to the cell data and set as the active scalar. The mapper is set to ScalarModeToUseCellData. On the property of the actor both RenderLinesAsTubesOn and RenderPointsAsSpheresOn are set. However, only the tubes are shown, the spheres for the vertices are not. If I comment out line 36 sphereSource->GetOutput()->GetCellData()->SetActiveScalars("doubleValues"); then both tubes and vertex spheres are shown, but of course the cells are not colored by their data array. So, I wonder why is the rendering of the vertex spheres linked to the active scalar on the cell data? Is this expected behavior? The example was build with VTK7.1rc2. Regards, Lukas -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK7-1-render-points-as-spheres-does-not-work-when-coloring-by-cell-data-tp5741121p5741133.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Nov 10 15:38:55 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 10 Nov 2016 15:38:55 -0500 Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data In-Reply-To: <1478808640955-5741133.post@n5.nabble.com> References: <1478719240610-5741121.post@n5.nabble.com> <1478808640955-5741133.post@n5.nabble.com> Message-ID: Ahh OK I got it, that should definitely work. I'll take a look at it. Thanks! - Ken On Thu, Nov 10, 2016 at 3:10 PM, lp wrote: > Hello Ken, > > Thank you for your swift reply. Let me apologize for not being clear enough > in my initial post. I will try to clarify. > > I do not want to color the vertices by cell data. I just want to turn on > the > tubes for the cell edges and the spheres for the vertices, while the cells > are colored by values in a cell data array. Both cell edges and vertex > spheres should just be colored by the constant color set with SetEdgeColor > and SetVertexColor on the actor property. > > In the example that I send before, the sphere has a double array added to > the cell data and set as the active scalar. The mapper is set to > ScalarModeToUseCellData. On the property of the actor both > RenderLinesAsTubesOn and RenderPointsAsSpheresOn are set. However, only the > tubes are shown, the spheres for the vertices are not. > > If I comment out line 36 > > sphereSource->GetOutput()->GetCellData()->SetActiveScalars(" > doubleValues"); > > then both tubes and vertex spheres are shown, but of course the cells are > not colored by their data array. > > So, I wonder why is the rendering of the vertex spheres linked to the > active > scalar on the cell data? Is this expected behavior? > > The example was build with VTK7.1rc2. > > Regards, > Lukas > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/VTK7-1-render-points-as-spheres-does-not-work-when- > coloring-by-cell-data-tp5741121p5741133.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 cory.quammen at kitware.com Fri Nov 11 10:30:09 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 11 Nov 2016 10:30:09 -0500 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Ah, yes, I should have caught that you would be using a vtkStringArray, which is not accessed the same way as the numeric data arrays. Glad you found the solution. Cory On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh wrote: > Hi all, > > Following the advice here > http://public.kitware.com/pipermail/paraview/2012-September/026100.html > > worked. That is, in Python, the following works > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) > > > On 9 November 2016 at 15:54, Chris Marsh wrote: >> >> Hi Cory, >> Thanks for the reply. This looks like a perfect way forward. >> >> I am following this >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData >> >> and am having troubles with this approach. The field data doesn't seem to >> be set properly. I can see the field data *name* in paraview when I load my >> mesh, but it has an NA value. >> >> >> What I'm doing is: >> >> std::string _srs_wkt = "my projection data here"; >> vtkSmartPointer proj4 = >> vtkSmartPointer::New(); >> proj4->SetNumberOfComponents(1); >> proj4->SetName("proj4"); >> proj4->InsertNextValue(_srs_wkt); >> >> vtkSmartPointer _vtk_unstructuredGrid = >> vtkSmartPointer::New(); >> >> //... build up _vtk_unstructuredGrid etc. >> >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); >> >> //validate >> vtkStringArray* test = >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetFieldData()->GetArray("proj4")); >> >> //test is NULL >> >> any ideas? >> Thanks >> >> >> Chris Marsh >> PhD Candidate >> chrismarsh.ca >> >> 13 Kirk Hall >> University of Saskatchewan >> >> On 9 November 2016 at 01:31, Cory Quammen >> wrote: >>> >>> Hi Chris, >>> >>> Usually we stuff this kind of data into the generic field data (arrays >>> not associated with points of cells) in the data set. The VTU >>> reader/writer supports reading/writing field data. >>> >>> HTH, >>> Cory >>> >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh wrote: >>> > Hi, >>> > >>> > I would like to add some extra meta-data to a pvd file. Specifically, a >>> > proj4 string containing information about the coordinate system >>> > projection >>> > of the data contained in a vtu file. >>> > >>> > Is there a recommended way to do this? >>> > >>> > Cheers >>> > Chris >>> > >>> > _______________________________________________ >>> > 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. From weifeng0715 at gmail.com Fri Nov 11 13:41:21 2016 From: weifeng0715 at gmail.com (weifeng0715) Date: Fri, 11 Nov 2016 11:41:21 -0700 (MST) Subject: [vtkusers] Trouble with added features to a VTK Animation: saving frames, "live" vtkPlot, vtkPoints In-Reply-To: <1313530690589-4705911.post@n5.nabble.com> References: <1313530690589-4705911.post@n5.nabble.com> Message-ID: <1478889681134-5741140.post@n5.nabble.com> Let me read your code first. I am doing the similar stuff with yours. -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-with-added-features-to-a-VTK-Animation-saving-frames-live-vtkPlot-vtkPoints-tp4705911p5741140.html Sent from the VTK - Users mailing list archive at Nabble.com. From weifeng0715 at gmail.com Fri Nov 11 14:43:25 2016 From: weifeng0715 at gmail.com (weifeng0715) Date: Fri, 11 Nov 2016 12:43:25 -0700 (MST) Subject: [vtkusers] Trouble with added features to a VTK Animation: saving frames, "live" vtkPlot, vtkPoints In-Reply-To: <1313530690589-4705911.post@n5.nabble.com> References: <1313530690589-4705911.post@n5.nabble.com> Message-ID: <1478893405848-5741141.post@n5.nabble.com> Could you send your project to me at email weifeng0715 at gmail.com ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-with-added-features-to-a-VTK-Animation-saving-frames-live-vtkPlot-vtkPoints-tp4705911p5741141.html Sent from the VTK - Users mailing list archive at Nabble.com. From mfaieghi at westerneng.ca Sun Nov 13 07:20:45 2016 From: mfaieghi at westerneng.ca (Reza Faieghi) Date: Sun, 13 Nov 2016 07:20:45 -0500 Subject: [vtkusers] how to write an unstructured grid into a stl file Message-ID: Hello, I am wondering is there a way to write an unstructured grid into an STL file? I am not sure if this is correct but I realized that for writing into an STL file, I have to create a triangle filter from my geometry. And, to create the triangle filter, I need to extract surface of my unstructured grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I was not able to set an input to an instance of this class from a vtkUnstructuredGrid. I am not sure if my approach is correct. I would be really grateful if you have any idea how to solve this. Many Thanks, Reza -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Sun Nov 13 10:55:11 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Sun, 13 Nov 2016 08:55:11 -0700 Subject: [vtkusers] how to write an unstructured grid into a stl file In-Reply-To: References: Message-ID: vtkDataSetSurfaceFilter is indeed the way to go. You should be able to set an unstructrued grid as input. Not sure why it didn't work for you? Doesn't the following code work: vtkUnstructuredGrid* ug = ... vtkDataSetSurfaceFilter* dsf = ... dsf->SetInputDataObject(ug); Utkarsh On Sun, Nov 13, 2016 at 5:20 AM, Reza Faieghi wrote: > Hello, > > I am wondering is there a way to write an unstructured grid into > an STL file? > > I am not sure if this is correct but I realized that for writing > into an STL file, I have to create a triangle filter from my geometry. And, > to create the triangle filter, I need to extract surface of my unstructured > grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I was > not able to set an input to an instance of this class from a > vtkUnstructuredGrid. > > I am not sure if my approach is correct. I would be really grateful if you > have any idea how to solve this. > > Many Thanks, > Reza > > _______________________________________________ > 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 mfaieghi at westerneng.ca Sun Nov 13 12:03:32 2016 From: mfaieghi at westerneng.ca (Reza Faieghi) Date: Sun, 13 Nov 2016 12:03:32 -0500 Subject: [vtkusers] how to write an unstructured grid into a stl file In-Reply-To: References: Message-ID: Hi Utkarsh, Thanks for the reply. I use the following code just like yours but I get some errors that dsf is a pointer to an incomplete class type: 1 vtkSmartPointer ug = vtkSmartPointer::New(); 2 vtkSmartPointer dsf = vtkSmartPointer::New(); 3 dsf->SetInputData(ug); 4 dsf->Update(); 5 vtkSmartPointer triangleFilterx = vtkSmartPointer::New(); 6 triangleFilterx->SetInputConnection(dsf); 7 triangleFilterx->Update(); 8 vtkSmartPointer stlWriter = vtkSmartPointer::New(); 9 std::string name = "file.stl"; 10 stlWriter->SetFileName(file.c_str()); 11 stlWriter->SetInputConnection(triangleFilterx->GetOutputPort()); 12 stlWriter->Write(); At line 3, I am getting these errors: use of undefined type 'vtkDataSetSurfaceFilter' 'SetInputData' : is not a member of 'vtkSmartPointer' 'Update' : is not a member of 'vtkSmartPointer' I think the way that I am using vtkDataSetSurfaceFilter is not correct. How can I use it in a proper way? Thanks, Reza On Sun, Nov 13, 2016 at 10:55 AM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > vtkDataSetSurfaceFilter is indeed the way to go. You should be able to set > an unstructrued grid as input. Not sure why it didn't work for you? Doesn't > the following code work: > > vtkUnstructuredGrid* ug = ... > vtkDataSetSurfaceFilter* dsf = ... > dsf->SetInputDataObject(ug); > > Utkarsh > > On Sun, Nov 13, 2016 at 5:20 AM, Reza Faieghi > wrote: > >> Hello, >> >> I am wondering is there a way to write an unstructured grid into >> an STL file? >> >> I am not sure if this is correct but I realized that for writing >> into an STL file, I have to create a triangle filter from my geometry. And, >> to create the triangle filter, I need to extract surface of my unstructured >> grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I was >> not able to set an input to an instance of this class from a >> vtkUnstructuredGrid. >> >> I am not sure if my approach is correct. I would be really grateful if >> you have any idea how to solve this. >> >> Many Thanks, >> Reza >> >> _______________________________________________ >> 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 >> >> > -- PhD Candidate, Spencer Engineering Building Room 37 University of Western Ontario London, ON, Canada, N6A 5B9 -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sun Nov 13 15:25:38 2016 From: DLRdave at aol.com (David Cole) Date: Sun, 13 Nov 2016 15:25:38 -0500 Subject: [vtkusers] how to write an unstructured grid into a stl file In-Reply-To: References: Message-ID: Have you tried: #include "vtkDataSetSurfaceFilter.h" in that source file? On Sun, Nov 13, 2016 at 12:03 PM, Reza Faieghi wrote: > Hi Utkarsh, > > Thanks for the reply. I use the following code just like yours but I get > some errors that dsf is a pointer to an incomplete class type: > > 1 vtkSmartPointer ug = > vtkSmartPointer::New(); > 2 vtkSmartPointer dsf = > vtkSmartPointer::New(); > 3 dsf->SetInputData(ug); > 4 dsf->Update(); > 5 vtkSmartPointer triangleFilterx = > vtkSmartPointer::New(); > 6 triangleFilterx->SetInputConnection(dsf); > 7 triangleFilterx->Update(); > 8 vtkSmartPointer stlWriter = > vtkSmartPointer::New(); > 9 std::string name = "file.stl"; > 10 stlWriter->SetFileName(file.c_str()); > 11 stlWriter->SetInputConnection(triangleFilterx->GetOutputPort()); > 12 stlWriter->Write(); > > At line 3, I am getting these errors: > > use of undefined type 'vtkDataSetSurfaceFilter' > 'SetInputData' : is not a member of > 'vtkSmartPointer' > 'Update' : is not a member of > 'vtkSmartPointer' > > I think the way that I am using vtkDataSetSurfaceFilter is not correct. How > can I use it in a proper way? > > Thanks, > Reza > > > On Sun, Nov 13, 2016 at 10:55 AM, Utkarsh Ayachit > wrote: >> >> vtkDataSetSurfaceFilter is indeed the way to go. You should be able to set >> an unstructrued grid as input. Not sure why it didn't work for you? Doesn't >> the following code work: >> >> vtkUnstructuredGrid* ug = ... >> vtkDataSetSurfaceFilter* dsf = ... >> dsf->SetInputDataObject(ug); >> >> Utkarsh >> >> On Sun, Nov 13, 2016 at 5:20 AM, Reza Faieghi >> wrote: >>> >>> Hello, >>> >>> I am wondering is there a way to write an unstructured grid into an STL >>> file? >>> >>> I am not sure if this is correct but I realized that for writing into an >>> STL file, I have to create a triangle filter from my geometry. And, to >>> create the triangle filter, I need to extract surface of my unstructured >>> grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I was not >>> able to set an input to an instance of this class from a >>> vtkUnstructuredGrid. >>> >>> I am not sure if my approach is correct. I would be really grateful if >>> you have any idea how to solve this. >>> >>> Many Thanks, >>> Reza >>> >>> _______________________________________________ >>> 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 >>> >> > > > > -- > PhD Candidate, > Spencer Engineering Building Room 37 > University of Western Ontario > London, ON, Canada, N6A 5B9 > > _______________________________________________ > 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 mfaieghi at westerneng.ca Sun Nov 13 16:55:58 2016 From: mfaieghi at westerneng.ca (Reza Faieghi) Date: Sun, 13 Nov 2016 16:55:58 -0500 Subject: [vtkusers] how to write an unstructured grid into a stl file In-Reply-To: References: Message-ID: Thanks David. That solved the problem! Reza On Nov 13, 2016 3:25 PM, "David Cole" wrote: > Have you tried: > > #include "vtkDataSetSurfaceFilter.h" > > in that source file? > > > > On Sun, Nov 13, 2016 at 12:03 PM, Reza Faieghi > wrote: > > Hi Utkarsh, > > > > Thanks for the reply. I use the following code just like yours but I get > > some errors that dsf is a pointer to an incomplete class type: > > > > 1 vtkSmartPointer ug = > > vtkSmartPointer::New(); > > 2 vtkSmartPointer dsf = > > vtkSmartPointer::New(); > > 3 dsf->SetInputData(ug); > > 4 dsf->Update(); > > 5 vtkSmartPointer triangleFilterx = > > vtkSmartPointer::New(); > > 6 triangleFilterx->SetInputConnection(dsf); > > 7 triangleFilterx->Update(); > > 8 vtkSmartPointer stlWriter = > > vtkSmartPointer::New(); > > 9 std::string name = "file.stl"; > > 10 stlWriter->SetFileName(file.c_str()); > > 11 stlWriter->SetInputConnection(triangleFilterx->GetOutputPort()); > > 12 stlWriter->Write(); > > > > At line 3, I am getting these errors: > > > > use of undefined type 'vtkDataSetSurfaceFilter' > > 'SetInputData' : is not a member of > > 'vtkSmartPointer' > > 'Update' : is not a member of > > 'vtkSmartPointer' > > > > I think the way that I am using vtkDataSetSurfaceFilter is not correct. > How > > can I use it in a proper way? > > > > Thanks, > > Reza > > > > > > On Sun, Nov 13, 2016 at 10:55 AM, Utkarsh Ayachit > > wrote: > >> > >> vtkDataSetSurfaceFilter is indeed the way to go. You should be able to > set > >> an unstructrued grid as input. Not sure why it didn't work for you? > Doesn't > >> the following code work: > >> > >> vtkUnstructuredGrid* ug = ... > >> vtkDataSetSurfaceFilter* dsf = ... > >> dsf->SetInputDataObject(ug); > >> > >> Utkarsh > >> > >> On Sun, Nov 13, 2016 at 5:20 AM, Reza Faieghi > >> wrote: > >>> > >>> Hello, > >>> > >>> I am wondering is there a way to write an unstructured grid into an STL > >>> file? > >>> > >>> I am not sure if this is correct but I realized that for writing into > an > >>> STL file, I have to create a triangle filter from my geometry. And, to > >>> create the triangle filter, I need to extract surface of my > unstructured > >>> grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I > was not > >>> able to set an input to an instance of this class from a > >>> vtkUnstructuredGrid. > >>> > >>> I am not sure if my approach is correct. I would be really grateful if > >>> you have any idea how to solve this. > >>> > >>> Many Thanks, > >>> Reza > >>> > >>> _______________________________________________ > >>> 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 > >>> > >> > > > > > > > > -- > > PhD Candidate, > > Spencer Engineering Building Room 37 > > University of Western Ontario > > London, ON, Canada, N6A 5B9 > > > > _______________________________________________ > > 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 lmklgm at naver.com Mon Nov 14 01:39:51 2016 From: lmklgm at naver.com (MK.LEE) Date: Sun, 13 Nov 2016 23:39:51 -0700 (MST) Subject: [vtkusers] I want to make multi vtkQuad data to a vtkPolyData field Message-ID: <1479105591790-5741154.post@n5.nabble.com> Hello vtk users I study VTK to visualize .dyn model. I read .dyn Data and complete showing to renderer whole dyn data. But, i want to seperate shell Data by Part ID. for exameple: ShellID PartID NodeID1 2 3 4 1 11 1 2 3 4 2 11 5 6 7 8 3 2 9 10 11 12 4 12 13 2 14 15 5 11 11 12 23 24 And, I wrote code like this: vtkSmartPointer quad = vtkSmartPointer::New(); vtkSmartPointer quads = vtkSmartPointer::New(); for(initial;size;++) { quad->GetPointIds()->SetId(0, NodeID_1); quad->GetPointIds()->SetId(1, NodeID_2); quad->GetPointIds()->SetId(2, NodeID_3); quad->GetPointIds()->SetId(3, NodeID_4); } vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints(points); polydata->SetPolys(quads); -------------------------------------- I check that I can put multi Quad Data to CellArray Data. But, I have to make Quad Data Partly visualize. How to make multi Quad Data save to vtkPolyData? Do I must make multi vtkQuad Class as much as number of Shell Part? -- View this message in context: http://vtk.1045678.n5.nabble.com/I-want-to-make-multi-vtkQuad-data-to-a-vtkPolyData-field-tp5741154.html Sent from the VTK - Users mailing list archive at Nabble.com. From luis.vieira at vektore.com Mon Nov 14 10:12:13 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Mon, 14 Nov 2016 10:12:13 -0500 Subject: [vtkusers] Image Analysis Message-ID: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> Hello vtkusers, Anybody knows the new version of these components? vtkpxAnalyzeImageSource vtkpxOrthoImageSlice vtkpxImageSlice vtkpxObliqueSlice vtkpxVolume vtkImageShiftScale vtkpxAnalyzeImageWriter Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cp.vtk.user at googlemail.com Mon Nov 14 10:47:40 2016 From: cp.vtk.user at googlemail.com (C P) Date: Mon, 14 Nov 2016 16:47:40 +0100 Subject: [vtkusers] Get all connected components of a vtkPolyData Message-ID: Dear vtk users, I would like to extract the connected components of a mesh which is given as a vtkPolyData object. I know that vtkPolyDataConnectivityFilter is supposed to do this. But how can I use this filter? I have to process each component separately. I tried to get the i-th component of 'my_mesh' as follows: vtkPolyDataConnectivityFilter* filer = vtkPolyDataConnectivityFilter::New(); filter->SetInputData(my_mesh); filter->SetExtractionModeToSpecifiedRegions(); filter->AddSpecifiedRegion(i); filter->Update(); vtkPolyData* component = filter->GetOutput(); // process component .... However, I get the same result, no matter what i I use. I tried with SetExtractionModeToAllRegions() but it's the same. How should I get the i-th component? Thank you, cp -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.zimmer at rwth-aachen.de Mon Nov 14 13:29:44 2016 From: andre.zimmer at rwth-aachen.de (Andre Zimmer) Date: Mon, 14 Nov 2016 19:29:44 +0100 Subject: [vtkusers] HELP Wanted: Visualizing data from an OpenFOAM simulation In-Reply-To: References: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> Message-ID: Hi, I noticed that this approach only shows one component of the array in this case the X-component of the velocity. I have figured out that I can set my color map to cmap.SetVectorModeToMagnitude() but this does not seem to do much. Is there a simple setting I am not aware of or do I have to manually calculate the vector magnitude? Thanks, Andr? On 11/08/2016 08:54 PM, Bill Lorensen wrote: > Andre, > > BTW: Thanks for providing a runnable script and data. Makes it easier to help. > > Enjoy VTK, > > Bill > > > On Tue, Nov 8, 2016 at 2:52 PM, Bill Lorensen wrote: >> You need to set the active scalar for the point data and specify the >> range of the scalars for the mapper. >> >> See: >> #! >> import vtk >> file_name = "U_nearWalls.vtk" >> >> reader = vtk.vtkPolyDataReader() >> reader.SetFileName(file_name) >> reader.ReadAllScalarsOn() >> reader.ReadAllVectorsOn() >> reader.Update() >> reader.GetOutput().GetPointData().SetActiveScalars("U") >> mapper=vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(reader.GetOutputPort()) >> mapper.SetScalarRange(reader.GetOutput().GetPointData().GetScalars().GetRange()) >> actor=vtk.vtkActor() >> actor.SetMapper(mapper) >> >> renderer = vtk.vtkRenderer() >> renderer.AddActor(actor) >> renderer.SetBackground(0.1, 0.2, 0.4) >> render_window = vtk.vtkRenderWindow() >> render_window.AddRenderer(renderer) >> render_window.SetSize(300, 300) >> interactor = vtk.vtkRenderWindowInteractor() >> interactor.SetRenderWindow(render_window) >> >> interactor.Initialize() >> render_window.Render() >> interactor.Start() >> >> On Tue, Nov 8, 2016 at 1:08 PM, Andre Zimmer >> wrote: >>> Hi, >>> by now I have spend days trying to visualize data from the OpenFOAM sample >>> function object. >>> Here is a small test case: >>> https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 >>> >>> No matter what I do I always get a gray car. I have tried specifically >>> setting the scalar, vector, array, transforming and all kinds of stuff >>> without success. >>> In the simplest form I think the Python code should look like this: >>> >>> import vtk >>> file_name = "U_nearWalls.vtk" >>> >>> reader = vtk.vtkPolyDataReader() >>> reader.SetFileName(file_name) >>> reader.ReadAllScalarsOn() >>> reader.ReadAllVectorsOn() >>> reader.Update() >>> >>> mapper=vtk.vtkPolyDataMapper() >>> mapper.SetInputConnection(reader.GetOutputPort()) >>> >>> actor=vtk.vtkActor() >>> actor.SetMapper(mapper) >>> >>> renderer = vtk.vtkRenderer() >>> renderer.AddActor(actor) >>> renderer.SetBackground(0.1, 0.2, 0.4) >>> render_window = vtk.vtkRenderWindow() >>> render_window.AddRenderer(renderer) >>> render_window.SetSize(300, 300) >>> interactor = vtk.vtkRenderWindowInteractor() >>> interactor.SetRenderWindow(render_window) >>> >>> interactor.Initialize() >>> render_window.Render() >>> interactor.Start() >>> >>> >>> I am using Fedora 24, Python 2.7, VTK 6.3. >>> I assume it is only a small mistake I am making so hopefully someone can >>> help. >>> >>> Thank you in advance, >>> Andr? >>> _______________________________________________ >>> 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 spir.robert at gmail.com Mon Nov 14 14:31:16 2016 From: spir.robert at gmail.com (RobertS) Date: Mon, 14 Nov 2016 12:31:16 -0700 (MST) Subject: [vtkusers] polydata are clipped after modifying underlying vtkpoints Message-ID: <1479151876424-5741162.post@n5.nabble.com> Hi all, I'm constructing 3d model from points on rectangular grid using vtktrianglestrip, everything works ok, except for when I use function to modify the point coordinates (by increasing "height" of the points), whereupon the displayed model starts to get clipped. You can see what I'm talking about in these images: http://tesla.math.sk/pics/model1.jpg - this is original model, everything looks ok http://tesla.math.sk/pics/model2.jpg - here you can see the model after increasing the point height by a factor of 2, everything still looks good http://tesla.math.sk/pics/model3.jpg - here after another height increase the model is clipped. When I rotate the model, it emerges from the back, but then it gets clipped in the front. I have no idea why is this happening. After points modification I call vtkdatasetmapper->update() and then display the new actor in vtkrenderer Thanks for any help. Robert -- View this message in context: http://vtk.1045678.n5.nabble.com/polydata-are-clipped-after-modifying-underlying-vtkpoints-tp5741162.html Sent from the VTK - Users mailing list archive at Nabble.com. From lmklgm at naver.com Tue Nov 15 02:08:05 2016 From: lmklgm at naver.com (MK.LEE) Date: Tue, 15 Nov 2016 00:08:05 -0700 (MST) Subject: [vtkusers] Can I apply vector function to mapper like actor? Message-ID: <1479193685723-5741165.post@n5.nabble.com> Hi :) I want to draw multi triangle each triangle by multi actor. like this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorOfActors In this example, I can apply multi actor using vector function. Then, Can I apply vector function to polydata, mapper like 'VectorOfAcotrs example'? I wrote my code: -------------------------------------------------- *//'CoordV_Shell[ManyShell].NodeID_1,2,3,4' is point number* for (unsigned int ManyShell = 0; ManyShell < CoordV_Shell.size(); ManyShell++) { quad->GetPointIds()->SetId(0, CoordV_Shell[ManyShell].NodeID_1); quad->GetPointIds()->SetId(1, CoordV_Shell[ManyShell].NodeID_2); quad->GetPointIds()->SetId(2, CoordV_Shell[ManyShell].NodeID_3); quad->GetPointIds()->SetId(3, CoordV_Shell[ManyShell].NodeID_4); quads->InsertNextCell(quad); vectorArray.push_back(quads); polydata->Allocate(); polydata->SetPoints(points); polydata->SetPolys(vectorArray[ManyShell]); vectorPoly.push_back(polydata); mapper->SetInputData(vectorPoly[ManyShell]); vectorMapper.push_back(mapper); actor->SetMapper(vectorMapper[ManyShell]); vectorActor.push_back(actor); renderer->AddActor(vectorActor[ManyShell]); //It is wrote in example. It's possible } ----------------------------- Can I apply vector function to polydata and mapper? -- View this message in context: http://vtk.1045678.n5.nabble.com/Can-I-apply-vector-function-to-mapper-like-actor-tp5741165.html Sent from the VTK - Users mailing list archive at Nabble.com. From andre.zimmer at rwth-aachen.de Tue Nov 15 06:30:20 2016 From: andre.zimmer at rwth-aachen.de (Andre Zimmer) Date: Tue, 15 Nov 2016 12:30:20 +0100 Subject: [vtkusers] HELP Wanted: Visualizing data from an OpenFOAM simulation In-Reply-To: References: <43542680-d182-3b3b-65f0-80fbd2a74fde@rwth-aachen.de> Message-ID: <285eba05-bfe3-f967-d59e-87239e48cffb@rwth-aachen.de> Ok, after a lot of research I figured it out, as it might help other as well here you go: import vtk file_name = "U_nearWalls.vtk" reader = vtk.vtkPolyDataReader() reader.SetFileName(file_name) reader.ReadAllScalarsOn() reader.ReadAllVectorsOn() reader.Update() reader.GetOutput().GetPointData().SetActiveScalars("U") #reader.SetNumberOfComponents(3) #reader.GetOutput().GetPointData().GetArray("U") #reader.UsePointFieldData() calculator=vtk.vtkArrayCalculator() calculator.SetInputConnection(reader.GetOutputPort()) calculator.AddVectorArrayName("U") calculator.SetFunction("mag(U)") calculator.SetResultArrayName("magU") calculator.Update() mapper=vtk.vtkPolyDataMapper() mapper.SetInputArrayToProcess(1,0,0,0,'magU') #mapper.SetInterpolateScalarsBeforeMapping(1) #mapper.SetNumberOfComponents(3) #mapper.SetInputConnection(reader.GetOutputPort()) mapper.SetInputConnection(calculator.GetOutputPort()) mapper.SetScalarRange(calculator.GetOutput().GetPointData().GetScalars().GetRange()) #mapper.SetScalarRange(0,75) #mapper.ScalarVisibilityOn() #mapper.UsePointFieldData() print('range: ',(calculator.GetOutput().GetPointData().GetScalars().GetRange())) actor=vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(0.1, 0.2, 0.4) render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) render_window.SetSize(600, 600) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(render_window) interactor.Initialize() render_window.Render() interactor.Start() On 11/14/2016 07:29 PM, Andre Zimmer wrote: > Hi, > > I noticed that this approach only shows one component of the array in > this case the X-component of the velocity. > > I have figured out that I can set my color map to > cmap.SetVectorModeToMagnitude() but this does not seem to do much. > > Is there a simple setting I am not aware of or do I have to manually > calculate the vector magnitude? > > > Thanks, > Andr? > > > On 11/08/2016 08:54 PM, Bill Lorensen wrote: >> Andre, >> >> BTW: Thanks for providing a runnable script and data. Makes it easier >> to help. >> >> Enjoy VTK, >> >> Bill >> >> >> On Tue, Nov 8, 2016 at 2:52 PM, Bill Lorensen >> wrote: >>> You need to set the active scalar for the point data and specify the >>> range of the scalars for the mapper. >>> >>> See: >>> #! >>> import vtk >>> file_name = "U_nearWalls.vtk" >>> >>> reader = vtk.vtkPolyDataReader() >>> reader.SetFileName(file_name) >>> reader.ReadAllScalarsOn() >>> reader.ReadAllVectorsOn() >>> reader.Update() >>> reader.GetOutput().GetPointData().SetActiveScalars("U") >>> mapper=vtk.vtkPolyDataMapper() >>> mapper.SetInputConnection(reader.GetOutputPort()) >>> mapper.SetScalarRange(reader.GetOutput().GetPointData().GetScalars().GetRange()) >>> >>> actor=vtk.vtkActor() >>> actor.SetMapper(mapper) >>> >>> renderer = vtk.vtkRenderer() >>> renderer.AddActor(actor) >>> renderer.SetBackground(0.1, 0.2, 0.4) >>> render_window = vtk.vtkRenderWindow() >>> render_window.AddRenderer(renderer) >>> render_window.SetSize(300, 300) >>> interactor = vtk.vtkRenderWindowInteractor() >>> interactor.SetRenderWindow(render_window) >>> >>> interactor.Initialize() >>> render_window.Render() >>> interactor.Start() >>> >>> On Tue, Nov 8, 2016 at 1:08 PM, Andre Zimmer >>> wrote: >>>> Hi, >>>> by now I have spend days trying to visualize data from the OpenFOAM >>>> sample >>>> function object. >>>> Here is a small test case: >>>> https://www.dropbox.com/s/5bhic1ms0anzrno/U_nearWalls.vtk?dl=0 >>>> >>>> No matter what I do I always get a gray car. I have tried specifically >>>> setting the scalar, vector, array, transforming and all kinds of stuff >>>> without success. >>>> In the simplest form I think the Python code should look like this: >>>> >>>> import vtk >>>> file_name = "U_nearWalls.vtk" >>>> >>>> reader = vtk.vtkPolyDataReader() >>>> reader.SetFileName(file_name) >>>> reader.ReadAllScalarsOn() >>>> reader.ReadAllVectorsOn() >>>> reader.Update() >>>> >>>> mapper=vtk.vtkPolyDataMapper() >>>> mapper.SetInputConnection(reader.GetOutputPort()) >>>> >>>> actor=vtk.vtkActor() >>>> actor.SetMapper(mapper) >>>> >>>> renderer = vtk.vtkRenderer() >>>> renderer.AddActor(actor) >>>> renderer.SetBackground(0.1, 0.2, 0.4) >>>> render_window = vtk.vtkRenderWindow() >>>> render_window.AddRenderer(renderer) >>>> render_window.SetSize(300, 300) >>>> interactor = vtk.vtkRenderWindowInteractor() >>>> interactor.SetRenderWindow(render_window) >>>> >>>> interactor.Initialize() >>>> render_window.Render() >>>> interactor.Start() >>>> >>>> >>>> I am using Fedora 24, Python 2.7, VTK 6.3. >>>> I assume it is only a small mistake I am making so hopefully >>>> someone can >>>> help. >>>> >>>> Thank you in advance, >>>> Andr? >>>> _______________________________________________ >>>> 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 >> >> > > _______________________________________________ > 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 mjordan at live.at Tue Nov 15 07:37:48 2016 From: mjordan at live.at (M. Jordan) Date: Tue, 15 Nov 2016 12:37:48 +0000 Subject: [vtkusers] Change VTK actor property in a Qt callback function Message-ID: All my vtk related code is in the constructor function of a Qt GUI. There I can change a property of a VTK actor like this: actor->GetProperty()->SetColor(0, 0, 0.15); But I want to change this proberty in a callback function from a button. void MainWindow::button_click() { actor->GetProperty()->SetColor(0,0, 0.15); } Of course "actor" is not defined there. What can I do to acess "actor" in this callback function? (Sry I am an OOP beginner) -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Nov 15 10:33:41 2016 From: david.lonie at kitware.com (David Lonie) Date: Tue, 15 Nov 2016 10:33:41 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> Message-ID: I've never heard of the vtkpx* stuff, is that an external add-on? vtkImageShiftScale is still available in VTK's ImagingCore library. On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira wrote: > Hello vtkusers, > > > > Anybody knows the new version of these components? > > > > vtkpxAnalyzeImageSource > > vtkpxOrthoImageSlice > > vtkpxImageSlice > > vtkpxObliqueSlice > > vtkpxVolume > > vtkImageShiftScale > > vtkpxAnalyzeImageWriter > > > > > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 gurunandan at outlook.com Tue Nov 15 12:24:25 2016 From: gurunandan at outlook.com (Guru Krishnan) Date: Tue, 15 Nov 2016 17:24:25 +0000 Subject: [vtkusers] VTK downoad not accessible Message-ID: I am trying to download VTK 6.3 using the link http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz but I get a 403 forbidden / Permission denied message. Can you please fix it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Nov 15 12:33:24 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 15 Nov 2016 12:33:24 -0500 Subject: [vtkusers] VTK downoad not accessible In-Reply-To: References: Message-ID: I see the same issue. I have cc'ed the developers list. On Tue, Nov 15, 2016 at 12:24 PM, Guru Krishnan wrote: > I am trying to download VTK 6.3 using the link > http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz but I get a 403 > forbidden / Permission denied message. Can you please fix it? > > > _______________________________________________ > 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 luis.vieira at vektore.com Tue Nov 15 12:51:02 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 15 Nov 2016 12:51:02 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> Message-ID: <103a701d23f68$d58aae70$80a00b50$@vektore.com> This is referenced as an update of the version of vtk 5.2 to be applied in Medical Image Analysis (http://bioimagesuite.yale.edu/vtkbook/xpvtkbook5_tcm501-95556_tcm501-284-32.pdf). We work with VTK 7.0 image analysis, which is closely related to the same functionality described in this document and uses these components. Also, googling, you can find different papers that are referring the use of the vtkpx components. That's why I came across this version. Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: David Lonie [mailto:david.lonie at kitware.com] Sent: November 15, 2016 10:34 AM To: Luis Vieira Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Image Analysis I've never heard of the vtkpx* stuff, is that an external add-on? vtkImageShiftScale is still available in VTK's ImagingCore library. On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira > wrote: Hello vtkusers, Anybody knows the new version of these components? vtkpxAnalyzeImageSource vtkpxOrthoImageSlice vtkpxImageSlice vtkpxObliqueSlice vtkpxVolume vtkImageShiftScale vtkpxAnalyzeImageWriter Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.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 bill.lorensen at gmail.com Tue Nov 15 13:04:53 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 15 Nov 2016 13:04:53 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: <103a701d23f68$d58aae70$80a00b50$@vektore.com> References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> <103a701d23f68$d58aae70$80a00b50$@vektore.com> Message-ID: Looks like files are part of BioImageSuite: http://bioimagesuite.yale.edu/lands/ It uses an older version of VTK (5.2). You should contact the authors of BioImageSuite to determine its current status. Bill On Tue, Nov 15, 2016 at 12:51 PM, Luis Vieira wrote: > This is referenced as an update of the version of vtk 5.2 to be applied in > Medical Image Analysis > (http://bioimagesuite.yale.edu/vtkbook/xpvtkbook5_tcm501-95556_tcm501-284-32.pdf). > We work with VTK 7.0 image analysis, which is closely related to the same > functionality described in this document and uses these components. Also, > googling, you can find different papers that are referring the use of the > vtkpx components. That's why I came across this version. > > > > Thank you, > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > From: David Lonie [mailto:david.lonie at kitware.com] > Sent: November 15, 2016 10:34 AM > To: Luis Vieira > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Image Analysis > > > > I've never heard of the vtkpx* stuff, is that an external add-on? > > > > vtkImageShiftScale is still available in VTK's ImagingCore library. > > > > On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira > wrote: > > Hello vtkusers, > > > > Anybody knows the new version of these components? > > > > vtkpxAnalyzeImageSource > > vtkpxOrthoImageSlice > > vtkpxImageSlice > > vtkpxObliqueSlice > > vtkpxVolume > > vtkImageShiftScale > > vtkpxAnalyzeImageWriter > > > > > > Thank you, > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 > > > > > _______________________________________________ > 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 dan.lipsa at kitware.com Tue Nov 15 13:16:17 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Nov 2016 13:16:17 -0500 Subject: [vtkusers] Change VTK actor property in a Qt callback function In-Reply-To: References: Message-ID: Move your actor and maybe other VTK objects as fields of your gui object. This way you can access them in your event handler. On Tue, Nov 15, 2016 at 7:37 AM, M. Jordan wrote: > All my vtk related code is in the constructor function of a Qt GUI. There > I can change a property of a VTK actor like this: > > actor->GetProperty()->SetColor(0, 0, 0.15); > > But I want to change this proberty in a callback function from a button. > > void MainWindow::button_click() { actor->GetProperty()->SetColor(0,0, > 0.15); } > > Of course "actor" is not defined there. What can I do to acess "actor" in > this callback function? > > (Sry I am an OOP beginner) > > > _______________________________________________ > 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 luis.vieira at vektore.com Tue Nov 15 13:58:05 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 15 Nov 2016 13:58:05 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> <103a701d23f68$d58aae70$80a00b50$@vektore.com> Message-ID: <11b8b01d23f72$33191870$994b4950$@vektore.com> Bill, That?s true. Are you one of the authors? I just saw your name in the Visualization Toolkit part from bioimagesuite. Thank you, Luis Vieira Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: November 15, 2016 1:05 PM To: Luis Vieira Cc: David Lonie ; VTK Users Subject: Re: [vtkusers] Image Analysis Looks like files are part of BioImageSuite: http://bioimagesuite.yale.edu/lands/ It uses an older version of VTK (5.2). You should contact the authors of BioImageSuite to determine its current status. Bill On Tue, Nov 15, 2016 at 12:51 PM, Luis Vieira wrote: > This is referenced as an update of the version of vtk 5.2 to be > applied in Medical Image Analysis > (http://bioimagesuite.yale.edu/vtkbook/xpvtkbook5_tcm501-95556_tcm501-284-32.pdf). > We work with VTK 7.0 image analysis, which is closely related to the > same functionality described in this document and uses these > components. Also, googling, you can find different papers that are > referring the use of the vtkpx components. That's why I came across this version. > > > > Thank you, > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > From: David Lonie [mailto:david.lonie at kitware.com] > Sent: November 15, 2016 10:34 AM > To: Luis Vieira > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Image Analysis > > > > I've never heard of the vtkpx* stuff, is that an external add-on? > > > > vtkImageShiftScale is still available in VTK's ImagingCore library. > > > > On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira > > wrote: > > Hello vtkusers, > > > > Anybody knows the new version of these components? > > > > vtkpxAnalyzeImageSource > > vtkpxOrthoImageSlice > > vtkpxImageSlice > > vtkpxObliqueSlice > > vtkpxVolume > > vtkImageShiftScale > > vtkpxAnalyzeImageWriter > > > > > > Thank you, > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 > > > > > _______________________________________________ > 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 Tue Nov 15 15:08:12 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 15 Nov 2016 15:08:12 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: <11b8b01d23f72$33191870$994b4950$@vektore.com> References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> <103a701d23f68$d58aae70$80a00b50$@vektore.com> <11b8b01d23f72$33191870$994b4950$@vektore.com> Message-ID: A VTK/ITK author, but not bioimagesuite On Tue, Nov 15, 2016 at 1:58 PM, Luis Vieira wrote: > Bill, > > That?s true. Are you one of the authors? I just saw your name in the Visualization Toolkit part from bioimagesuite. > > Thank you, > > Luis Vieira > Consultant, Software Engineer > Vektore Exploration Consulting Corporation > ca.linkedin.com/in/joaoluisvieira > luis.vieira at vektore.com > www.vektore.com > > -----Original Message----- > From: Bill Lorensen [mailto:bill.lorensen at gmail.com] > Sent: November 15, 2016 1:05 PM > To: Luis Vieira > Cc: David Lonie ; VTK Users > Subject: Re: [vtkusers] Image Analysis > > Looks like files are part of BioImageSuite: http://bioimagesuite.yale.edu/lands/ > > It uses an older version of VTK (5.2). > > You should contact the authors of BioImageSuite to determine its current status. > > Bill > > > > On Tue, Nov 15, 2016 at 12:51 PM, Luis Vieira wrote: >> This is referenced as an update of the version of vtk 5.2 to be >> applied in Medical Image Analysis >> (http://bioimagesuite.yale.edu/vtkbook/xpvtkbook5_tcm501-95556_tcm501-284-32.pdf). >> We work with VTK 7.0 image analysis, which is closely related to the >> same functionality described in this document and uses these >> components. Also, googling, you can find different papers that are >> referring the use of the vtkpx components. That's why I came across this version. >> >> >> >> Thank you, >> >> >> >> Luis Vieira, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> From: David Lonie [mailto:david.lonie at kitware.com] >> Sent: November 15, 2016 10:34 AM >> To: Luis Vieira >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Image Analysis >> >> >> >> I've never heard of the vtkpx* stuff, is that an external add-on? >> >> >> >> vtkImageShiftScale is still available in VTK's ImagingCore library. >> >> >> >> On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira >> >> wrote: >> >> Hello vtkusers, >> >> >> >> Anybody knows the new version of these components? >> >> >> >> vtkpxAnalyzeImageSource >> >> vtkpxOrthoImageSlice >> >> vtkpxImageSlice >> >> vtkpxObliqueSlice >> >> vtkpxVolume >> >> vtkImageShiftScale >> >> vtkpxAnalyzeImageWriter >> >> >> >> >> >> Thank you, >> >> >> >> Luis Vieira, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.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 >> >> >> >> >> _______________________________________________ >> 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 chris.marsh at usask.ca Tue Nov 15 15:09:30 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 15 Nov 2016 14:09:30 -0600 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: No problem. Does anyone know who would be able to amend the example I linked above to include the string? It is not at all clear from the docs that string behaves differently. On 11 November 2016 at 09:30, Cory Quammen wrote: > Ah, yes, I should have caught that you would be using a > vtkStringArray, which is not accessed the same way as the numeric data > arrays. Glad you found the solution. > > Cory > > On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh wrote: > > Hi all, > > > > Following the advice here > > http://public.kitware.com/pipermail/paraview/2012-September/026100.html > > > > worked. That is, in Python, the following works > > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) > > > > > > On 9 November 2016 at 15:54, Chris Marsh wrote: > >> > >> Hi Cory, > >> Thanks for the reply. This looks like a perfect way forward. > >> > >> I am following this > >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > >> > >> and am having troubles with this approach. The field data doesn't seem > to > >> be set properly. I can see the field data *name* in paraview when I > load my > >> mesh, but it has an NA value. > >> > >> > >> What I'm doing is: > >> > >> std::string _srs_wkt = "my projection data here"; > >> vtkSmartPointer proj4 = > >> vtkSmartPointer::New(); > >> proj4->SetNumberOfComponents(1); > >> proj4->SetName("proj4"); > >> proj4->InsertNextValue(_srs_wkt); > >> > >> vtkSmartPointer _vtk_unstructuredGrid = > >> vtkSmartPointer::New(); > >> > >> //... build up _vtk_unstructuredGrid etc. > >> > >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); > >> > >> //validate > >> vtkStringArray* test = > >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetField > Data()->GetArray("proj4")); > >> > >> //test is NULL > >> > >> any ideas? > >> Thanks > >> > >> > >> Chris Marsh > >> PhD Candidate > >> chrismarsh.ca > >> > >> 13 Kirk Hall > >> University of Saskatchewan > >> > >> On 9 November 2016 at 01:31, Cory Quammen > >> wrote: > >>> > >>> Hi Chris, > >>> > >>> Usually we stuff this kind of data into the generic field data (arrays > >>> not associated with points of cells) in the data set. The VTU > >>> reader/writer supports reading/writing field data. > >>> > >>> HTH, > >>> Cory > >>> > >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh > wrote: > >>> > Hi, > >>> > > >>> > I would like to add some extra meta-data to a pvd file. > Specifically, a > >>> > proj4 string containing information about the coordinate system > >>> > projection > >>> > of the data contained in a vtu file. > >>> > > >>> > Is there a recommended way to do this? > >>> > > >>> > Cheers > >>> > Chris > >>> > > >>> > _______________________________________________ > >>> > 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 shawn.waldon at kitware.com Tue Nov 15 15:23:26 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 15 Nov 2016 15:23:26 -0500 Subject: [vtkusers] [vtk-developers] VTK downoad not accessible In-Reply-To: References: Message-ID: Hi Bill & Guru, I forwarded it to the sysadmins and it should be fixed now. I can access the download again. Shawn On Tue, Nov 15, 2016 at 12:33 PM, Bill Lorensen wrote: > I see the same issue. I have cc'ed the developers list. > > > On Tue, Nov 15, 2016 at 12:24 PM, Guru Krishnan > wrote: > > I am trying to download VTK 6.3 using the link > > http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz but I get a 403 > > forbidden / Permission denied message. Can you please fix it? > > > > > > _______________________________________________ > > 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 > _______________________________________________ > 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 bill.lorensen at gmail.com Tue Nov 15 15:50:32 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 15 Nov 2016 15:50:32 -0500 Subject: [vtkusers] [vtk-developers] VTK downoad not accessible In-Reply-To: References: Message-ID: Great, works for me now... On Tue, Nov 15, 2016 at 3:23 PM, Shawn Waldon wrote: > Hi Bill & Guru, > > I forwarded it to the sysadmins and it should be fixed now. I can access > the download again. > > Shawn > > On Tue, Nov 15, 2016 at 12:33 PM, Bill Lorensen > wrote: >> >> I see the same issue. I have cc'ed the developers list. >> >> >> On Tue, Nov 15, 2016 at 12:24 PM, Guru Krishnan >> wrote: >> > I am trying to download VTK 6.3 using the link >> > http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz but I get a 403 >> > forbidden / Permission denied message. Can you please fix it? >> > >> > >> > _______________________________________________ >> > 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 >> _______________________________________________ >> 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 >> > -- Unpaid intern in BillsBasement at noware dot com From gurunandan at outlook.com Tue Nov 15 16:48:28 2016 From: gurunandan at outlook.com (Guru Krishnan) Date: Tue, 15 Nov 2016 21:48:28 +0000 Subject: [vtkusers] [vtk-developers] VTK downoad not accessible In-Reply-To: References: , Message-ID: Awesome. Thanks! ________________________________ From: Bill Lorensen Sent: Tuesday, November 15, 2016 12:50:32 PM To: Shawn Waldon Cc: Guru Krishnan; VTK Developers; vtkusers at vtk.org Subject: Re: [vtk-developers] [vtkusers] VTK downoad not accessible Great, works for me now... On Tue, Nov 15, 2016 at 3:23 PM, Shawn Waldon wrote: > Hi Bill & Guru, > > I forwarded it to the sysadmins and it should be fixed now. I can access > the download again. > > Shawn > > On Tue, Nov 15, 2016 at 12:33 PM, Bill Lorensen > wrote: >> >> I see the same issue. I have cc'ed the developers list. >> >> >> On Tue, Nov 15, 2016 at 12:24 PM, Guru Krishnan >> wrote: >> > I am trying to download VTK 6.3 using the link >> > http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz but I get a 403 >> > forbidden / Permission denied message. Can you please fix it? >> > >> > >> > _______________________________________________ >> > 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 >> _______________________________________________ >> 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 >> > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfaieghi at westerneng.ca Tue Nov 15 16:38:20 2016 From: mfaieghi at westerneng.ca (Reza Faieghi) Date: Tue, 15 Nov 2016 16:38:20 -0500 Subject: [vtkusers] unable to allocate 178MB for an array Message-ID: Hello, I am trying to extract surface of a goemetry and write it into a STL. I use vtkSmartPointer dsf = vtkSmartPointer::New(); dsf->SetInputData(ug); dsf->Update(); But I am getting this error in vtkOutputWindow: vtkIdTypeArray (00C30690): Unable to allocate 46656437 elements of size 4 bytes. This is about 187MB memory; however, I can not allocate this amount of memory on a 12GB RAM. I believe that I must be able to allocate this chunk of memory but for some reason it does not go through. I tried to delete every other arrays in my program to make sure that there are not any hidden consumption of RAM but that didnot help. I will be grateful if anyone has any idea how to fix this. Many thanks! Reza -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Tue Nov 15 20:21:41 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 15 Nov 2016 20:21:41 -0500 Subject: [vtkusers] Image Analysis In-Reply-To: References: <22e501d23e89$7b47a420$71d6ec60$@vektore.com> <103a701d23f68$d58aae70$80a00b50$@vektore.com> <11b8b01d23f72$33191870$994b4950$@vektore.com> Message-ID: Ok thank you. Sent from my iPhone > On Nov 15, 2016, at 3:08 PM, Bill Lorensen wrote: > > A VTK/ITK author, but not bioimagesuite > > On Tue, Nov 15, 2016 at 1:58 PM, Luis Vieira wrote: >> Bill, >> >> That?s true. Are you one of the authors? I just saw your name in the Visualization Toolkit part from bioimagesuite. >> >> Thank you, >> >> Luis Vieira >> Consultant, Software Engineer >> Vektore Exploration Consulting Corporation >> ca.linkedin.com/in/joaoluisvieira >> luis.vieira at vektore.com >> www.vektore.com >> >> -----Original Message----- >> From: Bill Lorensen [mailto:bill.lorensen at gmail.com] >> Sent: November 15, 2016 1:05 PM >> To: Luis Vieira >> Cc: David Lonie ; VTK Users >> Subject: Re: [vtkusers] Image Analysis >> >> Looks like files are part of BioImageSuite: http://bioimagesuite.yale.edu/lands/ >> >> It uses an older version of VTK (5.2). >> >> You should contact the authors of BioImageSuite to determine its current status. >> >> Bill >> >> >> >>> On Tue, Nov 15, 2016 at 12:51 PM, Luis Vieira wrote: >>> This is referenced as an update of the version of vtk 5.2 to be >>> applied in Medical Image Analysis >>> (http://bioimagesuite.yale.edu/vtkbook/xpvtkbook5_tcm501-95556_tcm501-284-32.pdf). >>> We work with VTK 7.0 image analysis, which is closely related to the >>> same functionality described in this document and uses these >>> components. Also, googling, you can find different papers that are >>> referring the use of the vtkpx components. That's why I came across this version. >>> >>> >>> >>> Thank you, >>> >>> >>> >>> Luis Vieira, >>> >>> Consultant, Software Engineer >>> >>> Vektore Exploration Consulting Corporation >>> >>> ca.linkedin.com/in/joaoluisvieira >>> >>> luis.vieira at vektore.com >>> >>> www.vektore.com >>> >>> >>> >>> From: David Lonie [mailto:david.lonie at kitware.com] >>> Sent: November 15, 2016 10:34 AM >>> To: Luis Vieira >>> Cc: vtkusers at vtk.org >>> Subject: Re: [vtkusers] Image Analysis >>> >>> >>> >>> I've never heard of the vtkpx* stuff, is that an external add-on? >>> >>> >>> >>> vtkImageShiftScale is still available in VTK's ImagingCore library. >>> >>> >>> >>> On Mon, Nov 14, 2016 at 10:12 AM, Luis Vieira >>> >>> wrote: >>> >>> Hello vtkusers, >>> >>> >>> >>> Anybody knows the new version of these components? >>> >>> >>> >>> vtkpxAnalyzeImageSource >>> >>> vtkpxOrthoImageSlice >>> >>> vtkpxImageSlice >>> >>> vtkpxObliqueSlice >>> >>> vtkpxVolume >>> >>> vtkImageShiftScale >>> >>> vtkpxAnalyzeImageWriter >>> >>> >>> >>> >>> >>> Thank you, >>> >>> >>> >>> Luis Vieira, >>> >>> Consultant, Software Engineer >>> >>> Vektore Exploration Consulting Corporation >>> >>> ca.linkedin.com/in/joaoluisvieira >>> >>> luis.vieira at vektore.com >>> >>> www.vektore.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 >>> >>> >>> >>> >>> _______________________________________________ >>> 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 mail at oliwe.com Wed Nov 16 05:42:58 2016 From: mail at oliwe.com (Oliver Weinheimer) Date: Wed, 16 Nov 2016 03:42:58 -0700 (MST) Subject: [vtkusers] Change of OpenGL Backend Message-ID: <1479292978514-5741188.post@n5.nabble.com> Hi, I am just upgrading a project from using vtk 6.3 to vtk 7.1rc2. Now OpenGL2 Backend should be used. For OpenGL Backend I previously added the lines #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingFreeType); VTK_MODULE_INIT(vtkInteractionStyle); in the main cpp file of my project. Works fine for OpenGL Backend and VTK 6.3 . In order to use OpenGL2 with VTK 7.1 I changed these lines to #include VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkRenderingFreeType); VTK_MODULE_INIT(vtkInteractionStyle); The project compiles fine, but the linker throws: [ilink64 Error] Error: Unresolved external 'vtk_netcdf_nctypelen' referenced from D:\CPPPROJECTS\KITWARE\VTK-7.1.0RC2-BERLIN-RELEASE-STATIC-BCC64\LIB\VTKNETCDF71.A|putget.c.o Any ideas? vtkIONetCDF71.a vtkNetCDF_cxx71.a vtkNetCDF71.a are added to the project. What is missing? Is vtk_netcdf_nctypelen defined elsewhere? I found it in vtk_netcdf_mangle.h ... this stuff should be included in vtkNetCDF71.a - or not? Oliver -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-of-OpenGL-Backend-tp5741188.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Wed Nov 16 06:10:24 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 16 Nov 2016 06:10:24 -0500 Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data In-Reply-To: <1478808640955-5741133.post@n5.nabble.com> References: <1478719240610-5741121.post@n5.nabble.com> <1478808640955-5741133.post@n5.nabble.com> Message-ID: Thanks, this should be fixed in VTK master now. Thanks again! Ken On Thu, Nov 10, 2016 at 3:10 PM, lp wrote: > Hello Ken, > > Thank you for your swift reply. Let me apologize for not being clear enough > in my initial post. I will try to clarify. > > I do not want to color the vertices by cell data. I just want to turn on > the > tubes for the cell edges and the spheres for the vertices, while the cells > are colored by values in a cell data array. Both cell edges and vertex > spheres should just be colored by the constant color set with SetEdgeColor > and SetVertexColor on the actor property. > > In the example that I send before, the sphere has a double array added to > the cell data and set as the active scalar. The mapper is set to > ScalarModeToUseCellData. On the property of the actor both > RenderLinesAsTubesOn and RenderPointsAsSpheresOn are set. However, only the > tubes are shown, the spheres for the vertices are not. > > If I comment out line 36 > > sphereSource->GetOutput()->GetCellData()->SetActiveScalars(" > doubleValues"); > > then both tubes and vertex spheres are shown, but of course the cells are > not colored by their data array. > > So, I wonder why is the rendering of the vertex spheres linked to the > active > scalar on the cell data? Is this expected behavior? > > The example was build with VTK7.1rc2. > > Regards, > Lukas > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/VTK7-1-render-points-as-spheres-does-not-work-when- > coloring-by-cell-data-tp5741121p5741133.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 mjordan at live.at Wed Nov 16 08:15:25 2016 From: mjordan at live.at (M. Jordan) Date: Wed, 16 Nov 2016 13:15:25 +0000 Subject: [vtkusers] VTK updating (qvtkWidget) Message-ID: In render some things in the constructor of my GUI. Now I try to add some spheres and update/redraw the radius of the spheres every second. I have a text file containing the new radius of each sphere and a timer to generate the events. When I am changing a radius in the .txt file (while my program is executed) to a higher value, the sphere grows in real time. But when I decrease the radius, the sphere isn't decreasing. I think that my program doesn't update everything. I use: ui.qvtkWidget->update(); In my timer function everything (expect the renderer and renderwindow) is created each time. So I can't figure out whats the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Wed Nov 16 10:11:07 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 16 Nov 2016 08:11:07 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) Message-ID: <1479309067222-5741192.post@n5.nabble.com> I'm trying to install VTK 7.1 and GDCM 2.6.3 on a Mac (OS Sierra). VTK compiles without any problems, but installing GDCM after that always blocks on the vtkGDCM classes. We've tried both with OpenGL and OpenGL2 and although the errors are different, neither works. Below is an example error. Any thoughts? [ 97%] Linking CXX shared library ../../bin/libvtkgdcm.dylib Undefined symbols for architecture x86_64: "vtkRenderingOpenGL_AutoInit_Destruct()", referenced from: vtkRenderingOpenGL_ModuleInit::~vtkRenderingOpenGL_ModuleInit() in vtkGDCMImageReader.cxx.o vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in vtkGDCMImageReader.cxx.o vtkRenderingOpenGL_ModuleInit::~vtkRenderingOpenGL_ModuleInit() in vtkGDCMImageWriter.cxx.o vtkRenderingOpenGL_ModuleInit::~vtkRenderingOpenGL_ModuleInit() in vtkGDCMThreadedImageReader.cxx.o vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in vtkGDCMImageReader2.cxx.o vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in vtkImageColorViewer.cxx.o "vtkRenderingOpenGL_AutoInit_Construct()", referenced from: vtkRenderingOpenGL_ModuleInit::vtkRenderingOpenGL_ModuleInit() in vtkGDCMImageReader.cxx.o vtkRenderingCore_AutoInit::vtkRenderingCore_AutoInit() in vtkGDCMImageReader.cxx.o vtkRenderingOpenGL_ModuleInit::vtkRenderingOpenGL_ModuleInit() in vtkGDCMImageWriter.cxx.o vtkRenderingOpenGL_ModuleInit::vtkRenderingOpenGL_ModuleInit() in vtkGDCMThreadedImageReader.cxx.o vtkRenderingCore_AutoInit::vtkRenderingCore_AutoInit() in vtkGDCMImageReader2.cxx.o vtkRenderingCore_AutoInit::vtkRenderingCore_AutoInit() in vtkImageColorViewer.cxx.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/libvtkgdcm.2.6.6.dylib] Error 1 make[1]: *** [Utilities/VTK/CMakeFiles/vtkgdcm.dir/all] Error 2 make: *** [all] Error 2 -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Nov 16 10:23:38 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 16 Nov 2016 10:23:38 -0500 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: > Does anyone know who would be able to amend the example I linked above to > include the string? It is not at all clear from the docs that string behaves > differently. Do you mean actually modify that example? Anyone with a wiki account can add an example. I just modified the example you cited to use GetAbstractArray(). Doing so doesn't really explain the API, but it may save someone the trouble you ran into. We always welcome improvements to the documentation in the source code. If you are asking for technical details on how to amend the example, this part vtkSmartPointer intValue = vtkSmartPointer::New(); intValue->SetNumberOfComponents(1); intValue->SetName("MyIntValue"); intValue->InsertNextValue(5); should be changed to vtkSmartPointer strArray = vtkSmartPointer::New(); strArray->SetName("MyStringArray"); vtkStdString strValue("my value"); strArray->InsertNextValue(strValue); HTH, Cory > > On 11 November 2016 at 09:30, Cory Quammen wrote: >> >> Ah, yes, I should have caught that you would be using a >> vtkStringArray, which is not accessed the same way as the numeric data >> arrays. Glad you found the solution. >> >> Cory >> >> On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh wrote: >> > Hi all, >> > >> > Following the advice here >> > http://public.kitware.com/pipermail/paraview/2012-September/026100.html >> > >> > worked. That is, in Python, the following works >> > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) >> > >> > >> > On 9 November 2016 at 15:54, Chris Marsh wrote: >> >> >> >> Hi Cory, >> >> Thanks for the reply. This looks like a perfect way forward. >> >> >> >> I am following this >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData >> >> >> >> and am having troubles with this approach. The field data doesn't seem >> >> to >> >> be set properly. I can see the field data *name* in paraview when I >> >> load my >> >> mesh, but it has an NA value. >> >> >> >> >> >> What I'm doing is: >> >> >> >> std::string _srs_wkt = "my projection data here"; >> >> vtkSmartPointer proj4 = >> >> vtkSmartPointer::New(); >> >> proj4->SetNumberOfComponents(1); >> >> proj4->SetName("proj4"); >> >> proj4->InsertNextValue(_srs_wkt); >> >> >> >> vtkSmartPointer _vtk_unstructuredGrid = >> >> vtkSmartPointer::New(); >> >> >> >> //... build up _vtk_unstructuredGrid etc. >> >> >> >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); >> >> >> >> //validate >> >> vtkStringArray* test = >> >> >> >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetFieldData()->GetArray("proj4")); >> >> >> >> //test is NULL >> >> >> >> any ideas? >> >> Thanks >> >> >> >> >> >> Chris Marsh >> >> PhD Candidate >> >> chrismarsh.ca >> >> >> >> 13 Kirk Hall >> >> University of Saskatchewan >> >> >> >> On 9 November 2016 at 01:31, Cory Quammen >> >> wrote: >> >>> >> >>> Hi Chris, >> >>> >> >>> Usually we stuff this kind of data into the generic field data (arrays >> >>> not associated with points of cells) in the data set. The VTU >> >>> reader/writer supports reading/writing field data. >> >>> >> >>> HTH, >> >>> Cory >> >>> >> >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh >> >>> wrote: >> >>> > Hi, >> >>> > >> >>> > I would like to add some extra meta-data to a pvd file. >> >>> > Specifically, a >> >>> > proj4 string containing information about the coordinate system >> >>> > projection >> >>> > of the data contained in a vtu file. >> >>> > >> >>> > Is there a recommended way to do this? >> >>> > >> >>> > Cheers >> >>> > Chris >> >>> > >> >>> > _______________________________________________ >> >>> > 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. From aborsic at ne-scientific.com Wed Nov 16 10:38:25 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 16:38:25 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> Message-ID: Hi All, Apologies for the long hiatus, but I would like to understand why the crash I and Elvis are experiencing is occurring. I am half convinced it could be a bug in the numpy support functions, and wanted to share my knowledge so far in order to hear any possible feedback. I am attaching a new Python script, which is simpler and self contained now. The script builds a vtkUnstructuredGrid with a single tetrahedra and displays it. The script does not crash under Windows, but crashes under Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 The dataset has only 4 points and the only cell of the dataset (a tetrahedra) is described by the list of nodes [0,1,2,3] to which is pre-pended a "4" to indicate that 4 points describe the cell, the cell data is therefore [4,0,1,2,3]. The cell data is automatically converted from numpy to vtk using the vtk numpy support functions. Printing the VTK converted cell_data (line 47) shows the output attached below: In the output the MaxId is 4, but the number of tuples is 1, shouldn't the MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the source of the problem ? Similarly if a (2x5) numpy array is converted to vtk with vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, which in my opininion should be 1. I will dig some more into the vtk_np.numpy_to_vtkIdTypeArray function ... Thanks for any comment, Best Regards, Andrea Printing cell data vtkIdTypeArray (000002C3420E7BE0) Debug: Off Modified Time: 54 Reference Count: 1 Registered Events: (none) Name: (none) Data type: idtype Size: 5 MaxId: 4 NumberOfComponents: 5 Information: 0000000000000000 Name: (none) Number Of Components: 5 Number Of Tuples: 1 Size: 5 MaxId: 4 LookupTable: (none) Array: 000002C342B0EA50 On 10/28/2016 4:39 PM, Andrea Borsic wrote: > Hi Elvis, > > Thanks for testing this. Actually I started out on Ubuntu with your > Jumbo VTK package, and is it was throwing this error, I switched to > compiling from source - with the same result. > > Cheers, > > Andrea > > > >> I tested your example with the 7.1.0.rc1 build we use at work (also >> Ubuntu 16.04), and I also get an X error, though a slightly different >> one: >> >> X Error of failed request: BadMatch (invalid parameter attributes) >> Major opcode of failed request: 154 (GLX) >> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >> Serial number of failed request: 2141 >> Current serial number in output stream: 2143 >> >> I can confirm that commenting the interactor initialization/start, it >> terminates OK. >> >> Haven't looked closer at what's happening, but just thought I should >> share. >> >> For brevity, these are the flags we use when configuring our build: >> >> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >> -DVTK_Group_Qt=ON \ >> -DVTK_QT_VERSION=5 \ >> -DVTK_Group_Imaging=ON \ >> -DVTK_Group_Views=ON \ >> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >> -DVTK_WRAP_PYTHON=ON \ >> -DVTK_PYTHON_VERSION=3 \ >> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >> -DBUILD_TESTING=OFF \ >> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >> -DVTK_USE_SYSTEM_GL2PS=OFF \ >> -DCMAKE_BUILD_TYPE=Release >> >> Elvis >> >>> Best Regards, >>> >>> Andrea >>> >>> >>> >>> On 27/10/2016 23:25, Ken Martin wrote: >>> >>> Hmm, well that means VTK's rendering engine is initializing OK and >>> running. >>> So it could be something specific to the python app. If you run some >>> of the >>> python tests do they work? ala >>> >>> ctest -R Python -I ,,23 >>> >>> thats runs 1/23rd of the python tests >>> >>> if those all pass then it must be something specific to your script >>> >>> >>> >>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>> >>> wrote: >>>> Hi Ken, >>>> >>>> The test seems to run fine, I am attaching below the output. >>>> >>>> Best Regards, >>>> >>>> Andrea >>>> >>>> >>>> ----------------------- >>>> >>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>> UpdateCTestConfiguration from >>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>> Add coverage exclude regular expressions. >>>> Add coverage exclude: vtk.*TCLInit.cxx >>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>> Add coverage exclude: .*vtkOpenGLState.* >>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>> Add coverage exclude: .*Testing.Cxx.*h >>>> Add coverage exclude: .*moc_.*cxx >>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>> Add coverage exclude: .*/Utilities/.* >>>> Add coverage exclude: .*/ThirdParty/.* >>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>> UpdateCTestConfiguration from >>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>> Test project /opt/VTK-7.1.0.rc1-bin >>>> Constructing a list of tests >>>> Done constructing a list of tests >>>> Checking test dependency graph... >>>> Checking test dependency graph end >>>> test 1551 >>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>> >>>> 1551: Test command: >>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>> "TestVBOPLYMapper" "-D" >>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" "-T" >>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>>> >>>> 1551: Test timeout computed to be: 3600 >>>> 1551: first render time: 0.132993 >>>> 1551: opengl version 4.5 >>>> 1551: interactive render time: 0.0166377 >>>> 1551: number of triangles: 871414 >>>> 1551: triangles per second: 5.2376e+07 >>>> 1551: >>> type="numeric/double">0>>> name="BaselineImage" >>>> type="text/string">Standard>>> name="WallTime" type="numeric/double">0.059715 >>>> 1551: >>> type="numeric/double">0.037073 >>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed >>>> 0.91 sec >>>> >>>> The following tests passed: >>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>> >>>> 100% tests passed, 0 tests failed out of 1 >>>> >>>> Label Time Summary: >>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>> >>>> Total Test time (real) = 0.97 sec >>>> >>>> >>>> >>>> >>>> >>>> On 27/10/2016 18:56, Ken Martin wrote: >>>> >>>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>>> >>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>> wrote: >>>>> Dear All, >>>>> >>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a >>>>> computer with the following hw configuration: >>>>> >>>>> Processor: Intel Core i7 >>>>> >>>>> GPU: NVIDIA GTX Titan Black >>>>> >>>>> --- >>>>> >>>>> VTK has been configured for: >>>>> >>>>> OpenGL 2 back-end >>>>> >>>>> Use Qt 5.7 >>>>> >>>>> Use OpenMP for SMP >>>>> >>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>> >>>>> --- >>>>> >>>>> A simple python script which displays an unstructured grid and which >>>>> works fine under Windows, opens (under Ubuntu) a rendering window and >>>>> crashes with the message below: >>>>> >>>>> X Error of failed request: GLXBadDrawable >>>>> Major opcode of failed request: 154 (GLX) >>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>> Serial number of failed request: 111 >>>>> Current serial number in output stream: 111 >>>>> >>>>> >>>>> Do you have any hint about this? Should I try the RC 7.1 or switch >>>>> to the >>>>> plain OpenGL back-end ? >>>>> >>>>> Thanks in advance for any suggestion, >>>>> >>>>> Best Regards, >>>>> >>>>> Andrea >>>>> >>>>> _______________________________________________ >>>>> 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. >>> >>> >>> >>> _______________________________________________ >>> 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 -------------- import pickle import numpy as np import time import vtk from vtk.util import numpy_support as vtk_np # manually generate a single tetrahedra using numpy and then convert it to a vtkUstructuredMesh nodes = np.zeros((4,3),dtype=np.float32) nodes[0,:] = (0,0,0) nodes[1,:] = (0,0,1) nodes[2,:] = (0,1,0) nodes[3,:] = (1,0,0) elems = np.zeros((2,4),dtype=np.int32) elems[0,:] = (0,1,2,3) scalars = np.zeros((4),dtype=np.float32) scalars[0] = 10 scalars[1] = 20 scalars[2] = 30 scalars[3] = 40 # embed now the nodes (coordinates of nodes of a FEM mesh) and elements (indices to nodes defining the tetrahedra of a FEM mesh) into a vtkUnstructuredGrid # copy nodes to dataset (unstructured grid) num_nodes = nodes.shape[0] pts = vtk.vtkPoints() pts_data = vtk_np.numpy_to_vtk(nodes, deep=True) pts.SetData(pts_data) # copy tetrahedral elements to cell data # for the cell array data we need to prepend a column of "4" indicating that each cell has 4 nodes num_elems = elems.shape[0] num_ids = np.ones((num_elems,1), dtype=np.int64)*4 cells_data = np.concatenate((num_ids, elems), axis=1) cells_data = vtk_np.numpy_to_vtkIdTypeArray(cells_data, deep=True) print("Printing cell data") print(cells_data) cells = vtk.vtkCellArray() cells.SetCells(num_elems, cells_data) # create the vtkUnstructuredGrid dataset = vtk.vtkUnstructuredGrid() dataset.SetPoints(pts) dataset.SetCells(vtk.VTK_TETRA, cells) # prepare now the scalars # generate vtk scalars from input data and associate it with the unstructured grid vtkscalars = vtk_np.numpy_to_vtk(scalars, deep=True) dataset.GetPointData().SetScalars(vtkscalars) # display now the dataset # use a mapper mapper = vtk.vtkDataSetMapper() mapper.SetInputData(dataset) # create a default color lookup table vtkLut = vtk.vtkLookupTable() vtkLut.SetTableRange (0, 1) vtkLut.SetHueRange (0.66, 0) vtkLut.SetSaturationRange (1, 1) vtkLut.SetValueRange (1, 1) vtkLut.Build() mapper.SetLookupTable(vtkLut) mapper.SetScalarRange(np.min(scalars), np.max(scalars)) # actor actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().SetRepresentationToSurface() # generate a colorbar scalarBar = vtk.vtkScalarBarActor() scalarBar.SetOrientationToVertical() scalarBar.SetTitle("Potential") # position the colorbar in the window pos = scalarBar.GetPositionCoordinate() pos.SetCoordinateSystemToNormalizedViewport() pos.SetValue(0.85,0.05) scalarBar.SetWidth(.1) scalarBar.SetHeight(.95) # set lookup table scalarBar.SetLookupTable(vtkLut) # renderer ren = vtk.vtkRenderer() ren.AddActor(actor) ren.AddActor(scalarBar) # render window renWin = vtk.vtkRenderWindow() # save ref, so that we can start an interactor at a later time renWin.AddRenderer(ren) renWin.SetSize(600,600) renWin.SetPosition(600,250) renWin.Render() # setup the interactor interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(renWin) istyle = vtk.vtkInteractorStyleSwitch() istyle.SetCurrentStyleToTrackballCamera() interactor.SetInteractorStyle(istyle) # DISPLAY THE DATASET FOR 5sec BEFORE STARTING THE INTERACTOR (WHICH WILL CRASH THE SCRIPT) time.sleep(5) ####################### NOTE ############################### # IF BOTH NEXT LINES ARE COMMENTED THE SCRIPT WILL NOT CRASH interactor.Initialize() interactor.Start() print("Terminated OK") From chris.marsh at usask.ca Wed Nov 16 10:43:21 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 16 Nov 2016 09:43:21 -0600 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Hi Corry, Sorry, I meant the former. The updated wiki looks good. Would have saved me some effort :p w.r.t in-code documentation, after your comment and some googling, this is where I ended up in the docs http://www.vtk.org/doc/nightly/html/classvtkDataObject.html#a72f64ab58126f72e048410751091011b which lead me to http://www.vtk.org/doc/nightly/html/classvtkFieldData.html#a888a6492210426d4ba4d358b87ab198f >From these documents, there is no indication what the difference between GetAbstractArray and GetArray is, other than return types. On my first pass through, AbstractArray seems like base class (which it is) and DataArray seems like the one that should be used. Looking at the inheritance graph here http://www.vtk.org/doc/nightly/html/classvtkAbstractArray.html I see what's going on now. But to be honest, it was easy to miss. If there was a small "Oh, remember to use GetAbstractArrray for stringarray, etc" that would have helped immensely. I find keeping vtk's inheritance graphs in mind difficult (they're pretty complex), so a reminder here and there would go a long way towards someone like me who is piecing together usage off the docs and examples, without fully groking the entirety of vtk. Cheers Chris Cheers Chris On 16 November 2016 at 09:23, Cory Quammen wrote: > > Does anyone know who would be able to amend the example I linked above to > > include the string? It is not at all clear from the docs that string > behaves > > differently. > > Do you mean actually modify that example? Anyone with a wiki account > can add an example. I just modified the example you cited to use > GetAbstractArray(). Doing so doesn't really explain the API, but it > may save someone the trouble you ran into. We always welcome > improvements to the documentation in the source code. > > If you are asking for technical details on how to amend the example, this > part > > vtkSmartPointer intValue = > vtkSmartPointer::New(); > intValue->SetNumberOfComponents(1); > intValue->SetName("MyIntValue"); > intValue->InsertNextValue(5); > > should be changed to > > vtkSmartPointer strArray = > vtkSmartPointer::New(); > strArray->SetName("MyStringArray"); > vtkStdString strValue("my value"); > strArray->InsertNextValue(strValue); > > HTH, > Cory > > > > > > On 11 November 2016 at 09:30, Cory Quammen > wrote: > >> > >> Ah, yes, I should have caught that you would be using a > >> vtkStringArray, which is not accessed the same way as the numeric data > >> arrays. Glad you found the solution. > >> > >> Cory > >> > >> On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh > wrote: > >> > Hi all, > >> > > >> > Following the advice here > >> > http://public.kitware.com/pipermail/paraview/2012- > September/026100.html > >> > > >> > worked. That is, in Python, the following works > >> > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) > >> > > >> > > >> > On 9 November 2016 at 15:54, Chris Marsh > wrote: > >> >> > >> >> Hi Cory, > >> >> Thanks for the reply. This looks like a perfect way forward. > >> >> > >> >> I am following this > >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > >> >> > >> >> and am having troubles with this approach. The field data doesn't > seem > >> >> to > >> >> be set properly. I can see the field data *name* in paraview when I > >> >> load my > >> >> mesh, but it has an NA value. > >> >> > >> >> > >> >> What I'm doing is: > >> >> > >> >> std::string _srs_wkt = "my projection data here"; > >> >> vtkSmartPointer proj4 = > >> >> vtkSmartPointer::New(); > >> >> proj4->SetNumberOfComponents(1); > >> >> proj4->SetName("proj4"); > >> >> proj4->InsertNextValue(_srs_wkt); > >> >> > >> >> vtkSmartPointer _vtk_unstructuredGrid = > >> >> vtkSmartPointer::New(); > >> >> > >> >> //... build up _vtk_unstructuredGrid etc. > >> >> > >> >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); > >> >> > >> >> //validate > >> >> vtkStringArray* test = > >> >> > >> >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid-> > GetFieldData()->GetArray("proj4")); > >> >> > >> >> //test is NULL > >> >> > >> >> any ideas? > >> >> Thanks > >> >> > >> >> > >> >> Chris Marsh > >> >> PhD Candidate > >> >> chrismarsh.ca > >> >> > >> >> 13 Kirk Hall > >> >> University of Saskatchewan > >> >> > >> >> On 9 November 2016 at 01:31, Cory Quammen > >> >> wrote: > >> >>> > >> >>> Hi Chris, > >> >>> > >> >>> Usually we stuff this kind of data into the generic field data > (arrays > >> >>> not associated with points of cells) in the data set. The VTU > >> >>> reader/writer supports reading/writing field data. > >> >>> > >> >>> HTH, > >> >>> Cory > >> >>> > >> >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh > >> >>> wrote: > >> >>> > Hi, > >> >>> > > >> >>> > I would like to add some extra meta-data to a pvd file. > >> >>> > Specifically, a > >> >>> > proj4 string containing information about the coordinate system > >> >>> > projection > >> >>> > of the data contained in a vtu file. > >> >>> > > >> >>> > Is there a recommended way to do this? > >> >>> > > >> >>> > Cheers > >> >>> > Chris > >> >>> > > >> >>> > _______________________________________________ > >> >>> > 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 ken.martin at kitware.com Wed Nov 16 10:44:57 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 16 Nov 2016 10:44:57 -0500 Subject: [vtkusers] VTK updating (qvtkWidget) In-Reply-To: References: Message-ID: Just guessing, I suspect you are adding spheres with each radius change. So when it is getting larger you see it (as new larger spheres are getting added) but when you shrink it does not shrink because there are many spheres accumulating and none are being deleted. Make sure you only have one sphere and actor being added. Just a guess On Wed, Nov 16, 2016 at 8:15 AM, M. Jordan wrote: > In render some things in the constructor of my GUI. > > Now I try to add some spheres and update/redraw the radius of the spheres > every second. > I have a text file containing the new radius of each sphere and a timer to > generate the events. > > When I am changing a radius in the .txt file (while my program is > executed) to a higher value, the sphere grows in real time. > But when I *decrease* the radius, the sphere isn't decreasing. > > I think that my program doesn't update everything. > > > I use: > ui.qvtkWidget->update(); > > In my timer function everything (expect the renderer and renderwindow) is > created each time. > > So I can't figure out whats the problem. > > > _______________________________________________ > 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 bill.lorensen at gmail.com Wed Nov 16 11:13:51 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 16 Nov 2016 11:13:51 -0500 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> Message-ID: I get the same error on my Ubuntu14.04 build. On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic wrote: > Hi All, > > Apologies for the long hiatus, but I would like to understand why the crash > I and Elvis are experiencing is occurring. I am half convinced it could be a > bug in the numpy support functions, and wanted to share my knowledge so far > in order to hear any possible feedback. > > I am attaching a new Python script, which is simpler and self contained now. > The script builds a vtkUnstructuredGrid with a single tetrahedra and > displays it. The script does not crash under Windows, but crashes under > Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 > > The dataset has only 4 points and the only cell of the dataset (a > tetrahedra) is described by the list of nodes [0,1,2,3] to which is > pre-pended a "4" to indicate that 4 points describe the cell, the cell data > is therefore [4,0,1,2,3]. The cell data is automatically converted from > numpy to vtk using the vtk numpy support functions. > > Printing the VTK converted cell_data (line 47) shows the output attached > below: > > In the output the MaxId is 4, but the number of tuples is 1, shouldn't the > MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the > source of the problem ? > > Similarly if a (2x5) numpy array is converted to vtk with > vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, which > in my opininion should be 1. I will dig some more into the > vtk_np.numpy_to_vtkIdTypeArray function ... > > Thanks for any comment, > > Best Regards, > > Andrea > > > Printing cell data > vtkIdTypeArray (000002C3420E7BE0) > Debug: Off > Modified Time: 54 > Reference Count: 1 > Registered Events: (none) > Name: (none) > Data type: idtype > Size: 5 > MaxId: 4 > NumberOfComponents: 5 > Information: 0000000000000000 > Name: (none) > Number Of Components: 5 > Number Of Tuples: 1 > Size: 5 > MaxId: 4 > LookupTable: (none) > Array: 000002C342B0EA50 > > > > > > > On 10/28/2016 4:39 PM, Andrea Borsic wrote: >> >> Hi Elvis, >> >> Thanks for testing this. Actually I started out on Ubuntu with your Jumbo >> VTK package, and is it was throwing this error, I switched to compiling from >> source - with the same result. >> >> Cheers, >> >> Andrea >> >> >> >>> I tested your example with the 7.1.0.rc1 build we use at work (also >>> Ubuntu 16.04), and I also get an X error, though a slightly different >>> one: >>> >>> X Error of failed request: BadMatch (invalid parameter attributes) >>> Major opcode of failed request: 154 (GLX) >>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>> Serial number of failed request: 2141 >>> Current serial number in output stream: 2143 >>> >>> I can confirm that commenting the interactor initialization/start, it >>> terminates OK. >>> >>> Haven't looked closer at what's happening, but just thought I should >>> share. >>> >>> For brevity, these are the flags we use when configuring our build: >>> >>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>> -DVTK_Group_Qt=ON \ >>> -DVTK_QT_VERSION=5 \ >>> -DVTK_Group_Imaging=ON \ >>> -DVTK_Group_Views=ON \ >>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>> -DVTK_WRAP_PYTHON=ON \ >>> -DVTK_PYTHON_VERSION=3 \ >>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>> -DBUILD_TESTING=OFF \ >>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>> -DCMAKE_BUILD_TYPE=Release >>> >>> Elvis >>> >>>> Best Regards, >>>> >>>> Andrea >>>> >>>> >>>> >>>> On 27/10/2016 23:25, Ken Martin wrote: >>>> >>>> Hmm, well that means VTK's rendering engine is initializing OK and >>>> running. >>>> So it could be something specific to the python app. If you run some of >>>> the >>>> python tests do they work? ala >>>> >>>> ctest -R Python -I ,,23 >>>> >>>> thats runs 1/23rd of the python tests >>>> >>>> if those all pass then it must be something specific to your script >>>> >>>> >>>> >>>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>>> >>>> wrote: >>>>> >>>>> Hi Ken, >>>>> >>>>> The test seems to run fine, I am attaching below the output. >>>>> >>>>> Best Regards, >>>>> >>>>> Andrea >>>>> >>>>> >>>>> ----------------------- >>>>> >>>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>>> UpdateCTestConfiguration from >>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>> Add coverage exclude regular expressions. >>>>> Add coverage exclude: vtk.*TCLInit.cxx >>>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>>> Add coverage exclude: .*vtkOpenGLState.* >>>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>>> Add coverage exclude: .*Testing.Cxx.*h >>>>> Add coverage exclude: .*moc_.*cxx >>>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>>> Add coverage exclude: .*/Utilities/.* >>>>> Add coverage exclude: .*/ThirdParty/.* >>>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>>> UpdateCTestConfiguration from >>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>> Test project /opt/VTK-7.1.0.rc1-bin >>>>> Constructing a list of tests >>>>> Done constructing a list of tests >>>>> Checking test dependency graph... >>>>> Checking test dependency graph end >>>>> test 1551 >>>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>> >>>>> 1551: Test command: >>>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>>> "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >>>>> "-T" >>>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>>> >>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>>>> 1551: Test timeout computed to be: 3600 >>>>> 1551: first render time: 0.132993 >>>>> 1551: opengl version 4.5 >>>>> 1551: interactive render time: 0.0166377 >>>>> 1551: number of triangles: 871414 >>>>> 1551: triangles per second: 5.2376e+07 >>>>> 1551: >>>> type="numeric/double">0>>>> name="BaselineImage" >>>>> type="text/string">Standard>>>> name="WallTime" type="numeric/double">0.059715 >>>>> 1551: >>>> type="numeric/double">0.037073 >>>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed >>>>> 0.91 sec >>>>> >>>>> The following tests passed: >>>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>> >>>>> 100% tests passed, 0 tests failed out of 1 >>>>> >>>>> Label Time Summary: >>>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>>> >>>>> Total Test time (real) = 0.97 sec >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On 27/10/2016 18:56, Ken Martin wrote: >>>>> >>>>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>>>> >>>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>>> wrote: >>>>>> >>>>>> Dear All, >>>>>> >>>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a >>>>>> computer with the following hw configuration: >>>>>> >>>>>> Processor: Intel Core i7 >>>>>> >>>>>> GPU: NVIDIA GTX Titan Black >>>>>> >>>>>> --- >>>>>> >>>>>> VTK has been configured for: >>>>>> >>>>>> OpenGL 2 back-end >>>>>> >>>>>> Use Qt 5.7 >>>>>> >>>>>> Use OpenMP for SMP >>>>>> >>>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>>> >>>>>> --- >>>>>> >>>>>> A simple python script which displays an unstructured grid and which >>>>>> works fine under Windows, opens (under Ubuntu) a rendering window and >>>>>> crashes with the message below: >>>>>> >>>>>> X Error of failed request: GLXBadDrawable >>>>>> Major opcode of failed request: 154 (GLX) >>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>> Serial number of failed request: 111 >>>>>> Current serial number in output stream: 111 >>>>>> >>>>>> >>>>>> Do you have any hint about this? Should I try the RC 7.1 or switch to >>>>>> the >>>>>> plain OpenGL back-end ? >>>>>> >>>>>> Thanks in advance for any suggestion, >>>>>> >>>>>> Best Regards, >>>>>> >>>>>> Andrea >>>>>> >>>>>> _______________________________________________ >>>>>> 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. >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 > -- Unpaid intern in BillsBasement at noware dot com From aborsic at ne-scientific.com Wed Nov 16 11:29:02 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 17:29:02 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> Message-ID: <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> Thanks for your test. My hint to the problem is wrong though - I have realized that MaxId is equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown by print() is correct. I will do some more digging, Best and thanks, Andrea On 16/11/2016 17:13, Bill Lorensen wrote: > I get the same error on my Ubuntu14.04 build. > > On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic > wrote: >> Hi All, >> >> Apologies for the long hiatus, but I would like to understand why the crash >> I and Elvis are experiencing is occurring. I am half convinced it could be a >> bug in the numpy support functions, and wanted to share my knowledge so far >> in order to hear any possible feedback. >> >> I am attaching a new Python script, which is simpler and self contained now. >> The script builds a vtkUnstructuredGrid with a single tetrahedra and >> displays it. The script does not crash under Windows, but crashes under >> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >> >> The dataset has only 4 points and the only cell of the dataset (a >> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >> pre-pended a "4" to indicate that 4 points describe the cell, the cell data >> is therefore [4,0,1,2,3]. The cell data is automatically converted from >> numpy to vtk using the vtk numpy support functions. >> >> Printing the VTK converted cell_data (line 47) shows the output attached >> below: >> >> In the output the MaxId is 4, but the number of tuples is 1, shouldn't the >> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the >> source of the problem ? >> >> Similarly if a (2x5) numpy array is converted to vtk with >> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, which >> in my opininion should be 1. I will dig some more into the >> vtk_np.numpy_to_vtkIdTypeArray function ... >> >> Thanks for any comment, >> >> Best Regards, >> >> Andrea >> >> >> Printing cell data >> vtkIdTypeArray (000002C3420E7BE0) >> Debug: Off >> Modified Time: 54 >> Reference Count: 1 >> Registered Events: (none) >> Name: (none) >> Data type: idtype >> Size: 5 >> MaxId: 4 >> NumberOfComponents: 5 >> Information: 0000000000000000 >> Name: (none) >> Number Of Components: 5 >> Number Of Tuples: 1 >> Size: 5 >> MaxId: 4 >> LookupTable: (none) >> Array: 000002C342B0EA50 >> >> >> >> >> >> >> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >>> Hi Elvis, >>> >>> Thanks for testing this. Actually I started out on Ubuntu with your Jumbo >>> VTK package, and is it was throwing this error, I switched to compiling from >>> source - with the same result. >>> >>> Cheers, >>> >>> Andrea >>> >>> >>> >>>> I tested your example with the 7.1.0.rc1 build we use at work (also >>>> Ubuntu 16.04), and I also get an X error, though a slightly different >>>> one: >>>> >>>> X Error of failed request: BadMatch (invalid parameter attributes) >>>> Major opcode of failed request: 154 (GLX) >>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>> Serial number of failed request: 2141 >>>> Current serial number in output stream: 2143 >>>> >>>> I can confirm that commenting the interactor initialization/start, it >>>> terminates OK. >>>> >>>> Haven't looked closer at what's happening, but just thought I should >>>> share. >>>> >>>> For brevity, these are the flags we use when configuring our build: >>>> >>>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>>> -DVTK_Group_Qt=ON \ >>>> -DVTK_QT_VERSION=5 \ >>>> -DVTK_Group_Imaging=ON \ >>>> -DVTK_Group_Views=ON \ >>>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>>> -DVTK_WRAP_PYTHON=ON \ >>>> -DVTK_PYTHON_VERSION=3 \ >>>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>>> -DBUILD_TESTING=OFF \ >>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>>> -DCMAKE_BUILD_TYPE=Release >>>> >>>> Elvis >>>> >>>>> Best Regards, >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>> On 27/10/2016 23:25, Ken Martin wrote: >>>>> >>>>> Hmm, well that means VTK's rendering engine is initializing OK and >>>>> running. >>>>> So it could be something specific to the python app. If you run some of >>>>> the >>>>> python tests do they work? ala >>>>> >>>>> ctest -R Python -I ,,23 >>>>> >>>>> thats runs 1/23rd of the python tests >>>>> >>>>> if those all pass then it must be something specific to your script >>>>> >>>>> >>>>> >>>>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>>>> >>>>> wrote: >>>>>> Hi Ken, >>>>>> >>>>>> The test seems to run fine, I am attaching below the output. >>>>>> >>>>>> Best Regards, >>>>>> >>>>>> Andrea >>>>>> >>>>>> >>>>>> ----------------------- >>>>>> >>>>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>>>> UpdateCTestConfiguration from >>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>> Add coverage exclude regular expressions. >>>>>> Add coverage exclude: vtk.*TCLInit.cxx >>>>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>>>> Add coverage exclude: .*vtkOpenGLState.* >>>>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>>>> Add coverage exclude: .*Testing.Cxx.*h >>>>>> Add coverage exclude: .*moc_.*cxx >>>>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>>>> Add coverage exclude: .*/Utilities/.* >>>>>> Add coverage exclude: .*/ThirdParty/.* >>>>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>>>> UpdateCTestConfiguration from >>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>> Test project /opt/VTK-7.1.0.rc1-bin >>>>>> Constructing a list of tests >>>>>> Done constructing a list of tests >>>>>> Checking test dependency graph... >>>>>> Checking test dependency graph end >>>>>> test 1551 >>>>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>> >>>>>> 1551: Test command: >>>>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>>>> "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >>>>>> "-T" >>>>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>>>> >>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>>>>> 1551: Test timeout computed to be: 3600 >>>>>> 1551: first render time: 0.132993 >>>>>> 1551: opengl version 4.5 >>>>>> 1551: interactive render time: 0.0166377 >>>>>> 1551: number of triangles: 871414 >>>>>> 1551: triangles per second: 5.2376e+07 >>>>>> 1551: >>>>> type="numeric/double">0>>>>> name="BaselineImage" >>>>>> type="text/string">Standard>>>>> name="WallTime" type="numeric/double">0.059715 >>>>>> 1551: >>>>> type="numeric/double">0.037073 >>>>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed >>>>>> 0.91 sec >>>>>> >>>>>> The following tests passed: >>>>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>> >>>>>> 100% tests passed, 0 tests failed out of 1 >>>>>> >>>>>> Label Time Summary: >>>>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>>>> >>>>>> Total Test time (real) = 0.97 sec >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 27/10/2016 18:56, Ken Martin wrote: >>>>>> >>>>>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>>>>> >>>>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>>>> wrote: >>>>>>> Dear All, >>>>>>> >>>>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a >>>>>>> computer with the following hw configuration: >>>>>>> >>>>>>> Processor: Intel Core i7 >>>>>>> >>>>>>> GPU: NVIDIA GTX Titan Black >>>>>>> >>>>>>> --- >>>>>>> >>>>>>> VTK has been configured for: >>>>>>> >>>>>>> OpenGL 2 back-end >>>>>>> >>>>>>> Use Qt 5.7 >>>>>>> >>>>>>> Use OpenMP for SMP >>>>>>> >>>>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>>>> >>>>>>> --- >>>>>>> >>>>>>> A simple python script which displays an unstructured grid and which >>>>>>> works fine under Windows, opens (under Ubuntu) a rendering window and >>>>>>> crashes with the message below: >>>>>>> >>>>>>> X Error of failed request: GLXBadDrawable >>>>>>> Major opcode of failed request: 154 (GLX) >>>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>>> Serial number of failed request: 111 >>>>>>> Current serial number in output stream: 111 >>>>>>> >>>>>>> >>>>>>> Do you have any hint about this? Should I try the RC 7.1 or switch to >>>>>>> the >>>>>>> plain OpenGL back-end ? >>>>>>> >>>>>>> Thanks in advance for any suggestion, >>>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> Andrea >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> > > From sean at rogue-research.com Wed Nov 16 11:59:49 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 16 Nov 2016 11:59:49 -0500 Subject: [vtkusers] RFC: removing Mac OS X 10.6 support in VTK In-Reply-To: References: <20160810183407.812025755@mail.rogue-research.com> <20160822143453.1008991438@mail.rogue-research.com> Message-ID: <20161116165949.1640947384@mail.rogue-research.com> Just wanted to ping this again... Now that 7.1 is branched, we could finally drop 10.6 support in master. JC, did you upgrade your 10.6 bot? Sean On Thu, 8 Sep 2016 12:50:03 -0400, Cory Quammen said: >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"? :) From aborsic at ne-scientific.com Wed Nov 16 12:01:31 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 18:01:31 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> Message-ID: I have further simplified the script (it still crashes under Ubuntu and not under Windows) Best, Andrea On 11/16/2016 5:29 PM, Andrea Borsic wrote: > Thanks for your test. > > My hint to the problem is wrong though - I have realized that MaxId > is equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown > by print() is correct. > > I will do some more digging, > > Best and thanks, > > Andrea > > > On 16/11/2016 17:13, Bill Lorensen wrote: >> I get the same error on my Ubuntu14.04 build. >> >> On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic >> wrote: >>> Hi All, >>> >>> Apologies for the long hiatus, but I would like to understand why >>> the crash >>> I and Elvis are experiencing is occurring. I am half convinced it >>> could be a >>> bug in the numpy support functions, and wanted to share my knowledge >>> so far >>> in order to hear any possible feedback. >>> >>> I am attaching a new Python script, which is simpler and self >>> contained now. >>> The script builds a vtkUnstructuredGrid with a single tetrahedra and >>> displays it. The script does not crash under Windows, but crashes under >>> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >>> >>> The dataset has only 4 points and the only cell of the dataset (a >>> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >>> pre-pended a "4" to indicate that 4 points describe the cell, the >>> cell data >>> is therefore [4,0,1,2,3]. The cell data is automatically converted from >>> numpy to vtk using the vtk numpy support functions. >>> >>> Printing the VTK converted cell_data (line 47) shows the output >>> attached >>> below: >>> >>> In the output the MaxId is 4, but the number of tuples is 1, >>> shouldn't the >>> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be >>> the >>> source of the problem ? >>> >>> Similarly if a (2x5) numpy array is converted to vtk with >>> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of >>> 9, which >>> in my opininion should be 1. I will dig some more into the >>> vtk_np.numpy_to_vtkIdTypeArray function ... >>> >>> Thanks for any comment, >>> >>> Best Regards, >>> >>> Andrea >>> >>> >>> Printing cell data >>> vtkIdTypeArray (000002C3420E7BE0) >>> Debug: Off >>> Modified Time: 54 >>> Reference Count: 1 >>> Registered Events: (none) >>> Name: (none) >>> Data type: idtype >>> Size: 5 >>> MaxId: 4 >>> NumberOfComponents: 5 >>> Information: 0000000000000000 >>> Name: (none) >>> Number Of Components: 5 >>> Number Of Tuples: 1 >>> Size: 5 >>> MaxId: 4 >>> LookupTable: (none) >>> Array: 000002C342B0EA50 >>> >>> >>> >>> >>> >>> >>> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >>>> Hi Elvis, >>>> >>>> Thanks for testing this. Actually I started out on Ubuntu with your >>>> Jumbo >>>> VTK package, and is it was throwing this error, I switched to >>>> compiling from >>>> source - with the same result. >>>> >>>> Cheers, >>>> >>>> Andrea >>>> >>>> >>>> >>>>> I tested your example with the 7.1.0.rc1 build we use at work (also >>>>> Ubuntu 16.04), and I also get an X error, though a slightly different >>>>> one: >>>>> >>>>> X Error of failed request: BadMatch (invalid parameter attributes) >>>>> Major opcode of failed request: 154 (GLX) >>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>> Serial number of failed request: 2141 >>>>> Current serial number in output stream: 2143 >>>>> >>>>> I can confirm that commenting the interactor initialization/start, it >>>>> terminates OK. >>>>> >>>>> Haven't looked closer at what's happening, but just thought I should >>>>> share. >>>>> >>>>> For brevity, these are the flags we use when configuring our build: >>>>> >>>>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>>>> -DVTK_Group_Qt=ON \ >>>>> -DVTK_QT_VERSION=5 \ >>>>> -DVTK_Group_Imaging=ON \ >>>>> -DVTK_Group_Views=ON \ >>>>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>>>> -DVTK_WRAP_PYTHON=ON \ >>>>> -DVTK_PYTHON_VERSION=3 \ >>>>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>>>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>>>> -DBUILD_TESTING=OFF \ >>>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>>>> -DCMAKE_BUILD_TYPE=Release >>>>> >>>>> Elvis >>>>> >>>>>> Best Regards, >>>>>> >>>>>> Andrea >>>>>> >>>>>> >>>>>> >>>>>> On 27/10/2016 23:25, Ken Martin wrote: >>>>>> >>>>>> Hmm, well that means VTK's rendering engine is initializing OK and >>>>>> running. >>>>>> So it could be something specific to the python app. If you run >>>>>> some of >>>>>> the >>>>>> python tests do they work? ala >>>>>> >>>>>> ctest -R Python -I ,,23 >>>>>> >>>>>> thats runs 1/23rd of the python tests >>>>>> >>>>>> if those all pass then it must be something specific to your script >>>>>> >>>>>> >>>>>> >>>>>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>>>>> >>>>>> wrote: >>>>>>> Hi Ken, >>>>>>> >>>>>>> The test seems to run fine, I am attaching below the output. >>>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> Andrea >>>>>>> >>>>>>> >>>>>>> ----------------------- >>>>>>> >>>>>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>>>>> UpdateCTestConfiguration from >>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>> Add coverage exclude regular expressions. >>>>>>> Add coverage exclude: vtk.*TCLInit.cxx >>>>>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>>>>> Add coverage exclude: .*vtkOpenGLState.* >>>>>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>>>>> Add coverage exclude: .*Testing.Cxx.*h >>>>>>> Add coverage exclude: .*moc_.*cxx >>>>>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>>>>> Add coverage exclude: .*/Utilities/.* >>>>>>> Add coverage exclude: .*/ThirdParty/.* >>>>>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>>>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>>>>> UpdateCTestConfiguration from >>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>> Test project /opt/VTK-7.1.0.rc1-bin >>>>>>> Constructing a list of tests >>>>>>> Done constructing a list of tests >>>>>>> Checking test dependency graph... >>>>>>> Checking test dependency graph end >>>>>>> test 1551 >>>>>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>> >>>>>>> 1551: Test command: >>>>>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>>>>> "TestVBOPLYMapper" "-D" >>>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >>>>>>> "-T" >>>>>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>>>>> >>>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>>>>>> >>>>>>> 1551: Test timeout computed to be: 3600 >>>>>>> 1551: first render time: 0.132993 >>>>>>> 1551: opengl version 4.5 >>>>>>> 1551: interactive render time: 0.0166377 >>>>>>> 1551: number of triangles: 871414 >>>>>>> 1551: triangles per second: 5.2376e+07 >>>>>>> 1551: >>>>>> type="numeric/double">0>>>>>> name="BaselineImage" >>>>>>> type="text/string">Standard>>>>>> name="WallTime" type="numeric/double">0.059715 >>>>>>> 1551: >>>>>> type="numeric/double">0.037073 >>>>>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... >>>>>>> Passed >>>>>>> 0.91 sec >>>>>>> >>>>>>> The following tests passed: >>>>>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>> >>>>>>> 100% tests passed, 0 tests failed out of 1 >>>>>>> >>>>>>> Label Time Summary: >>>>>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>>>>> >>>>>>> Total Test time (real) = 0.97 sec >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 27/10/2016 18:56, Ken Martin wrote: >>>>>>> >>>>>>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>>>>>> >>>>>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>>>>> wrote: >>>>>>>> Dear All, >>>>>>>> >>>>>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 >>>>>>>> LTS on a >>>>>>>> computer with the following hw configuration: >>>>>>>> >>>>>>>> Processor: Intel Core i7 >>>>>>>> >>>>>>>> GPU: NVIDIA GTX Titan Black >>>>>>>> >>>>>>>> --- >>>>>>>> >>>>>>>> VTK has been configured for: >>>>>>>> >>>>>>>> OpenGL 2 back-end >>>>>>>> >>>>>>>> Use Qt 5.7 >>>>>>>> >>>>>>>> Use OpenMP for SMP >>>>>>>> >>>>>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>>>>> >>>>>>>> --- >>>>>>>> >>>>>>>> A simple python script which displays an unstructured grid and >>>>>>>> which >>>>>>>> works fine under Windows, opens (under Ubuntu) a rendering >>>>>>>> window and >>>>>>>> crashes with the message below: >>>>>>>> >>>>>>>> X Error of failed request: GLXBadDrawable >>>>>>>> Major opcode of failed request: 154 (GLX) >>>>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>>>> Serial number of failed request: 111 >>>>>>>> Current serial number in output stream: 111 >>>>>>>> >>>>>>>> >>>>>>>> Do you have any hint about this? Should I try the RC 7.1 or >>>>>>>> switch to >>>>>>>> the >>>>>>>> plain OpenGL back-end ? >>>>>>>> >>>>>>>> Thanks in advance for any suggestion, >>>>>>>> >>>>>>>> Best Regards, >>>>>>>> >>>>>>>> Andrea >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 > > 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 -------------- import numpy as np import time import vtk from vtk.util import numpy_support as vtk_np # manually generate a single tetrahedra using numpy and then convert it to a vtkUstructuredMesh pts_data_np = np.zeros((4,3),dtype=np.float32) pts_data_np[0,:] = (0,0,0) pts_data_np[1,:] = (0,0,1) pts_data_np[2,:] = (0,1,0) pts_data_np[3,:] = (1,0,0) # convert the above numpy points into a vtkPoints object pts = vtk.vtkPoints() pts_data_vtk = vtk_np.numpy_to_vtk(pts_data_np, deep=True) pts.SetData(pts_data_vtk) # create a single tetrahedral cell using the points defined above cell_data_np = np.zeros((1,5),dtype=np.int64) cell_data_np[0,:] = (4,0,1,2,3) # this means this cell is formed by 4 nodes, and the nodes are [0,1,2,3] # from now a vtkCellArray from the numpy cell_data cell_data_vtk = vtk_np.numpy_to_vtkIdTypeArray(cell_data_np, deep=True) cells = vtk.vtkCellArray() cells.SetCells(1, cell_data_vtk) # create an vtkUnstructuredGrid from the vtkPoints and vtkCellArray dataset = vtk.vtkUnstructuredGrid() dataset.SetPoints(pts) dataset.SetCells(vtk.VTK_TETRA, cells) # display now the dataset # use a mapper mapper = vtk.vtkDataSetMapper() mapper.SetInputData(dataset) # actor actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().SetRepresentationToWireframe() # renderer ren = vtk.vtkRenderer() ren.AddActor(actor) # render window renWin = vtk.vtkRenderWindow() # save ref, so that we can start an interactor at a later time renWin.AddRenderer(ren) renWin.SetSize(600,600) renWin.SetPosition(600,250) renWin.Render() # setup the interactor interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(renWin) # DISPLAY THE DATASET FOR 2sec BEFORE STARTING THE INTERACTOR (WHICH WILL CRASH THE SCRIPT) time.sleep(2) ####################### NOTE ############################### # IF BOTH NEXT LINES ARE COMMENTED THE SCRIPT WILL NOT CRASH interactor.Initialize() interactor.Start() print("Terminated OK") From elvis.stansvik at orexplore.com Wed Nov 16 12:44:13 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 16 Nov 2016 18:44:13 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> Message-ID: I'm on my way home now, but have you tried running your simplified test under gdb or valgrind to pinpoint the crash? Elvis Den 16 nov. 2016 6:01 em skrev "Andrea Borsic" : > I have further simplified the script (it still crashes under Ubuntu and > not under Windows) > > Best, > > Andrea > > > On 11/16/2016 5:29 PM, Andrea Borsic wrote: > >> Thanks for your test. >> >> My hint to the problem is wrong though - I have realized that MaxId is >> equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown by >> print() is correct. >> >> I will do some more digging, >> >> Best and thanks, >> >> Andrea >> >> >> On 16/11/2016 17:13, Bill Lorensen wrote: >> >>> I get the same error on my Ubuntu14.04 build. >>> >>> On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic >>> wrote: >>> >>>> Hi All, >>>> >>>> Apologies for the long hiatus, but I would like to understand why the >>>> crash >>>> I and Elvis are experiencing is occurring. I am half convinced it could >>>> be a >>>> bug in the numpy support functions, and wanted to share my knowledge so >>>> far >>>> in order to hear any possible feedback. >>>> >>>> I am attaching a new Python script, which is simpler and self contained >>>> now. >>>> The script builds a vtkUnstructuredGrid with a single tetrahedra and >>>> displays it. The script does not crash under Windows, but crashes under >>>> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >>>> >>>> The dataset has only 4 points and the only cell of the dataset (a >>>> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >>>> pre-pended a "4" to indicate that 4 points describe the cell, the cell >>>> data >>>> is therefore [4,0,1,2,3]. The cell data is automatically converted from >>>> numpy to vtk using the vtk numpy support functions. >>>> >>>> Printing the VTK converted cell_data (line 47) shows the output attached >>>> below: >>>> >>>> In the output the MaxId is 4, but the number of tuples is 1, shouldn't >>>> the >>>> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the >>>> source of the problem ? >>>> >>>> Similarly if a (2x5) numpy array is converted to vtk with >>>> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, >>>> which >>>> in my opininion should be 1. I will dig some more into the >>>> vtk_np.numpy_to_vtkIdTypeArray function ... >>>> >>>> Thanks for any comment, >>>> >>>> Best Regards, >>>> >>>> Andrea >>>> >>>> >>>> Printing cell data >>>> vtkIdTypeArray (000002C3420E7BE0) >>>> Debug: Off >>>> Modified Time: 54 >>>> Reference Count: 1 >>>> Registered Events: (none) >>>> Name: (none) >>>> Data type: idtype >>>> Size: 5 >>>> MaxId: 4 >>>> NumberOfComponents: 5 >>>> Information: 0000000000000000 >>>> Name: (none) >>>> Number Of Components: 5 >>>> Number Of Tuples: 1 >>>> Size: 5 >>>> MaxId: 4 >>>> LookupTable: (none) >>>> Array: 000002C342B0EA50 >>>> >>>> >>>> >>>> >>>> >>>> >>>> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >>>> >>>>> Hi Elvis, >>>>> >>>>> Thanks for testing this. Actually I started out on Ubuntu with your >>>>> Jumbo >>>>> VTK package, and is it was throwing this error, I switched to >>>>> compiling from >>>>> source - with the same result. >>>>> >>>>> Cheers, >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>> I tested your example with the 7.1.0.rc1 build we use at work (also >>>>>> Ubuntu 16.04), and I also get an X error, though a slightly different >>>>>> one: >>>>>> >>>>>> X Error of failed request: BadMatch (invalid parameter attributes) >>>>>> Major opcode of failed request: 154 (GLX) >>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>> Serial number of failed request: 2141 >>>>>> Current serial number in output stream: 2143 >>>>>> >>>>>> I can confirm that commenting the interactor initialization/start, it >>>>>> terminates OK. >>>>>> >>>>>> Haven't looked closer at what's happening, but just thought I should >>>>>> share. >>>>>> >>>>>> For brevity, these are the flags we use when configuring our build: >>>>>> >>>>>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>>>>> -DVTK_Group_Qt=ON \ >>>>>> -DVTK_QT_VERSION=5 \ >>>>>> -DVTK_Group_Imaging=ON \ >>>>>> -DVTK_Group_Views=ON \ >>>>>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>>>>> -DVTK_WRAP_PYTHON=ON \ >>>>>> -DVTK_PYTHON_VERSION=3 \ >>>>>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>>>>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>>>>> -DBUILD_TESTING=OFF \ >>>>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>>>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>>>>> -DCMAKE_BUILD_TYPE=Release >>>>>> >>>>>> Elvis >>>>>> >>>>>> Best Regards, >>>>>>> >>>>>>> Andrea >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 27/10/2016 23:25, Ken Martin wrote: >>>>>>> >>>>>>> Hmm, well that means VTK's rendering engine is initializing OK and >>>>>>> running. >>>>>>> So it could be something specific to the python app. If you run some >>>>>>> of >>>>>>> the >>>>>>> python tests do they work? ala >>>>>>> >>>>>>> ctest -R Python -I ,,23 >>>>>>> >>>>>>> thats runs 1/23rd of the python tests >>>>>>> >>>>>>> if those all pass then it must be something specific to your script >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>>>>>> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Ken, >>>>>>>> >>>>>>>> The test seems to run fine, I am attaching below the output. >>>>>>>> >>>>>>>> Best Regards, >>>>>>>> >>>>>>>> Andrea >>>>>>>> >>>>>>>> >>>>>>>> ----------------------- >>>>>>>> >>>>>>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>>>>>> UpdateCTestConfiguration from >>>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Add coverage exclude regular expressions. >>>>>>>> Add coverage exclude: vtk.*TCLInit.cxx >>>>>>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>>>>>> Add coverage exclude: .*vtkOpenGLState.* >>>>>>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>>>>>> Add coverage exclude: .*Testing.Cxx.*h >>>>>>>> Add coverage exclude: .*moc_.*cxx >>>>>>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>>>>>> Add coverage exclude: .*/Utilities/.* >>>>>>>> Add coverage exclude: .*/ThirdParty/.* >>>>>>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>>>>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>>>>>> UpdateCTestConfiguration from >>>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Test project /opt/VTK-7.1.0.rc1-bin >>>>>>>> Constructing a list of tests >>>>>>>> Done constructing a list of tests >>>>>>>> Checking test dependency graph... >>>>>>>> Checking test dependency graph end >>>>>>>> test 1551 >>>>>>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>>> >>>>>>>> 1551: Test command: >>>>>>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>>>>>> "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/Extern >>>>>>>> alData//Testing" >>>>>>>> "-T" >>>>>>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>>>>>> >>>>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/ >>>>>>>> Testing/Data/Baseline/TestVBOPLYMapper.png" >>>>>>>> 1551: Test timeout computed to be: 3600 >>>>>>>> 1551: first render time: 0.132993 >>>>>>>> 1551: opengl version 4.5 >>>>>>>> 1551: interactive render time: 0.0166377 >>>>>>>> 1551: number of triangles: 871414 >>>>>>>> 1551: triangles per second: 5.2376e+07 >>>>>>>> 1551: >>>>>>> type="numeric/double">0>>>>>>> name="BaselineImage" >>>>>>>> type="text/string">Standard>>>>>>> name="WallTime" type="numeric/double">0.059715 >>>>>>>> 1551: >>>>>>> type="numeric/double">0.037073 >>>>>>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... >>>>>>>> Passed >>>>>>>> 0.91 sec >>>>>>>> >>>>>>>> The following tests passed: >>>>>>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>>> >>>>>>>> 100% tests passed, 0 tests failed out of 1 >>>>>>>> >>>>>>>> Label Time Summary: >>>>>>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>>>>>> >>>>>>>> Total Test time (real) = 0.97 sec >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 27/10/2016 18:56, Ken Martin wrote: >>>>>>>> >>>>>>>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>>>>>>> >>>>>>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Dear All, >>>>>>>>> >>>>>>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS >>>>>>>>> on a >>>>>>>>> computer with the following hw configuration: >>>>>>>>> >>>>>>>>> Processor: Intel Core i7 >>>>>>>>> >>>>>>>>> GPU: NVIDIA GTX Titan Black >>>>>>>>> >>>>>>>>> --- >>>>>>>>> >>>>>>>>> VTK has been configured for: >>>>>>>>> >>>>>>>>> OpenGL 2 back-end >>>>>>>>> >>>>>>>>> Use Qt 5.7 >>>>>>>>> >>>>>>>>> Use OpenMP for SMP >>>>>>>>> >>>>>>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>>>>>> >>>>>>>>> --- >>>>>>>>> >>>>>>>>> A simple python script which displays an unstructured grid and >>>>>>>>> which >>>>>>>>> works fine under Windows, opens (under Ubuntu) a rendering window >>>>>>>>> and >>>>>>>>> crashes with the message below: >>>>>>>>> >>>>>>>>> X Error of failed request: GLXBadDrawable >>>>>>>>> Major opcode of failed request: 154 (GLX) >>>>>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>>>>> Serial number of failed request: 111 >>>>>>>>> Current serial number in output stream: 111 >>>>>>>>> >>>>>>>>> >>>>>>>>> Do you have any hint about this? Should I try the RC 7.1 or switch >>>>>>>>> to >>>>>>>>> the >>>>>>>>> plain OpenGL back-end ? >>>>>>>>> >>>>>>>>> Thanks in advance for any suggestion, >>>>>>>>> >>>>>>>>> Best Regards, >>>>>>>>> >>>>>>>>> Andrea >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >> >> 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 aborsic at ne-scientific.com Wed Nov 16 12:49:17 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 18:49:17 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> Message-ID: Thanks for the suggestions, I will try that. Andrea On 11/16/2016 6:44 PM, Elvis Stansvik wrote: > > I'm on my way home now, but have you tried running your simplified > test under gdb or valgrind to pinpoint the crash? > > Elvis > > > Den 16 nov. 2016 6:01 em skrev "Andrea Borsic" > >: > > I have further simplified the script (it still crashes under > Ubuntu and not under Windows) > > Best, > > Andrea > > > On 11/16/2016 5:29 PM, Andrea Borsic wrote: > > Thanks for your test. > > My hint to the problem is wrong though - I have realized that > MaxId is equal to size() - 1 and not NumberOfTuples() -1, so > the MaxId shown by print() is correct. > > I will do some more digging, > > Best and thanks, > > Andrea > > > On 16/11/2016 17:13, Bill Lorensen wrote: > > I get the same error on my Ubuntu14.04 build. > > On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic > > wrote: > > Hi All, > > Apologies for the long hiatus, but I would like to > understand why the crash > I and Elvis are experiencing is occurring. I am half > convinced it could be a > bug in the numpy support functions, and wanted to > share my knowledge so far > in order to hear any possible feedback. > > I am attaching a new Python script, which is simpler > and self contained now. > The script builds a vtkUnstructuredGrid with a single > tetrahedra and > displays it. The script does not crash under Windows, > but crashes under > Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 > > The dataset has only 4 points and the only cell of the > dataset (a > tetrahedra) is described by the list of nodes > [0,1,2,3] to which is > pre-pended a "4" to indicate that 4 points describe > the cell, the cell data > is therefore [4,0,1,2,3]. The cell data is > automatically converted from > numpy to vtk using the vtk numpy support functions. > > Printing the VTK converted cell_data (line 47) shows > the output attached > below: > > In the output the MaxId is 4, but the number of tuples > is 1, shouldn't the > MaxId therefore be 0 (the shape of the array is (1,5) > )? Can this be the > source of the problem ? > > Similarly if a (2x5) numpy array is converted to vtk with > vtk_np.numpy_to_vtkIdTypeArray, the resulting array > has a MaxId of 9, which > in my opininion should be 1. I will dig some more into the > vtk_np.numpy_to_vtkIdTypeArray function ... > > Thanks for any comment, > > Best Regards, > > Andrea > > > Printing cell data > vtkIdTypeArray (000002C3420E7BE0) > Debug: Off > Modified Time: 54 > Reference Count: 1 > Registered Events: (none) > Name: (none) > Data type: idtype > Size: 5 > MaxId: 4 > NumberOfComponents: 5 > Information: 0000000000000000 > Name: (none) > Number Of Components: 5 > Number Of Tuples: 1 > Size: 5 > MaxId: 4 > LookupTable: (none) > Array: 000002C342B0EA50 > > > > > > > On 10/28/2016 4:39 PM, Andrea Borsic wrote: > > Hi Elvis, > > Thanks for testing this. Actually I started out on > Ubuntu with your Jumbo > VTK package, and is it was throwing this error, I > switched to compiling from > source - with the same result. > > Cheers, > > Andrea > > > > I tested your example with the 7.1.0.rc1 build > we use at work (also > Ubuntu 16.04), and I also get an X error, > though a slightly different > one: > > X Error of failed request: BadMatch (invalid > parameter attributes) > Major opcode of failed request: 154 (GLX) > Minor opcode of failed request: 11 > (X_GLXSwapBuffers) > Serial number of failed request: 2141 > Current serial number in output stream: 2143 > > I can confirm that commenting the interactor > initialization/start, it > terminates OK. > > Haven't looked closer at what's happening, but > just thought I should > share. > > For brevity, these are the flags we use when > configuring our build: > > -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ > -DVTK_Group_Qt=ON \ > -DVTK_QT_VERSION=5 \ > -DVTK_Group_Imaging=ON \ > -DVTK_Group_Views=ON \ > > -DModule_vtkRenderingFreeTypeFontConfig=ON \ > -DVTK_WRAP_PYTHON=ON \ > -DVTK_PYTHON_VERSION=3 \ > -DPYTHON_EXECUTABLE=/usr/bin/python3 \ > > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ > -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so > \ > -DBUILD_TESTING=OFF \ > -DVTK_USE_SYSTEM_LIBRARIES=ON \ > -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ > -DVTK_USE_SYSTEM_GL2PS=OFF \ > -DCMAKE_BUILD_TYPE=Release > > Elvis > > Best Regards, > > Andrea > > > > On 27/10/2016 23:25, Ken Martin wrote: > > Hmm, well that means VTK's rendering > engine is initializing OK and > running. > So it could be something specific to the > python app. If you run some of > the > python tests do they work? ala > > ctest -R Python -I ,,23 > > thats runs 1/23rd of the python tests > > if those all pass then it must be > something specific to your script > > > > On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic > > > wrote: > > Hi Ken, > > The test seems to run fine, I am > attaching below the output. > > Best Regards, > > Andrea > > > ----------------------- > > andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ > sudo ctest -R VBOPLY -VV > UpdateCTestConfiguration from > :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Parse Config > file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Add coverage exclude regular > expressions. > Add coverage exclude: vtk.*TCLInit.cxx > Add coverage exclude: > vtk[^\.]+(Java|Python|Tcl).cxx > Add coverage exclude: > .*vtkOpenGLState.* > Add coverage exclude: > .*Testing.Cxx.*cxx > Add coverage exclude: .*Testing.Cxx.*h > Add coverage exclude: .*moc_.*cxx > Add coverage exclude: > .*/Rendering/OpenGL/vtkgl.* > Add coverage exclude: .*/Utilities/.* > Add coverage exclude: .*/ThirdParty/.* > Add coverage exclude: > .*vtkOpenGLPolyDataMapper.* > SetCTestConfiguration:CMakeCommand:/usr/bin/cmake > UpdateCTestConfiguration from > :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Parse Config > file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Test project /opt/VTK-7.1.0.rc1-bin > Constructing a list of tests > Done constructing a list of tests > Checking test dependency graph... > Checking test dependency graph end > test 1551 > Start 1551: > vtkRenderingOpenGL2Cxx-TestVBOPLYMapper > > 1551: Test command: > /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests > "TestVBOPLYMapper" "-D" > "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" > "-T" > "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" > "-V" > > "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" > > 1551: Test timeout computed to be: 3600 > 1551: first render time: 0.132993 > 1551: opengl version 4.5 > 1551: interactive render time: 0.0166377 > 1551: number of triangles: 871414 > 1551: triangles per second: 5.2376e+07 > 1551: type="numeric/double">0 name="BaselineImage" > type="text/string">Standard name="WallTime" > type="numeric/double">0.059715 > 1551: type="numeric/double">0.037073 > 1/1 Test #1551: > vtkRenderingOpenGL2Cxx-TestVBOPLYMapper > ... Passed > 0.91 sec > > The following tests passed: > > vtkRenderingOpenGL2Cxx-TestVBOPLYMapper > > 100% tests passed, 0 tests failed out of 1 > > Label Time Summary: > vtkRenderingOpenGL2 = 0.91 sec (1 > test) > > Total Test time (real) = 0.97 sec > > > > > > On 27/10/2016 18:56, Ken Martin wrote: > > Can you try running ctest -R VBOPLY > -VV and let us know the output? > > On Thu, Oct 27, 2016 at 12:46 PM, > Andrea Borsic > > wrote: > > Dear All, > > I have successfully compiled VTK > 7.0.0 under Ubuntu 16.04.1 LTS on a > computer with the following hw > configuration: > > Processor: Intel Core i7 > > GPU: NVIDIA GTX Titan Black > > --- > > VTK has been configured for: > > OpenGL 2 back-end > > Use Qt 5.7 > > Use OpenMP for SMP > > Wrap Python 3 (ver 3.5.2 on the > system) > > --- > > A simple python script which > displays an unstructured grid and > which > works fine under Windows, opens > (under Ubuntu) a rendering window and > crashes with the message below: > > X Error of failed request: > GLXBadDrawable > Major opcode of failed > request: 154 (GLX) > Minor opcode of failed > request: 11 (X_GLXSwapBuffers) > Serial number of failed > request: 111 > Current serial number in > output stream: 111 > > > Do you have any hint about this? > Should I try the RC 7.1 or switch to > the > plain OpenGL back-end ? > > Thanks in advance for any suggestion, > > Best Regards, > > Andrea > > _______________________________________________ > 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. > > > > _______________________________________________ > 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 > > > 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 lotterluke at gmail.com Wed Nov 16 13:19:31 2016 From: lotterluke at gmail.com (lp) Date: Wed, 16 Nov 2016 11:19:31 -0700 (MST) Subject: [vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data In-Reply-To: References: <1478719240610-5741121.post@n5.nabble.com> <1478808640955-5741133.post@n5.nabble.com> Message-ID: <1479320371257-5741204.post@n5.nabble.com> Indeed, now I get vertex spheres when the mapper is set to color cells by cell data. Thank you for the fix! One other difference between before and after your change that I want to mention in case you are not aware: The coloring of the vertex spheres when having the mapper set to SetScalarModeToUsePointData is now different. Before, the spheres get the color matching the active scalar value in the point. Now, they get the uniform color as set with SetVertexColor on the actor property. Regards, Lukas -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK7-1-render-points-as-spheres-does-not-work-when-coloring-by-cell-data-tp5741121p5741204.html Sent from the VTK - Users mailing list archive at Nabble.com. From jchris.fillionr at kitware.com Wed Nov 16 14:02:06 2016 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Wed, 16 Nov 2016 14:02:06 -0500 Subject: [vtkusers] RFC: removing Mac OS X 10.6 support in VTK In-Reply-To: <20161116165949.1640947384@mail.rogue-research.com> References: <20160810183407.812025755@mail.rogue-research.com> <20160822143453.1008991438@mail.rogue-research.com> <20161116165949.1640947384@mail.rogue-research.com> Message-ID: Hi Sean, There was some glitch in the ordering process related to the new dasbboard machines. Without the new hardware, we were not able to setup a new MacOSx build. Let's also note that for the latest release of Slicer 4.6.2 (to be announced shortly), the transition to OpenGL2 was not a priority anymore. I will keep you posted when we resume our work related to the upgrade of VTK within Slicer. Thanks Jc On Wed, Nov 16, 2016 at 11:59 AM, Sean McBride wrote: > Just wanted to ping this again... Now that 7.1 is branched, we could > finally drop 10.6 support in master. > > JC, did you upgrade your 10.6 bot? > > Sean > > > > On Thu, 8 Sep 2016 12:50:03 -0400, Cory Quammen said: > > >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"? :) > > > -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborsic at ne-scientific.com Wed Nov 16 14:03:34 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 20:03:34 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> Message-ID: <81e50537-9e55-e960-2fed-329e8168444d@ne-scientific.com> Sorry for the many posts, just a last one with a further simplified example that removes the need for numpy and numpy conversions ... Best Regards, Andrea On 11/16/2016 6:01 PM, Andrea Borsic wrote: > I have further simplified the script (it still crashes under Ubuntu > and not under Windows) > > Best, > > Andrea > > > On 11/16/2016 5:29 PM, Andrea Borsic wrote: >> Thanks for your test. >> >> My hint to the problem is wrong though - I have realized that MaxId >> is equal to size() - 1 and not NumberOfTuples() -1, so the MaxId >> shown by print() is correct. >> >> I will do some more digging, >> >> Best and thanks, >> >> Andrea >> >> >> On 16/11/2016 17:13, Bill Lorensen wrote: >>> I get the same error on my Ubuntu14.04 build. >>> >>> On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic >>> wrote: >>>> Hi All, >>>> >>>> Apologies for the long hiatus, but I would like to understand why >>>> the crash >>>> I and Elvis are experiencing is occurring. I am half convinced it >>>> could be a >>>> bug in the numpy support functions, and wanted to share my >>>> knowledge so far >>>> in order to hear any possible feedback. >>>> >>>> I am attaching a new Python script, which is simpler and self >>>> contained now. >>>> The script builds a vtkUnstructuredGrid with a single tetrahedra and >>>> displays it. The script does not crash under Windows, but crashes >>>> under >>>> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >>>> >>>> The dataset has only 4 points and the only cell of the dataset (a >>>> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >>>> pre-pended a "4" to indicate that 4 points describe the cell, the >>>> cell data >>>> is therefore [4,0,1,2,3]. The cell data is automatically converted >>>> from >>>> numpy to vtk using the vtk numpy support functions. >>>> >>>> Printing the VTK converted cell_data (line 47) shows the output >>>> attached >>>> below: >>>> >>>> In the output the MaxId is 4, but the number of tuples is 1, >>>> shouldn't the >>>> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this >>>> be the >>>> source of the problem ? >>>> >>>> Similarly if a (2x5) numpy array is converted to vtk with >>>> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of >>>> 9, which >>>> in my opininion should be 1. I will dig some more into the >>>> vtk_np.numpy_to_vtkIdTypeArray function ... >>>> >>>> Thanks for any comment, >>>> >>>> Best Regards, >>>> >>>> Andrea >>>> >>>> >>>> Printing cell data >>>> vtkIdTypeArray (000002C3420E7BE0) >>>> Debug: Off >>>> Modified Time: 54 >>>> Reference Count: 1 >>>> Registered Events: (none) >>>> Name: (none) >>>> Data type: idtype >>>> Size: 5 >>>> MaxId: 4 >>>> NumberOfComponents: 5 >>>> Information: 0000000000000000 >>>> Name: (none) >>>> Number Of Components: 5 >>>> Number Of Tuples: 1 >>>> Size: 5 >>>> MaxId: 4 >>>> LookupTable: (none) >>>> Array: 000002C342B0EA50 >>>> >>>> >>>> >>>> >>>> >>>> >>>> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >>>>> Hi Elvis, >>>>> >>>>> Thanks for testing this. Actually I started out on Ubuntu with >>>>> your Jumbo >>>>> VTK package, and is it was throwing this error, I switched to >>>>> compiling from >>>>> source - with the same result. >>>>> >>>>> Cheers, >>>>> >>>>> Andrea >>>>> >>>>> >>>>> >>>>>> I tested your example with the 7.1.0.rc1 build we use at work (also >>>>>> Ubuntu 16.04), and I also get an X error, though a slightly >>>>>> different >>>>>> one: >>>>>> >>>>>> X Error of failed request: BadMatch (invalid parameter attributes) >>>>>> Major opcode of failed request: 154 (GLX) >>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>> Serial number of failed request: 2141 >>>>>> Current serial number in output stream: 2143 >>>>>> >>>>>> I can confirm that commenting the interactor >>>>>> initialization/start, it >>>>>> terminates OK. >>>>>> >>>>>> Haven't looked closer at what's happening, but just thought I should >>>>>> share. >>>>>> >>>>>> For brevity, these are the flags we use when configuring our build: >>>>>> >>>>>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>>>>> -DVTK_Group_Qt=ON \ >>>>>> -DVTK_QT_VERSION=5 \ >>>>>> -DVTK_Group_Imaging=ON \ >>>>>> -DVTK_Group_Views=ON \ >>>>>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>>>>> -DVTK_WRAP_PYTHON=ON \ >>>>>> -DVTK_PYTHON_VERSION=3 \ >>>>>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>>>>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>>>>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>>>>> -DBUILD_TESTING=OFF \ >>>>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>>>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>>>>> -DCMAKE_BUILD_TYPE=Release >>>>>> >>>>>> Elvis >>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> Andrea >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 27/10/2016 23:25, Ken Martin wrote: >>>>>>> >>>>>>> Hmm, well that means VTK's rendering engine is initializing OK and >>>>>>> running. >>>>>>> So it could be something specific to the python app. If you run >>>>>>> some of >>>>>>> the >>>>>>> python tests do they work? ala >>>>>>> >>>>>>> ctest -R Python -I ,,23 >>>>>>> >>>>>>> thats runs 1/23rd of the python tests >>>>>>> >>>>>>> if those all pass then it must be something specific to your script >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>>>>>> >>>>>>> wrote: >>>>>>>> Hi Ken, >>>>>>>> >>>>>>>> The test seems to run fine, I am attaching below the output. >>>>>>>> >>>>>>>> Best Regards, >>>>>>>> >>>>>>>> Andrea >>>>>>>> >>>>>>>> >>>>>>>> ----------------------- >>>>>>>> >>>>>>>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>>>>>>> UpdateCTestConfiguration from >>>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Add coverage exclude regular expressions. >>>>>>>> Add coverage exclude: vtk.*TCLInit.cxx >>>>>>>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>>>>>>> Add coverage exclude: .*vtkOpenGLState.* >>>>>>>> Add coverage exclude: .*Testing.Cxx.*cxx >>>>>>>> Add coverage exclude: .*Testing.Cxx.*h >>>>>>>> Add coverage exclude: .*moc_.*cxx >>>>>>>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>>>>>>> Add coverage exclude: .*/Utilities/.* >>>>>>>> Add coverage exclude: .*/ThirdParty/.* >>>>>>>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>>>>>>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>>>>>>> UpdateCTestConfiguration from >>>>>>>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>>>>>>> Test project /opt/VTK-7.1.0.rc1-bin >>>>>>>> Constructing a list of tests >>>>>>>> Done constructing a list of tests >>>>>>>> Checking test dependency graph... >>>>>>>> Checking test dependency graph end >>>>>>>> test 1551 >>>>>>>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>>> >>>>>>>> 1551: Test command: >>>>>>>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>>>>>>> "TestVBOPLYMapper" "-D" >>>>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >>>>>>>> "-T" >>>>>>>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>>>>>>> >>>>>>>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>>>>>>> >>>>>>>> 1551: Test timeout computed to be: 3600 >>>>>>>> 1551: first render time: 0.132993 >>>>>>>> 1551: opengl version 4.5 >>>>>>>> 1551: interactive render time: 0.0166377 >>>>>>>> 1551: number of triangles: 871414 >>>>>>>> 1551: triangles per second: 5.2376e+07 >>>>>>>> 1551: >>>>>>> type="numeric/double">0>>>>>>> name="BaselineImage" >>>>>>>> type="text/string">Standard>>>>>>> name="WallTime" type="numeric/double">0.059715 >>>>>>>> 1551: >>>>>>> type="numeric/double">0.037073 >>>>>>>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... >>>>>>>> Passed >>>>>>>> 0.91 sec >>>>>>>> >>>>>>>> The following tests passed: >>>>>>>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>>>>>>> >>>>>>>> 100% tests passed, 0 tests failed out of 1 >>>>>>>> >>>>>>>> Label Time Summary: >>>>>>>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>>>>>>> >>>>>>>> Total Test time (real) = 0.97 sec >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 27/10/2016 18:56, Ken Martin wrote: >>>>>>>> >>>>>>>> Can you try running ctest -R VBOPLY -VV and let us know the >>>>>>>> output? >>>>>>>> >>>>>>>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>>>>>>> wrote: >>>>>>>>> Dear All, >>>>>>>>> >>>>>>>>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 >>>>>>>>> LTS on a >>>>>>>>> computer with the following hw configuration: >>>>>>>>> >>>>>>>>> Processor: Intel Core i7 >>>>>>>>> >>>>>>>>> GPU: NVIDIA GTX Titan Black >>>>>>>>> >>>>>>>>> --- >>>>>>>>> >>>>>>>>> VTK has been configured for: >>>>>>>>> >>>>>>>>> OpenGL 2 back-end >>>>>>>>> >>>>>>>>> Use Qt 5.7 >>>>>>>>> >>>>>>>>> Use OpenMP for SMP >>>>>>>>> >>>>>>>>> Wrap Python 3 (ver 3.5.2 on the system) >>>>>>>>> >>>>>>>>> --- >>>>>>>>> >>>>>>>>> A simple python script which displays an unstructured grid and >>>>>>>>> which >>>>>>>>> works fine under Windows, opens (under Ubuntu) a rendering >>>>>>>>> window and >>>>>>>>> crashes with the message below: >>>>>>>>> >>>>>>>>> X Error of failed request: GLXBadDrawable >>>>>>>>> Major opcode of failed request: 154 (GLX) >>>>>>>>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>>>>>>>> Serial number of failed request: 111 >>>>>>>>> Current serial number in output stream: 111 >>>>>>>>> >>>>>>>>> >>>>>>>>> Do you have any hint about this? Should I try the RC 7.1 or >>>>>>>>> switch to >>>>>>>>> the >>>>>>>>> plain OpenGL back-end ? >>>>>>>>> >>>>>>>>> Thanks in advance for any suggestion, >>>>>>>>> >>>>>>>>> Best Regards, >>>>>>>>> >>>>>>>>> Andrea >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >> >> 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: -------------- next part -------------- import time import vtk # manually generate a vtkUnstructuredGrid with a single tetrahedra # generate 4 points in space for forming a tetrahedra pts = vtk.vtkPoints() pts.InsertNextPoint(0.0, 0.0, 0.0) pts.InsertNextPoint(0.0, 0.0, 1.0) pts.InsertNextPoint(0.0, 1.0, 0.0) pts.InsertNextPoint(1.0, 0.0, 0.0) # generate the list of Ids [0,1,2,3] representing the tetrahedra idList = vtk.vtkIdList() idList.InsertNextId(0) idList.InsertNextId(1) idList.InsertNextId(2) idList.InsertNextId(3) cells = vtk.vtkCellArray() cells.InsertNextCell(idList) # create an vtkUnstructuredGrid from the vtkPoints and vtkCellArray dataset = vtk.vtkUnstructuredGrid() dataset.SetPoints(pts) dataset.SetCells(vtk.VTK_TETRA, cells) # display now the dataset # use a mapper mapper = vtk.vtkDataSetMapper() mapper.SetInputData(dataset) # actor actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().SetRepresentationToWireframe() # renderer ren = vtk.vtkRenderer() ren.AddActor(actor) # render window renWin = vtk.vtkRenderWindow() # save ref, so that we can start an interactor at a later time renWin.AddRenderer(ren) renWin.SetSize(600,600) renWin.SetPosition(600,250) renWin.Render() # setup the interactor interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(renWin) # DISPLAY THE DATASET FOR 2sec BEFORE STARTING THE INTERACTOR (WHICH WILL CRASH THE SCRIPT) time.sleep(2) ####################### NOTE ############################### # IF BOTH NEXT LINES ARE COMMENTED THE SCRIPT WILL NOT CRASH interactor.Initialize() interactor.Start() print("Terminated OK") From bill.lorensen at gmail.com Wed Nov 16 14:56:22 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 16 Nov 2016 14:56:22 -0500 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: <81e50537-9e55-e960-2fed-329e8168444d@ne-scientific.com> References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> <81e50537-9e55-e960-2fed-329e8168444d@ne-scientific.com> Message-ID: Solved. looks like you need to: interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(renWin) BEFORE: renWin.Render() I'm not sure why. Looks like a strange bug to me. Your numpy example also works with this fix. On Wed, Nov 16, 2016 at 2:03 PM, Andrea Borsic wrote: > Sorry for the many posts, just a last one with a further simplified example > that removes the need for numpy and numpy conversions ... > > Best Regards, > > Andrea > > > On 11/16/2016 6:01 PM, Andrea Borsic wrote: > > I have further simplified the script (it still crashes under Ubuntu and not > under Windows) > > Best, > > Andrea > > > On 11/16/2016 5:29 PM, Andrea Borsic wrote: > > Thanks for your test. > > My hint to the problem is wrong though - I have realized that MaxId is > equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown by > print() is correct. > > I will do some more digging, > > Best and thanks, > > Andrea > > > On 16/11/2016 17:13, Bill Lorensen wrote: > > I get the same error on my Ubuntu14.04 build. > > On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic > wrote: > > Hi All, > > Apologies for the long hiatus, but I would like to understand why the crash > I and Elvis are experiencing is occurring. I am half convinced it could be a > bug in the numpy support functions, and wanted to share my knowledge so far > in order to hear any possible feedback. > > I am attaching a new Python script, which is simpler and self contained now. > The script builds a vtkUnstructuredGrid with a single tetrahedra and > displays it. The script does not crash under Windows, but crashes under > Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 > > The dataset has only 4 points and the only cell of the dataset (a > tetrahedra) is described by the list of nodes [0,1,2,3] to which is > pre-pended a "4" to indicate that 4 points describe the cell, the cell data > is therefore [4,0,1,2,3]. The cell data is automatically converted from > numpy to vtk using the vtk numpy support functions. > > Printing the VTK converted cell_data (line 47) shows the output attached > below: > > In the output the MaxId is 4, but the number of tuples is 1, shouldn't the > MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the > source of the problem ? > > Similarly if a (2x5) numpy array is converted to vtk with > vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, which > in my opininion should be 1. I will dig some more into the > vtk_np.numpy_to_vtkIdTypeArray function ... > > Thanks for any comment, > > Best Regards, > > Andrea > > > Printing cell data > vtkIdTypeArray (000002C3420E7BE0) > Debug: Off > Modified Time: 54 > Reference Count: 1 > Registered Events: (none) > Name: (none) > Data type: idtype > Size: 5 > MaxId: 4 > NumberOfComponents: 5 > Information: 0000000000000000 > Name: (none) > Number Of Components: 5 > Number Of Tuples: 1 > Size: 5 > MaxId: 4 > LookupTable: (none) > Array: 000002C342B0EA50 > > > > > > > On 10/28/2016 4:39 PM, Andrea Borsic wrote: > > Hi Elvis, > > Thanks for testing this. Actually I started out on Ubuntu with your Jumbo > VTK package, and is it was throwing this error, I switched to compiling from > source - with the same result. > > Cheers, > > Andrea > > > > I tested your example with the 7.1.0.rc1 build we use at work (also > Ubuntu 16.04), and I also get an X error, though a slightly different > one: > > X Error of failed request: BadMatch (invalid parameter attributes) > Major opcode of failed request: 154 (GLX) > Minor opcode of failed request: 11 (X_GLXSwapBuffers) > Serial number of failed request: 2141 > Current serial number in output stream: 2143 > > I can confirm that commenting the interactor initialization/start, it > terminates OK. > > Haven't looked closer at what's happening, but just thought I should > share. > > For brevity, these are the flags we use when configuring our build: > > -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ > -DVTK_Group_Qt=ON \ > -DVTK_QT_VERSION=5 \ > -DVTK_Group_Imaging=ON \ > -DVTK_Group_Views=ON \ > -DModule_vtkRenderingFreeTypeFontConfig=ON \ > -DVTK_WRAP_PYTHON=ON \ > -DVTK_PYTHON_VERSION=3 \ > -DPYTHON_EXECUTABLE=/usr/bin/python3 \ > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ > -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ > -DBUILD_TESTING=OFF \ > -DVTK_USE_SYSTEM_LIBRARIES=ON \ > -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ > -DVTK_USE_SYSTEM_GL2PS=OFF \ > -DCMAKE_BUILD_TYPE=Release > > Elvis > > Best Regards, > > Andrea > > > > On 27/10/2016 23:25, Ken Martin wrote: > > Hmm, well that means VTK's rendering engine is initializing OK and > running. > So it could be something specific to the python app. If you run some of > the > python tests do they work? ala > > ctest -R Python -I ,,23 > > thats runs 1/23rd of the python tests > > if those all pass then it must be something specific to your script > > > > On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic > > wrote: > > Hi Ken, > > The test seems to run fine, I am attaching below the output. > > Best Regards, > > Andrea > > > ----------------------- > > andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV > UpdateCTestConfiguration from > :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Add coverage exclude regular expressions. > Add coverage exclude: vtk.*TCLInit.cxx > Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx > Add coverage exclude: .*vtkOpenGLState.* > Add coverage exclude: .*Testing.Cxx.*cxx > Add coverage exclude: .*Testing.Cxx.*h > Add coverage exclude: .*moc_.*cxx > Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* > Add coverage exclude: .*/Utilities/.* > Add coverage exclude: .*/ThirdParty/.* > Add coverage exclude: .*vtkOpenGLPolyDataMapper.* > SetCTestConfiguration:CMakeCommand:/usr/bin/cmake > UpdateCTestConfiguration from > :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl > Test project /opt/VTK-7.1.0.rc1-bin > Constructing a list of tests > Done constructing a list of tests > Checking test dependency graph... > Checking test dependency graph end > test 1551 > Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper > > 1551: Test command: > /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests > "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" > "-T" > "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" > > "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" > 1551: Test timeout computed to be: 3600 > 1551: first render time: 0.132993 > 1551: opengl version 4.5 > 1551: interactive render time: 0.0166377 > 1551: number of triangles: 871414 > 1551: triangles per second: 5.2376e+07 > 1551: type="numeric/double">0 name="BaselineImage" > type="text/string">Standard name="WallTime" type="numeric/double">0.059715 > 1551: type="numeric/double">0.037073 > 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed > 0.91 sec > > The following tests passed: > vtkRenderingOpenGL2Cxx-TestVBOPLYMapper > > 100% tests passed, 0 tests failed out of 1 > > Label Time Summary: > vtkRenderingOpenGL2 = 0.91 sec (1 test) > > Total Test time (real) = 0.97 sec > > > > > > On 27/10/2016 18:56, Ken Martin wrote: > > Can you try running ctest -R VBOPLY -VV and let us know the output? > > On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic > wrote: > > Dear All, > > I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a > computer with the following hw configuration: > > Processor: Intel Core i7 > > GPU: NVIDIA GTX Titan Black > > --- > > VTK has been configured for: > > OpenGL 2 back-end > > Use Qt 5.7 > > Use OpenMP for SMP > > Wrap Python 3 (ver 3.5.2 on the system) > > --- > > A simple python script which displays an unstructured grid and which > works fine under Windows, opens (under Ubuntu) a rendering window and > crashes with the message below: > > X Error of failed request: GLXBadDrawable > Major opcode of failed request: 154 (GLX) > Minor opcode of failed request: 11 (X_GLXSwapBuffers) > Serial number of failed request: 111 > Current serial number in output stream: 111 > > > Do you have any hint about this? Should I try the RC 7.1 or switch to > the > plain OpenGL back-end ? > > Thanks in advance for any suggestion, > > Best Regards, > > Andrea > > _______________________________________________ > 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. > > > > _______________________________________________ > 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 > > 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 > -- Unpaid intern in BillsBasement at noware dot com From aborsic at ne-scientific.com Wed Nov 16 15:34:34 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 16 Nov 2016 21:34:34 +0100 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> <81e50537-9e55-e960-2fed-329e8168444d@ne-scientific.com> Message-ID: Thanks so much for your time! Best Regards, Andrea On 11/16/2016 8:56 PM, Bill Lorensen wrote: > Solved. > > looks like you need to: > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(renWin) > > BEFORE: > renWin.Render() > > I'm not sure why. Looks like a strange bug to me. > > Your numpy example also works with this fix. > > > On Wed, Nov 16, 2016 at 2:03 PM, Andrea Borsic > wrote: >> Sorry for the many posts, just a last one with a further simplified example >> that removes the need for numpy and numpy conversions ... >> >> Best Regards, >> >> Andrea >> >> >> On 11/16/2016 6:01 PM, Andrea Borsic wrote: >> >> I have further simplified the script (it still crashes under Ubuntu and not >> under Windows) >> >> Best, >> >> Andrea >> >> >> On 11/16/2016 5:29 PM, Andrea Borsic wrote: >> >> Thanks for your test. >> >> My hint to the problem is wrong though - I have realized that MaxId is >> equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown by >> print() is correct. >> >> I will do some more digging, >> >> Best and thanks, >> >> Andrea >> >> >> On 16/11/2016 17:13, Bill Lorensen wrote: >> >> I get the same error on my Ubuntu14.04 build. >> >> On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic >> wrote: >> >> Hi All, >> >> Apologies for the long hiatus, but I would like to understand why the crash >> I and Elvis are experiencing is occurring. I am half convinced it could be a >> bug in the numpy support functions, and wanted to share my knowledge so far >> in order to hear any possible feedback. >> >> I am attaching a new Python script, which is simpler and self contained now. >> The script builds a vtkUnstructuredGrid with a single tetrahedra and >> displays it. The script does not crash under Windows, but crashes under >> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >> >> The dataset has only 4 points and the only cell of the dataset (a >> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >> pre-pended a "4" to indicate that 4 points describe the cell, the cell data >> is therefore [4,0,1,2,3]. The cell data is automatically converted from >> numpy to vtk using the vtk numpy support functions. >> >> Printing the VTK converted cell_data (line 47) shows the output attached >> below: >> >> In the output the MaxId is 4, but the number of tuples is 1, shouldn't the >> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the >> source of the problem ? >> >> Similarly if a (2x5) numpy array is converted to vtk with >> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, which >> in my opininion should be 1. I will dig some more into the >> vtk_np.numpy_to_vtkIdTypeArray function ... >> >> Thanks for any comment, >> >> Best Regards, >> >> Andrea >> >> >> Printing cell data >> vtkIdTypeArray (000002C3420E7BE0) >> Debug: Off >> Modified Time: 54 >> Reference Count: 1 >> Registered Events: (none) >> Name: (none) >> Data type: idtype >> Size: 5 >> MaxId: 4 >> NumberOfComponents: 5 >> Information: 0000000000000000 >> Name: (none) >> Number Of Components: 5 >> Number Of Tuples: 1 >> Size: 5 >> MaxId: 4 >> LookupTable: (none) >> Array: 000002C342B0EA50 >> >> >> >> >> >> >> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >> >> Hi Elvis, >> >> Thanks for testing this. Actually I started out on Ubuntu with your Jumbo >> VTK package, and is it was throwing this error, I switched to compiling from >> source - with the same result. >> >> Cheers, >> >> Andrea >> >> >> >> I tested your example with the 7.1.0.rc1 build we use at work (also >> Ubuntu 16.04), and I also get an X error, though a slightly different >> one: >> >> X Error of failed request: BadMatch (invalid parameter attributes) >> Major opcode of failed request: 154 (GLX) >> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >> Serial number of failed request: 2141 >> Current serial number in output stream: 2143 >> >> I can confirm that commenting the interactor initialization/start, it >> terminates OK. >> >> Haven't looked closer at what's happening, but just thought I should >> share. >> >> For brevity, these are the flags we use when configuring our build: >> >> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >> -DVTK_Group_Qt=ON \ >> -DVTK_QT_VERSION=5 \ >> -DVTK_Group_Imaging=ON \ >> -DVTK_Group_Views=ON \ >> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >> -DVTK_WRAP_PYTHON=ON \ >> -DVTK_PYTHON_VERSION=3 \ >> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >> -DBUILD_TESTING=OFF \ >> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >> -DVTK_USE_SYSTEM_GL2PS=OFF \ >> -DCMAKE_BUILD_TYPE=Release >> >> Elvis >> >> Best Regards, >> >> Andrea >> >> >> >> On 27/10/2016 23:25, Ken Martin wrote: >> >> Hmm, well that means VTK's rendering engine is initializing OK and >> running. >> So it could be something specific to the python app. If you run some of >> the >> python tests do they work? ala >> >> ctest -R Python -I ,,23 >> >> thats runs 1/23rd of the python tests >> >> if those all pass then it must be something specific to your script >> >> >> >> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >> >> wrote: >> >> Hi Ken, >> >> The test seems to run fine, I am attaching below the output. >> >> Best Regards, >> >> Andrea >> >> >> ----------------------- >> >> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >> UpdateCTestConfiguration from >> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >> Add coverage exclude regular expressions. >> Add coverage exclude: vtk.*TCLInit.cxx >> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >> Add coverage exclude: .*vtkOpenGLState.* >> Add coverage exclude: .*Testing.Cxx.*cxx >> Add coverage exclude: .*Testing.Cxx.*h >> Add coverage exclude: .*moc_.*cxx >> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >> Add coverage exclude: .*/Utilities/.* >> Add coverage exclude: .*/ThirdParty/.* >> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >> UpdateCTestConfiguration from >> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >> Test project /opt/VTK-7.1.0.rc1-bin >> Constructing a list of tests >> Done constructing a list of tests >> Checking test dependency graph... >> Checking test dependency graph end >> test 1551 >> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >> >> 1551: Test command: >> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >> "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >> "-T" >> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >> >> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >> 1551: Test timeout computed to be: 3600 >> 1551: first render time: 0.132993 >> 1551: opengl version 4.5 >> 1551: interactive render time: 0.0166377 >> 1551: number of triangles: 871414 >> 1551: triangles per second: 5.2376e+07 >> 1551: > type="numeric/double">0> name="BaselineImage" >> type="text/string">Standard> name="WallTime" type="numeric/double">0.059715 >> 1551: > type="numeric/double">0.037073 >> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed >> 0.91 sec >> >> The following tests passed: >> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >> >> 100% tests passed, 0 tests failed out of 1 >> >> Label Time Summary: >> vtkRenderingOpenGL2 = 0.91 sec (1 test) >> >> Total Test time (real) = 0.97 sec >> >> >> >> >> >> On 27/10/2016 18:56, Ken Martin wrote: >> >> Can you try running ctest -R VBOPLY -VV and let us know the output? >> >> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >> wrote: >> >> Dear All, >> >> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a >> computer with the following hw configuration: >> >> Processor: Intel Core i7 >> >> GPU: NVIDIA GTX Titan Black >> >> --- >> >> VTK has been configured for: >> >> OpenGL 2 back-end >> >> Use Qt 5.7 >> >> Use OpenMP for SMP >> >> Wrap Python 3 (ver 3.5.2 on the system) >> >> --- >> >> A simple python script which displays an unstructured grid and which >> works fine under Windows, opens (under Ubuntu) a rendering window and >> crashes with the message below: >> >> X Error of failed request: GLXBadDrawable >> Major opcode of failed request: 154 (GLX) >> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >> Serial number of failed request: 111 >> Current serial number in output stream: 111 >> >> >> Do you have any hint about this? Should I try the RC 7.1 or switch to >> the >> plain OpenGL back-end ? >> >> Thanks in advance for any suggestion, >> >> Best Regards, >> >> Andrea >> >> _______________________________________________ >> 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. >> >> >> >> _______________________________________________ >> 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 >> >> 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 >> > > From bill.lorensen at gmail.com Wed Nov 16 15:39:08 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 16 Nov 2016 15:39:08 -0500 Subject: [vtkusers] Display Error under Ubuntu 16.04 In-Reply-To: References: <5fd8ea8d-e144-18aa-26d9-169827416ba4@ne-scientific.com> <05478125-ddf1-ae44-223c-c3fbc5c483d7@ne-scientific.com> <56f148d0-33da-f2c2-e449-79fec4a663fe@ne-scientific.com> <9bc8b0d4-0920-5e64-255e-08d4b48d11cd@ne-scientific.com> <90005c0c-0787-4716-9927-e893f2c10571@ne-scientific.com> <81e50537-9e55-e960-2fed-329e8168444d@ne-scientific.com> Message-ID: Andrea, Thanks for providing simple examples that illustrated the problem. I think you uncovered a bug. I'm happy there is a workaround... Bill On Wed, Nov 16, 2016 at 3:34 PM, Andrea Borsic wrote: > Thanks so much for your time! > > Best Regards, > > Andrea > > > > On 11/16/2016 8:56 PM, Bill Lorensen wrote: >> >> Solved. >> >> looks like you need to: >> interactor = vtk.vtkRenderWindowInteractor() >> interactor.SetRenderWindow(renWin) >> >> BEFORE: >> renWin.Render() >> >> I'm not sure why. Looks like a strange bug to me. >> >> Your numpy example also works with this fix. >> >> >> On Wed, Nov 16, 2016 at 2:03 PM, Andrea Borsic >> wrote: >>> >>> Sorry for the many posts, just a last one with a further simplified >>> example >>> that removes the need for numpy and numpy conversions ... >>> >>> Best Regards, >>> >>> Andrea >>> >>> >>> On 11/16/2016 6:01 PM, Andrea Borsic wrote: >>> >>> I have further simplified the script (it still crashes under Ubuntu and >>> not >>> under Windows) >>> >>> Best, >>> >>> Andrea >>> >>> >>> On 11/16/2016 5:29 PM, Andrea Borsic wrote: >>> >>> Thanks for your test. >>> >>> My hint to the problem is wrong though - I have realized that MaxId is >>> equal to size() - 1 and not NumberOfTuples() -1, so the MaxId shown by >>> print() is correct. >>> >>> I will do some more digging, >>> >>> Best and thanks, >>> >>> Andrea >>> >>> >>> On 16/11/2016 17:13, Bill Lorensen wrote: >>> >>> I get the same error on my Ubuntu14.04 build. >>> >>> On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic >>> wrote: >>> >>> Hi All, >>> >>> Apologies for the long hiatus, but I would like to understand why the >>> crash >>> I and Elvis are experiencing is occurring. I am half convinced it could >>> be a >>> bug in the numpy support functions, and wanted to share my knowledge so >>> far >>> in order to hear any possible feedback. >>> >>> I am attaching a new Python script, which is simpler and self contained >>> now. >>> The script builds a vtkUnstructuredGrid with a single tetrahedra and >>> displays it. The script does not crash under Windows, but crashes under >>> Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2 >>> >>> The dataset has only 4 points and the only cell of the dataset (a >>> tetrahedra) is described by the list of nodes [0,1,2,3] to which is >>> pre-pended a "4" to indicate that 4 points describe the cell, the cell >>> data >>> is therefore [4,0,1,2,3]. The cell data is automatically converted from >>> numpy to vtk using the vtk numpy support functions. >>> >>> Printing the VTK converted cell_data (line 47) shows the output attached >>> below: >>> >>> In the output the MaxId is 4, but the number of tuples is 1, shouldn't >>> the >>> MaxId therefore be 0 (the shape of the array is (1,5) )? Can this be the >>> source of the problem ? >>> >>> Similarly if a (2x5) numpy array is converted to vtk with >>> vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a MaxId of 9, >>> which >>> in my opininion should be 1. I will dig some more into the >>> vtk_np.numpy_to_vtkIdTypeArray function ... >>> >>> Thanks for any comment, >>> >>> Best Regards, >>> >>> Andrea >>> >>> >>> Printing cell data >>> vtkIdTypeArray (000002C3420E7BE0) >>> Debug: Off >>> Modified Time: 54 >>> Reference Count: 1 >>> Registered Events: (none) >>> Name: (none) >>> Data type: idtype >>> Size: 5 >>> MaxId: 4 >>> NumberOfComponents: 5 >>> Information: 0000000000000000 >>> Name: (none) >>> Number Of Components: 5 >>> Number Of Tuples: 1 >>> Size: 5 >>> MaxId: 4 >>> LookupTable: (none) >>> Array: 000002C342B0EA50 >>> >>> >>> >>> >>> >>> >>> On 10/28/2016 4:39 PM, Andrea Borsic wrote: >>> >>> Hi Elvis, >>> >>> Thanks for testing this. Actually I started out on Ubuntu with your Jumbo >>> VTK package, and is it was throwing this error, I switched to compiling >>> from >>> source - with the same result. >>> >>> Cheers, >>> >>> Andrea >>> >>> >>> >>> I tested your example with the 7.1.0.rc1 build we use at work (also >>> Ubuntu 16.04), and I also get an X error, though a slightly different >>> one: >>> >>> X Error of failed request: BadMatch (invalid parameter attributes) >>> Major opcode of failed request: 154 (GLX) >>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>> Serial number of failed request: 2141 >>> Current serial number in output stream: 2143 >>> >>> I can confirm that commenting the interactor initialization/start, it >>> terminates OK. >>> >>> Haven't looked closer at what's happening, but just thought I should >>> share. >>> >>> For brevity, these are the flags we use when configuring our build: >>> >>> -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \ >>> -DVTK_Group_Qt=ON \ >>> -DVTK_QT_VERSION=5 \ >>> -DVTK_Group_Imaging=ON \ >>> -DVTK_Group_Views=ON \ >>> -DModule_vtkRenderingFreeTypeFontConfig=ON \ >>> -DVTK_WRAP_PYTHON=ON \ >>> -DVTK_PYTHON_VERSION=3 \ >>> -DPYTHON_EXECUTABLE=/usr/bin/python3 \ >>> -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \ >>> -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \ >>> -DBUILD_TESTING=OFF \ >>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>> -DVTK_USE_SYSTEM_GL2PS=OFF \ >>> -DCMAKE_BUILD_TYPE=Release >>> >>> Elvis >>> >>> Best Regards, >>> >>> Andrea >>> >>> >>> >>> On 27/10/2016 23:25, Ken Martin wrote: >>> >>> Hmm, well that means VTK's rendering engine is initializing OK and >>> running. >>> So it could be something specific to the python app. If you run some of >>> the >>> python tests do they work? ala >>> >>> ctest -R Python -I ,,23 >>> >>> thats runs 1/23rd of the python tests >>> >>> if those all pass then it must be something specific to your script >>> >>> >>> >>> On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic >>> >>> wrote: >>> >>> Hi Ken, >>> >>> The test seems to run fine, I am attaching below the output. >>> >>> Best Regards, >>> >>> Andrea >>> >>> >>> ----------------------- >>> >>> andrea at i7-Desktop:/opt/VTK-7.1.0.rc1-bin$ sudo ctest -R VBOPLY -VV >>> UpdateCTestConfiguration from >>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>> Add coverage exclude regular expressions. >>> Add coverage exclude: vtk.*TCLInit.cxx >>> Add coverage exclude: vtk[^\.]+(Java|Python|Tcl).cxx >>> Add coverage exclude: .*vtkOpenGLState.* >>> Add coverage exclude: .*Testing.Cxx.*cxx >>> Add coverage exclude: .*Testing.Cxx.*h >>> Add coverage exclude: .*moc_.*cxx >>> Add coverage exclude: .*/Rendering/OpenGL/vtkgl.* >>> Add coverage exclude: .*/Utilities/.* >>> Add coverage exclude: .*/ThirdParty/.* >>> Add coverage exclude: .*vtkOpenGLPolyDataMapper.* >>> SetCTestConfiguration:CMakeCommand:/usr/bin/cmake >>> UpdateCTestConfiguration from >>> :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>> Parse Config file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl >>> Test project /opt/VTK-7.1.0.rc1-bin >>> Constructing a list of tests >>> Done constructing a list of tests >>> Checking test dependency graph... >>> Checking test dependency graph end >>> test 1551 >>> Start 1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>> >>> 1551: Test command: >>> /opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests >>> "TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing" >>> "-T" >>> "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V" >>> >>> >>> "/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png" >>> 1551: Test timeout computed to be: 3600 >>> 1551: first render time: 0.132993 >>> 1551: opengl version 4.5 >>> 1551: interactive render time: 0.0166377 >>> 1551: number of triangles: 871414 >>> 1551: triangles per second: 5.2376e+07 >>> 1551: >> type="numeric/double">0>> name="BaselineImage" >>> type="text/string">Standard>> name="WallTime" type="numeric/double">0.059715 >>> 1551: >> type="numeric/double">0.037073 >>> 1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ... Passed >>> 0.91 sec >>> >>> The following tests passed: >>> vtkRenderingOpenGL2Cxx-TestVBOPLYMapper >>> >>> 100% tests passed, 0 tests failed out of 1 >>> >>> Label Time Summary: >>> vtkRenderingOpenGL2 = 0.91 sec (1 test) >>> >>> Total Test time (real) = 0.97 sec >>> >>> >>> >>> >>> >>> On 27/10/2016 18:56, Ken Martin wrote: >>> >>> Can you try running ctest -R VBOPLY -VV and let us know the output? >>> >>> On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic >>> wrote: >>> >>> Dear All, >>> >>> I have successfully compiled VTK 7.0.0 under Ubuntu 16.04.1 LTS on a >>> computer with the following hw configuration: >>> >>> Processor: Intel Core i7 >>> >>> GPU: NVIDIA GTX Titan Black >>> >>> --- >>> >>> VTK has been configured for: >>> >>> OpenGL 2 back-end >>> >>> Use Qt 5.7 >>> >>> Use OpenMP for SMP >>> >>> Wrap Python 3 (ver 3.5.2 on the system) >>> >>> --- >>> >>> A simple python script which displays an unstructured grid and which >>> works fine under Windows, opens (under Ubuntu) a rendering window and >>> crashes with the message below: >>> >>> X Error of failed request: GLXBadDrawable >>> Major opcode of failed request: 154 (GLX) >>> Minor opcode of failed request: 11 (X_GLXSwapBuffers) >>> Serial number of failed request: 111 >>> Current serial number in output stream: 111 >>> >>> >>> Do you have any hint about this? Should I try the RC 7.1 or switch to >>> the >>> plain OpenGL back-end ? >>> >>> Thanks in advance for any suggestion, >>> >>> Best Regards, >>> >>> Andrea >>> >>> _______________________________________________ >>> 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. >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> 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 >>> >> >> > -- Unpaid intern in BillsBasement at noware dot com From andrew.slaughter at inl.gov Wed Nov 16 19:30:49 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 16 Nov 2016 17:30:49 -0700 Subject: [vtkusers] Render results differ with Paraview Message-ID: I am writing a VTK python script (VTK7.0.0 on OSX) to read and render an ExodusII file. I am getting results that differ quite a bit from Paraview (4.3.1), as shown in the attached images. My python script (also attached) produces a result that is not nearly as smooth as Paraview. I am likely using an incorrect filter or missing some setting and would appreciate if someone could assist me in improving my script. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: paraview.png Type: image/png Size: 86070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: python.png Type: image/png Size: 63390 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: exodus.py Type: text/x-python-script Size: 1266 bytes Desc: not available URL: From cory.quammen at kitware.com Wed Nov 16 23:15:40 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 16 Nov 2016 23:15:40 -0500 Subject: [vtkusers] Render results differ with Paraview In-Reply-To: References: Message-ID: Andrew, Please add mapper.InterpolateScalarsBeforeMappingOn() to your script. This should get your example to render the same way ParaView does by default. See this blog post for more details: https://blog.kitware.com/what-is-interpolatescalarsbeforemapping-in-vtk/ HTH, Cory On Wed, Nov 16, 2016 at 7:30 PM, Slaughter, Andrew E wrote: > I am writing a VTK python script (VTK7.0.0 on OSX) to read and render an > ExodusII file. I am getting results that differ quite a bit from Paraview > (4.3.1), as shown in the attached images. > > My python script (also attached) produces a result that is not nearly as > smooth as Paraview. I am likely using an incorrect filter or missing some > setting and would appreciate if someone could assist me in improving my > script. > > Thanks, > > Andrew > > _______________________________________________ > 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 mail at oliwe.com Thu Nov 17 01:53:48 2016 From: mail at oliwe.com (Oliver Weinheimer) Date: Wed, 16 Nov 2016 23:53:48 -0700 (MST) Subject: [vtkusers] Change of OpenGL Backend In-Reply-To: <1479292978514-5741188.post@n5.nabble.com> References: <1479292978514-5741188.post@n5.nabble.com> Message-ID: <1479365628116-5741213.post@n5.nabble.com> VTK 7.1rc2 works now in my project. It was a problem with wrong linked libraries. Used IDE: C++Builder Berlin Update 1, bcc64 -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-of-OpenGL-Backend-tp5741188p5741213.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.slaughter at inl.gov Thu Nov 17 10:09:04 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 17 Nov 2016 08:09:04 -0700 Subject: [vtkusers] Render results differ with Paraview In-Reply-To: References: Message-ID: Thank you, worked like a charm. I will update the Exodus example on the wiki to include this. On Wed, Nov 16, 2016 at 9:15 PM, Cory Quammen wrote: > Andrew, > > Please add > > mapper.InterpolateScalarsBeforeMappingOn() > > to your script. This should get your example to render the same way > ParaView does by default. > > See this blog post for more details: > https://urldefense.proofpoint.com/v2/url?u=https-3A__blog. > kitware.com_what-2Dis-2Dinterpolatescalarsbeforemapp > ing-2Din-2Dvtk_&d=CwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8 > c&m=0oicLgp7qUpCO1b7bfKpO_l4jQFlDVseMnuOHdbYKew&s=sYF5vqvJURaL8N- > hnp5tmFimChBukKggn2sx7r6BFtA&e= > > HTH, > Cory > > On Wed, Nov 16, 2016 at 7:30 PM, Slaughter, Andrew E > wrote: > > I am writing a VTK python script (VTK7.0.0 on OSX) to read and render an > > ExodusII file. I am getting results that differ quite a bit from Paraview > > (4.3.1), as shown in the attached images. > > > > My python script (also attached) produces a result that is not nearly as > > smooth as Paraview. I am likely using an incorrect filter or missing > some > > setting and would appreciate if someone could assist me in improving my > > script. > > > > Thanks, > > > > Andrew > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > https://urldefense.proofpoint.com/v2/url?u=http-3A__www. > kitware.com_opensource_opensource.html&d=CwIBaQ&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=0oicLgp7qUpCO1b7bfKpO_ > l4jQFlDVseMnuOHdbYKew&s=Qmmnd04kg8EZ7XX1H_H5dhqDcQjcag2iq9a9h8cfNJ8&e= > > > > Please keep messages on-topic and check the VTK FAQ at: > > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=CwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8 > c&m=0oicLgp7qUpCO1b7bfKpO_l4jQFlDVseMnuOHdbYKew&s=vVaBo4M__P4kvs7b1CDiu9_ > uAhpqrvqDGz-GXd93MjQ&e= > > > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=CwIBaQ&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=0oicLgp7qUpCO1b7bfKpO_ > l4jQFlDVseMnuOHdbYKew&s=fWW0fqYgfjYdhf_fJUqYyXpM7NW0hYRTvAUu_iQNQg4&e= > > > > Follow this link to subscribe/unsubscribe: > > https://urldefense.proofpoint.com/v2/url?u=http-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=CwIBaQ&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=0oicLgp7qUpCO1b7bfKpO_ > l4jQFlDVseMnuOHdbYKew&s=G8Tq_L0DynuT_c7uFthEkEJXAeDIut9waYcf8DJicps&e= > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prakeshofficial at gmail.com Thu Nov 17 11:31:26 2016 From: prakeshofficial at gmail.com (rakesh patil) Date: Thu, 17 Nov 2016 22:01:26 +0530 Subject: [vtkusers] vtkAppendPolydataFilter vs vtkBooleanOperationPolyDataFilter::Union Message-ID: Hi all, I am using vtkBooleanOperationPolyDataFilter to perform union of two 3D objects. For 3D objects of same height, I find there exists certain cracks and holes. So as a workaround I was thinking to use vtkAppendPolyDataFilter. So I just wanted to know whether vtkAppendPolyDataFilter is an alternate option for union operation performed by vtkBooleanOperationPolyDataFilter. The only difference I can see is that the input and output wont be triangulated in case of vtkAppendPolyDataFilter. Also will there be any improvements done on vtkBooleanOperationPolyDataFilter to solve the holes issue in near future? Thanks & Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Nov 17 11:42:01 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 17 Nov 2016 11:42:01 -0500 Subject: [vtkusers] vtkAppendPolydataFilter vs vtkBooleanOperationPolyDataFilter::Union In-Reply-To: References: Message-ID: On Thu, Nov 17, 2016 at 11:31 AM, rakesh patil wrote: > Hi all, > > I am using vtkBooleanOperationPolyDataFilter to perform union of two 3D > objects. For 3D objects of same height, I find there exists certain cracks > and holes. So as a workaround I was thinking to use vtkAppendPolyDataFilter. > So I just wanted to know whether vtkAppendPolyDataFilter is an alternate > option for union operation performed by vtkBooleanOperationPolyDataFilter. > The only difference I can see is that the input and output wont be > triangulated in case of vtkAppendPolyDataFilter. The result won't be the same if your two objects overlap in space. The union for overlapping objects should exclude the portions of one input geometry that are inside the other. vtkAppendPolyDataFilter just globs everything together. > Also will there be any improvements done on > vtkBooleanOperationPolyDataFilter to solve the holes issue in near future? It's a tough geometric problem. There is a merge request from Adam Updegrove that improves the operation of the boolean filter [1], but as I recall another VTK community member had a test cases on which even it fails. Best regards, Cory [1] https://gitlab.kitware.com/vtk/vtk/merge_requests/1752 > Thanks & 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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From wangtao_ at sjtu.edu.cn Fri Nov 18 02:59:57 2016 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Fri, 18 Nov 2016 00:59:57 -0700 (MST) Subject: [vtkusers] How to improve medical volume render? Message-ID: <1479455997452-5741220.post@n5.nabble.com> Can anybody give me some advises to improve the volume render effect of my medical image data? How can I remove the "isolines" on skin to make it looks smooth? I have tried SetSampleDistance(), small distance can improve it but make the rendering time too long, is there any other good way to make it more beautiful? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220.html Sent from the VTK - Users mailing list archive at Nabble.com. From jan-niklas.hasse at stw.de Fri Nov 18 05:51:04 2016 From: jan-niklas.hasse at stw.de (Jan Niklas Hasse) Date: Fri, 18 Nov 2016 11:51:04 +0100 Subject: [vtkusers] How to "undo" GetRenderWindow()->Render()? Message-ID: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> Hi, I'm using VTK 6.2 with Qt. I've created a class Plot2D which inherits from QVTKWidget. I now have a lot of these plots widgets in a tabbed view and want to only render the ones that are currently visible (otherwise I get an OpenGL crash). void Plot2D::showEvent(QShowEvent*) { view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1,1,1); view->SetRenderWindow(GetRenderWindow()); view->GetRenderWindow()->SetSize(width(),height()); view->GetScene()->AddItem(chart); view->GetRenderWindow()->SetMultiSamples(0); view->GetRenderWindow()->Render(); } void Plot2D::hideEvent(QHideEvent*) { view = nullptr; } Unfortunately, deleting the vtkContextView isn't enough: The next time showEvent is called, I get a crash inside VTK because it seems that view->GetRenderWindow()->Render(); has set up some kind of timer in the background. How would I solve this? Thanks in advance :) Jan From dan.lipsa at kitware.com Fri Nov 18 08:57:29 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 18 Nov 2016 08:57:29 -0500 Subject: [vtkusers] How to "undo" GetRenderWindow()->Render()? In-Reply-To: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> References: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> Message-ID: Jan, To hide items in a scene you have to call SetVisible(false) on them. Is this what you are trying to do? Dan On Fri, Nov 18, 2016 at 5:51 AM, Jan Niklas Hasse wrote: > Hi, > > I'm using VTK 6.2 with Qt. I've created a class Plot2D which inherits from > QVTKWidget. I now have a lot of these plots widgets in a tabbed view and > want to only render the ones that are currently visible (otherwise I get an > OpenGL crash). > > void Plot2D::showEvent(QShowEvent*) { > view = vtkSmartPointer::New(); > view->GetRenderer()->SetBackground(1,1,1); > view->SetRenderWindow(GetRenderWindow()); > view->GetRenderWindow()->SetSize(width(),height()); > view->GetScene()->AddItem(chart); > view->GetRenderWindow()->SetMultiSamples(0); > view->GetRenderWindow()->Render(); > } > > void Plot2D::hideEvent(QHideEvent*) { > view = nullptr; > } > > Unfortunately, deleting the vtkContextView isn't enough: The next time > showEvent is called, I get a crash inside VTK because it seems that > view->GetRenderWindow()->Render(); has set up some kind of timer in the > background. How would I solve this? > > Thanks in advance :) > Jan > _______________________________________________ > 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 Fri Nov 18 10:10:08 2016 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Fri, 18 Nov 2016 10:10:08 -0500 Subject: [vtkusers] How to improve medical volume render? In-Reply-To: <1479455997452-5741220.post@n5.nabble.com> References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: If you built VTK with the OpenGL2 backend and you are using GPU ray cast mapper, you could enable jittering by calling UseJitteringOn(). This should reduce the aliasing effects you are seeing. Cheers, ?lvaro On Fri, Nov 18, 2016 at 2:59 AM, wangtaoiz wrote: > > Can anybody give me some advises to improve the volume render effect of my > medical image data? How can I remove the "isolines" on skin to make it > looks > smooth? I have tried SetSampleDistance(), small distance can improve it but > make the rendering time too long, is there any other good way to make it > more beautiful? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/How-to-improve-medical-volume-render-tp5741220.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 > -- 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 cory.quammen at kitware.com Fri Nov 18 13:41:19 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 18 Nov 2016 13:41:19 -0500 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: > I see what's going on now. But to be honest, it was easy to miss. If there > was a small "Oh, remember to use GetAbstractArrray for stringarray, etc" > that would have helped immensely. I find keeping vtk's inheritance graphs in > mind difficult (they're pretty complex), so a reminder here and there would > go a long way towards someone like me who is piecing together usage off the > docs and examples, without fully groking the entirety of vtk. Thanks for the feedback. You are right that we should probably recommend using GetAbstractArray() by default as one typically needs to downcast the returned pointer anyway. Abstract arrays were added to VTK after the numeric arrays were added, so a lot of code still uses the GetArray() member function. To avoid breaking backwards compatibility, the GetAbstractArray() was added for accessing non-numeric arrays. Hence the confusion. I have a merge request for clarifying when to use these member functions up: https://gitlab.kitware.com/vtk/vtk/merge_requests/2180 - Cory > Cheers > Chris > > > > Cheers > Chris > > On 16 November 2016 at 09:23, Cory Quammen wrote: >> >> > Does anyone know who would be able to amend the example I linked above >> > to >> > include the string? It is not at all clear from the docs that string >> > behaves >> > differently. >> >> Do you mean actually modify that example? Anyone with a wiki account >> can add an example. I just modified the example you cited to use >> GetAbstractArray(). Doing so doesn't really explain the API, but it >> may save someone the trouble you ran into. We always welcome >> improvements to the documentation in the source code. >> >> If you are asking for technical details on how to amend the example, this >> part >> >> vtkSmartPointer intValue = >> vtkSmartPointer::New(); >> intValue->SetNumberOfComponents(1); >> intValue->SetName("MyIntValue"); >> intValue->InsertNextValue(5); >> >> should be changed to >> >> vtkSmartPointer strArray = >> vtkSmartPointer::New(); >> strArray->SetName("MyStringArray"); >> vtkStdString strValue("my value"); >> strArray->InsertNextValue(strValue); >> >> HTH, >> Cory >> >> >> > >> > On 11 November 2016 at 09:30, Cory Quammen >> > wrote: >> >> >> >> Ah, yes, I should have caught that you would be using a >> >> vtkStringArray, which is not accessed the same way as the numeric data >> >> arrays. Glad you found the solution. >> >> >> >> Cory >> >> >> >> On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh >> >> wrote: >> >> > Hi all, >> >> > >> >> > Following the advice here >> >> > >> >> > http://public.kitware.com/pipermail/paraview/2012-September/026100.html >> >> > >> >> > worked. That is, in Python, the following works >> >> > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) >> >> > >> >> > >> >> > On 9 November 2016 at 15:54, Chris Marsh >> >> > wrote: >> >> >> >> >> >> Hi Cory, >> >> >> Thanks for the reply. This looks like a perfect way forward. >> >> >> >> >> >> I am following this >> >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData >> >> >> >> >> >> and am having troubles with this approach. The field data doesn't >> >> >> seem >> >> >> to >> >> >> be set properly. I can see the field data *name* in paraview when I >> >> >> load my >> >> >> mesh, but it has an NA value. >> >> >> >> >> >> >> >> >> What I'm doing is: >> >> >> >> >> >> std::string _srs_wkt = "my projection data here"; >> >> >> vtkSmartPointer proj4 = >> >> >> vtkSmartPointer::New(); >> >> >> proj4->SetNumberOfComponents(1); >> >> >> proj4->SetName("proj4"); >> >> >> proj4->InsertNextValue(_srs_wkt); >> >> >> >> >> >> vtkSmartPointer _vtk_unstructuredGrid = >> >> >> vtkSmartPointer::New(); >> >> >> >> >> >> //... build up _vtk_unstructuredGrid etc. >> >> >> >> >> >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); >> >> >> >> >> >> //validate >> >> >> vtkStringArray* test = >> >> >> >> >> >> >> >> >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetFieldData()->GetArray("proj4")); >> >> >> >> >> >> //test is NULL >> >> >> >> >> >> any ideas? >> >> >> Thanks >> >> >> >> >> >> >> >> >> Chris Marsh >> >> >> PhD Candidate >> >> >> chrismarsh.ca >> >> >> >> >> >> 13 Kirk Hall >> >> >> University of Saskatchewan >> >> >> >> >> >> On 9 November 2016 at 01:31, Cory Quammen >> >> >> wrote: >> >> >>> >> >> >>> Hi Chris, >> >> >>> >> >> >>> Usually we stuff this kind of data into the generic field data >> >> >>> (arrays >> >> >>> not associated with points of cells) in the data set. The VTU >> >> >>> reader/writer supports reading/writing field data. >> >> >>> >> >> >>> HTH, >> >> >>> Cory >> >> >>> >> >> >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh >> >> >>> wrote: >> >> >>> > Hi, >> >> >>> > >> >> >>> > I would like to add some extra meta-data to a pvd file. >> >> >>> > Specifically, a >> >> >>> > proj4 string containing information about the coordinate system >> >> >>> > projection >> >> >>> > of the data contained in a vtu file. >> >> >>> > >> >> >>> > Is there a recommended way to do this? >> >> >>> > >> >> >>> > Cheers >> >> >>> > Chris >> >> >>> > >> >> >>> > _______________________________________________ >> >> >>> > 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. > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From chris.marsh at usask.ca Fri Nov 18 14:18:22 2016 From: chris.marsh at usask.ca (Chris Marsh) Date: Fri, 18 Nov 2016 13:18:22 -0600 Subject: [vtkusers] Extra meta data in pvd In-Reply-To: References: Message-ID: Cory, that's awesome. Thanks very much. Cheers Chris On 18 November 2016 at 12:41, Cory Quammen wrote: > > I see what's going on now. But to be honest, it was easy to miss. If > there > > was a small "Oh, remember to use GetAbstractArrray for stringarray, etc" > > that would have helped immensely. I find keeping vtk's inheritance > graphs in > > mind difficult (they're pretty complex), so a reminder here and there > would > > go a long way towards someone like me who is piecing together usage off > the > > docs and examples, without fully groking the entirety of vtk. > > Thanks for the feedback. You are right that we should probably > recommend using GetAbstractArray() by default as one typically needs > to downcast the returned pointer anyway. Abstract arrays were added to > VTK after the numeric arrays were added, so a lot of code still uses > the GetArray() member function. To avoid breaking backwards > compatibility, the GetAbstractArray() was added for accessing > non-numeric arrays. Hence the confusion. > > I have a merge request for clarifying when to use these member > functions up: https://gitlab.kitware.com/vtk/vtk/merge_requests/2180 > > - Cory > > > Cheers > > Chris > > > > > > > > Cheers > > Chris > > > > On 16 November 2016 at 09:23, Cory Quammen > wrote: > >> > >> > Does anyone know who would be able to amend the example I linked above > >> > to > >> > include the string? It is not at all clear from the docs that string > >> > behaves > >> > differently. > >> > >> Do you mean actually modify that example? Anyone with a wiki account > >> can add an example. I just modified the example you cited to use > >> GetAbstractArray(). Doing so doesn't really explain the API, but it > >> may save someone the trouble you ran into. We always welcome > >> improvements to the documentation in the source code. > >> > >> If you are asking for technical details on how to amend the example, > this > >> part > >> > >> vtkSmartPointer intValue = > >> vtkSmartPointer::New(); > >> intValue->SetNumberOfComponents(1); > >> intValue->SetName("MyIntValue"); > >> intValue->InsertNextValue(5); > >> > >> should be changed to > >> > >> vtkSmartPointer strArray = > >> vtkSmartPointer::New(); > >> strArray->SetName("MyStringArray"); > >> vtkStdString strValue("my value"); > >> strArray->InsertNextValue(strValue); > >> > >> HTH, > >> Cory > >> > >> > >> > > >> > On 11 November 2016 at 09:30, Cory Quammen > >> > wrote: > >> >> > >> >> Ah, yes, I should have caught that you would be using a > >> >> vtkStringArray, which is not accessed the same way as the numeric > data > >> >> arrays. Glad you found the solution. > >> >> > >> >> Cory > >> >> > >> >> On Thu, Nov 10, 2016 at 2:15 PM, Chris Marsh > >> >> wrote: > >> >> > Hi all, > >> >> > > >> >> > Following the advice here > >> >> > > >> >> > http://public.kitware.com/pipermail/paraview/2012- > September/026100.html > >> >> > > >> >> > worked. That is, in Python, the following works > >> >> > my_mesh.GetFieldData().GetAbstractArray("proj4").GetValue(0) > >> >> > > >> >> > > >> >> > On 9 November 2016 at 15:54, Chris Marsh > >> >> > wrote: > >> >> >> > >> >> >> Hi Cory, > >> >> >> Thanks for the reply. This looks like a perfect way forward. > >> >> >> > >> >> >> I am following this > >> >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > >> >> >> > >> >> >> and am having troubles with this approach. The field data doesn't > >> >> >> seem > >> >> >> to > >> >> >> be set properly. I can see the field data *name* in paraview when > I > >> >> >> load my > >> >> >> mesh, but it has an NA value. > >> >> >> > >> >> >> > >> >> >> What I'm doing is: > >> >> >> > >> >> >> std::string _srs_wkt = "my projection data here"; > >> >> >> vtkSmartPointer proj4 = > >> >> >> vtkSmartPointer::New(); > >> >> >> proj4->SetNumberOfComponents(1); > >> >> >> proj4->SetName("proj4"); > >> >> >> proj4->InsertNextValue(_srs_wkt); > >> >> >> > >> >> >> vtkSmartPointer _vtk_unstructuredGrid = > >> >> >> vtkSmartPointer::New(); > >> >> >> > >> >> >> //... build up _vtk_unstructuredGrid etc. > >> >> >> > >> >> >> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4); > >> >> >> > >> >> >> //validate > >> >> >> vtkStringArray* test = > >> >> >> > >> >> >> > >> >> >> vtkStringArray::SafeDownCast(_vtk_unstructuredGrid-> > GetFieldData()->GetArray("proj4")); > >> >> >> > >> >> >> //test is NULL > >> >> >> > >> >> >> any ideas? > >> >> >> Thanks > >> >> >> > >> >> >> > >> >> >> Chris Marsh > >> >> >> PhD Candidate > >> >> >> chrismarsh.ca > >> >> >> > >> >> >> 13 Kirk Hall > >> >> >> University of Saskatchewan > >> >> >> > >> >> >> On 9 November 2016 at 01:31, Cory Quammen < > cory.quammen at kitware.com> > >> >> >> wrote: > >> >> >>> > >> >> >>> Hi Chris, > >> >> >>> > >> >> >>> Usually we stuff this kind of data into the generic field data > >> >> >>> (arrays > >> >> >>> not associated with points of cells) in the data set. The VTU > >> >> >>> reader/writer supports reading/writing field data. > >> >> >>> > >> >> >>> HTH, > >> >> >>> Cory > >> >> >>> > >> >> >>> On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh < > chris.marsh at usask.ca> > >> >> >>> wrote: > >> >> >>> > Hi, > >> >> >>> > > >> >> >>> > I would like to add some extra meta-data to a pvd file. > >> >> >>> > Specifically, a > >> >> >>> > proj4 string containing information about the coordinate system > >> >> >>> > projection > >> >> >>> > of the data contained in a vtu file. > >> >> >>> > > >> >> >>> > Is there a recommended way to do this? > >> >> >>> > > >> >> >>> > Cheers > >> >> >>> > Chris > >> >> >>> > > >> >> >>> > _______________________________________________ > >> >> >>> > 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. > > > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sat Nov 19 01:39:49 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sat, 19 Nov 2016 06:39:49 +0000 (UTC) Subject: [vtkusers] Problems to configurate VTK-7.1.0RC2 in Debian 8 References: <224649106.37928.1479537589918.ref@mail.yahoo.com> Message-ID: <224649106.37928.1479537589918@mail.yahoo.com> Hi to AllI have a problems to configure VTK-&.!.)RC2 in Debian 8.5 x64 ?with OpenGL2I use CCMAKE-3.7.0 ?and have got next error messageCould NOT find OpenGL (missing: OPEN_gl_Library) In Debian 7 I configure all without problems. Thank you. Leonid -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangtao_ at sjtu.edu.cn Sat Nov 19 01:53:57 2016 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Fri, 18 Nov 2016 23:53:57 -0700 (MST) Subject: [vtkusers] How to improve medical volume render? In-Reply-To: References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: <1479538437297-5741227.post@n5.nabble.com> Hello ?lvaro, thanks for your advice, in order to use the UseJitteringOn(), I update my VTK to 7.1.0.rc2. Although I added UseJitteringOn() to vtkGPUVolumeRayCastMapper, there seems no good effects. I find another topic about the UseJitteringOn(), UseJitteringOn() has no effect in 7.1.0.rc1 , is this really noneffective? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220p5741227.html Sent from the VTK - Users mailing list archive at Nabble.com. From f_magician at mac.com Sat Nov 19 04:16:01 2016 From: f_magician at mac.com (Magician) Date: Sat, 19 Nov 2016 18:16:01 +0900 Subject: [vtkusers] vtk.vtkDistributedDataFilter() not works Message-ID: <1C21FF27-6B83-4CD1-9577-D72E1B2A0092@mac.com> Hi all, I posted the message about partitioning datasets. I still trying vtk.vtkDistributedDataFilter(), but the exported data aren?t partitioned. My VTK version is 7.1.0 (pvpython with ParaView 5.2.0 RC3) and executing on 2 CPUs. Here is the sample code: import vtk source = vtk.vtkPointSource() source.SetCenter((0.0, 0.0, 0.0)) source.SetNumberOfPoints(1000000) source.SetRadius(1.0) source.Update() d3 = vtk.vtkDistributedDataFilter() d3.SetInputData(source.GetOutput()) d3.SetBoundaryMode(0) d3.Update() writer = vtk.vtkXMLPUnstructuredGridWriter() writer.SetInputData(d3.GetOutput()) writer.SetFileName(?test.pvtu?) writer.SetNumberOfPieces(2) writer.WriteSummaryFileOn() writer.SetStartPiece(0) writer.SetEndPiece(1) writer.Write() How to partition data? Magician -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Sat Nov 19 10:50:48 2016 From: ken.martin at kitware.com (Ken Martin) Date: Sat, 19 Nov 2016 10:50:48 -0500 Subject: [vtkusers] Problems to configurate VTK-7.1.0RC2 in Debian 8 In-Reply-To: <224649106.37928.1479537589918@mail.yahoo.com> References: <224649106.37928.1479537589918.ref@mail.yahoo.com> <224649106.37928.1479537589918@mail.yahoo.com> Message-ID: You may not have it installed, On ubuntu I typically have to do something like sudo apt install libgl1-mesa-dev sudo apt install libxt-dev On Sat, Nov 19, 2016 at 1:39 AM, Leonid Dulman via vtkusers < vtkusers at vtk.org> wrote: > Hi to All > I have a problems to configure VTK-&.!.)RC2 in Debian 8.5 x64 with OpenGL2 > I use CCMAKE-3.7.0 and have got next error message > Could NOT find OpenGL (missing: OPEN_gl_Library) > > In Debian 7 I configure all without problems. Thank you. Leonid > > _______________________________________________ > 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 alvaro.sanchez at kitware.com Sat Nov 19 10:59:39 2016 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Sat, 19 Nov 2016 10:59:39 -0500 Subject: [vtkusers] How to improve medical volume render? In-Reply-To: <1479538437297-5741227.post@n5.nabble.com> References: <1479455997452-5741220.post@n5.nabble.com> <1479538437297-5741227.post@n5.nabble.com> Message-ID: Hi, it seems like the fix did not make it to 7.1.0.rc2, it is in master however and should make it to 7.1.0 final. Could you give master a try? Here is the merge request with some before and after pictures. Run 'ctest -R Jittering' in the build directory in case you want to checkout the tests. cheers, Alvaro On Sat, Nov 19, 2016 at 1:53 AM, wangtaoiz wrote: > Hello ?lvaro, thanks for your advice, in order to use the > UseJitteringOn(), I > update my VTK to 7.1.0.rc2. Although I added UseJitteringOn() to > vtkGPUVolumeRayCastMapper, there seems no good effects. I find another > topic > about the UseJitteringOn(), UseJitteringOn() has no effect in 7.1.0.rc1 > effect-in-7-1-0-rc1-td5740768.html#a5740778> > , is this really noneffective? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/How-to-improve-medical-volume-render-tp5741220p5741227.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 > -- 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 leonid_dulman at yahoo.co.uk Sun Nov 20 11:21:46 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 20 Nov 2016 16:21:46 +0000 (UTC) Subject: [vtkusers] Problems to configurate VTK-7.1.0RC2 in Debian 8 In-Reply-To: References: <224649106.37928.1479537589918.ref@mail.yahoo.com> <224649106.37928.1479537589918@mail.yahoo.com> Message-ID: <380563838.1052283.1479658906223@mail.yahoo.com> Thank you. My next problem is No thread library found and thread/mutex support is required ?by LIBPROJ_USE_THREAD option From: Ken Martin To: Leonid Dulman Cc: "vtkusers at public.kitware.com" Sent: Saturday, November 19, 2016 5:50 PM Subject: Re: [vtkusers] Problems to configurate VTK-7.1.0RC2 in Debian 8 You may not have it installed, On ubuntu I typically have to do something like sudo apt install libgl1-mesa-devsudo apt install libxt-dev On Sat, Nov 19, 2016 at 1:39 AM, Leonid Dulman via vtkusers wrote: Hi to AllI have a problems to configure VTK-&.!.)RC2 in Debian 8.5 x64 ?with OpenGL2I use CCMAKE-3.7.0 ?and have got next error messageCould NOT find OpenGL (missing: OPEN_gl_Library) In Debian 7 I configure all without problems. Thank you. Leonid ______________________________ _________________ 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 PhDChairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication,including all attachments, contains confidential and legally privilegedinformation, and it is intended only for the use of the addressee.? Access to this email by anyone else isunauthorized. If you are not the intended recipient, any disclosure, copying,distribution or any action taken in reliance on it is prohibited and may beunlawful. If you received this communication in error please notify usimmediately and destroy the original message.?Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Nov 20 11:00:47 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 21 Nov 2016 00:00:47 +0800 (CST) Subject: [vtkusers] How to pick a widget object and delete it if there are several kinds of widgets on the 3D model In-Reply-To: <2a153235.1.15846a3f730.Coremail.tjlp@netease.com> References: <2a153235.1.15846a3f730.Coremail.tjlp@netease.com> Message-ID: <54419b16.7.1588277eeac.Coremail.tjlp@netease.com> Hi, VTK experts, Repost this question as I have no idea to implement it. Even I add LeftButtonPressEvent handler for these widgets, but the handler is not called. I am using C# Activiz .NET for vtk 7.1 Can any guys give me some hints? Thanks Hi, At present in my project, there are point widget, vtkDistanceWidget, vtkCaptionWidget and vtkAnglewidget on the 3D model. How can I know what widget I select and delete it? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From lekiam87 at gmail.com Sun Nov 20 11:54:09 2016 From: lekiam87 at gmail.com (Maikel Sanchez) Date: Sun, 20 Nov 2016 11:54:09 -0500 Subject: [vtkusers] Extract irregular region from volume rendering Message-ID: Hello to everyone, i have a volume rendering reconstruction and i need extract a irregular region from this,how i can create the irregular region using freehand and remove from volume, i using Activiz .Net 5.8 Best regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Sun Nov 20 12:16:29 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Sun, 20 Nov 2016 12:16:29 -0500 Subject: [vtkusers] vtkTable GetValueByName Message-ID: <1456501d24351$d591a670$80b4f350$@vektore.com> Hello vtkusers, I am trying to get values of some columns in my vtkTable. Below, you could see my table and how I am setting the values. Works fine. Then, I want get some values by ColumnName ("ThistheColumn1") instead of to inform row number and column number as well as vtk examples shows. I know of the existence of the function vtkVariant vtkTable::GetValueByName (vtkIdType const char * ). However, I don't know how to apply in my particular case that is vtkDoubleArray and that I have to use this value as double and not as variant. tableLine = vtkSmartPointer::New(); vtkSmartPointer ThistheColumn1 = vtkSmartPointer::New(); ThistheColumn1 ->SetName("ThistheColumn1"); tableLine->AddColumn(ThistheColumn1); vtkSmartPointer ThistheColumn2 = vtkSmartPointer::New(); ThistheColumn2->SetName("ThistheColumn2"); tableLine->AddColumn(ThistheColumn2); for (unsigned int r = 0; r < numberRowsLine; r++) { for (unsigned int c = 0; c < modelLine->columnCount(); c++) { QString sh = modelLine->item(r, c)->data(Qt::DisplayRole).toString();// .toString(); tableLine->SetValue(r, c, sh.toLatin1().constData()); } } vtkDocumentation to get values vtkVariant v = table->GetValue( r,c); std::cout << "(r,c) = (" << r << "," << c << ") = " << v << std::endl; Thank you very much for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sun Nov 20 12:34:58 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 20 Nov 2016 12:34:58 -0500 Subject: [vtkusers] vtkTable GetValueByName In-Reply-To: <1456501d24351$d591a670$80b4f350$@vektore.com> References: <1456501d24351$d591a670$80b4f350$@vektore.com> Message-ID: You can use vtkVariant.ToDouble() to access the value as a double. http://www.vtk.org/doc/nightly/html/classvtkVariant.html#add5f17851c142a9b522532dc9b59800a On Sun, Nov 20, 2016 at 12:16 PM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to get values of some columns in my vtkTable. Below, you could > see my table and how I am setting the values. Works fine. Then, I want get > some values by ColumnName (?ThistheColumn1?) instead of to inform row number > and column number as well as vtk examples shows. I know of the existence of > the function vtkVariant vtkTable::GetValueByName (vtkIdType const > char * ). However, I don?t know how to apply in my particular > case that is vtkDoubleArray and that I have to use this value as double and > not as variant. > > > > tableLine = vtkSmartPointer::New(); > > > > vtkSmartPointer ThistheColumn1 = > > vtkSmartPointer::New(); > > ThistheColumn1 ->SetName("ThistheColumn1"); > > tableLine->AddColumn(ThistheColumn1); > > > > vtkSmartPointer ThistheColumn2 = > > vtkSmartPointer::New(); > > ThistheColumn2->SetName("ThistheColumn2"); > > tableLine->AddColumn(ThistheColumn2); > > > > for (unsigned int r = 0; r < numberRowsLine; r++) > > { > > > > for (unsigned int c = 0; c < > modelLine->columnCount(); c++) > > { > > QString sh = modelLine->item(r, > c)->data(Qt::DisplayRole).toString();// .toString(); > > tableLine->SetValue(r, c, > sh.toLatin1().constData()); > > > > } > > } > > > > vtkDocumentation to get values > > > > vtkVariant v = table->GetValue( r,c); > > std::cout << "(r,c) = (" << r << "," << c << ") = " << v << std::endl; > > > > Thank you very much for any help. > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From zhuangming.shen at sphic.org.cn Mon Nov 21 01:12:41 2016 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Mon, 21 Nov 2016 06:12:41 +0000 Subject: [vtkusers] Draw an object using millimeter as unit Message-ID: <1479708759062.72576@sphic.org.cn> Hi all, If I want to draw an object (e.g. cone) using millimeter as unit, not the screen units. How can I do that? Specifically, whether the codes below specify a 10-millimeter-high cone? Thanks in advance. import vtk cone = vtk.vtkConeSource() cone.SetHeight(10) cone.Update() Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From tehsunnliu at yahoo.com Mon Nov 21 03:36:56 2016 From: tehsunnliu at yahoo.com (Alex Liu) Date: Mon, 21 Nov 2016 01:36:56 -0700 (MST) Subject: [vtkusers] Surface Rendering from point set. Message-ID: <1479717416655-5741245.post@n5.nabble.com> Hello World! I'm working on a project in which I'm given DICOM files. I've extracted the DICOM images to openCV. >From openCV I've extracted Points for each DICOM Image/Slice. I'm trying to construct a 3D view of the detected face Points. As I'm new to VTK I'm facing some problems. I've Points(x,y,z) for all the images right now. and I can display the points on the screen, please see the attachment. Point Cloud Face Right now I want to calculate Normals for all the points with Normals facing out from the face. In MeshLab there is a function to calculate Normals for points set. And i get this result MeshLab Point set Normals My Code. vtkSmartPointer polyData = vtkSmartPointer::New(); polyData->SetPoints(vtkPts); // vtkPts contains all the points in x, y, z of the face. vtkSmartPointer glyphFilter = vtkSmartPointer::New(); glyphFilter->SetInputData(polyData); glyphFilter->Update(); // Im not sure here if Im using the right function to calculate Points Normals // But I get the same output in blue as in attached image MeshLab_Points_With_Normals.png vtkSmartPointer polyDataNormals = vtkSmartPointer::New(); polyDataNormals->SetInputConnection(glyphFilter->GetOutputPort()); polyDataNormals->FlipNormalsOff(); polyDataNormals->ComputePointNormalsOn(); polyDataNormals->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyphFilter->GetOutputPort()); // Display image vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyphFilter->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(0.0, 0.0, 0.9); //(R,G,B) vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); renderer->SetBackground(0.9, 0.9, 0.9); // Background color Gray vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderWindow->SetPosition(400, 200); renderWindow->SetSize(612, 612); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindowInteractor->Start(); I'm trying to get output like in MeshLab, with a smooth surface. Help will be really appreciated. Thank you. Alex ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/Surface-Rendering-from-point-set-tp5741245.html Sent from the VTK - Users mailing list archive at Nabble.com. From michaelsvenna at gmail.com Mon Nov 21 04:57:07 2016 From: michaelsvenna at gmail.com (Michael Hansen) Date: Mon, 21 Nov 2016 10:57:07 +0100 Subject: [vtkusers] stretching pixels in one dimension Message-ID: Hello. I have volumes which are of size 800x30000x6 I am visualizing this using 3 vtkImagePlaneWidget. This is working ok, however when i am viewing the data in the dimension which only has columns its pretty much impossible to see the content of the 6 pixels.... My question is... is there any way to stretch/zoom/scale the pixels in this dimension such that it becomes more visible to the viewer? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Mon Nov 21 08:38:44 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Mon, 21 Nov 2016 08:38:44 -0500 Subject: [vtkusers] vtkTable GetValueByName In-Reply-To: References: <1456501d24351$d591a670$80b4f350$@vektore.com> Message-ID: <16a7301d243fc$94af4620$be0dd260$@vektore.com> I will check up. Thank you. Luis Vieira Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -----Original Message----- From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: November 20, 2016 12:35 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] vtkTable GetValueByName You can use vtkVariant.ToDouble() to access the value as a double. http://www.vtk.org/doc/nightly/html/classvtkVariant.html#add5f17851c142a9b522532dc9b59800a On Sun, Nov 20, 2016 at 12:16 PM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to get values of some columns in my vtkTable. Below, you > could see my table and how I am setting the values. Works fine. Then, > I want get some values by ColumnName (?ThistheColumn1?) instead of to > inform row number and column number as well as vtk examples shows. I know of the existence of > the function vtkVariant vtkTable::GetValueByName (vtkIdType const > char * ). However, I don?t know how to apply in my particular > case that is vtkDoubleArray and that I have to use this value as > double and not as variant. > > > > tableLine = vtkSmartPointer::New(); > > > > vtkSmartPointer ThistheColumn1 = > > vtkSmartPointer::New(); > > ThistheColumn1 ->SetName("ThistheColumn1"); > > tableLine->AddColumn(ThistheColumn1); > > > > vtkSmartPointer ThistheColumn2 = > > vtkSmartPointer::New(); > > ThistheColumn2->SetName("ThistheColumn2"); > > tableLine->AddColumn(ThistheColumn2); > > > > for (unsigned int r = 0; r < numberRowsLine; r++) > > { > > > > for (unsigned int c = 0; c < > modelLine->columnCount(); c++) > > { > > QString sh = modelLine->item(r, > c)->data(Qt::DisplayRole).toString();// .toString(); > > tableLine->SetValue(r, c, > sh.toLatin1().constData()); > > > > } > > } > > > > vtkDocumentation to get values > > > > vtkVariant v = table->GetValue( r,c); > > std::cout << "(r,c) = (" << r << "," << c << ") = " << v << > std::endl; > > > > Thank you very much for any help. > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From jose.de.paula at live.com Mon Nov 21 08:59:39 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Mon, 21 Nov 2016 06:59:39 -0700 (MST) Subject: [vtkusers] bounds in vtkResliceImageViewer Message-ID: <1479736779027-5741248.post@n5.nabble.com> Hello, Is there any way to get the bounds of the image being viewed in the "vtkResliceImageViewer", after I apply some rotation in the cursors? -- View this message in context: http://vtk.1045678.n5.nabble.com/bounds-in-vtkResliceImageViewer-tp5741248.html Sent from the VTK - Users mailing list archive at Nabble.com. From sankhesh.jhaveri at kitware.com Mon Nov 21 09:00:40 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 21 Nov 2016 14:00:40 +0000 Subject: [vtkusers] stretching pixels in one dimension In-Reply-To: References: Message-ID: Hi Michael, Depending on your use case, you could either use the vtkCamera API (or an appropriate interactor style) to zoom in on a section of the data or modify the spacing of the image data along the Z axis. Hope that helps. Sankhesh ? On Mon, Nov 21, 2016 at 4:57 AM Michael Hansen wrote: > Hello. I have volumes which are of size 800x30000x6 > > I am visualizing this using 3 vtkImagePlaneWidget. > > This is working ok, however when i am viewing the data in the dimension > which only has columns its pretty much impossible to see the content of the > 6 pixels.... > My question is... is there any way to stretch/zoom/scale the pixels in > this dimension such that it becomes more visible to the viewer? > > Thanks > _______________________________________________ > 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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Nov 21 09:47:33 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 21 Nov 2016 09:47:33 -0500 Subject: [vtkusers] Draw an object using millimeter as unit In-Reply-To: <1479708759062.72576@sphic.org.cn> References: <1479708759062.72576@sphic.org.cn> Message-ID: Specifying the height of the cone as 10 does not mean that it is 10 pixels high, for example, or 10 of any other screen unit. Units in VTK mean whatever you want them to mean. Millimeters, meters, feet, cubits, anything. The only thing you need to do is be consistent in how you interpret sizes in VTK. Best, Cory On Mon, Nov 21, 2016 at 1:12 AM, ??? wrote: > Hi all, > > > If I want to draw an object (e.g. cone) using millimeter as unit, not the > screen units. How can I do that? Specifically, whether the codes below > specify a 10-millimeter-high cone? Thanks in advance. > > > import vtk > > cone = vtk.vtkConeSource() > > cone.SetHeight(10) > > cone.Update() > > > > Regards, > > > Zhuangming Shen > > > _______________________________________________ > 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 Mon Nov 21 09:59:09 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 21 Nov 2016 09:59:09 -0500 Subject: [vtkusers] Surface Rendering from point set. In-Reply-To: <1479717416655-5741245.post@n5.nabble.com> References: <1479717416655-5741245.post@n5.nabble.com> Message-ID: Alex, vtkPolyDataNormals doesn't do any kind of normal estimation for vertex cells. It works only for cell types that connect 3 or more points. Will, is there anything you've been working on lately that can do normal estimation for point clouds representing surfaces? Thanks, Cory On Mon, Nov 21, 2016 at 3:36 AM, Alex Liu via vtkusers wrote: > Hello World! > I'm working on a project in which I'm given DICOM files. I've extracted the > DICOM images to openCV. > From openCV I've extracted Points for each DICOM Image/Slice. I'm trying to > construct a 3D view of the detected face Points. As I'm new to VTK I'm > facing some problems. > > I've Points(x,y,z) for all the images right now. and I can display the > points on the screen, please see the attachment. > > Point Cloud Face > > > Right now I want to calculate Normals for all the points with Normals facing > out from the face. In MeshLab there is a function to calculate Normals for > points set. And i get this result > > MeshLab Point set Normals > > > My Code. > > vtkSmartPointer polyData = vtkSmartPointer::New(); > polyData->SetPoints(vtkPts); // vtkPts contains all the points in x, y, z > of the face. > > vtkSmartPointer glyphFilter = > vtkSmartPointer::New(); > glyphFilter->SetInputData(polyData); > glyphFilter->Update(); > > // Im not sure here if Im using the right function to calculate Points > Normals > // But I get the same output in blue as in attached image > MeshLab_Points_With_Normals.png > vtkSmartPointer polyDataNormals = > vtkSmartPointer::New(); > polyDataNormals->SetInputConnection(glyphFilter->GetOutputPort()); > polyDataNormals->FlipNormalsOff(); > polyDataNormals->ComputePointNormalsOn(); > polyDataNormals->Update(); > > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(glyphFilter->GetOutputPort()); > > > // Display image > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(glyphFilter->GetOutputPort()); > > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(0.0, 0.0, 0.9); //(R,G,B) > > vtkSmartPointer renderer = vtkSmartPointer::New(); > renderer->AddActor(actor); > renderer->SetBackground(0.9, 0.9, 0.9); // Background color Gray > > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > renderWindow->SetPosition(400, 200); > renderWindow->SetSize(612, 612); > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > renderWindowInteractor->Start(); > > > I'm trying to get output like in MeshLab, with a smooth surface. > Help will be really appreciated. > > Thank you. > Alex > > > > ----- > Alex Liu > +15574855474 > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Surface-Rendering-from-point-set-tp5741245.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 -- Cory Quammen Staff R&D Engineer Kitware, Inc. From michaelsvenna at gmail.com Mon Nov 21 10:24:38 2016 From: michaelsvenna at gmail.com (Michael Hansen) Date: Mon, 21 Nov 2016 16:24:38 +0100 Subject: [vtkusers] stretching pixels in one dimension In-Reply-To: References: Message-ID: Hi Sankhesh, Thank you for your comment. Can you tell me how I can adjust the spacing of the image data along the z-axis? Below is my code: from PyQt5.QtWidgets import (QMainWindow, QFrame, QVBoxLayout, QApplication) from PyQt5 import QtCore from QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import random import vtk import numpy as np import sys import h5py import skimage import matplotlib.pyplot as plt def misc2stdimage(img): ''' Transform arbitrarily scaled image into something scikit image understands, ie. a ubyte numpy array ''' # rescale to [x E -1.0;1.0], xER img_rescaled = (((img - img.min()) / (img.max() - img.min()))*2)-1 return skimage.img_as_ubyte(img_rescaled) class MyEventFilter(QtCore.QObject): def __init__(self, vtkwindow): self.vtkwindow = vtkwindow QtCore.QObject.__init__(self) def eventFilter(self, receiver, event): if(event.type() == QtCore.QEvent.KeyPress): if event.text() == 'x': self.vtkwindow.slideX(1) elif event.text() == 'X': self.vtkwindow.slideX(-1) elif event.text() == 'y': self.vtkwindow.slideY(1) elif event.text() == 'Y': self.vtkwindow.slideY(-1) elif event.text() == 'z': self.vtkwindow.slideZ(1) elif event.text() == 'Z': self.vtkwindow.slideZ(-1) return super(MyEventFilter,self).eventFilter(receiver, event) def MakeLUTFromCTF(tableSize): ''' Use a color transfer Function to generate the colors in the lookup table. See: http://www.vtk.org/doc/nightly/html/classvtkColorTransferFunction.html :param: tableSize - The table size :return: The lookup table. ''' ctf = vtk.vtkColorTransferFunction() ctf.SetColorSpaceToDiverging() # Green to tan. ctf.AddRGBPoint(0.0, 0.085, 0.532, 0.201) ctf.AddRGBPoint(0.5, 0.865, 0.865, 0.865) ctf.AddRGBPoint(1.0, 0.677, 0.492, 0.093) lut = vtk.vtkLookupTable() lut.SetNumberOfTableValues(tableSize) lut.Build() for i in range(0,tableSize): rgb = list(ctf.GetColor(float(i)/tableSize))+[1] lut.SetTableValue(i,rgb) return lut class MainWindow(QMainWindow): def slideX(self, x): self.planeWidgetX.SetSliceIndex( self.planeWidgetX.GetSliceIndex() + x ) print( self.planeWidgetX.GetSliceIndex() ) self.ren.ResetCameraClippingRange() self.vtkWidget.GetRenderWindow().Render() def slideY(self, y): self.planeWidgetY.SetSliceIndex( self.planeWidgetY.GetSliceIndex() + y ) self.ren.ResetCameraClippingRange() self.vtkWidget.GetRenderWindow().Render() def slideZ(self, z): self.planeWidgetZ.SetSliceIndex( self.planeWidgetZ.GetSliceIndex() + z ) self.ren.ResetCameraClippingRange() self.vtkWidget.GetRenderWindow().Render() def __init__(self, parent = None): QMainWindow.__init__(self, parent) self.frame = QFrame() self.vl = QVBoxLayout() self.vtkWidget = QVTKRenderWindowInteractor(self.frame) self.vl.addWidget(self.vtkWidget) self.ren = vtk.vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() F = h5py.File('../realdata.h5','r') volume = np.dstack( ( F['02']['03']['db'], F['02']['04']['db'], F['02']['05']['db'], F['02']['06']['db'], F['02']['07']['db'], F['02']['08']['db'] ) ) data_matrix = misc2stdimage(volume) F.close() m, n, p = data_matrix.shape print(data_matrix.shape, data_matrix.dtype, np.min(data_matrix), np.max(data_matrix) ) v16 = vtk.vtkImageImport() v16.CopyImportVoidPointer(data_matrix, data_matrix.nbytes) v16.SetDataScalarTypeToUnsignedChar() v16.SetNumberOfScalarComponents(1) v16.SetDataExtent(0, p-1, 0, n-1, 0, m-1) v16.SetWholeExtent(0, p-1, 0, n-1, 0, m-1) xMin, xMax, yMin, yMax, zMin, zMax = v16.GetExecutive().\ GetWholeExtent( v16.GetOutputInformation(0) ) spacing = v16.GetOutput().GetSpacing() sx, sy, sz = spacing origin = v16.GetOutput().GetOrigin() ox, oy, oz = origin # An outline is shown for context. outline = vtk.vtkOutlineFilter() outline.SetInputConnection(v16.GetOutputPort()) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(outlineMapper) # The shared picker enables us to use 3 planes at one time # and gets the picking order right picker = vtk.vtkCellPicker() picker.SetTolerance(0.005) norm = plt.Normalize() colors = plt.cm.jet(norm(range(0, 255))) colorFunc = vtk.vtkColorTransferFunction() [colorFunc.AddRGBPoint(i, colors[i,0], colors[i,1], colors[i,2]) for i in range(0,255)] # The 3 image plane widgets are used to probe the dataset. self.planeWidgetX = vtk.vtkImagePlaneWidget() self.planeWidgetX.DisplayTextOn() self.planeWidgetX.SetInputConnection(v16.GetOutputPort()) self.planeWidgetX.SetPlaneOrientationToXAxes() self.planeWidgetX.SetSliceIndex(32) self.planeWidgetX.SetPicker(picker) self.planeWidgetX.SetKeyPressActivationValue("x") self.planeWidgetX.SetLookupTable(MakeLUTFromCTF(200)) prop1 = self.planeWidgetX.GetPlaneProperty() prop1.SetColor(1, 0, 0) self.planeWidgetY = vtk.vtkImagePlaneWidget() self.planeWidgetY.DisplayTextOn() self.planeWidgetY.SetInputConnection(v16.GetOutputPort()) self.planeWidgetY.SetPlaneOrientationToYAxes() self.planeWidgetY.SetSliceIndex(32) self.planeWidgetY.SetPicker(picker) self.planeWidgetY.SetKeyPressActivationValue("y") self.planeWidgetY.SetLookupTable(MakeLUTFromCTF(200)) prop2 = self.planeWidgetY.GetPlaneProperty() prop2.SetColor(1, 1, 0) self.planeWidgetY.SetLookupTable(self.planeWidgetX.GetLookupTable()) self.planeWidgetZ = vtk.vtkImagePlaneWidget() self.planeWidgetZ.DisplayTextOn() self.planeWidgetZ.SetInputConnection(v16.GetOutputPort()) self.planeWidgetZ.SetPlaneOrientationToZAxes() self.planeWidgetZ.SetSliceIndex(46) self.planeWidgetZ.SetPicker(picker) self.planeWidgetZ.SetKeyPressActivationValue("z") self.planeWidgetZ.SetLookupTable(MakeLUTFromCTF(200)) prop3 = self.planeWidgetZ.GetPlaneProperty() prop3.SetColor(0, 0, 1) self.planeWidgetZ.SetLookupTable(self.planeWidgetX.GetLookupTable()) self.ren.AddActor(outlineActor) self.planeWidgetX.SetInteractor(self.iren) self.planeWidgetX.On() self.planeWidgetY.SetInteractor(self.iren) self.planeWidgetY.On() self.planeWidgetZ.SetInteractor(self.iren) self.planeWidgetZ.On() self.ren.ResetCamera() self.ren.ResetCameraClippingRange() self.ren.SetViewport(0,0,1,1) self.vtkWidget.GetRenderWindow().SetSize(400, 400) self.frame.setLayout(self.vl) self.setCentralWidget(self.frame) self.show() self.iren.Initialize() if __name__ == "__main__": app = QApplication(sys.argv) window = MainWindow() myFilter = MyEventFilter(window) app.installEventFilter(myFilter) window.ren.ResetCamera() sys.exit(app.exec_()) On Mon, Nov 21, 2016 at 3:00 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi Michael, > > Depending on your use case, you could either use the vtkCamera API (or an > appropriate interactor style) to zoom in on a section of the data or modify > the spacing of the image data along the Z axis. > > Hope that helps. > Sankhesh > ? > > On Mon, Nov 21, 2016 at 4:57 AM Michael Hansen > wrote: > >> Hello. I have volumes which are of size 800x30000x6 >> >> I am visualizing this using 3 vtkImagePlaneWidget. >> >> This is working ok, however when i am viewing the data in the dimension >> which only has columns its pretty much impossible to see the content of the >> 6 pixels.... >> My question is... is there any way to stretch/zoom/scale the pixels in >> this dimension such that it becomes more visible to the viewer? >> >> Thanks >> _______________________________________________ >> 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 >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabio.riot at gmail.com Mon Nov 21 10:34:07 2016 From: fabio.riot at gmail.com (fabio riot) Date: Mon, 21 Nov 2016 16:34:07 +0100 Subject: [vtkusers] error in vtk/android building Message-ID: Dear All, I'm trying to build vtk 7.0 with android on ubuntu 16.04 using cmake These are the cmake's values: ANDROID_ARCH_NAME: X86_64 ANDROID_EXECUTABLE: /home/...../Android/sdk/tools/android ANDROID_NATIVE_API_LEVEL: 21 ANDROID_NDK: /home/...../android-ndk-r13 ANT_EXECUTABLE: /usr/bin/ant But after launching "make", the build process fails with the following error: in vtkEGLRenderWindow.cxx, ANativeWindow_setBufferGeometry was not declared in the scope I can remedy at the error adding: #include .../.../native_window.h in vtkEGLRenderWindow.cxx; Anyway, NativeVTK.apk fails once installed on my smartphone. Thank you very much for any help Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Nov 21 10:40:40 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 21 Nov 2016 15:40:40 +0000 Subject: [vtkusers] stretching pixels in one dimension In-Reply-To: References: Message-ID: Take a look at vtkImageResample . You can set the AxisMagnificationFactor or just provide a spacing value explicitly using SetAxisOutputSpacing ? On Mon, Nov 21, 2016 at 10:24 AM Michael Hansen wrote: > Hi Sankhesh, > > Thank you for your comment. Can you tell me how I can adjust the spacing > of the image data along the z-axis? > Below is my code: > > from PyQt5.QtWidgets import (QMainWindow, > QFrame, QVBoxLayout, QApplication) > from PyQt5 import QtCore > from QVTKRenderWindowInteractor import QVTKRenderWindowInteractor > import random > import vtk > import numpy as np > import sys > import h5py > import skimage > import matplotlib.pyplot as plt > > > def misc2stdimage(img): > ''' > Transform arbitrarily scaled image into > something scikit image understands, > ie. a ubyte numpy array > ''' > # rescale to [x E -1.0;1.0], xER > img_rescaled = (((img - img.min()) / (img.max() - img.min()))*2)-1 > return skimage.img_as_ubyte(img_rescaled) > > class MyEventFilter(QtCore.QObject): > def __init__(self, vtkwindow): > self.vtkwindow = vtkwindow > QtCore.QObject.__init__(self) > > def eventFilter(self, receiver, event): > if(event.type() == QtCore.QEvent.KeyPress): > if event.text() == 'x': > self.vtkwindow.slideX(1) > elif event.text() == 'X': > self.vtkwindow.slideX(-1) > elif event.text() == 'y': > self.vtkwindow.slideY(1) > elif event.text() == 'Y': > self.vtkwindow.slideY(-1) > elif event.text() == 'z': > self.vtkwindow.slideZ(1) > elif event.text() == 'Z': > self.vtkwindow.slideZ(-1) > return super(MyEventFilter,self).eventFilter(receiver, event) > > def MakeLUTFromCTF(tableSize): > ''' > Use a color transfer Function to generate the colors in the lookup > table. > See: > http://www.vtk.org/doc/nightly/html/classvtkColorTransferFunction.html > :param: tableSize - The table size > :return: The lookup table. > ''' > ctf = vtk.vtkColorTransferFunction() > ctf.SetColorSpaceToDiverging() > # Green to tan. > ctf.AddRGBPoint(0.0, 0.085, 0.532, 0.201) > ctf.AddRGBPoint(0.5, 0.865, 0.865, 0.865) > ctf.AddRGBPoint(1.0, 0.677, 0.492, 0.093) > > lut = vtk.vtkLookupTable() > lut.SetNumberOfTableValues(tableSize) > lut.Build() > > for i in range(0,tableSize): > rgb = list(ctf.GetColor(float(i)/tableSize))+[1] > lut.SetTableValue(i,rgb) > > return lut > > class MainWindow(QMainWindow): > > def slideX(self, x): > self.planeWidgetX.SetSliceIndex( > self.planeWidgetX.GetSliceIndex() + x > ) > print( self.planeWidgetX.GetSliceIndex() ) > self.ren.ResetCameraClippingRange() > self.vtkWidget.GetRenderWindow().Render() > > def slideY(self, y): > self.planeWidgetY.SetSliceIndex( > self.planeWidgetY.GetSliceIndex() + y > ) > self.ren.ResetCameraClippingRange() > self.vtkWidget.GetRenderWindow().Render() > > def slideZ(self, z): > self.planeWidgetZ.SetSliceIndex( > self.planeWidgetZ.GetSliceIndex() + z > ) > self.ren.ResetCameraClippingRange() > self.vtkWidget.GetRenderWindow().Render() > > def __init__(self, parent = None): > QMainWindow.__init__(self, parent) > > self.frame = QFrame() > > self.vl = QVBoxLayout() > self.vtkWidget = QVTKRenderWindowInteractor(self.frame) > > self.vl.addWidget(self.vtkWidget) > > self.ren = vtk.vtkRenderer() > self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) > self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() > > F = h5py.File('../realdata.h5','r') > volume = np.dstack( > ( > F['02']['03']['db'], > F['02']['04']['db'], > F['02']['05']['db'], > F['02']['06']['db'], > F['02']['07']['db'], > F['02']['08']['db'] > ) > ) > data_matrix = misc2stdimage(volume) > F.close() > m, n, p = data_matrix.shape > > print(data_matrix.shape, data_matrix.dtype, > np.min(data_matrix), np.max(data_matrix) > ) > > v16 = vtk.vtkImageImport() > v16.CopyImportVoidPointer(data_matrix, data_matrix.nbytes) > v16.SetDataScalarTypeToUnsignedChar() > v16.SetNumberOfScalarComponents(1) > v16.SetDataExtent(0, p-1, 0, n-1, 0, m-1) > v16.SetWholeExtent(0, p-1, 0, n-1, 0, m-1) > > xMin, xMax, yMin, yMax, zMin, zMax = v16.GetExecutive().\ > GetWholeExtent( > > v16.GetOutputInformation(0) > ) > > spacing = v16.GetOutput().GetSpacing() > sx, sy, sz = spacing > > origin = v16.GetOutput().GetOrigin() > ox, oy, oz = origin > > # An outline is shown for context. > outline = vtk.vtkOutlineFilter() > outline.SetInputConnection(v16.GetOutputPort()) > > outlineMapper = vtk.vtkPolyDataMapper() > outlineMapper.SetInputConnection(outline.GetOutputPort()) > > outlineActor = vtk.vtkActor() > outlineActor.SetMapper(outlineMapper) > > # The shared picker enables us to use 3 planes at one time > # and gets the picking order right > picker = vtk.vtkCellPicker() > picker.SetTolerance(0.005) > > norm = plt.Normalize() > colors = plt.cm.jet(norm(range(0, 255))) > colorFunc = vtk.vtkColorTransferFunction() > [colorFunc.AddRGBPoint(i, colors[i,0], colors[i,1], colors[i,2]) > for i in range(0,255)] > > > # The 3 image plane widgets are used to probe the dataset. > self.planeWidgetX = vtk.vtkImagePlaneWidget() > self.planeWidgetX.DisplayTextOn() > self.planeWidgetX.SetInputConnection(v16.GetOutputPort()) > self.planeWidgetX.SetPlaneOrientationToXAxes() > self.planeWidgetX.SetSliceIndex(32) > self.planeWidgetX.SetPicker(picker) > self.planeWidgetX.SetKeyPressActivationValue("x") > self.planeWidgetX.SetLookupTable(MakeLUTFromCTF(200)) > > prop1 = self.planeWidgetX.GetPlaneProperty() > prop1.SetColor(1, 0, 0) > > self.planeWidgetY = vtk.vtkImagePlaneWidget() > self.planeWidgetY.DisplayTextOn() > self.planeWidgetY.SetInputConnection(v16.GetOutputPort()) > self.planeWidgetY.SetPlaneOrientationToYAxes() > self.planeWidgetY.SetSliceIndex(32) > self.planeWidgetY.SetPicker(picker) > self.planeWidgetY.SetKeyPressActivationValue("y") > self.planeWidgetY.SetLookupTable(MakeLUTFromCTF(200)) > prop2 = self.planeWidgetY.GetPlaneProperty() > prop2.SetColor(1, 1, 0) > > self.planeWidgetY.SetLookupTable(self.planeWidgetX.GetLookupTable()) > > self.planeWidgetZ = vtk.vtkImagePlaneWidget() > self.planeWidgetZ.DisplayTextOn() > self.planeWidgetZ.SetInputConnection(v16.GetOutputPort()) > self.planeWidgetZ.SetPlaneOrientationToZAxes() > self.planeWidgetZ.SetSliceIndex(46) > self.planeWidgetZ.SetPicker(picker) > self.planeWidgetZ.SetKeyPressActivationValue("z") > self.planeWidgetZ.SetLookupTable(MakeLUTFromCTF(200)) > prop3 = self.planeWidgetZ.GetPlaneProperty() > prop3.SetColor(0, 0, 1) > > self.planeWidgetZ.SetLookupTable(self.planeWidgetX.GetLookupTable()) > > self.ren.AddActor(outlineActor) > > self.planeWidgetX.SetInteractor(self.iren) > self.planeWidgetX.On() > self.planeWidgetY.SetInteractor(self.iren) > self.planeWidgetY.On() > self.planeWidgetZ.SetInteractor(self.iren) > self.planeWidgetZ.On() > > self.ren.ResetCamera() > self.ren.ResetCameraClippingRange() > self.ren.SetViewport(0,0,1,1) > self.vtkWidget.GetRenderWindow().SetSize(400, 400) > > self.frame.setLayout(self.vl) > self.setCentralWidget(self.frame) > > self.show() > self.iren.Initialize() > > if __name__ == "__main__": > > app = QApplication(sys.argv) > window = MainWindow() > myFilter = MyEventFilter(window) > app.installEventFilter(myFilter) > window.ren.ResetCamera() > > sys.exit(app.exec_()) > > > On Mon, Nov 21, 2016 at 3:00 PM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > > Hi Michael, > > Depending on your use case, you could either use the vtkCamera API (or an > appropriate interactor style) to zoom in on a section of the data or modify > the spacing of the image data along the Z axis. > > Hope that helps. > Sankhesh > ? > > On Mon, Nov 21, 2016 at 4:57 AM Michael Hansen > wrote: > > Hello. I have volumes which are of size 800x30000x6 > > I am visualizing this using 3 vtkImagePlaneWidget. > > This is working ok, however when i am viewing the data in the dimension > which only has columns its pretty much impossible to see the content of the > 6 pixels.... > My question is... is there any way to stretch/zoom/scale the pixels in > this dimension such that it becomes more visible to the viewer? > > Thanks > _______________________________________________ > 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 > > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Mon Nov 21 13:01:20 2016 From: bebe0705 at colorado.edu (BBerco) Date: Mon, 21 Nov 2016 11:01:20 -0700 (MST) Subject: [vtkusers] VTK actors only appear after camera zoom action by user Message-ID: <1479751280095-5741255.post@n5.nabble.com> Dear all, I am dealing with an annoying delay in the rendering process. Basically, a shape model stored in a vtkPolyData and displayed inside a QVTKWidget through the usual mapper/actor chain only shows after a zoom in/out action. I was thinking that calling *this -> qvtkWidget -> GetRenderWindow() -> Render();* after adding the actor to the current renderer was sufficient, but it seems I missed something. Any thoughts? Best, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-actors-only-appear-after-camera-zoom-action-by-user-tp5741255.html Sent from the VTK - Users mailing list archive at Nabble.com. From mjordan at live.at Mon Nov 21 16:14:30 2016 From: mjordan at live.at (M. Jordan) Date: Mon, 21 Nov 2016 21:14:30 +0000 Subject: [vtkusers] Split polydata into individual polydatas Message-ID: Hello, I have some polydata containing about 100 unconnected parts. Now I would like to split these parts to be able to interact with each of the unconnected parts. I think the "vtkPolyDataConnectivityFilter" is able to handle this but I don't know how to use this filter. The goal is to get 100 independent actors. How can I do this? Thank you very much for you help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From tehsunnliu at yahoo.com Mon Nov 21 21:40:03 2016 From: tehsunnliu at yahoo.com (Alex Liu) Date: Mon, 21 Nov 2016 19:40:03 -0700 (MST) Subject: [vtkusers] Surface Rendering from point set. In-Reply-To: References: <1479717416655-5741245.post@n5.nabble.com> Message-ID: <1479782403199-5741257.post@n5.nabble.com> Thanks for your reply Cory. I noticed that vtkPolyDataNormals couldn't find any Normals in my case. So I tried vtkTriangle. and Passed 3 nearest neighbor points to find the normals. vtkTriangle has a function called ComputeNormal(); to compute normals. With this function I could find all the normals, but the problem I'm facing right now is all the normals are facing in one direction. I need to some how filter out Inliner normals and keep only the outliner normals ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/Surface-Rendering-from-point-set-tp5741245p5741257.html Sent from the VTK - Users mailing list archive at Nabble.com. From timofey.mukha at it.uu.se Tue Nov 22 05:07:15 2016 From: timofey.mukha at it.uu.se (Timofey Mukha) Date: Tue, 22 Nov 2016 11:07:15 +0100 Subject: [vtkusers] Sampling cell-data along a line Message-ID: <5f2cfeb2-e3ce-9268-9a87-782b769e281a@it.uu.se> Dear all, I have some large cell-data from a CFD simulation. I would like to view profiles along a line. Currently I understand that I can do this with a probeFilter to which I feed a line with a given resolution. The problem is that given a complicated mesh the sampling points on the line will probably miss some cells or, on the other hand, some points might fall into the same cell. Is there a way to sample along a line in such a way that the returned profile will contain data from all the cells that the line intersects? For each cell a sampling point should then be generated somewhere in between the point where the line enters the cell and where it exists it. I tried playing around with the vtkCellLocator, that can find which cells are intersected by a given line using the FindCellsAlongLine method. However, that does not give the locations of the sampling points, only the coordinates of the cell-centers that are intersected by the line. There is also the subtle issue of handling cases when the sampling line lies on a boundary between two or more cells. All in all it seems like a more complicated problem than at first glance, but I am wondering if someone has already dealt with it before me? Best, Timofey From richard.j.brown at live.co.uk Tue Nov 22 05:22:39 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 22 Nov 2016 03:22:39 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: <1479309067222-5741192.post@n5.nabble.com> References: <1479309067222-5741192.post@n5.nabble.com> Message-ID: <1479810159854-5741259.post@n5.nabble.com> Anybody? -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741259.html Sent from the VTK - Users mailing list archive at Nabble.com. From joachim.pouderoux at kitware.com Tue Nov 22 08:54:03 2016 From: joachim.pouderoux at kitware.com (Joachim Pouderoux) Date: Tue, 22 Nov 2016 09:54:03 -0400 Subject: [vtkusers] Adding points at the begining of a polyline In-Reply-To: References: Message-ID: Hello, You are right, vtkCellArray allows to append data but not insert in sense of shifting data. Here you are building a set of segments so there is no need to shift anything (but you can do you manually by creating new arrays if you want). Append your points and append your cells, the order does no matter, just remember what is first point (resp. last point to appending). int firstPointId = 0; // Initial start point System.out.println("Prepending"); for (int i = 1; i < 10; i++) { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } double[] prev_pt = points.GetPoint(0); double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); int pid = points.InsertNextPoint(new_x, new_y, new_z); points.Modified(); lines.InsertNextCell(2); lines.InsertCellPoint(firstPointId); lines.InsertCellPoint(i); firstPointId = i; // Newly insterted point is new line head point lines.Modified(); canvas.repaint(); } Hope it helps. Best regards, *Joachim Pouderoux*, PhD *Technical Expert - Scientific Computing Team* *Kitware SAS * 2016-11-10 9:36 GMT-04:00 Jean-Max Redonnet : > Hi ! First, I would like to thanks people who works on VTK. This is a > great piece of software, very fast, very efficient ! > > I'm currently working on a viewer that is supposed to display dynamically > the polylines calculated by my algorithms. To do that, I relied on this > post : > http://public.kitware.com/pipermail/vtkusers/2010-July/061781.html > > This works fine to append points to the polyline, but due to my > algorithms, I need also to prepend points at the beginning of the polyline. > I can't figure out how to do that. Any help would be gracefully appreciated. > > jMax > > === > Here is my test code. The first loop works fine, but the second one is a > mess. > > package vtktest; > > import java.awt.BorderLayout; > > public class PolyLineTest extends JFrame { > private static final long serialVersionUID = 1L; > > static { > if (!vtkNativeLibrary.LoadAllNativeLibraries()) { > } > vtkNativeLibrary.DisableOutputWindow(null); > } > > private Random random = new Random(); > private vtkRenderWindowPanel canvas; > private vtkRenderer renderer; > private vtkRenderWindowInteractor iren; > private JPanel mainPanel; > > public static void main(String[] args) { > new PolyLineTest(); > } > > public PolyLineTest() { > this.canvas = new vtkRenderWindowPanel(); > this.renderer = canvas.GetRenderer(); > this.iren = canvas.getRenderWindowInteractor(); > this.setTitle("VTK Test"); > > // First we'll create an initial point to build on > vtkPoints points = new vtkPoints(); > points.InsertPoint(0, 0.0, 0.0, 0.0); > > // The cell array can be thought of as a connectivity list. Here we > // specify the number of points followed by that number of point > // ids. This can be repeated as many times as there are primitives > in > // the list. > // This first one is just a point to connect to as we add more > points > vtkCellArray lines = new vtkCellArray(); > lines.InsertNextCell(1); // number of points > lines.InsertCellPoint(0); > > vtkPolyData track = new vtkPolyData(); > track.SetPoints(points); > track.SetLines(lines); > > vtkPolyDataMapper mapper = new vtkPolyDataMapper(); > mapper.SetInputData(track); > > vtkActor actor = new vtkActor(); > actor.SetMapper(mapper); > actor.GetProperty().SetColor(0.3800, 0.7000, 0.1600); > > renderer.AddActor(actor); > renderer.ResetCamera(); > > this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > > mainPanel = new JPanel(); > mainPanel.setLayout(new BorderLayout()); > mainPanel.add(canvas, BorderLayout.CENTER); > > this.getContentPane().add(mainPanel); > this.setSize(800, 800); > this.setLocationRelativeTo(null); // Center on desktop > > this.setVisible(true); > > // Loop to add points to line > System.out.println("Appending"); > for (int i = 1; i < 10; i++) { > try { > Thread.sleep(500); > } catch (InterruptedException e) { > e.printStackTrace(); > } > double[] prev_pt = points.GetPoint(i - 1); > double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); > double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); > double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); > > // Insert the new point > // then tell VTK that the data has been modified so the > Render() > // call will update the view with the new data > points.InsertPoint(i, new_x, new_y, new_z); > points.Modified(); > > // To get lines we need a beginning and end point in the > // connectivity list, > // then again tell VTK that the data has been modified > lines.InsertNextCell(2); > lines.InsertCellPoint(i - 1); > lines.InsertCellPoint(i); > lines.Modified(); > canvas.repaint(); > } > > System.out.println("Prepending"); > for (int i = 1; i < 10; i++) { > try { > Thread.sleep(100); > } catch (InterruptedException e) { > e.printStackTrace(); > } > double[] prev_pt = points.GetPoint(0); > double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); > double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); > double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); > > points.InsertPoint(0, new_x, new_y, new_z); > points.Modified(); > > lines.InsertNextCell(2); > lines.UpdateCellCount (2); > lines.InsertCellPoint(0); > lines.InsertCellPoint(1); > lines.Modified(); > canvas.repaint(); > } > } > } > > _______________________________________________ > 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 luis.vieira at vektore.com Tue Nov 22 09:33:25 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 22 Nov 2016 09:33:25 -0500 Subject: [vtkusers] vtkTable GetValueByName In-Reply-To: References: <1456501d24351$d591a670$80b4f350$@vektore.com> Message-ID: <2432d01d244cd$628259e0$27870da0$@vektore.com> Yes Core, it worked. Thank you. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -----Original Message----- From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: November 20, 2016 12:35 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] vtkTable GetValueByName You can use vtkVariant.ToDouble() to access the value as a double. http://www.vtk.org/doc/nightly/html/classvtkVariant.html#add5f17851c142a9b522532dc9b59800a On Sun, Nov 20, 2016 at 12:16 PM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to get values of some columns in my vtkTable. Below, you > could see my table and how I am setting the values. Works fine. Then, > I want get some values by ColumnName (?ThistheColumn1?) instead of to > inform row number and column number as well as vtk examples shows. I know of the existence of > the function vtkVariant vtkTable::GetValueByName (vtkIdType const > char * ). However, I don?t know how to apply in my particular > case that is vtkDoubleArray and that I have to use this value as > double and not as variant. > > > > tableLine = vtkSmartPointer::New(); > > > > vtkSmartPointer ThistheColumn1 = > > vtkSmartPointer::New(); > > ThistheColumn1 ->SetName("ThistheColumn1"); > > tableLine->AddColumn(ThistheColumn1); > > > > vtkSmartPointer ThistheColumn2 = > > vtkSmartPointer::New(); > > ThistheColumn2->SetName("ThistheColumn2"); > > tableLine->AddColumn(ThistheColumn2); > > > > for (unsigned int r = 0; r < numberRowsLine; r++) > > { > > > > for (unsigned int c = 0; c < > modelLine->columnCount(); c++) > > { > > QString sh = modelLine->item(r, > c)->data(Qt::DisplayRole).toString();// .toString(); > > tableLine->SetValue(r, c, > sh.toLatin1().constData()); > > > > } > > } > > > > vtkDocumentation to get values > > > > vtkVariant v = table->GetValue( r,c); > > std::cout << "(r,c) = (" << r << "," << c << ") = " << v << > std::endl; > > > > Thank you very much for any help. > > > > Luis Vieira, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From jose.de.paula at live.com Tue Nov 22 10:00:33 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 22 Nov 2016 08:00:33 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer get image Message-ID: <1479826832991-5741262.post@n5.nabble.com> Hi guys, Im use vtkResliceImageViewer for viewer MPR. I rotate the viewers with the cursor in vtkResliceImageViewer. But, I can not get bounds of my image in screen after rotate. How to get the bounds of the image in question? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkResliceImageViewer-get-image-tp5741262.html Sent from the VTK - Users mailing list archive at Nabble.com. From rickfrank at me.com Tue Nov 22 10:02:19 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 22 Nov 2016 10:02:19 -0500 Subject: [vtkusers] vtkReslice question Message-ID: Hi, I have most of everything working for a six DOF re-slice of a 3-D volume with three 2d planes and one 3-D view. One problem I'm having I can't find a solution for, is that when I change the center of rotation - for instance in the axial plane I just move The center of rotation 10 pixels up and to the right, the slice actor shifts so that the new Center of rotation is moved to the center of the view as well. What I need is for the actor to stay put, for instance as it might do in real life if it were a flat card on a table - that is to rotate about this new center at the position in the view. I've tried using the user transform to offset by the Delta between the old and new center. But when I do this the slice stays put but rotates about the old center, which is very confusing. There seems to be quite a bit of flexibility at least in terms of the API, but I'm completely baffled by what's going on and have to get my desired result is. I have a complete test project with an MHA file if somebody wants code. Any help appreciated Rick Frank Sent from my iPad From jaimefbc at gmail.com Tue Nov 22 11:09:08 2016 From: jaimefbc at gmail.com (Jaime Campos) Date: Tue, 22 Nov 2016 16:09:08 +0000 Subject: [vtkusers] iOS compiling issues Message-ID: Hi everyone, I'm trying to compile VTK from tag v7.1.0 for iOS using CMAKE and make. The configuration has the flag VTK_IOS_BUILD turned ON, so I suppose that's how we add support to build the iOS version of VTK. The problem begins with the make process, I'm getting errors such as: [ 77%] Performing build step for 'vtk-ios-device-arm64' make[3]: *** No rule to make target `install'. Stop. make[2]: *** [CMakeExternals/Prefix/vtk-ios-device-arm64/src/vtk-ios-device-arm64-stamp/vtk-ios-device-arm64-build] Error 2 make[1]: *** [CMakeFiles/vtk-ios-device-arm64.dir/all] Error 2 make: *** [all] Error 2 For the armv7, armv7s, arm64 and even the simulator architectures. Is the makefile being generated correctly ? Is anyone else having the same problem ? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 22 11:31:27 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 22 Nov 2016 11:31:27 -0500 Subject: [vtkusers] iOS compiling issues In-Reply-To: References: Message-ID: Here is the script I use I believe you have to create/have a writable install directory. Below you can see that script creates an install directory in the build directory. So you probably need to mkdir install and set CMAKE_INSTALL_PREFIX to it. Thanks Ken set(CTEST_SITE "kens_ipad.kitware") set(CTEST_BUILD_NAME "iOS ES 3.0") set(CTEST_CONFIGURATION_TYPE Debug) set(CTEST_CMAKE_GENERATOR "Ninja") set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "has no symbols") set(dashboard_cache " CMAKE_MAKE_PROGRAM:FILEPATH=/usr/local/bin/ninja BUILD_TESTING:BOOL=OFF BUILD_EXAMPLES:BOOL=ON OPENGL_ES_VERSION:STRING=3.0 VTK_IOS_BUILD:BOOL=ON CMAKE_INSTALL_PREFIX:PATH=/Users/kenmartin/Dashboards/My Tests/vtkios_es3/install ") set(dashboard_model "Nightly") set(dashboard_binary_name vtkios_es3) macro(dashboard_hook_init) file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}/install") endmacro() include(${CTEST_SCRIPT_DIRECTORY}/common/vtk_common.cmake) On Tue, Nov 22, 2016 at 11:09 AM, Jaime Campos wrote: > Hi everyone, > > I'm trying to compile VTK from tag v7.1.0 for iOS using CMAKE and make. > The configuration has the flag VTK_IOS_BUILD turned ON, so I suppose > that's how we add support to build the iOS version of VTK. > > The problem begins with the make process, I'm getting errors such as: > > [ 77%] Performing build step for 'vtk-ios-device-arm64' > make[3]: *** No rule to make target `install'. Stop. > make[2]: *** [CMakeExternals/Prefix/vtk-ios-device-arm64/src/vtk-ios- > device-arm64-stamp/vtk-ios-device-arm64-build] Error 2 > make[1]: *** [CMakeFiles/vtk-ios-device-arm64.dir/all] Error 2 > make: *** [all] Error 2 > > For the armv7, armv7s, arm64 and even the simulator architectures. > > Is the makefile being generated correctly ? > Is anyone else having the same problem ? > > Thanks, > > _______________________________________________ > 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 leonid_dulman at yahoo.co.uk Tue Nov 22 13:16:00 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Tue, 22 Nov 2016 18:16:00 +0000 (UTC) Subject: [vtkusers] VTK 7.1.0 rc2 problems References: <2138701994.4010389.1479838560780.ref@mail.yahoo.com> Message-ID: <2138701994.4010389.1479838560780@mail.yahoo.com> I have problem to execute voltm2drotateclip.tcl test ?vtkVolumeTextureMapper2D is not found, but vtkRenderingVolume is built -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.gavana at gmail.com Tue Nov 22 14:00:19 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Tue, 22 Nov 2016 19:00:19 +0000 Subject: [vtkusers] vtkUnstructuredGrid - "hiding" cells Message-ID: Dear All, I'm working with a vtkUnstructuredGrid coming from a CFD simulation. The grid is composed by hexahedron cells, and the input grid defines all coordinates for all cells (as a Nx x Ny x Nz number if cells). However, based on other inputs, the CFD simulator deactivates some of the cells. Also, in my user interface built on top of VTK, I allow the user to "filter" the grid by selecting only a certain number of layers (in the Nz direction) or selecting an interval in the x and y direction to create a "sub grid" of the original grid and so on. Now, it would be nice if there was an easy way to say: "all cells outside the user selection and all cells deactivated by the simulator should be invisible", without creating a new vtkUnstructuredGrid every time the user changes her selection. At the moment I'm handling this (awkwardly) using vtkThreshold, but the original cell ids are lost using this filter and this approach also requires the creation of a new vtkUnstructuredGrid, hiding the full model, adding a new actor for the new vtkUnstructuredGrid and rendering again. Having the original grid always there (but with hidden cells) also allows me to keep the vtkUnstructuredGrid and all the properties loaded from the simulation files (as Numpy arrays) in sync without much gymnastics. And also allows me to use pickers to retrieve cell ids that are in sync with the unfiltered grid (which I very much need...). Does anyone have a better idea on how to handle this situation? I'm using VTK 7.0 in Python. Thank you in advance for your suggestions. Andrea. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 22 14:46:38 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 22 Nov 2016 14:46:38 -0500 Subject: [vtkusers] VTK actors only appear after camera zoom action by user In-Reply-To: <1479751280095-5741255.post@n5.nabble.com> References: <1479751280095-5741255.post@n5.nabble.com> Message-ID: After adding the actor try something like myRenderer->ResetCamera(); On Mon, Nov 21, 2016 at 1:01 PM, BBerco wrote: > Dear all, > I am dealing with an annoying delay in the rendering process. Basically, a > shape model stored in a vtkPolyData and displayed inside a QVTKWidget > through the usual mapper/actor chain only shows after a zoom in/out action. > > I was thinking that calling > *this -> qvtkWidget -> GetRenderWindow() -> Render();* > > after adding the actor to the current renderer was sufficient, but it seems > I missed something. > > Any thoughts? > > Best, > Ben > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/VTK-actors-only-appear-after-camera-zoom-action-by-user-tp5741255.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 Tue Nov 22 15:19:28 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 22 Nov 2016 15:19:28 -0500 Subject: [vtkusers] How to improve medical volume render? In-Reply-To: <1479455997452-5741220.post@n5.nabble.com> References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: I am not a Volume Rendering expert but maybe set volProperty->SetInterpolationTypeToLinear() if you have not already? I think it defaults to Nearest which can cause issues (aside from step size) On Fri, Nov 18, 2016 at 2:59 AM, wangtaoiz wrote: > > Can anybody give me some advises to improve the volume render effect of my > medical image data? How can I remove the "isolines" on skin to make it > looks > smooth? I have tried SetSampleDistance(), small distance can improve it but > make the rendering time too long, is there any other good way to make it > more beautiful? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/How-to-improve-medical-volume-render-tp5741220.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 aashish.chaudhary at kitware.com Tue Nov 22 15:21:41 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 22 Nov 2016 20:21:41 +0000 Subject: [vtkusers] How to improve medical volume render? In-Reply-To: References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: Dear wangtaoiz, Increase your sample distance (step size) to as low as possible. Looks like you have a low-resolution dataset? (other than trying out Ken and Alvaro's suggesiotn). On Tue, Nov 22, 2016 at 3:19 PM Ken Martin wrote: > I am not a Volume Rendering expert but maybe set > volProperty->SetInterpolationTypeToLinear() if you have not already? I > think it defaults to Nearest which can cause issues (aside from step size) > > On Fri, Nov 18, 2016 at 2:59 AM, wangtaoiz wrote: > > > Can anybody give me some advises to improve the volume render effect of my > medical image data? How can I remove the "isolines" on skin to make it > looks > smooth? I have tried SetSampleDistance(), small distance can improve it but > make the rendering time too long, is there any other good way to make it > more beautiful? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220.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 <(518)%20371-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 bebe0705 at colorado.edu Tue Nov 22 15:46:40 2016 From: bebe0705 at colorado.edu (BBerco) Date: Tue, 22 Nov 2016 13:46:40 -0700 (MST) Subject: [vtkusers] VTK actors only appear after camera zoom action by user In-Reply-To: References: <1479751280095-5741255.post@n5.nabble.com> Message-ID: <1479847600167-5741272.post@n5.nabble.com> Spot-on, thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-actors-only-appear-after-camera-zoom-action-by-user-tp5741255p5741272.html Sent from the VTK - Users mailing list archive at Nabble.com. From prakeshofficial at gmail.com Tue Nov 22 21:18:26 2016 From: prakeshofficial at gmail.com (rakesh patil) Date: Wed, 23 Nov 2016 07:48:26 +0530 Subject: [vtkusers] BRep support in VTK Message-ID: Hi, Does VTK support BRep ? If not then any plans to give support in future? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiezjc at sina.com Wed Nov 23 00:13:54 2016 From: jiezjc at sina.com (zjc) Date: Wed, 23 Nov 2016 13:13:54 +0800 Subject: [vtkusers] SetOutput of the class vtkGraphReader exists in name only In-Reply-To: <1a7f1400-f7f2-99dc-af7f-c127a9924c91@Outlook.com> References: <1a7f1400-f7f2-99dc-af7f-c127a9924c91@Outlook.com> Message-ID: Hello everyone, I'm trying to use the class /vtkGraphReader/ to import a undirected graph. I thought the member function /SetOutput/ of the class /vtkGraphReader/ was provided for users to specify the resulting object, but I found that the return value of /GetOutput/ after /Update/ was called was different from the pointer I specified. Is it a bug? Or did I use the class inappropriately? Regards Juncheng Enclosed is the .vtk file of the graph. And here is the code. vtkSmartPointer graph = vtkSmartPointer::New(); vtkGraphReader *reader = vtkGraphReader::New(); reader->SetFileName(Filename); reader->SetOutput(graph); reader->Update(); if(graph != vtkUndirectedGraph::SafeDownCast(reader->GetOutput())) cout << "Output is different." << endl; if(graph->GetNumberOfVertices()==0 && reader->GetOutput()->GetNumberOfVertices()>0) cout << "Output specified is not updated." << endl; reader->Delete(); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- # vtk DataFile Version 4.0 vtk output ASCII DATASET UNDIRECTED_GRAPH POINTS 20 float -0.235597 4.19265 0.557564 -0.226415 3.90285 1.41364 -0.552681 3.99281 1.08117 -0.408151 -4.16471 0.340572 -0.787696 -4.1173 0.0940845 -0.258744 -4.18317 -0.225288 -0.00911081 -1.40764 0.0200255 -0.666889 -0.505271 -0.495084 -0.411895 1.53943 0.241843 -0.684812 0.443477 0.549157 0.471433 0.387155 -0.333095 -1.0063 2.13384 1.45423 -0.758552 -1.00379 0.794824 1.14556 0.894125 0.47958 0.558745 0.0178654 0.914717 0.222442 2.77834 1.51518 0.572759 -3.23244 1.02109 0.215907 -2.75125 -0.617971 -0.0944958 -3.30206 0.0922823 -0.6552 2.88964 0.553324 VERTICES 20 EDGES 8 17 18 6 17 8 9 6 7 4 18 0 19 7 9 8 19 VERTEX_DATA 20 SCALARS scalars char LOOKUP_TABLE default 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FIELD FieldData 1 vtkOriginalPointIds 1 20 vtkIdType 10020 10546 10678 11726 11728 12153 13302 13310 13327 13336 13341 13349 13389 13495 13597 15712 16780 17520 18069 18098 From cory.quammen at kitware.com Wed Nov 23 00:26:35 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 23 Nov 2016 00:26:35 -0500 Subject: [vtkusers] SetOutput of the class vtkGraphReader exists in name only In-Reply-To: References: <1a7f1400-f7f2-99dc-af7f-c127a9924c91@Outlook.com> Message-ID: You normally don't need to allocate or specify an output. VTK readers/filters create an output data object for you internally, and that's what you access with GetOutput(). That is why the output pointer is different from the one you specified. HTH, Cory On Wed, Nov 23, 2016 at 12:13 AM, zjc wrote: > Hello everyone, > > I'm trying to use the class vtkGraphReader to import a undirected graph. I > thought the member function SetOutput of the class vtkGraphReader was > provided for users to specify the resulting object, but I found that the > return value of GetOutput after Update was called was different from the > pointer I specified. Is it a bug? Or did I use the class inappropriately? > > Regards > Juncheng > > Enclosed is the .vtk file of the graph. And here is the code. > vtkSmartPointer graph = > vtkSmartPointer::New(); > vtkGraphReader *reader = vtkGraphReader::New(); > reader->SetFileName(Filename); > reader->SetOutput(graph); > reader->Update(); > if(graph != vtkUndirectedGraph::SafeDownCast(reader->GetOutput())) > cout << "Output is different." << endl; > if(graph->GetNumberOfVertices()==0 && > reader->GetOutput()->GetNumberOfVertices()>0) > cout << "Output specified is not updated." << endl; > reader->Delete(); > > > _______________________________________________ > 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 wangtao_ at sjtu.edu.cn Wed Nov 23 03:54:47 2016 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Wed, 23 Nov 2016 01:54:47 -0700 (MST) Subject: [vtkusers] How to improve medical volume render? In-Reply-To: References: <1479455997452-5741220.post@n5.nabble.com> <1479538437297-5741227.post@n5.nabble.com> Message-ID: <1479891287193-5741276.post@n5.nabble.com> Dear Alvaro, I have tried the master version and it is really effective to remove the "wood-grain" in some way, thanks very much! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220p5741276.html Sent from the VTK - Users mailing list archive at Nabble.com. From wangtao_ at sjtu.edu.cn Wed Nov 23 03:58:10 2016 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Wed, 23 Nov 2016 01:58:10 -0700 (MST) Subject: [vtkusers] How to improve medical volume render? In-Reply-To: References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: <1479891490395-5741277.post@n5.nabble.com> Thanks for your advice, I have used SetInterpolationTypeToLinear() but it make no sense, but I have solved my problem. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220p5741277.html Sent from the VTK - Users mailing list archive at Nabble.com. From wangtao_ at sjtu.edu.cn Wed Nov 23 04:01:00 2016 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Wed, 23 Nov 2016 02:01:00 -0700 (MST) Subject: [vtkusers] How to improve medical volume render? In-Reply-To: References: <1479455997452-5741220.post@n5.nabble.com> Message-ID: <1479891660541-5741278.post@n5.nabble.com> As I haved said before, decrease the smaple distance would increase the rendering time cost, I solve the problem from Alvaro's suggesiotn, thanks anyway! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-improve-medical-volume-render-tp5741220p5741278.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Wed Nov 23 12:21:17 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 23 Nov 2016 10:21:17 -0700 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving Message-ID: Read all about it here: https://blog.kitware.com/vtk-7-1-0/ 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 elvis.stansvik at orexplore.com Thu Nov 24 03:04:13 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 24 Nov 2016 09:04:13 +0100 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: 2016-11-23 18:21 GMT+01:00 David E DeMarle : > Read all about it here: > https://blog.kitware.com/vtk-7-1-0/ > > Great news! A big thanks to everyone involved. Looks like an impressive release. I shall update our Ubuntu package straight away. Cheers, Elvis 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.gavana at gmail.com Thu Nov 24 03:18:17 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Thu, 24 Nov 2016 09:18:17 +0100 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: Hi David & All, On 23 November 2016 at 18:21, David E DeMarle wrote: > Read all about it here: > https://blog.kitware.com/vtk-7-1-0/ > Thank you for the release. I have tried to use the cool feature described here: https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/ Using the just released VTK 7.1 and its Python bindings (I'm using VTK through Python). However, when I add these two lines to one of my scripts (property is a vtkProperty): property.SetVertexVisibility(1) property.SetVertexColor(0.5, 1.0, 0.8) I get the following: AttributeError: 'vtkRenderingOpenGL2Python.vtkOpenGLProperty' object has no attribute 'SetVertexVisibility' Also, doing a dir(vtkProperty) there is no mention of SetVertexVisibility or any other "Vertex" method whatsoever. Maybe I am missing something obvious... Thank you. Andrea. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjordan at live.at Thu Nov 24 06:54:29 2016 From: mjordan at live.at (M. Jordan) Date: Thu, 24 Nov 2016 11:54:29 +0000 Subject: [vtkusers] Acess functions in custom interactor class Message-ID: I have a Qt GUI called MainWindow. I am rendering some 3D objects in the constructor of the MainWindow. Moreover I declared a custom class of the vtkInteractorStyleTrackballCamera in "MainWindow.cpp" like in this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MouseEvents Now I would like to call a function from the MainWindow class in the function "OnLeftButtonDown()" from my custom class of the Interactor. I tried to inherit the MainWindow class to the custom Interactor class like this: class customMouseInteractorStyle : public vtkInteractorStyleTrackballCamera, MainWindow But this doesn't work. How can I access the functions of the MainWindow there? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Nov 24 07:46:49 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 24 Nov 2016 07:46:49 -0500 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: That feature was added after the 7.1 release process was well along so it probably did not make it into the 7.1 release. On Thu, Nov 24, 2016 at 3:18 AM, Andrea Gavana wrote: > Hi David & All, > > On 23 November 2016 at 18:21, David E DeMarle wrote: > >> Read all about it here: >> https://blog.kitware.com/vtk-7-1-0/ >> > > > Thank you for the release. I have tried to use the cool feature described > here: > > https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/ > > Using the just released VTK 7.1 and its Python bindings (I'm using VTK > through Python). However, when I add these two lines to one of my scripts > (property is a vtkProperty): > > property.SetVertexVisibility(1) > property.SetVertexColor(0.5, 1.0, 0.8) > > > I get the following: > > AttributeError: 'vtkRenderingOpenGL2Python.vtkOpenGLProperty' object has > no attribute 'SetVertexVisibility' > > Also, doing a dir(vtkProperty) there is no mention of SetVertexVisibility > or any other "Vertex" method whatsoever. > > Maybe I am missing something obvious... > > Thank you. > > Andrea. > > > _______________________________________________ > 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 andrea.gavana at gmail.com Thu Nov 24 08:38:35 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Thu, 24 Nov 2016 14:38:35 +0100 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: Hi David & All, On 24 November 2016 at 13:46, Ken Martin wrote: > That feature was added after the 7.1 release process was well along so it > probably did not make it into the 7.1 release. > > Ah, OK, thank you for the clarification. I must have misread the "RENDERING" section of the announcement in the VTK blog then. Andrea. > On Thu, Nov 24, 2016 at 3:18 AM, Andrea Gavana > wrote: > >> Hi David & All, >> >> On 23 November 2016 at 18:21, David E DeMarle wrote: >> >>> Read all about it here: >>> https://blog.kitware.com/vtk-7-1-0/ >>> >> >> >> Thank you for the release. I have tried to use the cool feature described >> here: >> >> https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/ >> >> Using the just released VTK 7.1 and its Python bindings (I'm using VTK >> through Python). However, when I add these two lines to one of my scripts >> (property is a vtkProperty): >> >> property.SetVertexVisibility(1) >> property.SetVertexColor(0.5, 1.0, 0.8) >> >> >> I get the following: >> >> AttributeError: 'vtkRenderingOpenGL2Python.vtkOpenGLProperty' object has >> no attribute 'SetVertexVisibility' >> >> Also, doing a dir(vtkProperty) there is no mention of SetVertexVisibility >> or any other "Vertex" method whatsoever. >> >> Maybe I am missing something obvious... >> >> Thank you. >> >> Andrea. >> >> >> _______________________________________________ >> 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 Nov 24 10:29:42 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 24 Nov 2016 10:29:42 -0500 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: You read it correctly, :-) I ***think*** the ability to render points as spheres and lines as tubes is in there but what didn't make it is the ability to render the vertices (i.e. the points used by the cells.). But if you turn on RenderPointsAsSpheres, SetPointSize and SetRepresentationToPoints I think you will get spheres, it is just not as nice an option as rendering a unique list of points referenced by the cells which is what the VertexVisibility does. It just unfortunately was developed right as the release process was going on. On Thu, Nov 24, 2016 at 8:38 AM, Andrea Gavana wrote: > Hi David & All, > > > On 24 November 2016 at 13:46, Ken Martin wrote: > >> That feature was added after the 7.1 release process was well along so it >> probably did not make it into the 7.1 release. >> >> > > Ah, OK, thank you for the clarification. I must have misread the > "RENDERING" section of the announcement in the VTK blog then. > > Andrea. > > > > >> On Thu, Nov 24, 2016 at 3:18 AM, Andrea Gavana >> wrote: >> >>> Hi David & All, >>> >>> On 23 November 2016 at 18:21, David E DeMarle wrote: >>> >>>> Read all about it here: >>>> https://blog.kitware.com/vtk-7-1-0/ >>>> >>> >>> >>> Thank you for the release. I have tried to use the cool feature >>> described here: >>> >>> https://blog.kitware.com/rendering-tubes-and-spheres-in-vtk/ >>> >>> Using the just released VTK 7.1 and its Python bindings (I'm using VTK >>> through Python). However, when I add these two lines to one of my scripts >>> (property is a vtkProperty): >>> >>> property.SetVertexVisibility(1) >>> property.SetVertexColor(0.5, 1.0, 0.8) >>> >>> >>> I get the following: >>> >>> AttributeError: 'vtkRenderingOpenGL2Python.vtkOpenGLProperty' object >>> has no attribute 'SetVertexVisibility' >>> >>> Also, doing a dir(vtkProperty) there is no mention of >>> SetVertexVisibility or any other "Vertex" method whatsoever. >>> >>> Maybe I am missing something obvious... >>> >>> Thank you. >>> >>> Andrea. >>> >>> >>> _______________________________________________ >>> 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 tevain at telecom-paristech.fr Thu Nov 24 10:59:33 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 24 Nov 2016 16:59:33 +0100 (CET) Subject: [vtkusers] Slider Widget pick on multiple viewports/renderers In-Reply-To: <284191330.37283908.1480001127143.JavaMail.zimbra@enst.fr> Message-ID: <649665501.37321556.1480003173530.JavaMail.zimbra@enst.fr> Hello everyone, Some context: I'm trying to set up a light view for manually correcting 3D image segmentation with a paint-brush effect. I have a window split in four viewports associated with a renderer for each. One part is the volume view of segmentation while the three other are image actors representing axial/sagittal/coronal slices overlayed with segmentation. Following the idea of a paint brush, I wish to put a slider somewhere to control the radius of correction but I'm stuck on a strange behavior with the slider widget. If I associate it with the bottom-left renderer (the "first" viewport in term of coordinates), everything is fine, but if I associate the widget on any other renderer/viewport, it is well rendered, but cannot be picked anymore even if it should (pickable "on", higher priority). Has anyone an idea on what could be tricking me ? (Code provided at the end) Tim void GUI_EditSegmentation(vtkImageData *InputImage, vtkImageData *InputSegmentation) { /* /!\ It is the user responsibility to ensure that image and segmentation are in same space i.e. same origin, same spacing /!\ Typical usage is to have the segmentation as RGBA image, with color on segmented parts, whereas background pixels are translucents (A=0) */ double ImSpacing[3]; int ImSize[3]; vtkSmartPointer ImVtk=InputImage; ImVtk->GetSpacing(ImSpacing); ImVtk->GetDimensions(ImSize); double ImOri[3]; double SegmOri[3]; double SegmSpacing[3]; int ImExtent[6]; int SegmExtent[6]; ImVtk->GetOrigin(ImOri); InputSegmentation->GetOrigin(SegmOri); InputSegmentation->GetSpacing(SegmSpacing); ImVtk->GetExtent(ImExtent); InputSegmentation->GetExtent(SegmExtent); vtkSmartPointer ImStats= vtkSmartPointer::New(); ImStats->SetInputData(ImVtk); ImStats->SetAutomaticBinning(true); ImStats->Update(); double BestRangeVisu[2]; ImStats->GetAutoRange(BestRangeVisu); float BestLevelVisu=(BestRangeVisu[0]+BestRangeVisu[1])/2; float BestWindowVisu=BestRangeVisu[1]-BestRangeVisu[0]; vtkSmartPointer RenderWin=vtkSmartPointer::New(); vtkSmartPointer Interactor=vtkSmartPointer::New(); vtkSmartPointer InterStyle=vtkSmartPointer::New(); /* AXIAL PART */ vtkSmartPointer Renderer_1=vtkSmartPointer::New(); Renderer_1->SetBackground(0.7,0.7,0.7); Renderer_1->SetRenderWindow(RenderWin); vtkSmartPointer AxialReslicer=vtkSmartPointer::New(); vtkSmartPointer AxialImAct=vtkSmartPointer::New(); AxialReslicer->SetInputData(ImVtk); // ( 1 0 0 ) // ( 0 1 0 ) // ( 0 0 1 ) //Axial reslice AxialReslicer->SetResliceAxesDirectionCosines(1,0,0,0,1,0,0,0,1); AxialReslicer->SetOutputDimensionality(2); AxialReslicer->SetResliceAxesOrigin(0,0,ImOri[2]+(float(ImExtent[4])*ImSpacing[2])+(float(ImSize[2])*ImSpacing[2]/2)); AxialReslicer->Update(); AxialImAct->SetInputData(AxialReslicer->GetOutput()); AxialImAct->GetProperty()->SetColorLevel(BestLevelVisu); AxialImAct->GetProperty()->SetColorWindow(BestWindowVisu); vtkSmartPointer AxialSegmReslicer=vtkSmartPointer::New(); vtkSmartPointer AxialSegmAct=vtkSmartPointer::New(); AxialSegmReslicer->SetInputData(InputSegmentation); AxialSegmReslicer->SetResliceAxesDirectionCosines(1,0,0,0,1,0,0,0,1); AxialSegmReslicer->SetOutputDimensionality(2); AxialSegmReslicer->SetResliceAxesOrigin(0,0,ImOri[2]+(float(ImExtent[4])*ImSpacing[2])+(float(ImSize[2])*ImSpacing[2]/2)); AxialSegmReslicer->Update(); AxialSegmAct->SetInputData(AxialSegmReslicer->GetOutput()); Renderer_1->AddActor(AxialImAct); Renderer_1->AddActor(AxialSegmAct); Renderer_1->SetViewport(0, 0, 0.5, 0.5); /* SAGITTAL PART */ vtkSmartPointer Renderer_2=vtkSmartPointer::New(); Renderer_2->SetBackground(0.7,0.7,0.7); Renderer_2->SetRenderWindow(RenderWin); vtkSmartPointer SagittalReslicer=vtkSmartPointer::New(); SagittalReslicer->SetInputData(ImVtk); // ( 0 1 0 ) // ( 0 0 1 ) // ( 1 0 0 ) //Sagittal reslice SagittalReslicer->SetResliceAxesDirectionCosines(0,1,0,0,0,1,1,0,0); SagittalReslicer->SetOutputDimensionality(2); SagittalReslicer->SetResliceAxesOrigin(ImOri[0]+(float(ImExtent[0])*ImSpacing[0])+(float(ImSize[0])*ImSpacing[0]/2),0,0); SagittalReslicer->Update(); vtkSmartPointer SagittalImAct=vtkSmartPointer::New(); SagittalImAct->SetInputData(SagittalReslicer->GetOutput()); SagittalImAct->GetProperty()->SetColorLevel(BestLevelVisu); SagittalImAct->GetProperty()->SetColorWindow(BestWindowVisu); vtkSmartPointer SagittalSegmReslicer=vtkSmartPointer::New(); vtkSmartPointer SagittalSegmAct=vtkSmartPointer::New(); SagittalSegmReslicer->SetInputData(InputSegmentation); SagittalSegmReslicer->SetResliceAxesDirectionCosines(0,1,0,0,0,1,1,0,0); SagittalSegmReslicer->SetOutputDimensionality(2); SagittalSegmReslicer->SetResliceAxesOrigin(ImOri[0]+(float(ImExtent[0])*ImSpacing[0])+(float(ImSize[0])*ImSpacing[0]/2),0,0); SagittalSegmReslicer->Update(); SagittalSegmAct->SetInputData(SagittalSegmReslicer->GetOutput()); Renderer_2->AddActor(SagittalImAct); Renderer_2->AddActor(SagittalSegmAct); Renderer_2->SetViewport(0.5,0,1,0.5); /* CORONAL PART */ vtkSmartPointer Renderer_3=vtkSmartPointer::New(); Renderer_3->SetBackground(0.7,0.7,0.7); Renderer_3->SetRenderWindow(RenderWin); vtkSmartPointer CoronalReslicer=vtkSmartPointer::New(); CoronalReslicer->SetInputData(ImVtk); // ( 1 0 0 ) // ( 0 0 1 ) // ( 0 1 0 ) //Coronal reslice CoronalReslicer->SetResliceAxesDirectionCosines(1,0,0,0,0,1,0,1,0); CoronalReslicer->SetOutputDimensionality(2); CoronalReslicer->SetResliceAxesOrigin(0,ImOri[1]+(float(ImExtent[2])*ImSpacing[1])+(float(ImSize[1])*ImSpacing[1]/2),0); CoronalReslicer->Update(); vtkSmartPointer CoronalImAct=vtkSmartPointer::New(); CoronalImAct->SetInputData(CoronalReslicer->GetOutput()); CoronalImAct->GetProperty()->SetColorLevel(BestLevelVisu); CoronalImAct->GetProperty()->SetColorWindow(BestWindowVisu); vtkSmartPointer CoronalSegmReslicer=vtkSmartPointer::New(); vtkSmartPointer CoronalSegmAct=vtkSmartPointer::New(); CoronalSegmReslicer->SetInputData(InputSegmentation); CoronalSegmReslicer->SetResliceAxesDirectionCosines(1,0,0,0,0,1,0,1,0); CoronalSegmReslicer->SetOutputDimensionality(2); CoronalSegmReslicer->SetResliceAxesOrigin(0,ImOri[1]+(float(ImExtent[2])*ImSpacing[1])+(float(ImSize[1])*ImSpacing[1]/2),0); CoronalSegmReslicer->Update(); CoronalSegmAct->SetInputData(CoronalSegmReslicer->GetOutput()); Renderer_3->AddActor(CoronalImAct); Renderer_3->AddActor(CoronalSegmAct); Renderer_3->SetViewport(0,0.5,0.5,1); /* VOLUME PART */ vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(InputSegmentation); vtkSmartPointer volumeProperty = vtkSmartPointer::New(); volumeProperty->ShadeOff(); volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); vtkSmartPointer compositeOpacity = vtkSmartPointer::New(); compositeOpacity->AddPoint(0.0,0.0); compositeOpacity->AddPoint(120,0.3); compositeOpacity->AddPoint(255,0.5); volumeProperty->SetScalarOpacity(0,compositeOpacity); volumeProperty->SetScalarOpacity(1,compositeOpacity); volumeProperty->SetScalarOpacity(2,compositeOpacity); volumeProperty->SetScalarOpacity(3,compositeOpacity); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(mapper); volume->SetProperty(volumeProperty); vtkSmartPointer Renderer_4=vtkSmartPointer::New(); Renderer_4->SetBackground(0.7,0.7,0.7); Renderer_4->SetRenderWindow(RenderWin); Renderer_4->AddVolume(volume); Renderer_4->SetViewport(0.5, 0.5, 1, 1); vtkSmartPointer VolStyle=vtkSmartPointer::New(); /* ASSEMBLY PART*/ vtkSmartPointer SliderRep = vtkSmartPointer::New(); SliderRep->SetMinimumValue(1); SliderRep->SetMaximumValue(100); SliderRep->SetValue(5); SliderRep->SetTitleText("Brush Radius"); SliderRep->GetSliderProperty()->SetColor(1, 1, 1); SliderRep->GetTitleProperty()->SetColor(1, 1, 1); SliderRep->GetLabelProperty()->SetColor(1, 1, 1); SliderRep->GetSelectedProperty()->SetColor(0, 1, 0); SliderRep->GetTubeProperty()->SetColor(0.8, 0.8, 0.8); SliderRep->GetCapProperty()->SetColor(0.8, 0.8, 0.8); SliderRep->GetPoint1Coordinate()->SetCoordinateSystemToNormalizedDisplay(); SliderRep->GetPoint1Coordinate()->SetValue(0.3, 0.45, 0); SliderRep->GetPoint2Coordinate()->SetCoordinateSystemToNormalizedDisplay(); SliderRep->GetPoint2Coordinate()->SetValue(0.4, 0.45, 0); vtkSmartPointer Slider = vtkSmartPointer::New(); Slider->SetPriority(1); Slider->SetInteractor(Interactor); Slider->SetRepresentation(SliderRep); Slider->SetAnimationModeToJump(); Slider->SetCurrentRenderer(Renderer_1); // ONLY PICKABLE ON RENDERER_1, NOT ON OTHER Interactor->SetInteractorStyle(InterStyle); RenderWin->SetInteractor(Interactor); RenderWin->AddRenderer(Renderer_1); RenderWin->AddRenderer(Renderer_2); RenderWin->AddRenderer(Renderer_3); RenderWin->AddRenderer(Renderer_4); RenderWin->SetSize(1600,900); RenderWin->SetDesiredUpdateRate(Interactor->GetDesiredUpdateRate()); RenderWin->Render(); Slider->EnabledOn(); Interactor->Start(); } From sean at rogue-research.com Thu Nov 24 11:26:26 2016 From: sean at rogue-research.com (Sean McBride) Date: Thu, 24 Nov 2016 11:26:26 -0500 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: References: Message-ID: <20161124162626.510817897@mail.rogue-research.com> On Wed, 23 Nov 2016 10:21:17 -0700, David E DeMarle said: >Read all about it here: >https://blog.kitware.com/vtk-7-1-0/ Are there any screenshots of this vtkBillboardTextActor3D out there? Sounds like it could be useful for us... 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 bill.lorensen at gmail.com Thu Nov 24 12:46:14 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 24 Nov 2016 12:46:14 -0500 Subject: [vtkusers] Sampling cell-data along a line In-Reply-To: <5f2cfeb2-e3ce-9268-9a87-782b769e281a@it.uu.se> References: <5f2cfeb2-e3ce-9268-9a87-782b769e281a@it.uu.se> Message-ID: Timofey, Motivated by your email. I just added this wiki example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/VisualizationAlgorithms/FindCellIntersections I realize it does not solve your problem, but it does illustrate how to use the FindCellsAlongLine method. You might try it with one of your datasets. Bill On Tue, Nov 22, 2016 at 5:07 AM, Timofey Mukha wrote: > Dear all, > > I have some large cell-data from a CFD simulation. I would like to view > profiles along a line. > Currently I understand that I can do this with a probeFilter to which I feed > a line with a given resolution. > > The problem is that given a complicated mesh the sampling points on the line > will probably miss some cells or, on the other hand, some points might fall > into the same cell. > > Is there a way to sample along a line in such a way that the returned > profile will contain data from all the cells that the line intersects? For > each cell a sampling point should then be generated somewhere in between the > point where the line enters the cell and where it exists it. > > I tried playing around with the vtkCellLocator, that can find which cells > are intersected by a given line using the FindCellsAlongLine method. > However, that does not give the locations of the sampling points, only the > coordinates of the cell-centers that are intersected by the line. There is > also the subtle issue of handling cases when the sampling line lies on a > boundary between two or more cells. > > All in all it seems like a more complicated problem than at first glance, > but I am wondering if someone has already dealt with it before me? > > Best, > > Timofey > > _______________________________________________ > 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 mario at emmenlauer.de Fri Nov 25 04:23:30 2016 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Fri, 25 Nov 2016 10:23:30 +0100 Subject: [vtkusers] building VTK 7.1.0 on MSYS2: undefined references Message-ID: <5b7f6ad8-5793-6148-f755-e1741e43e5ed@emmenlauer.de> Dear All, I've reported this issue already here: https://gitlab.kitware.com/vtk/vtk/issues/16916 But I hope somebody here on the mailing list might be knowledgeable about how to add linker dependencies inside VTK? When building VTK 7.1.0 I get an error about an undefined reference on MSYS2. Everything works fine on Linux. The error on MSYS2 is: CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a7c): undefined reference to `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a92): undefined reference to `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' I think its required that vtkCommonDataModel links against vtkCommonCore? I do not know how to achieve this. I've tried various combinations to add the dependency to Common/DataModel/CMakeLists.txt but without success. How is this done correctly? Cheers, Mario From timofey.mukha at it.uu.se Fri Nov 25 10:07:23 2016 From: timofey.mukha at it.uu.se (Timofey Mukha) Date: Fri, 25 Nov 2016 16:07:23 +0100 Subject: [vtkusers] Sampling cell-data along a line In-Reply-To: References: <5f2cfeb2-e3ce-9268-9a87-782b769e281a@it.uu.se> Message-ID: Dear Bill, Thank you for the example, it's a nice illustration. I have ultimately arrived to another solution to my problem. A somewhat important detail is that my data is 2d. What I do then is take a slice of the data with vtkCutter, so that the cut goes along the line that I need. A given cell center of the cutter is located exactly in the middle of the segment obtained by cutting a given cell by the desired line. So the cell data of the cutter gives me my profile along a line! In a 3d setting I suppose one can to the same, but one needs two cutters the intersection of which would give the desired line! Best, Timofey On 2016-11-24 18:46, Bill Lorensen wrote: > Timofey, > > Motivated by your email. I just added this wiki example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/VisualizationAlgorithms/FindCellIntersections > > I realize it does not solve your problem, but it does illustrate how > to use the FindCellsAlongLine method. You might try it with one of > your datasets. > > Bill > > > On Tue, Nov 22, 2016 at 5:07 AM, Timofey Mukha wrote: >> Dear all, >> >> I have some large cell-data from a CFD simulation. I would like to view >> profiles along a line. >> Currently I understand that I can do this with a probeFilter to which I feed >> a line with a given resolution. >> >> The problem is that given a complicated mesh the sampling points on the line >> will probably miss some cells or, on the other hand, some points might fall >> into the same cell. >> >> Is there a way to sample along a line in such a way that the returned >> profile will contain data from all the cells that the line intersects? For >> each cell a sampling point should then be generated somewhere in between the >> point where the line enters the cell and where it exists it. >> >> I tried playing around with the vtkCellLocator, that can find which cells >> are intersected by a given line using the FindCellsAlongLine method. >> However, that does not give the locations of the sampling points, only the >> coordinates of the cell-centers that are intersected by the line. There is >> also the subtle issue of handling cases when the sampling line lies on a >> boundary between two or more cells. >> >> All in all it seems like a more complicated problem than at first glance, >> but I am wondering if someone has already dealt with it before me? >> >> Best, >> >> Timofey >> >> _______________________________________________ >> 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 jmax.red at gmail.com Fri Nov 25 11:29:18 2016 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Fri, 25 Nov 2016 17:29:18 +0100 Subject: [vtkusers] Adding points at the begining of a polyline In-Reply-To: References: Message-ID: Hello, Thanks for your response. I just replaced i by pid in lines lines.InsertCellPoint(i); firstPointId = i; // Newly insterted point is new line head point to make it work. Thanks again. You help me a lot. Regards jMax 2016-11-22 14:54 GMT+01:00 Joachim Pouderoux : > Hello, > > You are right, vtkCellArray allows to append data but not insert in sense > of shifting data. > Here you are building a set of segments so there is no need to shift > anything (but you can do you manually by creating new arrays if you want). > Append your points and append your cells, the order does no matter, just > remember what is first point (resp. last point to appending). > > int firstPointId = 0; // Initial start point > System.out.println("Prepending"); > for (int i = 1; i < 10; i++) { > try { > Thread.sleep(100); > } catch (InterruptedException e) { > e.printStackTrace(); > } > double[] prev_pt = points.GetPoint(0); > double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); > double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); > double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); > > int pid = points.InsertNextPoint(new_x, new_y, new_z); > points.Modified(); > > lines.InsertNextCell(2); > lines.InsertCellPoint(firstPointId); > lines.InsertCellPoint(i); > firstPointId = i; // Newly insterted point is new line head point > lines.Modified(); > canvas.repaint(); > } > > Hope it helps. > > Best regards, > > *Joachim Pouderoux*, PhD > > *Technical Expert - Scientific Computing Team* > *Kitware SAS * > > > 2016-11-10 9:36 GMT-04:00 Jean-Max Redonnet : > >> Hi ! First, I would like to thanks people who works on VTK. This is a >> great piece of software, very fast, very efficient ! >> >> I'm currently working on a viewer that is supposed to display dynamically >> the polylines calculated by my algorithms. To do that, I relied on this >> post : >> http://public.kitware.com/pipermail/vtkusers/2010-July/061781.html >> >> This works fine to append points to the polyline, but due to my >> algorithms, I need also to prepend points at the beginning of the polyline. >> I can't figure out how to do that. Any help would be gracefully appreciated. >> >> jMax >> >> === >> Here is my test code. The first loop works fine, but the second one is a >> mess. >> >> package vtktest; >> >> import java.awt.BorderLayout; >> >> public class PolyLineTest extends JFrame { >> private static final long serialVersionUID = 1L; >> >> static { >> if (!vtkNativeLibrary.LoadAllNativeLibraries()) { >> } >> vtkNativeLibrary.DisableOutputWindow(null); >> } >> >> private Random random = new Random(); >> private vtkRenderWindowPanel canvas; >> private vtkRenderer renderer; >> private vtkRenderWindowInteractor iren; >> private JPanel mainPanel; >> >> public static void main(String[] args) { >> new PolyLineTest(); >> } >> >> public PolyLineTest() { >> this.canvas = new vtkRenderWindowPanel(); >> this.renderer = canvas.GetRenderer(); >> this.iren = canvas.getRenderWindowInteractor(); >> this.setTitle("VTK Test"); >> >> // First we'll create an initial point to build on >> vtkPoints points = new vtkPoints(); >> points.InsertPoint(0, 0.0, 0.0, 0.0); >> >> // The cell array can be thought of as a connectivity list. Here >> we >> // specify the number of points followed by that number of point >> // ids. This can be repeated as many times as there are >> primitives in >> // the list. >> // This first one is just a point to connect to as we add more >> points >> vtkCellArray lines = new vtkCellArray(); >> lines.InsertNextCell(1); // number of points >> lines.InsertCellPoint(0); >> >> vtkPolyData track = new vtkPolyData(); >> track.SetPoints(points); >> track.SetLines(lines); >> >> vtkPolyDataMapper mapper = new vtkPolyDataMapper(); >> mapper.SetInputData(track); >> >> vtkActor actor = new vtkActor(); >> actor.SetMapper(mapper); >> actor.GetProperty().SetColor(0.3800, 0.7000, 0.1600); >> >> renderer.AddActor(actor); >> renderer.ResetCamera(); >> >> this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); >> >> mainPanel = new JPanel(); >> mainPanel.setLayout(new BorderLayout()); >> mainPanel.add(canvas, BorderLayout.CENTER); >> >> this.getContentPane().add(mainPanel); >> this.setSize(800, 800); >> this.setLocationRelativeTo(null); // Center on desktop >> >> this.setVisible(true); >> >> // Loop to add points to line >> System.out.println("Appending"); >> for (int i = 1; i < 10; i++) { >> try { >> Thread.sleep(500); >> } catch (InterruptedException e) { >> e.printStackTrace(); >> } >> double[] prev_pt = points.GetPoint(i - 1); >> double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); >> double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); >> double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); >> >> // Insert the new point >> // then tell VTK that the data has been modified so the >> Render() >> // call will update the view with the new data >> points.InsertPoint(i, new_x, new_y, new_z); >> points.Modified(); >> >> // To get lines we need a beginning and end point in the >> // connectivity list, >> // then again tell VTK that the data has been modified >> lines.InsertNextCell(2); >> lines.InsertCellPoint(i - 1); >> lines.InsertCellPoint(i); >> lines.Modified(); >> canvas.repaint(); >> } >> >> System.out.println("Prepending"); >> for (int i = 1; i < 10; i++) { >> try { >> Thread.sleep(100); >> } catch (InterruptedException e) { >> e.printStackTrace(); >> } >> double[] prev_pt = points.GetPoint(0); >> double new_x = prev_pt[0] + (2.0 * random.nextDouble() - 1.0); >> double new_y = prev_pt[1] + (2.0 * random.nextDouble() - 1.0); >> double new_z = prev_pt[2] + (2.0 * random.nextDouble() - 1.0); >> >> points.InsertPoint(0, new_x, new_y, new_z); >> points.Modified(); >> >> lines.InsertNextCell(2); >> lines.UpdateCellCount (2); >> lines.InsertCellPoint(0); >> lines.InsertCellPoint(1); >> lines.Modified(); >> canvas.repaint(); >> } >> } >> } >> >> _______________________________________________ >> 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 kevinrdixon at gmail.com Fri Nov 25 11:54:23 2016 From: kevinrdixon at gmail.com (Kevin Dixon) Date: Fri, 25 Nov 2016 16:54:23 +0000 Subject: [vtkusers] HeaderTest failures Message-ID: I've been able to successfully build VTK 7.0.0 from source with BUILD_TESTING set to ON. However, unmodified a number of the HeaderTests fail: 1 - vtkCommonCore-HeaderTest (Failed) 8 - vtkCommonExecutionModel-HeaderTest (Failed) 9 - vtkFiltersCore-HeaderTest (Failed) 11 - vtkFiltersGeneral-HeaderTest (Failed) 17 - vtkFiltersGeometry-HeaderTest (Failed) 19 - vtkRenderingCore-HeaderTest (Failed) 31 - vtkRenderingOpenGL2-HeaderTest (Failed) 38 - vtkInteractionStyle-HeaderTest (Failed) 40 - vtkRenderingAnnotation-HeaderTest (Failed) 42 - vtkInteractionWidgets-HeaderTest (Failed) 270 - vtkRenderingVolumeOpenGL2-HeaderTest (Failed) 312 - vtkFiltersFlowPaths-HeaderTest (Failed) 489 - vtkIOExodus-HeaderTest (Failed) Example of one of the test output in detail: Start 1: vtkCommonCore-HeaderTest 1: Test command: /usr/bin/python "/Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Testing/Core/HeaderTesting.py" "/Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core" "VTKCOMMONCORE_EXPORT" 1: Test timeout computed to be: 1500 1: Use export macro: VTKCOMMONCORE_EXPORT 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/vtkMinimalStandardRandomSequence.h has broken type macro(s): 1: 41: vtkTypeMacro(vtkMinimalStandardRandomSequence,vtkRandomSequence); 1: Should be: , vtkRandomSequence)MinimalStandardRandomSequence 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/vtkMinimalStandardRandomSequence.h does not define copy constructor 1: Should be: &); // Not implementedardRandomSequence 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/vtkMinimalStandardRandomSequence.h does not define assignment operator 1: Should be: &); // Not implementedt vtkMinimalStandardRandomSequence 1: 1: There were errors: 1: * Broken type macro 1: * No private copy constructor 1: * No private assignment operator 1/1 Test #1: vtkCommonCore-HeaderTest .........***Failed 0.64 sec >From what I can see, these are code stylistic checks via the 'HeaderTesting.py' script. Any idea why these are failing out-of-the-box without modification? -------------- next part -------------- An HTML attachment was scrubbed... URL: From saimahesh.m at panaceamedical.com Sat Nov 26 03:49:19 2016 From: saimahesh.m at panaceamedical.com (M B Sai Mahesh) Date: Sat, 26 Nov 2016 08:49:19 +0000 Subject: [vtkusers] Highlight a contoured portion of Volume. Message-ID: <20161126084919.566c0942@PMT-SER-2.panaceamedical.com> Hi all, I am new to vtk. Iam using vtk and Qt for the cbct application where 3D Volume is renedered using VTK. I want to segment the volume based on the freehand curves drawn on axial slices by the user. At present I am collecting the values inside the curve for each slice and stacking them together to form a volume. Is there an efficient way of doing this without creating copies of the volume data. any examples or suggestions? *********************************************************************************** KINDLY NOTE WE HAVE SHIFTED OUR HEAD OFFICE TO THE NEW ADDRESS LISTED BELOW EFFECTIVE FROM 14th NOVEMBER 2016 *********************************************************************************** PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #116, 4th Floor, Shailendra Techno Park, Road No 3, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From f_magician at mac.com Sun Nov 27 10:39:13 2016 From: f_magician at mac.com (Magician) Date: Mon, 28 Nov 2016 00:39:13 +0900 Subject: [vtkusers] vtk.vtkDistributedDataFilter() not works In-Reply-To: <1C21FF27-6B83-4CD1-9577-D72E1B2A0092@mac.com> References: <1C21FF27-6B83-4CD1-9577-D72E1B2A0092@mac.com> Message-ID: Does anyone use the vtkDistributedDataFilter? > On Nov 19, 2016, at 18:16, Magician wrote: > > Hi all, > > > I posted the message about partitioning datasets. > > > > I still trying vtk.vtkDistributedDataFilter(), but the exported data aren?t partitioned. > My VTK version is 7.1.0 (pvpython with ParaView 5.2.0 RC3) and executing on 2 CPUs. > > Here is the sample code: > > import vtk > > source = vtk.vtkPointSource() > source.SetCenter((0.0, 0.0, 0.0)) > source.SetNumberOfPoints(1000000) > source.SetRadius(1.0) > source.Update() > > d3 = vtk.vtkDistributedDataFilter() > d3.SetInputData(source.GetOutput()) > d3.SetBoundaryMode(0) > d3.Update() > > writer = vtk.vtkXMLPUnstructuredGridWriter() > writer.SetInputData(d3.GetOutput()) > writer.SetFileName(?test.pvtu?) > writer.SetNumberOfPieces(2) > writer.WriteSummaryFileOn() > writer.SetStartPiece(0) > writer.SetEndPiece(1) > writer.Write() > How to partition data? > > > Magician -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sun Nov 27 11:39:03 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 27 Nov 2016 16:39:03 +0000 (UTC) Subject: [vtkusers] I'm pleased to announce VTKAda version 7.1.0 free edition release 27/11/2016 References: <1147109700.2146513.1480264743409.ref@mail.yahoo.com> Message-ID: <1147109700.2146513.1480264743409@mail.yahoo.com> VTKAda is Ada-2012 ?port to VTK (Visualization Toolkit by Kitware, Inc) and Qt5 application and UI framework by NokiaVTK version 7.1.0, Qt version 5.7.0(5.8.0beta) open source and vtkc.dll,vtkc2.dll,qt5c.dll(libvtkc.so,libvtkc2.so,libqt5c.so) were built with Microsoft Visual Studio 2015 ?in Windows (WIN32)and gcc ?in Linux ?x86-64Package was tested with gnat gpl 2012 ada compiler in Windows 10 ?64bit,Debian 8.3 x86-64 As a role ADA is used in embeded systems, but with VTKADA(+QTADA) you can build any desktop applications with?powerful 2D/3D rendering and imaging (games, animations, emulations) GUI, Database connection, server/client, Internet browsing and many others thinks. VTKADA you can be used without QTADA subsystem? Qt5Ada and VTKAda for Windows, Linux (Unix) is available fromhttps://drive.google.com/folderview?id=0B2QuZLoe-yiPbmNQRl83M1dTRVE&usp=sharing (google drive. It can be mounted as virtual drive or directory or viewed with Web Browser)? -------------- next part -------------- An HTML attachment was scrubbed... URL: From 128 at gmx.us Sun Nov 27 12:53:38 2016 From: 128 at gmx.us (128 at gmx.us) Date: Sun, 27 Nov 2016 18:53:38 +0100 Subject: [vtkusers] vtm file reader and writer Message-ID: Hi, Is there an API in C++/Python, to read and write *.vtm multiblock files? Ideally I expect this to be there in the VTK library. If not, it should at least be there in Paraview. Thank you. From 128 at gmx.us Sun Nov 27 14:27:04 2016 From: 128 at gmx.us (128 at gmx.us) Date: Sun, 27 Nov 2016 20:27:04 +0100 Subject: [vtkusers] vtm file reader and writer Message-ID: vtkXMLMultiBlockDataWriter can be used for this > Sent: Sunday, November 27, 2016 at 6:53 PM > From: 128 at gmx.us > To: vtkusers at vtk.org > Subject: [vtkusers] vtm file reader and writer > > Hi, > > Is there an API in C++/Python, to read and write *.vtm multiblock files? > > Ideally I expect this to be there in the VTK library. If not, it should at least be there in Paraview. > > 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 > From cory.quammen at kitware.com Sun Nov 27 16:19:17 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 27 Nov 2016 16:19:17 -0500 Subject: [vtkusers] vtk.vtkDistributedDataFilter() not works In-Reply-To: References: <1C21FF27-6B83-4CD1-9577-D72E1B2A0092@mac.com> Message-ID: I think you need to run your script in parallel with MPI for the partitioning to work. See [1] for an example of how to use this filter. Hope that helps, Cory [1] http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Parallel/Testing/Cxx/DistributedData.cxx On Sun, Nov 27, 2016 at 10:39 AM, Magician wrote: > Does anyone use the vtkDistributedDataFilter? > > > On Nov 19, 2016, at 18:16, Magician wrote: > > Hi all, > > > I posted the message about partitioning datasets. > > > I still trying vtk.vtkDistributedDataFilter(), but the exported data aren?t > partitioned. > My VTK version is 7.1.0 (pvpython with ParaView 5.2.0 RC3) and executing on > 2 CPUs. > > Here is the sample code: > > import vtk > > source = vtk.vtkPointSource() > source.SetCenter((0.0, 0.0, 0.0)) > source.SetNumberOfPoints(1000000) > source.SetRadius(1.0) > source.Update() > > d3 = vtk.vtkDistributedDataFilter() > d3.SetInputData(source.GetOutput()) > d3.SetBoundaryMode(0) > d3.Update() > > writer = vtk.vtkXMLPUnstructuredGridWriter() > writer.SetInputData(d3.GetOutput()) > writer.SetFileName(?test.pvtu?) > writer.SetNumberOfPieces(2) > writer.WriteSummaryFileOn() > writer.SetStartPiece(0) > writer.SetEndPiece(1) > writer.Write() > > How to partition data? > > > Magician > > > > _______________________________________________ > 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 128 at gmx.us Mon Nov 28 02:24:57 2016 From: 128 at gmx.us (128 at gmx.us) Date: Mon, 28 Nov 2016 08:24:57 +0100 Subject: [vtkusers] dynamically allocate vtkpointer Message-ID: Hi, How can I create a dynamically allocated vtk pointer. For example, vtkSmartPointer block[3] = vtkSmartPointer::New(); can create a size 3 array of vtkUnstructuredGrid pointers. How can I dyncamically allocate this? Thank you. From 128 at gmx.us Mon Nov 28 02:43:11 2016 From: 128 at gmx.us (128 at gmx.us) Date: Mon, 28 Nov 2016 08:43:11 +0100 Subject: [vtkusers] dynamically allocate vtkpointer In-Reply-To: References: Message-ID: got it vtkSmartPointer *block = new vtkSmartPointer [3]; block[0]=vtkSmartPointer::New(); block[1]=vtkSmartPointer::New(); block[2]=vtkSmartPointer::New(); > Sent: Monday, November 28, 2016 at 8:24 AM > From: 128 at gmx.us > To: vtkusers at vtk.org > Subject: [vtkusers] dynamically allocate vtkpointer > > Hi, > > How can I create a dynamically allocated vtk pointer. For example, > > vtkSmartPointer block[3] = vtkSmartPointer::New(); > > can create a size 3 array of vtkUnstructuredGrid pointers. How can I dyncamically allocate this? > > 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 > From kevinrdixon at gmail.com Mon Nov 28 05:50:36 2016 From: kevinrdixon at gmail.com (Kevin Dixon) Date: Mon, 28 Nov 2016 10:50:36 +0000 Subject: [vtkusers] HeaderTest failures In-Reply-To: References: Message-ID: Found the issue - these tests run just fine when the Python executable is 3.x. When Python 2.x is used they fail because the Python script HeaderTesting.py fails to strip newlines/carriage returns from the class names parsed from the headers. Simple fix is to alter the script to strip out control characters. Issue raised: https://gitlab.kitware.com/vtk/vtk/issues/16922 On 25 November 2016 at 16:54, Kevin Dixon wrote: > I've been able to successfully build VTK 7.0.0 from source with > BUILD_TESTING set to ON. However, unmodified a number of the HeaderTests > fail: > > 1 - vtkCommonCore-HeaderTest (Failed) > > 8 - vtkCommonExecutionModel-HeaderTest (Failed) > > 9 - vtkFiltersCore-HeaderTest (Failed) > > 11 - vtkFiltersGeneral-HeaderTest (Failed) > > 17 - vtkFiltersGeometry-HeaderTest (Failed) > > 19 - vtkRenderingCore-HeaderTest (Failed) > > 31 - vtkRenderingOpenGL2-HeaderTest (Failed) > > 38 - vtkInteractionStyle-HeaderTest (Failed) > > 40 - vtkRenderingAnnotation-HeaderTest (Failed) > > 42 - vtkInteractionWidgets-HeaderTest (Failed) > > 270 - vtkRenderingVolumeOpenGL2-HeaderTest (Failed) > > 312 - vtkFiltersFlowPaths-HeaderTest (Failed) > > 489 - vtkIOExodus-HeaderTest (Failed) > > > Example of one of the test output in detail: > > > Start 1: vtkCommonCore-HeaderTest > > 1: Test command: /usr/bin/python "/Users/kevin/dev/prj/lms/ > soup/vtk-7.0.0/Testing/Core/HeaderTesting.py" "/Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core" > "VTKCOMMONCORE_EXPORT" > > 1: Test timeout computed to be: 1500 > > 1: Use export macro: VTKCOMMONCORE_EXPORT > > 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/ > vtkMinimalStandardRandomSequence.h has broken type macro(s): > > 1: 41: vtkTypeMacro(vtkMinimalStandardRandomSequen > ce,vtkRandomSequence); > > 1: Should be: > > , vtkRandomSequence)MinimalStandardRandomSequence > > 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/ > vtkMinimalStandardRandomSequence.h does not define copy constructor > > 1: Should be: > > &); // Not implementedardRandomSequence > > 1: File: /Users/kevin/dev/prj/lms/soup/vtk-7.0.0/Common/Core/ > vtkMinimalStandardRandomSequence.h does not define assignment operator > > 1: Should be: > > &); // Not implementedt vtkMinimalStandardRandomSequence > > 1: > > 1: There were errors: > > 1: * Broken type macro > > 1: * No private copy constructor > > 1: * No private assignment operator > > 1/1 Test #1: vtkCommonCore-HeaderTest .........***Failed 0.64 sec > > > From what I can see, these are code stylistic checks via the > 'HeaderTesting.py' script. > > Any idea why these are failing out-of-the-box without modification? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saimahesh.m at panaceamedical.com Mon Nov 28 06:07:18 2016 From: saimahesh.m at panaceamedical.com (M B Sai Mahesh) Date: Mon, 28 Nov 2016 11:07:18 +0000 Subject: [vtkusers] Highlight a contoured portion of Volume. Message-ID: <20161128110718.6139214f@PMT-SER-2.panaceamedical.com> Hi all, I am new to vtk. Iam using vtk and Qt for the cbct application where 3D Volume is renedered using VTK. I want to segment the volume based on the freehand curves drawn on axial slices by the user. At present I am collecting the values inside the curve for each slice and stacking them together to form a volume. Is there an efficient way of doing this without creating copies of the volume data. any examples or suggestions? *********************************************************************************** KINDLY NOTE WE HAVE SHIFTED OUR HEAD OFFICE TO THE NEW ADDRESS LISTED BELOW EFFECTIVE FROM 14th NOVEMBER 2016 *********************************************************************************** PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #116, 4th Floor, Shailendra Techno Park, Road No 3, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From andrea.gavana at gmail.com Mon Nov 28 07:35:13 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Mon, 28 Nov 2016 13:35:13 +0100 Subject: [vtkusers] VTK pipeline & rendering strategies Message-ID: Dear All, I am working with some stuff coming out of CFD simulations, and in the current work the simulator produces a 3D grid (unstructured grid made of hexahedrons). The full grid is about 4 million cells, but due to other settings in the simulator the number of "active" cells in the simulation ends up being "only" 270,000. In order to visualize all this, I create a vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the "inactive" cells and then use a vtkDataSetMapper to visualize the resulting active grid: vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor However, the rendering speed for the 270,000 cells grid is quite low - it takes about one second to display a new property by using SetScalars on the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on the output of vtkThreshold to try and speed up the rendering. So, the current visualization strategy I have implemented is the following: vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> vtkPolyDataMapper --> vtkActor This is still as slow as my first approach, and I also have a couple of questions - which stems from my ignorance in VTK things: 1. When I load (from the simulator outputs) a new property (cell-based) and I assign its values to the original vtkUnstructuredGrid (by using SetScalars on it), do all the filters (vtkThreshold and vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing the active/inactive cells nor the geometry of the grid, only assigning different scalars. And, if yes, is there any way to tell the pipeline: "look, I've only changed the scalars, there's no need to re-run all the thresholds and surface filters *again*"? 2. Is there any other pipeline style or visualization technique in VTK or any settings whatsoever that could bring down the rendering time (memory is not that much of a concern)? Basically, what I have a the moment - in terms of timing - is as follows: Reading data from simulator: 0.042 seconds Create VTK array with data : 0.002 seconds Call to SetScalars : 0.000 seconds Create Lookup Table : 0.001 seconds Render on screen : about 1 second Thank you in advance for any suggestion, my apologies for the long message. Andrea. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Nov 28 09:40:00 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 28 Nov 2016 09:40:00 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Responses inline. Mostly though, make sure you are using the "OpenGL2" rendering backend, which is the default for 7.0 and 7.1. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana wrote: > Dear All, > > I am working with some stuff coming out of CFD simulations, and in > the current work the simulator produces a 3D grid (unstructured grid made > of hexahedrons). The full grid is about 4 million cells, but due to other > settings in the simulator the number of "active" cells in the simulation > ends up being "only" 270,000. In order to visualize all this, I create a > vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the > "inactive" cells and then use a vtkDataSetMapper to visualize the resulting > active grid: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > However, the rendering speed for the 270,000 cells grid is quite low - it > takes about one second to display a new property by using SetScalars on the > output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on > the output of vtkThreshold to try and speed up the rendering. So, the > current visualization strategy I have implemented is the following: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> > vtkPolyDataMapper --> vtkActor > > This is still as slow as my first approach, and I also have a couple of > questions - which stems from my ignorance in VTK things: > > DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper when given something other than PolyData, so not surprising that it isn't faster. > 1. When I load (from the simulator outputs) a new property (cell-based) > and I assign its values to the original vtkUnstructuredGrid (by using > SetScalars on it), do all the filters (vtkThreshold and > vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing > the active/inactive cells nor the geometry of the grid, only assigning > different scalars. And, if yes, is there any way to tell the pipeline: > "look, I've only changed the scalars, there's no need to re-run all the > thresholds and surface filters *again*"? > > Yes they do, since the Executive classes' Modified time tracking is not fine grained enough to know the difference, and few if any of the filters would know how to update just the changed portions. > 2. Is there any other pipeline style or visualization technique in VTK or > any settings whatsoever that could bring down the rendering time (memory is > not that much of a concern)? Basically, what I have a the moment - in terms > of timing - is as follows: > > Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to hundreds of times faster than the Legacy fixed function "OpenGL" backend. > Reading data from simulator: 0.042 seconds > Create VTK array with data : 0.002 seconds > Call to SetScalars : 0.000 seconds > Create Lookup Table : 0.001 seconds > Render on screen : about 1 second > > > Thank you in advance for any suggestion, my apologies for the long message. > > Andrea. > > _______________________________________________ > 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 andrea.gavana at gmail.com Mon Nov 28 10:12:58 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Mon, 28 Nov 2016 16:12:58 +0100 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi David, thank you for your answer. I will put some more comments inline too. Any insight or suggestion is more than welcome. On 28 November 2016 at 15:40, David E DeMarle wrote: > Responses inline. Mostly though, make sure you are using the "OpenGL2" > rendering backend, which is the default for 7.0 and 7.1. > I am using VTK 7.0 through the Python bindings (the official ones from the Kitware website here: http://www.vtk.org/download/ So I was assuming that the rendering backend was already OpenGL2... is there any way to check if this is really the case? Also, I have tried to load my dataset in ParaView, and ParaView seems to be doing some kind of black magic on my vtkUnstructuredGrid as I get these kind of messages when I load the vtk file: Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO support. The algorithm may produce visual artifacts. Which, I believe, is telling me that ParaView is not doing what I am doing but maybe using some kind of volume-based rendering - when I rotate the grid the (almost cube-shaped) cells becomes subdivided in small triangles, when I stop interacting with them they go back to their normal appearance. It would be nice to know what ParaView is doing though, and also what "FBO support" means :-). I also noticed that ParaView is slightly faster in changing the displayed property - maybe 2 or 3 times faster than my bare-bone script. On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana > wrote: > >> Dear All, >> >> I am working with some stuff coming out of CFD simulations, and in >> the current work the simulator produces a 3D grid (unstructured grid made >> of hexahedrons). The full grid is about 4 million cells, but due to other >> settings in the simulator the number of "active" cells in the simulation >> ends up being "only" 270,000. In order to visualize all this, I create a >> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >> active grid: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >> >> However, the rendering speed for the 270,000 cells grid is quite low - it >> takes about one second to display a new property by using SetScalars on the >> output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on >> the output of vtkThreshold to try and speed up the rendering. So, the >> current visualization strategy I have implemented is the following: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >> vtkPolyDataMapper --> vtkActor >> >> This is still as slow as my first approach, and I also have a couple of >> questions - which stems from my ignorance in VTK things: >> >> > DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper > when given something other than PolyData, so not surprising that it isn't > faster. > > >> 1. When I load (from the simulator outputs) a new property (cell-based) >> and I assign its values to the original vtkUnstructuredGrid (by using >> SetScalars on it), do all the filters (vtkThreshold and >> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >> the active/inactive cells nor the geometry of the grid, only assigning >> different scalars. And, if yes, is there any way to tell the pipeline: >> "look, I've only changed the scalars, there's no need to re-run all the >> thresholds and surface filters *again*"? >> >> > Yes they do, since the Executive classes' Modified time tracking is not > fine grained enough to know the difference, and few if any of the filters > would know how to update just the changed portions. > > >> 2. Is there any other pipeline style or visualization technique in VTK or >> any settings whatsoever that could bring down the rendering time (memory is >> not that much of a concern)? Basically, what I have a the moment - in terms >> of timing - is as follows: >> >> > Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to > hundreds of times faster than the Legacy fixed function "OpenGL" backend. > > >> Reading data from simulator: 0.042 seconds >> Create VTK array with data : 0.002 seconds >> Call to SetScalars : 0.000 seconds >> Create Lookup Table : 0.001 seconds >> Render on screen : about 1 second >> >> >> Thank you in advance for any suggestion, my apologies for the long >> message. >> >> Andrea. >> >> _______________________________________________ >> 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 mjordan at live.at Mon Nov 28 11:16:18 2016 From: mjordan at live.at (M. Jordan) Date: Mon, 28 Nov 2016 16:16:18 +0000 Subject: [vtkusers] restrict polydata to area of other polydata Message-ID: I have a polydata consisting out of many little unconnected pieces. I would like to get a resulting polydata just containing pieces which are inside of another big (connected) polydata. How can I do this? Is there a filter for it? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Mon Nov 28 11:44:00 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 28 Nov 2016 11:44:00 -0500 Subject: [vtkusers] building VTK 7.1.0 on MSYS2: undefined references In-Reply-To: <5b7f6ad8-5793-6148-f755-e1741e43e5ed@emmenlauer.de> References: <5b7f6ad8-5793-6148-f755-e1741e43e5ed@emmenlauer.de> Message-ID: According to Common/DataModel/module.cmake, vtkCommonDataModel already has a dependency on vtkCommonCore inside of VTK. Everything should be linked already. Hmm. It's likely that the mingw support needs some love. I don't think we have any customers that rely on it at the moment, but maybe someone can pick it up. On Fri, Nov 25, 2016 at 4:23 AM, Mario Emmenlauer wrote: > > Dear All, > > I've reported this issue already here: https://gitlab.kitware.com/ > vtk/vtk/issues/16916 > But I hope somebody here on the mailing list might be knowledgeable about > how to add > linker dependencies inside VTK? > > When building VTK 7.1.0 I get an error about an undefined reference on > MSYS2. Everything > works fine on Linux. The error on MSYS2 is: > > CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj): > vtkDataSetAttributes.cxx:(.text+0x4a7c): undefined reference to > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj): > vtkDataSetAttributes.cxx:(.text+0x4a92): undefined reference to > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > > I think its required that vtkCommonDataModel links against vtkCommonCore? > I do not > know how to achieve this. I've tried various combinations to add the > dependency to > Common/DataModel/CMakeLists.txt but without success. How is this done > correctly? > > Cheers, > > Mario > _______________________________________________ > 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 Nov 28 11:38:53 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 28 Nov 2016 11:38:53 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: +1 to what other Dave said. I'd also point out that you can simply add all of the potential scalars you'd like to use to the point/cell/field data as named arrays, and then use the vtkMapper::SelectColorArray method to select the property to use for visualization. This way, the threshold/DSSF pipeline would only execute once and will produce a dataset with all of the property arrays filtered to just the active set. Changing the visible scalars at the mapper level will not cause the pipeline to re-execute. On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana wrote: > Dear All, > > I am working with some stuff coming out of CFD simulations, and in > the current work the simulator produces a 3D grid (unstructured grid made > of hexahedrons). The full grid is about 4 million cells, but due to other > settings in the simulator the number of "active" cells in the simulation > ends up being "only" 270,000. In order to visualize all this, I create a > vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the > "inactive" cells and then use a vtkDataSetMapper to visualize the resulting > active grid: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > However, the rendering speed for the 270,000 cells grid is quite low - it > takes about one second to display a new property by using SetScalars on the > output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on > the output of vtkThreshold to try and speed up the rendering. So, the > current visualization strategy I have implemented is the following: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> > vtkPolyDataMapper --> vtkActor > > This is still as slow as my first approach, and I also have a couple of > questions - which stems from my ignorance in VTK things: > > 1. When I load (from the simulator outputs) a new property (cell-based) > and I assign its values to the original vtkUnstructuredGrid (by using > SetScalars on it), do all the filters (vtkThreshold and > vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing > the active/inactive cells nor the geometry of the grid, only assigning > different scalars. And, if yes, is there any way to tell the pipeline: > "look, I've only changed the scalars, there's no need to re-run all the > thresholds and surface filters *again*"? > > 2. Is there any other pipeline style or visualization technique in VTK or > any settings whatsoever that could bring down the rendering time (memory is > not that much of a concern)? Basically, what I have a the moment - in terms > of timing - is as follows: > > Reading data from simulator: 0.042 seconds > Create VTK array with data : 0.002 seconds > Call to SetScalars : 0.000 seconds > Create Lookup Table : 0.001 seconds > Render on screen : about 1 second > > > Thank you in advance for any suggestion, my apologies for the long message. > > Andrea. > > _______________________________________________ > 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 Nov 28 11:31:31 2016 From: david.lonie at kitware.com (David Lonie) Date: Mon, 28 Nov 2016 11:31:31 -0500 Subject: [vtkusers] announce: 7.1.0 is cooked, out of the oven, and ready for carving In-Reply-To: <20161124162626.510817897@mail.rogue-research.com> References: <20161124162626.510817897@mail.rogue-research.com> Message-ID: On Thu, Nov 24, 2016 at 11:26 AM, Sean McBride wrote: > On Wed, 23 Nov 2016 10:21:17 -0700, David E DeMarle said: > > >Read all about it here: > >https://blog.kitware.com/vtk-7-1-0/ > > Are there any screenshots of this vtkBillboardTextActor3D out there? > Sounds like it could be useful for us... > Well, not any *nice* ones.... ;) Here's the output of the test for it. It's sort ugly, but it shows that the text is rendered at a fixed size (on the display) and pixel aligned while still being embedded in the 3D scene and mixed with other geometry. Let me know if you have questions about it / what it does and I'll be happy to clear anything up. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestBillboardTextActor3D.png Type: image/png Size: 77891 bytes Desc: not available URL: From andrea.gavana at gmail.com Mon Nov 28 12:26:53 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Mon, 28 Nov 2016 17:26:53 +0000 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi David, I wish I could do that. The CFD simulator spits out result files that are easily tens of GB of data, and clearly I can't load all that stuff inside my tool at once. The simulator itself produces smaller "support" output files that only contain "pointers" to where the results are stored in the big output files (pointers in the file.seek sense). Andrea. On Mon, 28 Nov 2016 at 17:39, David Lonie wrote: > +1 to what other Dave said. I'd also point out that you can simply add all > of the potential scalars you'd like to use to the point/cell/field data as > named arrays, and then use the vtkMapper::SelectColorArray method to select > the property to use for visualization. > > This way, the threshold/DSSF pipeline would only execute once and will > produce a dataset with all of the property arrays filtered to just the > active set. Changing the visible scalars at the mapper level will not cause > the pipeline to re-execute. > > On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana > wrote: > > Dear All, > > I am working with some stuff coming out of CFD simulations, and in > the current work the simulator produces a 3D grid (unstructured grid made > of hexahedrons). The full grid is about 4 million cells, but due to other > settings in the simulator the number of "active" cells in the simulation > ends up being "only" 270,000. In order to visualize all this, I create a > vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the > "inactive" cells and then use a vtkDataSetMapper to visualize the resulting > active grid: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > However, the rendering speed for the 270,000 cells grid is quite low - it > takes about one second to display a new property by using SetScalars on the > output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on > the output of vtkThreshold to try and speed up the rendering. So, the > current visualization strategy I have implemented is the following: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> > vtkPolyDataMapper --> vtkActor > > This is still as slow as my first approach, and I also have a couple of > questions - which stems from my ignorance in VTK things: > > 1. When I load (from the simulator outputs) a new property (cell-based) > and I assign its values to the original vtkUnstructuredGrid (by using > SetScalars on it), do all the filters (vtkThreshold and > vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing > the active/inactive cells nor the geometry of the grid, only assigning > different scalars. And, if yes, is there any way to tell the pipeline: > "look, I've only changed the scalars, there's no need to re-run all the > thresholds and surface filters *again*"? > > 2. Is there any other pipeline style or visualization technique in VTK or > any settings whatsoever that could bring down the rendering time (memory is > not that much of a concern)? Basically, what I have a the moment - in terms > of timing - is as follows: > > Reading data from simulator: 0.042 seconds > Create VTK array with data : 0.002 seconds > Call to SetScalars : 0.000 seconds > Create Lookup Table : 0.001 seconds > Render on screen : about 1 second > > > Thank you in advance for any suggestion, my apologies for the long message. > > Andrea. > > _______________________________________________ > 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 mario at emmenlauer.de Mon Nov 28 15:45:18 2016 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Mon, 28 Nov 2016 21:45:18 +0100 Subject: [vtkusers] building VTK 7.1.0 on MSYS2: undefined references In-Reply-To: References: <5b7f6ad8-5793-6148-f755-e1741e43e5ed@emmenlauer.de> Message-ID: <9c3d57d5-ea39-f361-2c77-ea9619210d2b@emmenlauer.de> Thanks David for the reply. Its a bit strange because 7.0.0 worked fine, so it must be something introduced in 7.1.0. I can also see the text definition of the missing symbol in vtkCommonCore, so it must be the missing linker command. Could you tell me how the dependency is defined in VTK? I would be curious to learn the build system a bit. Cheers, Mario On 28.11.2016 17:44, David Lonie wrote: > According to Common/DataModel/module.cmake, vtkCommonDataModel already has a > dependency on vtkCommonCore inside of VTK. Everything should be linked already. Hmm. > > It's likely that the mingw support needs some love. I don't think we have any > customers that rely on it at the moment, but maybe someone can pick it up. > > On Fri, Nov 25, 2016 at 4:23 AM, Mario Emmenlauer > wrote: > > > Dear All, > > I've reported this issue already here: > https://gitlab.kitware.com/vtk/vtk/issues/16916 > > But I hope somebody here on the mailing list might be knowledgeable about > how to add > linker dependencies inside VTK? > > When building VTK 7.1.0 I get an error about an undefined reference on > MSYS2. Everything > works fine on Linux. The error on MSYS2 is: > > CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a7c): > undefined reference to > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > CMakeFiles/vtkCommonDataModel.dir/objects.a(vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a92): > undefined reference to > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > > I think its required that vtkCommonDataModel links against vtkCommonCore? I > do not > know how to achieve this. I've tried various combinations to add the > dependency to > Common/DataModel/CMakeLists.txt but without success. How is this done correctly? > > Cheers, > > Mario > _______________________________________________ > 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 > > > 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 bill.lorensen at gmail.com Mon Nov 28 15:46:43 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 28 Nov 2016 15:46:43 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Here is a half-baked idea (that I have not tested). And I may have completely misunderstood your problem... You can delay the application of the scalars until after DataSetSurfaceFilter. That filter has an option to pass the original cell and/or point ids. So after an update to the DataSetToSufaceFilter, create your scalars and populate the new points with the scalars at the original point id. It should be pretty fast since you will only be settng scalar values at surface points and not interior points. How many triangles are produced by DataSetToSufaceFilter? From meow at mat.uni.torun.pl Mon Nov 28 17:56:33 2016 From: meow at mat.uni.torun.pl (meow_fiz) Date: Mon, 28 Nov 2016 15:56:33 -0700 (MST) Subject: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update Message-ID: <1480373793774-5741322.post@n5.nabble.com> For a long time I've used vtkGPUVolumeRayCastMapper in vtk 6.3 (OpenGL 1.x). I could change interactively volume mask voxel values set by: volMapper->SetMaskInput (myMask); Now when i switched to VTK 7.1RC & OpenGL2 I can't make any modifications to volume mask interactively. Calling Update(), Modified() on every element of the pipeline (volume, input data, mask input, mapper) does not affect visual result. The only way I can get the updated mask volume is to call: Renderer->RemoveVolume(Volume); Renderer->AddVolume(Volume); Is there any way that I could force volume mask update for vtkGPUVolumeRayCastMapper ? Regards, Michal -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkGPUVolumeRayCastMapper-OpenGL2-Mask-Input-update-tp5741322.html Sent from the VTK - Users mailing list archive at Nabble.com. From ed1996 at gmail.com Mon Nov 28 20:56:51 2016 From: ed1996 at gmail.com (EdwardWang) Date: Mon, 28 Nov 2016 18:56:51 -0700 (MST) Subject: [vtkusers] Rectangular Prism Registration Using Iterative Closest Point Message-ID: <1480384611632-5741323.post@n5.nabble.com> Hi all, I am trying to register two rectangular prism polygon meshes using vtk's ICP implementation. One is created using vtkCubeSource, and the other is an imported STL file. The dimensions are very similar, although not identical. In most cases, the results are as expected; the two rectangular prisms overlaid over each other. However, in some cases, the the models are overlaid perpendicular to each other (see attached image). Any thoughts as to what's causing this, and if it's possible to fix? I am working in Slicer3d. Thank you, Edward -- View this message in context: http://vtk.1045678.n5.nabble.com/Rectangular-Prism-Registration-Using-Iterative-Closest-Point-tp5741323.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Nov 29 00:08:02 2016 From: jothybasu at gmail.com (Jothybasu Selvaraj) Date: Tue, 29 Nov 2016 16:08:02 +1100 Subject: [vtkusers] Memory leak in vtkImageReslice Message-ID: Hi Guys I am reslicing an image at several location continuously. Every time I slice the image with the below code the memory increases. I only thing I am skeptical about is reslice->SetInputData(this->ImageData); Should this be SetInputConnection(this->ImageData.TakeReference()). But this doesn't seem to work. this->ImageSlice is instantiated int he constructor of the slicing class as vtkSmartPointerNew(); Any hints? // Extract a slice in the desired orientation vtkSmartPointerreslice = vtkSmartPointer::New(); reslice->SetInputData(this->ImageData); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToCubic(); reslice->Update(); // Create a greyscale lookup table vtkSmartPointer table = vtkSmartPointer::New(); table->SetRange(this->WindowLow,this->WindowUp); // image intensity range table->SetValueRange(0.0,1.0); // from black to white table->SetSaturationRange(0,0); // no color saturation table->SetRampToSCurve(); table->Build(); // Map the image through the lookup table vtkSmartPointer color = vtkSmartPointer::New(); color->SetLookupTable(table); color->SetInputConnection(reslice->GetOutputPort()); color->Update(); this->ImageSlice->GetMapper()->SetInputConnection(color->GetOutputPort()); Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.gavana at gmail.com Tue Nov 29 00:21:47 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Tue, 29 Nov 2016 05:21:47 +0000 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi Bill, Thank you for your answer. I think I may try something like that, although I am more interested in cells rather than points. As in many problems in CFD, the cell scalars are the important part in the visualization, and ignite were for me I could easily obliterate the points - their only function is to define the cell boundaries, I'm not using them for anything. vtkDataSetSurfaceFilter may not be a good idea anymore - as mentioned by David. In any case, if I have to loop through all the cells and setting their scalars based on the original cell ID it's going to be slow. Python is not famous for the speed of its for loops :-) . But beside the filters, I'm still puzzled by the actual call to Render that is taking up so much time. And the grid I have is not particularly big by industry standards, some grids can easily go up to millions of cells. Andrea. On Mon, 28 Nov 2016 at 21:46, Bill Lorensen wrote: > Here is a half-baked idea (that I have not tested). And I may have > completely misunderstood your problem... > > You can delay the application of the scalars until after > DataSetSurfaceFilter. That filter has an option to pass the original > cell and/or point ids. So after an update to the > DataSetToSufaceFilter, create your scalars and populate the new points > with the scalars at the original point id. It should be pretty fast > since you will only be settng scalar values at surface points and not > interior points. How many triangles are produced by > DataSetToSufaceFilter? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gerald.Lodron at joanneum.at Tue Nov 29 02:18:29 2016 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Tue, 29 Nov 2016 07:18:29 +0000 Subject: [vtkusers] Correct choice of data type Message-ID: Hello What would be the correct data type for a ordered Point Cloud like data from a 3D range sensor. Would it be a Rectilinear Grid? Currently I use vtkPolydata but this data is not ordered as on images. Is it possible to specify "nodata" values in that datatype? When I set values in vtkPolydata to QNan I get crashes.... PS: I want to use the data set in paraview.... Best regards, gerald ------------------------------------------------------------------------------------ Gerald Lodron Researcher of Machine Vision Applications Group DIGITAL - Institute for Information and Communication Technologies JOANNEUM RESEARCH Forschungsgesellschaft mbH Steyrergasse 17, 8010 Graz, AUSTRIA phone: +43-316-876-1751 general fax: +43-316-876-1751 web: http://www.joanneum.at/digital e-mail: gerald.lodron at joanneum.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.gavana at gmail.com Tue Nov 29 03:39:09 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Tue, 29 Nov 2016 09:39:09 +0100 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Dear All, On 28 November 2016 at 16:12, Andrea Gavana wrote: > Hi David, > > thank you for your answer. I will put some more comments inline too. > Any insight or suggestion is more than welcome. > > On 28 November 2016 at 15:40, David E DeMarle wrote: > >> Responses inline. Mostly though, make sure you are using the "OpenGL2" >> rendering backend, which is the default for 7.0 and 7.1. >> > > > I am using VTK 7.0 through the Python bindings (the official ones from the > Kitware website here: > > http://www.vtk.org/download/ > > > So I was assuming that the rendering backend was already OpenGL2... is > there any way to check if this is really the case? > > Also, I have tried to load my dataset in ParaView, and ParaView seems to > be doing some kind of black magic on my vtkUnstructuredGrid as I get these > kind of messages when I load the vtk file: > > Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ > vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 > > vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO > support. The algorithm may produce visual artifacts. > > > > > Which, I believe, is telling me that ParaView is not doing what I am doing > but maybe using some kind of volume-based rendering - when I rotate the > grid the (almost cube-shaped) cells becomes subdivided in small triangles, > when I stop interacting with them they go back to their normal appearance. > It would be nice to know what ParaView is doing though, and also what "FBO > support" means :-). I also noticed that ParaView is slightly faster in > changing the displayed property - maybe 2 or 3 times faster than my > bare-bone script. > > > Just to add some more information: it is true that ParaView is faster in the re-rendering when I switch to another property, but it also shows heavy visual artifacts (i.e., cells with multiple colors in them?!? - see attached screenshot). So, if I understood it correctly, ParaView uses some kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask it to... should it not use the default vtkDataSetMapper?). Based on my original pipeline: vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor I have tried everything I know to speed up the re-rendering of the grid, I actually operate directly on the output of vtkThreshold (that is still a vtkUnstructuredGrid), so I simply throw away the original grid. With and without ImmediateModeRendering, with and without backface culling. My best improvements so far took the rendering time from 1.04 seconds to 0.94 seconds... so not much of an improvement :-) . I am of course open to any suggestions anyone may have on the rendering part - assuming that my geometry is fixed (it is not, but I'll worry about that later...), basically only on the process: vtkUnstructuredGrid.SetScalars(my_data) vtkUnstructuredGrid.Modified() vtkRenderWindow.Render() And of course - if there are other visualization strategies I may use, please shout :-) Thank you. Andrea. > > > On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >> wrote: >> >>> Dear All, >>> >>> I am working with some stuff coming out of CFD simulations, and in >>> the current work the simulator produces a 3D grid (unstructured grid made >>> of hexahedrons). The full grid is about 4 million cells, but due to other >>> settings in the simulator the number of "active" cells in the simulation >>> ends up being "only" 270,000. In order to visualize all this, I create a >>> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >>> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >>> active grid: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>> >>> However, the rendering speed for the 270,000 cells grid is quite low - >>> it takes about one second to display a new property by using SetScalars on >>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>> on the output of vtkThreshold to try and speed up the rendering. So, the >>> current visualization strategy I have implemented is the following: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>> vtkPolyDataMapper --> vtkActor >>> >>> This is still as slow as my first approach, and I also have a couple of >>> questions - which stems from my ignorance in VTK things: >>> >>> >> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >> when given something other than PolyData, so not surprising that it isn't >> faster. >> >> >>> 1. When I load (from the simulator outputs) a new property (cell-based) >>> and I assign its values to the original vtkUnstructuredGrid (by using >>> SetScalars on it), do all the filters (vtkThreshold and >>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>> the active/inactive cells nor the geometry of the grid, only assigning >>> different scalars. And, if yes, is there any way to tell the pipeline: >>> "look, I've only changed the scalars, there's no need to re-run all the >>> thresholds and surface filters *again*"? >>> >>> >> Yes they do, since the Executive classes' Modified time tracking is not >> fine grained enough to know the difference, and few if any of the filters >> would know how to update just the changed portions. >> >> >>> 2. Is there any other pipeline style or visualization technique in VTK >>> or any settings whatsoever that could bring down the rendering time (memory >>> is not that much of a concern)? Basically, what I have a the moment - in >>> terms of timing - is as follows: >>> >>> >> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >> >> >>> Reading data from simulator: 0.042 seconds >>> Create VTK array with data : 0.002 seconds >>> Call to SetScalars : 0.000 seconds >>> Create Lookup Table : 0.001 seconds >>> Render on screen : about 1 second >>> >>> >>> Thank you in advance for any suggestion, my apologies for the long >>> message. >>> >>> Andrea. >>> >>> _______________________________________________ >>> 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: paraview_volume_ug.png Type: image/png Size: 13708 bytes Desc: not available URL: From lplavorante at gmail.com Tue Nov 29 06:57:44 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Tue, 29 Nov 2016 09:57:44 -0200 Subject: [vtkusers] vtkUnstructuredGrid and Gouraud Shading Message-ID: Hi vtkusers, how can I display a vtkUnstructuredGrid using Gouraud shading? I have seen two or three similar posts on the list but was unable to find any answer. I have an unstructured grid with ~50000 3D cells (Triquadratic Hexahedra). I need to extract its outer shape and visualize it with a smooth appearance. I verified that the method vtkActor::GetProperty()->SetInterpolationToGouraud() is of no avail on an actor built directly from the grid's vtkDataSetMapper. So I though I should convert the unstructured grid to a polygonal representation in order to compute normals on it using vtkPolyDataNormals. Here I have another doubt. I want to extract just the boundary faces from the unstructured grid (something I have successfully done using a vtkDataSetSurfaceFilter fed with a vtkStructuredGrid). Which is the proper pipeline I should follow? vtkUnstructuredGrid -> vtkDataSetSurfaceFilter -> vtkPolyDataNormals ? Is vtkDataSetSurfaceFilter able to extract only the boundary faces from an unstructured grid? Also, is the polygonal conversion strictly necessary? I ask this because this is probably computationally costly. Thank you in advance for any help, Luca -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Nov 29 09:20:08 2016 From: david.lonie at kitware.com (David Lonie) Date: Tue, 29 Nov 2016 09:20:08 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: On Tue, Nov 29, 2016 at 12:21 AM, Andrea Gavana wrote: > But beside the filters, I'm still puzzled by the actual call to Render > that is taking up so much time. And the grid I have is not particularly big > by industry standards, some grids can easily go up to millions of cells. > One thing that might explain the long render time is the delayed-execution model of the VTK pipeline in ParaView. The filters will not be executed until the renderer explicitly requests data during rendering, unless Update() is called on the filter beforehand. So you may be seeing the combined execution time of the filters and the renderer/mapper in your results. Try calling Update explicitly on the filters and time that to make sure you're measuring each filter's execution separately. Another thing that can slow down rendering is translucent geometry. Correctly composing translucent geometry requires rendering pieces in depth ordering, and this requires multiple passes through the data. The higher the 'depth complexity' of the scene, e.g. how many layer of geometry contribute to each pixel, the more geometry passes are required. HTH, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 29 09:33:31 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 09:33:31 -0500 Subject: [vtkusers] vtkUnstructuredGrid and Gouraud Shading In-Reply-To: References: Message-ID: You need normals for smooth shading. So yes, something like vtkUnstructuredGrid -> vtkGeometryFilter (with merging on) -> vtkPolyDataNormals Do you have to convert to polydata? Technically no, you could volume render the 3D cells using ProjectedTetrahedra but the most common approach is to extract some sort of polygonal surface and render that. On Tue, Nov 29, 2016 at 6:57 AM, Luca Pallozzi Lavorante < lplavorante at gmail.com> wrote: > Hi vtkusers, > > how can I display a vtkUnstructuredGrid using Gouraud shading? I have seen > two or three similar posts on the list but was unable to find any answer. > I have an unstructured grid with ~50000 3D cells (Triquadratic Hexahedra). > I need to extract its outer shape and visualize it with a smooth > appearance. I verified that the method vtkActor::GetProperty()->SetInterpolationToGouraud() > is of no avail on an actor built directly from the grid's vtkDataSetMapper. > So I though I should convert the unstructured grid to a polygonal > representation in order to compute normals on it using vtkPolyDataNormals. > Here I have another doubt. I want to extract just the boundary faces from > the unstructured grid (something I have successfully done using a > vtkDataSetSurfaceFilter fed with a vtkStructuredGrid). > Which is the proper pipeline I should follow? > vtkUnstructuredGrid -> vtkDataSetSurfaceFilter -> vtkPolyDataNormals ? > Is vtkDataSetSurfaceFilter able to extract only the boundary faces from an > unstructured grid? > Also, is the polygonal conversion strictly necessary? I ask this because > this is probably computationally costly. > > Thank you in advance for any help, > > Luca > > _______________________________________________ > 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 Tue Nov 29 09:42:36 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 09:42:36 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: When talking rendering times it is helpful to specify if you are talking first frame or subsequent frame times. As others have mentioned the first frame time can include executing the entire pipeline plus building a number of rendering structures etc. The subsequent render time is the time after all of that prep has been done and can be quite different. Knowing what time you are talking about helps us figure out what the issue could be. If you change the data then, you are back to a first frame time typically. 270K cells is trivially small from a subsequent frame render time perspective. Building those structures from a 4 million cell unstructured grid though I could see taking a second on the first frame. ala yourLastFilter->Update() // pipeline calc time renWin->Render() // first frame render time for (int i = 0; i < 500; i++) { // no data changes here renWin->Render(); // subsequent frame render time } On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana wrote: > Dear All, > > > On 28 November 2016 at 16:12, Andrea Gavana > wrote: > >> Hi David, >> >> thank you for your answer. I will put some more comments inline too. >> Any insight or suggestion is more than welcome. >> >> On 28 November 2016 at 15:40, David E DeMarle wrote: >> >>> Responses inline. Mostly though, make sure you are using the "OpenGL2" >>> rendering backend, which is the default for 7.0 and 7.1. >>> >> >> >> I am using VTK 7.0 through the Python bindings (the official ones from >> the Kitware website here: >> >> http://www.vtk.org/download/ >> >> >> So I was assuming that the rendering backend was already OpenGL2... is >> there any way to check if this is really the case? >> >> Also, I have tried to load my dataset in ParaView, and ParaView seems to >> be doing some kind of black magic on my vtkUnstructuredGrid as I get these >> kind of messages when I load the vtk file: >> >> Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ >> vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 >> >> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >> support. The algorithm may produce visual artifacts. >> >> >> >> >> Which, I believe, is telling me that ParaView is not doing what I am >> doing but maybe using some kind of volume-based rendering - when I rotate >> the grid the (almost cube-shaped) cells becomes subdivided in small >> triangles, when I stop interacting with them they go back to their normal >> appearance. It would be nice to know what ParaView is doing though, and >> also what "FBO support" means :-). I also noticed that ParaView is slightly >> faster in changing the displayed property - maybe 2 or 3 times faster than >> my bare-bone script. >> >> >> > > Just to add some more information: it is true that ParaView is faster in > the re-rendering when I switch to another property, but it also shows heavy > visual artifacts (i.e., cells with multiple colors in them?!? - see > attached screenshot). So, if I understood it correctly, ParaView uses some > kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask > it to... should it not use the default vtkDataSetMapper?). > > Based on my original pipeline: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > I have tried everything I know to speed up the re-rendering of the grid, I > actually operate directly on the output of vtkThreshold (that is still a > vtkUnstructuredGrid), so I simply throw away the original grid. With and > without ImmediateModeRendering, with and without backface culling. My best > improvements so far took the rendering time from 1.04 seconds to 0.94 > seconds... so not much of an improvement :-) . > > I am of course open to any suggestions anyone may have on the rendering > part - assuming that my geometry is fixed (it is not, but I'll worry about > that later...), basically only on the process: > > vtkUnstructuredGrid.SetScalars(my_data) > vtkUnstructuredGrid.Modified() > vtkRenderWindow.Render() > > And of course - if there are other visualization strategies I may use, > please shout :-) > > Thank you. > > Andrea. > > > > > > > >> >> >> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >>> wrote: >>> >>>> Dear All, >>>> >>>> I am working with some stuff coming out of CFD simulations, and in >>>> the current work the simulator produces a 3D grid (unstructured grid made >>>> of hexahedrons). The full grid is about 4 million cells, but due to other >>>> settings in the simulator the number of "active" cells in the simulation >>>> ends up being "only" 270,000. In order to visualize all this, I create a >>>> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >>>> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >>>> active grid: >>>> >>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>>> >>>> However, the rendering speed for the 270,000 cells grid is quite low - >>>> it takes about one second to display a new property by using SetScalars on >>>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>>> on the output of vtkThreshold to try and speed up the rendering. So, the >>>> current visualization strategy I have implemented is the following: >>>> >>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>>> vtkPolyDataMapper --> vtkActor >>>> >>>> This is still as slow as my first approach, and I also have a couple of >>>> questions - which stems from my ignorance in VTK things: >>>> >>>> >>> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >>> when given something other than PolyData, so not surprising that it isn't >>> faster. >>> >>> >>>> 1. When I load (from the simulator outputs) a new property (cell-based) >>>> and I assign its values to the original vtkUnstructuredGrid (by using >>>> SetScalars on it), do all the filters (vtkThreshold and >>>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>>> the active/inactive cells nor the geometry of the grid, only assigning >>>> different scalars. And, if yes, is there any way to tell the pipeline: >>>> "look, I've only changed the scalars, there's no need to re-run all the >>>> thresholds and surface filters *again*"? >>>> >>>> >>> Yes they do, since the Executive classes' Modified time tracking is not >>> fine grained enough to know the difference, and few if any of the filters >>> would know how to update just the changed portions. >>> >>> >>>> 2. Is there any other pipeline style or visualization technique in VTK >>>> or any settings whatsoever that could bring down the rendering time (memory >>>> is not that much of a concern)? Basically, what I have a the moment - in >>>> terms of timing - is as follows: >>>> >>>> >>> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >>> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >>> >>> >>>> Reading data from simulator: 0.042 seconds >>>> Create VTK array with data : 0.002 seconds >>>> Call to SetScalars : 0.000 seconds >>>> Create Lookup Table : 0.001 seconds >>>> Render on screen : about 1 second >>>> >>>> >>>> Thank you in advance for any suggestion, my apologies for the long >>>> message. >>>> >>>> Andrea. >>>> >>>> _______________________________________________ >>>> 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 > > -- 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 andrea.gavana at gmail.com Tue Nov 29 10:00:14 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Tue, 29 Nov 2016 16:00:14 +0100 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi Ken, On 29 November 2016 at 15:42, Ken Martin wrote: > When talking rendering times it is helpful to specify if you are talking > first frame or subsequent frame times. As others have mentioned the first > frame time can include executing the entire pipeline plus building a number > of rendering structures etc. The subsequent render time is the time after > all of that prep has been done and can be quite different. Knowing what > time you are talking about helps us figure out what the issue could be. If > you change the data then, you are back to a first frame time typically. > > 270K cells is trivially small from a subsequent frame render time > perspective. Building those structures from a 4 million cell unstructured > grid though I could see taking a second on the first frame. ala > > yourLastFilter->Update() // pipeline calc time > renWin->Render() // first frame render time > for (int i = 0; i < 500; i++) > { > // no data changes here > renWin->Render(); // subsequent frame render time > } > > > The timing are all taken after the first rendering. I have a little GUI with a VTK render window and a single button. Every time I press the button new data is randomly generated and I time the rendering only process, i.e.: grid.GetCellData().SetScalars(data) grid.Modified() renwin.Render() And I have a little rendering listener setup like this: renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): timeInSeconds = caller.GetLastRenderTimeInSeconds() fps = 1.0/timeInSeconds print timeInSeconds, fps However, I realized that the simulator outputs the grid with a lot of redundant information - i.e., duplicated points. So I did the following: clean = vtk.vtkExtractUnstructuredGrid() clean.SetInputData(grid.GetOutput()) clean.MergingOn() clean.CellClippingOn() clean.SetCellMinimum(0) clean.SetCellMaximum(nx*ny*nz) clean.Update() the "clean" grid contains far far far less points than the original one (as the coincident points have been merged), and the rendering is much faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the rendering engine to ignore the points (i.e., don't render the points, I only care about the cells...) that would be even better :-) . Thank you again for all your hints. Andrea. > > > > On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana > wrote: > >> Dear All, >> >> >> On 28 November 2016 at 16:12, Andrea Gavana >> wrote: >> >>> Hi David, >>> >>> thank you for your answer. I will put some more comments inline too. >>> Any insight or suggestion is more than welcome. >>> >>> On 28 November 2016 at 15:40, David E DeMarle wrote: >>> >>>> Responses inline. Mostly though, make sure you are using the "OpenGL2" >>>> rendering backend, which is the default for 7.0 and 7.1. >>>> >>> >>> >>> I am using VTK 7.0 through the Python bindings (the official ones from >>> the Kitware website here: >>> >>> http://www.vtk.org/download/ >>> >>> >>> So I was assuming that the rendering backend was already OpenGL2... is >>> there any way to check if this is really the case? >>> >>> Also, I have tried to load my dataset in ParaView, and ParaView seems to >>> be doing some kind of black magic on my vtkUnstructuredGrid as I get these >>> kind of messages when I load the vtk file: >>> >>> Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ >>> vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 >>> >>> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >>> support. The algorithm may produce visual artifacts. >>> >>> >>> >>> >>> Which, I believe, is telling me that ParaView is not doing what I am >>> doing but maybe using some kind of volume-based rendering - when I rotate >>> the grid the (almost cube-shaped) cells becomes subdivided in small >>> triangles, when I stop interacting with them they go back to their normal >>> appearance. It would be nice to know what ParaView is doing though, and >>> also what "FBO support" means :-). I also noticed that ParaView is slightly >>> faster in changing the displayed property - maybe 2 or 3 times faster than >>> my bare-bone script. >>> >>> >>> >> >> Just to add some more information: it is true that ParaView is faster in >> the re-rendering when I switch to another property, but it also shows heavy >> visual artifacts (i.e., cells with multiple colors in them?!? - see >> attached screenshot). So, if I understood it correctly, ParaView uses some >> kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask >> it to... should it not use the default vtkDataSetMapper?). >> >> Based on my original pipeline: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >> >> I have tried everything I know to speed up the re-rendering of the grid, >> I actually operate directly on the output of vtkThreshold (that is still a >> vtkUnstructuredGrid), so I simply throw away the original grid. With and >> without ImmediateModeRendering, with and without backface culling. My best >> improvements so far took the rendering time from 1.04 seconds to 0.94 >> seconds... so not much of an improvement :-) . >> >> I am of course open to any suggestions anyone may have on the rendering >> part - assuming that my geometry is fixed (it is not, but I'll worry about >> that later...), basically only on the process: >> >> vtkUnstructuredGrid.SetScalars(my_data) >> vtkUnstructuredGrid.Modified() >> vtkRenderWindow.Render() >> >> And of course - if there are other visualization strategies I may use, >> please shout :-) >> >> Thank you. >> >> Andrea. >> >> >> >> >> >> >> >>> >>> >>> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >>>> wrote: >>>> >>>>> Dear All, >>>>> >>>>> I am working with some stuff coming out of CFD simulations, and >>>>> in the current work the simulator produces a 3D grid (unstructured grid >>>>> made of hexahedrons). The full grid is about 4 million cells, but due to >>>>> other settings in the simulator the number of "active" cells in the >>>>> simulation ends up being "only" 270,000. In order to visualize all this, I >>>>> create a vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to >>>>> remove the "inactive" cells and then use a vtkDataSetMapper to visualize >>>>> the resulting active grid: >>>>> >>>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>>>> >>>>> However, the rendering speed for the 270,000 cells grid is quite low - >>>>> it takes about one second to display a new property by using SetScalars on >>>>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>>>> on the output of vtkThreshold to try and speed up the rendering. So, the >>>>> current visualization strategy I have implemented is the following: >>>>> >>>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>>>> vtkPolyDataMapper --> vtkActor >>>>> >>>>> This is still as slow as my first approach, and I also have a couple >>>>> of questions - which stems from my ignorance in VTK things: >>>>> >>>>> >>>> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >>>> when given something other than PolyData, so not surprising that it isn't >>>> faster. >>>> >>>> >>>>> 1. When I load (from the simulator outputs) a new property >>>>> (cell-based) and I assign its values to the original vtkUnstructuredGrid >>>>> (by using SetScalars on it), do all the filters (vtkThreshold and >>>>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>>>> the active/inactive cells nor the geometry of the grid, only assigning >>>>> different scalars. And, if yes, is there any way to tell the pipeline: >>>>> "look, I've only changed the scalars, there's no need to re-run all the >>>>> thresholds and surface filters *again*"? >>>>> >>>>> >>>> Yes they do, since the Executive classes' Modified time tracking is not >>>> fine grained enough to know the difference, and few if any of the filters >>>> would know how to update just the changed portions. >>>> >>>> >>>>> 2. Is there any other pipeline style or visualization technique in VTK >>>>> or any settings whatsoever that could bring down the rendering time (memory >>>>> is not that much of a concern)? Basically, what I have a the moment - in >>>>> terms of timing - is as follows: >>>>> >>>>> >>>> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >>>> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >>>> >>>> >>>>> Reading data from simulator: 0.042 seconds >>>>> Create VTK array with data : 0.002 seconds >>>>> Call to SetScalars : 0.000 seconds >>>>> Create Lookup Table : 0.001 seconds >>>>> Render on screen : about 1 second >>>>> >>>>> >>>>> Thank you in advance for any suggestion, my apologies for the long >>>>> message. >>>>> >>>>> Andrea. >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> > > > -- > 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 lplavorante at gmail.com Tue Nov 29 10:05:34 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Tue, 29 Nov 2016 13:05:34 -0200 Subject: [vtkusers] vtkUnstructuredGrid and Gouraud Shading In-Reply-To: References: Message-ID: Hi Ken, thank you very much for your reply. I will follow the suggested pipeline. Luca On Tue, Nov 29, 2016 at 12:33 PM, Ken Martin wrote: > You need normals for smooth shading. So yes, something like > > vtkUnstructuredGrid -> vtkGeometryFilter (with merging on) -> > vtkPolyDataNormals > > Do you have to convert to polydata? Technically no, you could volume > render the 3D cells using ProjectedTetrahedra but the most common approach > is to extract some sort of polygonal surface and render that. > > > > > > > On Tue, Nov 29, 2016 at 6:57 AM, Luca Pallozzi Lavorante < > lplavorante at gmail.com> wrote: > >> Hi vtkusers, >> >> how can I display a vtkUnstructuredGrid using Gouraud shading? I have >> seen two or three similar posts on the list but was unable to find any >> answer. >> I have an unstructured grid with ~50000 3D cells (Triquadratic >> Hexahedra). I need to extract its outer shape and visualize it with a >> smooth appearance. I verified that the method vtkActor::GetProperty()->SetInterpolationToGouraud() >> is of no avail on an actor built directly from the grid's vtkDataSetMapper. >> So I though I should convert the unstructured grid to a polygonal >> representation in order to compute normals on it using vtkPolyDataNormals. >> Here I have another doubt. I want to extract just the boundary faces from >> the unstructured grid (something I have successfully done using a >> vtkDataSetSurfaceFilter fed with a vtkStructuredGrid). >> Which is the proper pipeline I should follow? >> vtkUnstructuredGrid -> vtkDataSetSurfaceFilter -> vtkPolyDataNormals ? >> Is vtkDataSetSurfaceFilter able to extract only the boundary faces from >> an unstructured grid? >> Also, is the polygonal conversion strictly necessary? I ask this because >> this is probably computationally costly. >> >> Thank you in advance for any help, >> >> Luca >> >> _______________________________________________ >> 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 richard.j.brown at live.co.uk Tue Nov 29 10:23:53 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 29 Nov 2016 08:23:53 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: <1479810159854-5741259.post@n5.nabble.com> References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> Message-ID: <1480433033848-5741335.post@n5.nabble.com> No one? -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741335.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Tue Nov 29 10:29:51 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 29 Nov 2016 10:29:51 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: > On 28 November 2016 at 15:40, David E DeMarle wrote: > >> Responses inline. Mostly though, make sure you are using the "OpenGL2" >> rendering backend, which is the default for 7.0 and 7.1. >> > > > I am using VTK 7.0 through the Python bindings (the official ones from the > Kitware website here: > > http://www.vtk.org/download/ > > > So I was assuming that the rendering backend was already OpenGL2... is > there any way to check if this is really the case? > > The 7.x binaries were made with OpenGL2, so I'm extremely surprised at the poor rendering speed. In 7.0 not easily. If the package has a libvtkRenderingOpenGL2-7.0.1.dylib file in it, then it is OpenGL2. In 7.1 you can say: rw = vtk.vtkRenderWindow() print rw.GetRenderingBackend() > Also, I have tried to load my dataset in ParaView, and ParaView seems to > be doing some kind of black magic on my vtkUnstructuredGrid as I get these > kind of messages when I load the vtk file: > > Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ > vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 > > vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO > support. The algorithm may produce visual artifacts. > > > > > Which, I believe, is telling me that ParaView is not doing what I am doing > but maybe using some kind of volume-based rendering - when I rotate the > grid the (almost cube-shaped) cells becomes subdivided in small triangles, > when I stop interacting with them they go back to their normal appearance. > It would be nice to know what ParaView is doing though, and also what "FBO > support" means :-). I also noticed that ParaView is slightly faster in > changing the displayed property - maybe 2 or 3 times faster than my > bare-bone script. > > > The warning is saying that if you change from surface to volume rendering mode, you may run into trouble. ParaView makes a number of display pipelines behind the scenes that will become active only when change display types. Here it is complaining about one of them The subdivision you see is quadric clustering that paraview switches into when interacting with the camera. See LOD threshold in settings/preferences to turn it off. > > > On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >> wrote: >> >>> Dear All, >>> >>> I am working with some stuff coming out of CFD simulations, and in >>> the current work the simulator produces a 3D grid (unstructured grid made >>> of hexahedrons). The full grid is about 4 million cells, but due to other >>> settings in the simulator the number of "active" cells in the simulation >>> ends up being "only" 270,000. In order to visualize all this, I create a >>> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >>> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >>> active grid: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>> >>> However, the rendering speed for the 270,000 cells grid is quite low - >>> it takes about one second to display a new property by using SetScalars on >>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>> on the output of vtkThreshold to try and speed up the rendering. So, the >>> current visualization strategy I have implemented is the following: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>> vtkPolyDataMapper --> vtkActor >>> >>> This is still as slow as my first approach, and I also have a couple of >>> questions - which stems from my ignorance in VTK things: >>> >>> >> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >> when given something other than PolyData, so not surprising that it isn't >> faster. >> >> >>> 1. When I load (from the simulator outputs) a new property (cell-based) >>> and I assign its values to the original vtkUnstructuredGrid (by using >>> SetScalars on it), do all the filters (vtkThreshold and >>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>> the active/inactive cells nor the geometry of the grid, only assigning >>> different scalars. And, if yes, is there any way to tell the pipeline: >>> "look, I've only changed the scalars, there's no need to re-run all the >>> thresholds and surface filters *again*"? >>> >>> >> Yes they do, since the Executive classes' Modified time tracking is not >> fine grained enough to know the difference, and few if any of the filters >> would know how to update just the changed portions. >> >> >>> 2. Is there any other pipeline style or visualization technique in VTK >>> or any settings whatsoever that could bring down the rendering time (memory >>> is not that much of a concern)? Basically, what I have a the moment - in >>> terms of timing - is as follows: >>> >>> >> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >> >> >>> Reading data from simulator: 0.042 seconds >>> Create VTK array with data : 0.002 seconds >>> Call to SetScalars : 0.000 seconds >>> Create Lookup Table : 0.001 seconds >>> Render on screen : about 1 second >>> >>> >>> Thank you in advance for any suggestion, my apologies for the long >>> message. >>> >>> Andrea. >>> >>> _______________________________________________ >>> 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 ken.martin at kitware.com Tue Nov 29 10:37:12 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 10:37:12 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: > The timing are all taken after the first rendering. I have a little GUI > with a VTK render window and a single button. Every time I press the button > new data is randomly generated and I time the rendering only process, i.e.: > > VTK with OpenGL2 can render 500 million cells/second on a laptop GPU. If you are seeing performance significantly off from that and think you are using a GPU then something is wrong. To do timings do not rely on GetLastRenderTimeInSeconds but rather time a render loop like ala startTimer for (i = 0; i < 500; i++) { renWin->Render(); } endTimer print elapsedTime/500; > grid.GetCellData().SetScalars(data) > grid.Modified() > renwin.Render() > The render above is a first render, in that it is the first render after you modified your data. The entire pipeline has to be run then. You are probably timing how has the pipeline can be modified and recalaculated when you change your data. > And I have a little rendering listener setup like this: > > > renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) > > > def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): > > timeInSeconds = caller.GetLastRenderTimeInSeconds() > fps = 1.0/timeInSeconds > print timeInSeconds, fps > > > However, I realized that the simulator outputs the grid with a lot of > redundant information - i.e., duplicated points. So I did the following: > > clean = vtk.vtkExtractUnstructuredGrid() > clean.SetInputData(grid.GetOutput()) > clean.MergingOn() > clean.CellClippingOn() > > clean.SetCellMinimum(0) > clean.SetCellMaximum(nx*ny*nz) > clean.Update() > > > the "clean" grid contains far far far less points than the original one > (as the coincident points have been merged), and the rendering is much > faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the > rendering engine to ignore the points (i.e., don't render the points, I > only care about the cells...) that would be even better :-) . > > > Thank you again for all your hints. > > Andrea. > > > > > > > > >> >> >> >> On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana >> wrote: >> >>> Dear All, >>> >>> >>> On 28 November 2016 at 16:12, Andrea Gavana >>> wrote: >>> >>>> Hi David, >>>> >>>> thank you for your answer. I will put some more comments inline >>>> too. Any insight or suggestion is more than welcome. >>>> >>>> On 28 November 2016 at 15:40, David E DeMarle wrote: >>>> >>>>> Responses inline. Mostly though, make sure you are using the "OpenGL2" >>>>> rendering backend, which is the default for 7.0 and 7.1. >>>>> >>>> >>>> >>>> I am using VTK 7.0 through the Python bindings (the official ones from >>>> the Kitware website here: >>>> >>>> http://www.vtk.org/download/ >>>> >>>> >>>> So I was assuming that the rendering backend was already OpenGL2... is >>>> there any way to check if this is really the case? >>>> >>>> Also, I have tried to load my dataset in ParaView, and ParaView seems >>>> to be doing some kind of black magic on my vtkUnstructuredGrid as I get >>>> these kind of messages when I load the vtk file: >>>> >>>> Warning: In C:\bbd\df0abce0\source-paravie >>>> w\VTK\Rendering\VolumeOpenGL2\vtkOpenGLProjectedTetrahedraMapper.cxx, >>>> line 251 >>>> >>>> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >>>> support. The algorithm may produce visual artifacts. >>>> >>>> >>>> >>>> >>>> Which, I believe, is telling me that ParaView is not doing what I am >>>> doing but maybe using some kind of volume-based rendering - when I rotate >>>> the grid the (almost cube-shaped) cells becomes subdivided in small >>>> triangles, when I stop interacting with them they go back to their normal >>>> appearance. It would be nice to know what ParaView is doing though, and >>>> also what "FBO support" means :-). I also noticed that ParaView is slightly >>>> faster in changing the displayed property - maybe 2 or 3 times faster than >>>> my bare-bone script. >>>> >>>> >>>> >>> >>> Just to add some more information: it is true that ParaView is faster in >>> the re-rendering when I switch to another property, but it also shows heavy >>> visual artifacts (i.e., cells with multiple colors in them?!? - see >>> attached screenshot). So, if I understood it correctly, ParaView uses some >>> kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask >>> it to... should it not use the default vtkDataSetMapper?). >>> >>> Based on my original pipeline: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>> >>> I have tried everything I know to speed up the re-rendering of the grid, >>> I actually operate directly on the output of vtkThreshold (that is still a >>> vtkUnstructuredGrid), so I simply throw away the original grid. With and >>> without ImmediateModeRendering, with and without backface culling. My best >>> improvements so far took the rendering time from 1.04 seconds to 0.94 >>> seconds... so not much of an improvement :-) . >>> >>> I am of course open to any suggestions anyone may have on the rendering >>> part - assuming that my geometry is fixed (it is not, but I'll worry about >>> that later...), basically only on the process: >>> >>> vtkUnstructuredGrid.SetScalars(my_data) >>> vtkUnstructuredGrid.Modified() >>> vtkRenderWindow.Render() >>> >>> And of course - if there are other visualization strategies I may use, >>> please shout :-) >>> >>> Thank you. >>> >>> Andrea. >>> >>> >>> >>> >>> >>> >>> >>>> >>>> >>>> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >>>> > wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> I am working with some stuff coming out of CFD simulations, and >>>>>> in the current work the simulator produces a 3D grid (unstructured grid >>>>>> made of hexahedrons). The full grid is about 4 million cells, but due to >>>>>> other settings in the simulator the number of "active" cells in the >>>>>> simulation ends up being "only" 270,000. In order to visualize all this, I >>>>>> create a vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to >>>>>> remove the "inactive" cells and then use a vtkDataSetMapper to visualize >>>>>> the resulting active grid: >>>>>> >>>>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>>>>> >>>>>> However, the rendering speed for the 270,000 cells grid is quite low >>>>>> - it takes about one second to display a new property by using SetScalars >>>>>> on the output of vtkThreshold. So I thought of using a >>>>>> vtkDataSetSurfaceFilter on the output of vtkThreshold to try and speed up >>>>>> the rendering. So, the current visualization strategy I have implemented is >>>>>> the following: >>>>>> >>>>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>>>>> vtkPolyDataMapper --> vtkActor >>>>>> >>>>>> This is still as slow as my first approach, and I also have a couple >>>>>> of questions - which stems from my ignorance in VTK things: >>>>>> >>>>>> >>>>> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >>>>> when given something other than PolyData, so not surprising that it isn't >>>>> faster. >>>>> >>>>> >>>>>> 1. When I load (from the simulator outputs) a new property >>>>>> (cell-based) and I assign its values to the original vtkUnstructuredGrid >>>>>> (by using SetScalars on it), do all the filters (vtkThreshold and >>>>>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>>>>> the active/inactive cells nor the geometry of the grid, only assigning >>>>>> different scalars. And, if yes, is there any way to tell the pipeline: >>>>>> "look, I've only changed the scalars, there's no need to re-run all the >>>>>> thresholds and surface filters *again*"? >>>>>> >>>>>> >>>>> Yes they do, since the Executive classes' Modified time tracking is >>>>> not fine grained enough to know the difference, and few if any of the >>>>> filters would know how to update just the changed portions. >>>>> >>>>> >>>>>> 2. Is there any other pipeline style or visualization technique in >>>>>> VTK or any settings whatsoever that could bring down the rendering time >>>>>> (memory is not that much of a concern)? Basically, what I have a the moment >>>>>> - in terms of timing - is as follows: >>>>>> >>>>>> >>>>> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >>>>> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >>>>> >>>>> >>>>>> Reading data from simulator: 0.042 seconds >>>>>> Create VTK array with data : 0.002 seconds >>>>>> Call to SetScalars : 0.000 seconds >>>>>> Create Lookup Table : 0.001 seconds >>>>>> Render on screen : about 1 second >>>>>> >>>>>> >>>>>> Thank you in advance for any suggestion, my apologies for the long >>>>>> message. >>>>>> >>>>>> Andrea. >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>> >>> >> >> >> -- >> 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 bastiheerwald at live.de Tue Nov 29 10:32:43 2016 From: bastiheerwald at live.de (Sebastian Heerwald) Date: Tue, 29 Nov 2016 15:32:43 +0000 Subject: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive) Message-ID: Hello VTK team and users, I've been working with the latest trunk of VTK (7.1 rc2) and wanted to use the OpenVR Framework (with HTC Vive). This works great except for the volume rendering. Currently there is a view depended distortion within the volume rendering. If I look onto the volume rendering and move around it, there appear "refraction" lines. In front of this line the dataset is rendered correctly, and behind this line too. But onto that line the dataset gets distorted into another "orientation". So we have one orientation on the one side of the line and antoher orientation on the other side. This is bad because the eye cameras look from different positions onto this volume rendering and because this is view dependend we get non-matching stereo output. I've tried to track this down and I've seen, that the shader code for the GPURaycaster is independed from using standard rendering, stereo-anaglyph rendering and VR rendering. So it seems, that some transformations for this shader aren't set correctly. But I couldn't figure out which one. The one thing I could figure out is, that the ray which is used for raycasting, doesn't go into the right direction. If I assume a bounding box around the dataset which is used for volume rendering, the refraction lines seem to go along the edges of the bounding box cube. So I think there is a wrong transformation in this context. But currently I couldn't find any mistake there. I've tested everything with different volume data but it was always the same. My question is: Did anyone experience these issues? Has someone a fix for that or knows how to find a solution? Best Regards Sebastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 29 10:46:55 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 10:46:55 -0500 Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: <1480433033848-5741335.post@n5.nabble.com> References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> Message-ID: It looks like the vtkGDCM lib is not linking against vtkRenderingCore and vtkRenderingOpenGL based on your link errors. Did you check your gdcm link line to see if it is linking against those libs? On Tue, Nov 29, 2016 at 10:23 AM, mbcx9rb9 wrote: > No one? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/GDCM-installation-problem-openGL-tp5741192p5741335.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 richard.j.brown at live.co.uk Tue Nov 29 10:50:06 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 29 Nov 2016 08:50:06 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> Message-ID: <1480434606050-5741340.post@n5.nabble.com> Thanks for the reply, Ken, but what do you mean by "gdcm link line"? Is it one of the options in CMake? -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741340.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Tue Nov 29 10:56:14 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 10:56:14 -0500 Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: <1480434606050-5741340.post@n5.nabble.com> References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> <1480434606050-5741340.post@n5.nabble.com> Message-ID: Yes, make sure the target link libraries for GDCM include RenderingCore and RenderingOpenGL, if you are not familiar with CMake then maybe find the person who wrote the GDCM cmake files. Point me to the source tree and I might can tell you what to change. On Tue, Nov 29, 2016 at 10:50 AM, mbcx9rb9 wrote: > Thanks for the reply, Ken, but what do you mean by "gdcm link line"? Is it > one of the options in CMake? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/GDCM-installation-problem-openGL-tp5741192p5741340.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 andrea.gavana at gmail.com Tue Nov 29 11:01:51 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Tue, 29 Nov 2016 16:01:51 +0000 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi Ken, Thank you for your answer. So it seems to me that I should not call grid.Modified() if I only change the scalars? In my script there is almost no pipeline, I.e. I have: Grid --> Mapper --> Actor No filters, no updating, no nothing. I will try your loop example tomorrow from my work computer. Also, how can I know if the rendering engine is using the GPU? I have a fairly powerful machine at work, able to run commercial 3D visualization software (on a geological scale) with multi-million cells with no problem... Thank you again! Andrea. On Tue, 29 Nov 2016 at 16:37, Ken Martin wrote: > > The timing are all taken after the first rendering. I have a little GUI > with a VTK render window and a single button. Every time I press the button > new data is randomly generated and I time the rendering only process, i.e.: > > > VTK with OpenGL2 can render 500 million cells/second on a laptop GPU. If > you are seeing performance significantly off from that and think you are > using a GPU then something is wrong. To do timings do not rely on > GetLastRenderTimeInSeconds but rather time a render loop like ala > > startTimer > for (i = 0; i < 500; i++) > { > renWin->Render(); > } > endTimer > print elapsedTime/500; > > > > grid.GetCellData().SetScalars(data) > grid.Modified() > renwin.Render() > > > The render above is a first render, in that it is the first render after > you modified your data. The entire > pipeline has to be run then. You are probably timing how has the pipeline > can be modified and recalaculated when you change your data. > > > > And I have a little rendering listener setup like this: > > > renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) > > > def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): > > timeInSeconds = caller.GetLastRenderTimeInSeconds() > fps = 1.0/timeInSeconds > print timeInSeconds, fps > > > However, I realized that the simulator outputs the grid with a lot of > redundant information - i.e., duplicated points. So I did the following: > > clean = vtk.vtkExtractUnstructuredGrid() > clean.SetInputData(grid.GetOutput()) > clean.MergingOn() > clean.CellClippingOn() > > clean.SetCellMinimum(0) > clean.SetCellMaximum(nx*ny*nz) > clean.Update() > > > the "clean" grid contains far far far less points than the original one > (as the coincident points have been merged), and the rendering is much > faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the > rendering engine to ignore the points (i.e., don't render the points, I > only care about the cells...) that would be even better :-) . > > > Thank you again for all your hints. > > Andrea. > > > > > > > > > > > > On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana > wrote: > > Dear All, > > > On 28 November 2016 at 16:12, Andrea Gavana > wrote: > > Hi David, > > thank you for your answer. I will put some more comments inline too. > Any insight or suggestion is more than welcome. > > On 28 November 2016 at 15:40, David E DeMarle wrote: > > Responses inline. Mostly though, make sure you are using the "OpenGL2" > rendering backend, which is the default for 7.0 and 7.1. > > > > I am using VTK 7.0 through the Python bindings (the official ones from the > Kitware website here: > > http://www.vtk.org/download/ > > > So I was assuming that the rendering backend was already OpenGL2... is > there any way to check if this is really the case? > > Also, I have tried to load my dataset in ParaView, and ParaView seems to > be doing some kind of black magic on my vtkUnstructuredGrid as I get these > kind of messages when I load the vtk file: > > Warning: In > C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\vtkOpenGLProjectedTetrahedraMapper.cxx, > line 251 > > vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO > support. The algorithm may produce visual artifacts. > > > > > Which, I believe, is telling me that ParaView is not doing what I am doing > but maybe using some kind of volume-based rendering - when I rotate the > grid the (almost cube-shaped) cells becomes subdivided in small triangles, > when I stop interacting with them they go back to their normal appearance. > It would be nice to know what ParaView is doing though, and also what "FBO > support" means :-). I also noticed that ParaView is slightly faster in > changing the displayed property - maybe 2 or 3 times faster than my > bare-bone script. > > > > > Just to add some more information: it is true that ParaView is faster in > the re-rendering when I switch to another property, but it also shows heavy > visual artifacts (i.e., cells with multiple colors in them?!? - see > attached screenshot). So, if I understood it correctly, ParaView uses some > kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask > it to... should it not use the default vtkDataSetMapper?). > > Based on my original pipeline: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > I have tried everything I know to speed up the re-rendering of the grid, I > actually operate directly on the output of vtkThreshold (that is still a > vtkUnstructuredGrid), so I simply throw away the original grid. With and > without ImmediateModeRendering, with and without backface culling. My best > improvements so far took the rendering time from 1.04 seconds to 0.94 > seconds... so not much of an improvement :-) . > > I am of course open to any suggestions anyone may have on the rendering > part - assuming that my geometry is fixed (it is not, but I'll worry about > that later...), basically only on the process: > > vtkUnstructuredGrid.SetScalars(my_data) > vtkUnstructuredGrid.Modified() > vtkRenderWindow.Render() > > And of course - if there are other visualization strategies I may use, > please shout :-) > > Thank you. > > Andrea. > > > > > > > > > > On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana > wrote: > > Dear All, > > I am working with some stuff coming out of CFD simulations, and in > the current work the simulator produces a 3D grid (unstructured grid made > of hexahedrons). The full grid is about 4 million cells, but due to other > settings in the simulator the number of "active" cells in the simulation > ends up being "only" 270,000. In order to visualize all this, I create a > vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the > "inactive" cells and then use a vtkDataSetMapper to visualize the resulting > active grid: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor > > However, the rendering speed for the 270,000 cells grid is quite low - it > takes about one second to display a new property by using SetScalars on the > output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on > the output of vtkThreshold to try and speed up the rendering. So, the > current visualization strategy I have implemented is the following: > > vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> > vtkPolyDataMapper --> vtkActor > > This is still as slow as my first approach, and I also have a couple of > questions - which stems from my ignorance in VTK things: > > > DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper > when given something other than PolyData, so not surprising that it isn't > faster. > > > 1. When I load (from the simulator outputs) a new property (cell-based) > and I assign its values to the original vtkUnstructuredGrid (by using > SetScalars on it), do all the filters (vtkThreshold and > vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing > the active/inactive cells nor the geometry of the grid, only assigning > different scalars. And, if yes, is there any way to tell the pipeline: > "look, I've only changed the scalars, there's no need to re-run all the > thresholds and surface filters *again*"? > > > Yes they do, since the Executive classes' Modified time tracking is not > fine grained enough to know the difference, and few if any of the filters > would know how to update just the changed portions. > > > 2. Is there any other pipeline style or visualization technique in VTK or > any settings whatsoever that could bring down the rendering time (memory is > not that much of a concern)? Basically, what I have a the moment - in terms > of timing - is as follows: > > > Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to > hundreds of times faster than the Legacy fixed function "OpenGL" backend. > > > Reading data from simulator: 0.042 seconds > Create VTK array with data : 0.002 seconds > Call to SetScalars : 0.000 seconds > Create Lookup Table : 0.001 seconds > Render on screen : about 1 second > > > Thank you in advance for any suggestion, my apologies for the long message. > > Andrea. > > _______________________________________________ > 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 > > > > > -- > 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 cory.quammen at kitware.com Tue Nov 29 11:14:29 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 29 Nov 2016 11:14:29 -0500 Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> <1480434606050-5741340.post@n5.nabble.com> Message-ID: Looks like the GDCM CMakeLists.txt file is defined here: https://sourceforge.net/p/gdcm/gdcm/ci/v2.6.3/tree/Utilities/VTK/CMakeLists.txt It also looks like there were some updates in v2.6.6 that might fix this: https://sourceforge.net/p/gdcm/gdcm/ci/v2.6.6/tree/Utilities/VTK/CMakeLists.txt I'd try building GDCM 2.6.6 and see if you still run into problems. HTH, Cory On Tue, Nov 29, 2016 at 10:56 AM, Ken Martin wrote: > Yes, make sure the target link libraries for GDCM include RenderingCore and > RenderingOpenGL, if you are not familiar with CMake then maybe find the > person who wrote the GDCM cmake files. Point me to the source tree and I > might can tell you what to change. > > On Tue, Nov 29, 2016 at 10:50 AM, mbcx9rb9 > wrote: >> >> Thanks for the reply, Ken, but what do you mean by "gdcm link line"? Is it >> one of the options in CMake? >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741340.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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From ken.martin at kitware.com Tue Nov 29 11:16:38 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 29 Nov 2016 11:16:38 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: The ReportCapabilities() method on RenderWindow provides a lot of information. You can do something like renWin->Render(); const char *info = renWin->ReportCapabilities(); cerr << info; or some sort of message box that displays info. That should tell you what is being used for your rendering by VTK. If you are changing your data, then modified is fine, but then the first render after you change data will be slow because it is re executing the pipeline to account for the new data. So really the use case matters here. If you have a GUI pulldown with a few different scalar fields then a 0.25 second delay on the first render is a non issue. All renders after that first one (until you change the data again) will be super fast. If you are trying to make an animation loop where you change the data every frame then you either have to cache the data or deal with the delay. Simple caching of the data means creating a filter/mapper/actor for each timestep/scalarfield and just turning the visibility on for the one you currently want rendered, leaving the others off. After one time through the loop it should be fast assuming it fits in memory. Hope that helps! Ken On Tue, Nov 29, 2016 at 11:01 AM, Andrea Gavana wrote: > Hi Ken, > > Thank you for your answer. So it seems to me that I should not call > grid.Modified() if I only change the scalars? In my script there is almost > no pipeline, I.e. I have: > > Grid --> Mapper --> Actor > > No filters, no updating, no nothing. > > I will try your loop example tomorrow from my work computer. Also, how can > I know if the rendering engine is using the GPU? I have a fairly powerful > machine at work, able to run commercial 3D visualization software (on a > geological scale) with multi-million cells with no problem... > > Thank you again! > > Andrea. > > On Tue, 29 Nov 2016 at 16:37, Ken Martin wrote: > >> >> The timing are all taken after the first rendering. I have a little GUI >> with a VTK render window and a single button. Every time I press the button >> new data is randomly generated and I time the rendering only process, i.e.: >> >> >> VTK with OpenGL2 can render 500 million cells/second on a laptop GPU. If >> you are seeing performance significantly off from that and think you are >> using a GPU then something is wrong. To do timings do not rely on >> GetLastRenderTimeInSeconds but rather time a render loop like ala >> >> startTimer >> for (i = 0; i < 500; i++) >> { >> renWin->Render(); >> } >> endTimer >> print elapsedTime/500; >> >> >> >> grid.GetCellData().SetScalars(data) >> grid.Modified() >> renwin.Render() >> >> >> The render above is a first render, in that it is the first render after >> you modified your data. The entire >> pipeline has to be run then. You are probably timing how has the pipeline >> can be modified and recalaculated when you change your data. >> >> >> >> And I have a little rendering listener setup like this: >> >> >> renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) >> >> >> def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): >> >> timeInSeconds = caller.GetLastRenderTimeInSeconds() >> fps = 1.0/timeInSeconds >> print timeInSeconds, fps >> >> >> However, I realized that the simulator outputs the grid with a lot of >> redundant information - i.e., duplicated points. So I did the following: >> >> clean = vtk.vtkExtractUnstructuredGrid() >> clean.SetInputData(grid.GetOutput()) >> clean.MergingOn() >> clean.CellClippingOn() >> >> clean.SetCellMinimum(0) >> clean.SetCellMaximum(nx*ny*nz) >> clean.Update() >> >> >> the "clean" grid contains far far far less points than the original one >> (as the coincident points have been merged), and the rendering is much >> faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the >> rendering engine to ignore the points (i.e., don't render the points, I >> only care about the cells...) that would be even better :-) . >> >> >> Thank you again for all your hints. >> >> Andrea. >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana >> wrote: >> >> Dear All, >> >> >> On 28 November 2016 at 16:12, Andrea Gavana >> wrote: >> >> Hi David, >> >> thank you for your answer. I will put some more comments inline too. >> Any insight or suggestion is more than welcome. >> >> On 28 November 2016 at 15:40, David E DeMarle wrote: >> >> Responses inline. Mostly though, make sure you are using the "OpenGL2" >> rendering backend, which is the default for 7.0 and 7.1. >> >> >> >> I am using VTK 7.0 through the Python bindings (the official ones from >> the Kitware website here: >> >> http://www.vtk.org/download/ >> >> >> So I was assuming that the rendering backend was already OpenGL2... is >> there any way to check if this is really the case? >> >> Also, I have tried to load my dataset in ParaView, and ParaView seems to >> be doing some kind of black magic on my vtkUnstructuredGrid as I get these >> kind of messages when I load the vtk file: >> >> Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ >> vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 >> >> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >> support. The algorithm may produce visual artifacts. >> >> >> >> >> Which, I believe, is telling me that ParaView is not doing what I am >> doing but maybe using some kind of volume-based rendering - when I rotate >> the grid the (almost cube-shaped) cells becomes subdivided in small >> triangles, when I stop interacting with them they go back to their normal >> appearance. It would be nice to know what ParaView is doing though, and >> also what "FBO support" means :-). I also noticed that ParaView is slightly >> faster in changing the displayed property - maybe 2 or 3 times faster than >> my bare-bone script. >> >> >> >> >> Just to add some more information: it is true that ParaView is faster in >> the re-rendering when I switch to another property, but it also shows heavy >> visual artifacts (i.e., cells with multiple colors in them?!? - see >> attached screenshot). So, if I understood it correctly, ParaView uses some >> kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask >> it to... should it not use the default vtkDataSetMapper?). >> >> Based on my original pipeline: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >> >> I have tried everything I know to speed up the re-rendering of the grid, >> I actually operate directly on the output of vtkThreshold (that is still a >> vtkUnstructuredGrid), so I simply throw away the original grid. With and >> without ImmediateModeRendering, with and without backface culling. My best >> improvements so far took the rendering time from 1.04 seconds to 0.94 >> seconds... so not much of an improvement :-) . >> >> I am of course open to any suggestions anyone may have on the rendering >> part - assuming that my geometry is fixed (it is not, but I'll worry about >> that later...), basically only on the process: >> >> vtkUnstructuredGrid.SetScalars(my_data) >> vtkUnstructuredGrid.Modified() >> vtkRenderWindow.Render() >> >> And of course - if there are other visualization strategies I may use, >> please shout :-) >> >> Thank you. >> >> Andrea. >> >> >> >> >> >> >> >> >> >> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >> wrote: >> >> Dear All, >> >> I am working with some stuff coming out of CFD simulations, and in >> the current work the simulator produces a 3D grid (unstructured grid made >> of hexahedrons). The full grid is about 4 million cells, but due to other >> settings in the simulator the number of "active" cells in the simulation >> ends up being "only" 270,000. In order to visualize all this, I create a >> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >> active grid: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >> >> However, the rendering speed for the 270,000 cells grid is quite low - it >> takes about one second to display a new property by using SetScalars on the >> output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter on >> the output of vtkThreshold to try and speed up the rendering. So, the >> current visualization strategy I have implemented is the following: >> >> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >> vtkPolyDataMapper --> vtkActor >> >> This is still as slow as my first approach, and I also have a couple of >> questions - which stems from my ignorance in VTK things: >> >> >> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >> when given something other than PolyData, so not surprising that it isn't >> faster. >> >> >> 1. When I load (from the simulator outputs) a new property (cell-based) >> and I assign its values to the original vtkUnstructuredGrid (by using >> SetScalars on it), do all the filters (vtkThreshold and >> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >> the active/inactive cells nor the geometry of the grid, only assigning >> different scalars. And, if yes, is there any way to tell the pipeline: >> "look, I've only changed the scalars, there's no need to re-run all the >> thresholds and surface filters *again*"? >> >> >> Yes they do, since the Executive classes' Modified time tracking is not >> fine grained enough to know the difference, and few if any of the filters >> would know how to update just the changed portions. >> >> >> 2. Is there any other pipeline style or visualization technique in VTK or >> any settings whatsoever that could bring down the rendering time (memory is >> not that much of a concern)? Basically, what I have a the moment - in terms >> of timing - is as follows: >> >> >> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >> >> >> Reading data from simulator: 0.042 seconds >> Create VTK array with data : 0.002 seconds >> Call to SetScalars : 0.000 seconds >> Create Lookup Table : 0.001 seconds >> Render on screen : about 1 second >> >> >> Thank you in advance for any suggestion, my apologies for the long >> message. >> >> Andrea. >> >> _______________________________________________ >> 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 >> >> >> >> >> -- >> 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 richard.j.brown at live.co.uk Tue Nov 29 11:21:15 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 29 Nov 2016 09:21:15 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> <1480434606050-5741340.post@n5.nabble.com> Message-ID: <1480436475922-5741345.post@n5.nabble.com> Thanks for the help, guys. If I do: "git clone git://git.code.sf.net/p/gdcm/gdcm" will that clone 2.6.6? I'm not so good at GIT... -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741345.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Nov 29 11:29:09 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 29 Nov 2016 11:29:09 -0500 Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: <1480436475922-5741345.post@n5.nabble.com> References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> <1480434606050-5741340.post@n5.nabble.com> <1480436475922-5741345.post@n5.nabble.com> Message-ID: If you want 2.6.6, clone like you show above, then run git fetch --tags git checkout v2.6.6 You could also just download the source code if you are not comfortable with git: https://sourceforge.net/projects/gdcm/files/gdcm%202.x/GDCM%202.6.6/ For GDCM support, you might also try the project's mailing lists: https://sourceforge.net/p/gdcm/mailman/ - Cory On Tue, Nov 29, 2016 at 11:21 AM, mbcx9rb9 wrote: > Thanks for the help, guys. If I do: "git clone > git://git.code.sf.net/p/gdcm/gdcm" will that clone 2.6.6? I'm not so good at > GIT... > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741345.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 -- Cory Quammen Staff R&D Engineer Kitware, Inc. From alvaro.sanchez at kitware.com Tue Nov 29 11:39:50 2016 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Tue, 29 Nov 2016 11:39:50 -0500 Subject: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update In-Reply-To: <1480373793774-5741322.post@n5.nabble.com> References: <1480373793774-5741322.post@n5.nabble.com> Message-ID: Hi, there is a related patch [1] about to be merged, not sure if this would address this issue though, could you try it? I will try to reproduce the problem. Thanks. [1] https://gitlab.kitware.com/vtk/vtk/merge_requests/2196#note_201434 On Mon, Nov 28, 2016 at 5:56 PM, meow_fiz wrote: > For a long time I've used vtkGPUVolumeRayCastMapper in vtk 6.3 (OpenGL > 1.x). > I could change interactively volume mask voxel values set by: > > volMapper->SetMaskInput (myMask); > > > Now when i switched to VTK 7.1RC & OpenGL2 I can't make any modifications > to > volume mask interactively. Calling Update(), Modified() on every element of > the pipeline (volume, input data, mask input, mapper) does not affect > visual > result. > > The only way I can get the updated mask volume is to call: > > Renderer->RemoveVolume(Volume); > Renderer->AddVolume(Volume); > > Is there any way that I could force volume mask update for > vtkGPUVolumeRayCastMapper ? > > Regards, > Michal > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkGPUVolumeRayCastMapper-OpenGL2-Mask-Input-update-tp5741322.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 > -- 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 cp.vtk.user at googlemail.com Tue Nov 29 13:06:38 2016 From: cp.vtk.user at googlemail.com (C P) Date: Tue, 29 Nov 2016 19:06:38 +0100 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? Message-ID: Dear VTK users, Seems that the VTK developers have forgotten to add vtkParallelCoordinatesActor.cxx to the CMakeLists.txt file in the Rendering/Annotation folder. Without this one cannot use the class... And in general, it is extremely difficult to figure out which VTK module one should build in order to use certain classes. In other words, where is the VTK-module to VTK-class correspondence? How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. Best CP -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Nov 29 13:56:39 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 29 Nov 2016 13:56:39 -0500 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: I think vtkParallelCoordinatesActor was removed when me migrated to a modular VTK (6.x). I'll see if it can be added. Bill On Tue, Nov 29, 2016 at 1:06 PM, C P via vtkusers wrote: > Dear VTK users, > > Seems that the VTK developers have forgotten to add > vtkParallelCoordinatesActor.cxx to the CMakeLists.txt file in the > Rendering/Annotation folder. Without this one cannot use the class... > > And in general, it is extremely difficult to figure out which VTK module one > should build in order to use certain classes. In other words, where is the > VTK-module to VTK-class correspondence? > > How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. > > Best > CP > > > _______________________________________________ > 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 onlyjus at gmail.com Tue Nov 29 14:02:18 2016 From: onlyjus at gmail.com (Justin Weber) Date: Tue, 29 Nov 2016 14:02:18 -0500 Subject: [vtkusers] possible bug implicit + sampleFunction + contourFilter Message-ID: I am creating an implicit surface with vtkSphere, sampling with vtkSampleFunction, and finally contouring with vtkContourFilter. This all works fine. *The Problem*: If I go back and update the sample dimensions, I don't get what I would expect. If I double the sample dimensions, the extents seem to be cut in half. Am I not updating/clearing data correctly? See the sample images below: a) sampleDimensions(10, 10, 10) b) sampleDimensions(20, 20, 20) a) b) ? Attached is a complete example. environment: python 2.7 vtk 6.3.0 (installed via anaconda) Ubuntu Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 20.png Type: image/png Size: 13023 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 10.png Type: image/png Size: 29010 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: implicit_sphere_sample_bug.py Type: application/octet-stream Size: 1978 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Tue Nov 29 14:23:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 29 Nov 2016 20:23:06 +0100 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: 2016-11-29 19:06 GMT+01:00 C P via vtkusers : > Dear VTK users, > > Seems that the VTK developers have forgotten to add > vtkParallelCoordinatesActor.cxx to the CMakeLists.txt file in the > Rendering/Annotation folder. Without this one cannot use the class... > > And in general, it is extremely difficult to figure out which VTK module > one should build in order to use certain classes. In other words, where is > the VTK-module to VTK-class correspondence? > I don't know if there's a full list somewhere (would be really nice if the Doxygen output could be augmented somehow to include this..), but you can run the Utilities/Maintenance/WhatModules.py script from VTK against your sources, to find out the list of modules you need to link against based on what headers you are including. E.g: estan at newton:~/orexplore/VTK$ ./Utilities/Maintenance/WhatModulesVTK.py . Filters/Modeling/Testing/Cxx/TestRotationalExtrusion.cxx Modules and their dependencies: find_package(VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonTransforms vtkFiltersCore vtkFiltersGeneral vtkFiltersModeling vtkFiltersSources vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL vtkTestingCore vtkTestingRendering vtkkwiml ) Your application code includes 16 of 189 vtk modules. All modules referenced in the files: find_package(VTK COMPONENTS vtkCommonCore vtkFiltersCore vtkFiltersModeling vtkFiltersSources vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL vtkTestingCore vtkTestingRendering ) Your application code includes 9 of 189 vtk modules. Minimal set of modules: find_package(VTK COMPONENTS vtkFiltersModeling vtkFiltersSources vtkInteractionStyle vtkRenderingOpenGL vtkTestingRendering ) Your application code includes 5 of 189 vtk modules. estan at newton:~/orexplore/VTK$ It's the middle one of these three sets of modules that you probably wants to use (the one listed under "All modules referenced in the files:"). The script is not perfect, but has been a great help to me. Elvis > How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. > > Best > CP > > > > _______________________________________________ > 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 dave.demarle at kitware.com Tue Nov 29 15:43:19 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 29 Nov 2016 15:43:19 -0500 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: Submit bug reports (ideally after vetting in the mailing list as you've done) via https://gitlab.kitware.com/vtk/vtk/issues. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Nov 29, 2016 at 1:06 PM, C P via vtkusers wrote: > Dear VTK users, > > Seems that the VTK developers have forgotten to add > vtkParallelCoordinatesActor.cxx to the CMakeLists.txt file in the > Rendering/Annotation folder. Without this one cannot use the class... > > And in general, it is extremely difficult to figure out which VTK module > one should build in order to use certain classes. In other words, where is > the VTK-module to VTK-class correspondence? > > How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. > > Best > CP > > > > _______________________________________________ > 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 Tue Nov 29 15:58:58 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 29 Nov 2016 15:58:58 -0500 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: > I don't know if there's a full list somewhere (would be really nice if the > Doxygen output could be augmented somehow to include this..), At the bottom of each class's Doxygen page is the location of the file from which the Doxygen was generated. You can use this to identify the module to which a class belongs. E.g., for vtkCoordinate, the location listed is dox/Rendering/Core/vtkCoordinate.h Convert the "dox" to "vtk", remove the forward slashes, remove the header file name, and you'll get the module: vtkRenderingCore - Cory > but you can > run the Utilities/Maintenance/WhatModules.py script from VTK against your > sources, to find out the list of modules you need to link against based on > what headers you are including. > > E.g: > > estan at newton:~/orexplore/VTK$ ./Utilities/Maintenance/WhatModulesVTK.py . > Filters/Modeling/Testing/Cxx/TestRotationalExtrusion.cxx > Modules and their dependencies: > find_package(VTK COMPONENTS > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkCommonMath > vtkCommonMisc > vtkCommonTransforms > vtkFiltersCore > vtkFiltersGeneral > vtkFiltersModeling > vtkFiltersSources > vtkInteractionStyle > vtkRenderingCore > vtkRenderingOpenGL > vtkTestingCore > vtkTestingRendering > vtkkwiml > ) > Your application code includes 16 of 189 vtk modules. > > All modules referenced in the files: > find_package(VTK COMPONENTS > vtkCommonCore > vtkFiltersCore > vtkFiltersModeling > vtkFiltersSources > vtkInteractionStyle > vtkRenderingCore > vtkRenderingOpenGL > vtkTestingCore > vtkTestingRendering > ) > Your application code includes 9 of 189 vtk modules. > > Minimal set of modules: > find_package(VTK COMPONENTS > vtkFiltersModeling > vtkFiltersSources > vtkInteractionStyle > vtkRenderingOpenGL > vtkTestingRendering > ) > Your application code includes 5 of 189 vtk modules. > > > estan at newton:~/orexplore/VTK$ > > It's the middle one of these three sets of modules that you probably wants > to use (the one listed under "All modules referenced in the files:"). > > The script is not perfect, but has been a great help to me. > > Elvis > >> >> How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. >> >> Best >> CP >> >> >> _______________________________________________ >> 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 > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From sankhesh.jhaveri at kitware.com Tue Nov 29 23:40:06 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 30 Nov 2016 04:40:06 +0000 Subject: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update In-Reply-To: References: <1480373793774-5741322.post@n5.nabble.com> Message-ID: Hi, The patch that Alvaro mentioned should have fixed your masking issue. It has been merged into master. Please try the latest VTK master. Thanks, Sankhesh On Tue, Nov 29, 2016 at 11:39 AM Alvaro Sanchez wrote: > Hi, > > there is a related patch [1] about to be merged, not sure if this would > address this issue though, could you try it? I will try to reproduce the > problem. > > Thanks. > > [1] https://gitlab.kitware.com/vtk/vtk/merge_requests/2196#note_201434 > > On Mon, Nov 28, 2016 at 5:56 PM, meow_fiz wrote: > > For a long time I've used vtkGPUVolumeRayCastMapper in vtk 6.3 (OpenGL > 1.x). > I could change interactively volume mask voxel values set by: > > volMapper->SetMaskInput (myMask); > > > Now when i switched to VTK 7.1RC & OpenGL2 I can't make any modifications > to > volume mask interactively. Calling Update(), Modified() on every element of > the pipeline (volume, input data, mask input, mapper) does not affect > visual > result. > > The only way I can get the updated mask volume is to call: > > Renderer->RemoveVolume(Volume); > Renderer->AddVolume(Volume); > > Is there any way that I could force volume mask update for > vtkGPUVolumeRayCastMapper ? > > Regards, > Michal > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkGPUVolumeRayCastMapper-OpenGL2-Mask-Input-update-tp5741322.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 > > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 <(518)%20881-4901> > _______________________________________________ > 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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Wed Nov 30 00:57:01 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Wed, 30 Nov 2016 05:57:01 +0000 (UTC) Subject: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update In-Reply-To: References: <1480373793774-5741322.post@n5.nabble.com> Message-ID: <1085383452.5356259.1480485421437@mail.yahoo.com> I have problems with?vtkVolumeTextureMapper2D ? (OpenGL2) and test ?voltm2rotateclip.tcl no works From: Alvaro Sanchez To: meow_fiz Cc: VTK Users Sent: Tuesday, November 29, 2016 6:39 PM Subject: Re: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update Hi, there is a related patch [1] about to be merged, not sure if this would address this issue though, could you try it? ? ?I will try to reproduce the problem. Thanks. [1]?https://gitlab.kitware.com/ vtk/vtk/merge_requests/2196# note_201434 On Mon, Nov 28, 2016 at 5:56 PM, meow_fiz wrote: For a long time I've used vtkGPUVolumeRayCastMapper? in vtk 6.3 (OpenGL 1.x). I could change interactively volume mask voxel values set by: volMapper->SetMaskInput (myMask); Now when i switched to VTK 7.1RC & OpenGL2 I can't make any modifications to volume mask interactively. Calling Update(), Modified() on every element of the pipeline (volume, input data, mask input, mapper) does not affect visual result. The only way I can get the updated mask volume is to call: Renderer->RemoveVolume(Volume) ; Renderer->AddVolume(Volume); Is there any way that I could force volume mask update for vtkGPUVolumeRayCastMapper? ? Regards, ?Michal -- View this message in context: http://vtk.1045678.n5.nabble. com/vtkGPUVolumeRayCastMapper- OpenGL2-Mask-Input-update- tp5741322.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 -- Alvaro SanchezKitware, Inc.Senior R&D Engineer21 Corporate DriveClifton Park, NY 12065-8662Phone: 518-881-4901 _______________________________________________ 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 sysexits at gmail.com Wed Nov 30 02:20:32 2016 From: sysexits at gmail.com (Jaehyun Jang) Date: Wed, 30 Nov 2016 16:20:32 +0900 Subject: [vtkusers] Render scene without shading, light, interpolation Message-ID: Dear vtk users, I am trying to these tasks using *vtkPolyDataMapper with vtkUnsignedCharArray*, *vtkRenderer, vtkRenderWindow *to get pixel count of a specific cell 1. Translate index value(within 1 ~ 16777215) to R, G, B value (using R = idx & 255, G = (idx >> 8) & 255, B = (idx >> 16) & 255 2. From all points of each cell, assigning those color values into *vtkUnsignedCharArray *with SetTupleValue(point index of same cell, color) (the forth value of color is always 255) - i.e, All different cells have different RGB value. (If I set only 50 cells in the model, only 50 cells have distinct color in 1 ~ 50) 3. Setting the model using *vtkProperty *with these settings m_actor->GetProperty()->BackfaceCullingOn(); m_actor->GetProperty()->LightingOff(); m_actor->GetProperty()->ShadingOff(); m_actor->GetProperty()->SetInterpolationToFlat(); 4. Render this model using *vtkRenderWindow *with these settings renderwindow->SetOffScreenRendering(1); renderwindow->AddRenderer(renderer); renderwindow->SetSize(600, 600); renderwindow->Render() 5. Get vtkImageData using *vtkWindowToImageFilter *and access GetScalarPointer 6. Translate RGB to index and count it. However, RGB values translate wrong indices which I did not expect, I want to know how to set my renderer or actor without interpolation and shading to get the expected color. Thanks. -- *Jaehyun Jang* Master's candidate School of Computing, KAIST 291, Daehak-ro, Yuseong-gu, Daejeon E3-1, 2413 STE Computer Graphics and Visualization Lab Resume | Github | Personal -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Nov 30 02:49:03 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 30 Nov 2016 08:49:03 +0100 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: Den 29 nov. 2016 9:58 em skrev "Cory Quammen" : > > > I don't know if there's a full list somewhere (would be really nice if the > > Doxygen output could be augmented somehow to include this..), > > At the bottom of each class's Doxygen page is the location of the file > from which the Doxygen was generated. You can use this to identify the > module to which a class belongs. E.g., for vtkCoordinate, the location > listed is > > dox/Rendering/Core/vtkCoordinate.h > > Convert the "dox" to "vtk", remove the forward slashes, remove the > header file name, and you'll get the module: > > vtkRenderingCore Ah yes, I know the information is there, if you care to do some pusseling :) I just meant it would be nice if it was visible in a more prominent way, kind of like how the Qt docs has a list of modules [1], a page for each module (e.g QtNetwork [2]), a list of classes in each module [3], and where the module a class resides in is visible at the top of the class docs (e.g. QNetworkReply [4], see the breadcrumb at the top). I think it would help make the VTK docs less flat and hard to navigate. Not sure it's easily doable with just Doxygen though. Qt has its own tooling. BTW the heuristic you used above, will it work for all classes? I mean, are all modules laid out in the file system like this, and all module names correspond to directory names like that? Elvis [1] https://doc.qt.io/qt-5/qtmodules.html [2] https://doc.qt.io/qt-5/qtnetwork-index.html [3] https://doc.qt.io/qt-5/qtnetwork-module.html [4] https://doc.qt.io/qt-5/qnetworkreply.html > > - Cory > > > but you can > > run the Utilities/Maintenance/WhatModules.py script from VTK against your > > sources, to find out the list of modules you need to link against based on > > what headers you are including. > > > > E.g: > > > > estan at newton:~/orexplore/VTK$ ./Utilities/Maintenance/WhatModulesVTK.py . > > Filters/Modeling/Testing/Cxx/TestRotationalExtrusion.cxx > > Modules and their dependencies: > > find_package(VTK COMPONENTS > > vtkCommonCore > > vtkCommonDataModel > > vtkCommonExecutionModel > > vtkCommonMath > > vtkCommonMisc > > vtkCommonTransforms > > vtkFiltersCore > > vtkFiltersGeneral > > vtkFiltersModeling > > vtkFiltersSources > > vtkInteractionStyle > > vtkRenderingCore > > vtkRenderingOpenGL > > vtkTestingCore > > vtkTestingRendering > > vtkkwiml > > ) > > Your application code includes 16 of 189 vtk modules. > > > > All modules referenced in the files: > > find_package(VTK COMPONENTS > > vtkCommonCore > > vtkFiltersCore > > vtkFiltersModeling > > vtkFiltersSources > > vtkInteractionStyle > > vtkRenderingCore > > vtkRenderingOpenGL > > vtkTestingCore > > vtkTestingRendering > > ) > > Your application code includes 9 of 189 vtk modules. > > > > Minimal set of modules: > > find_package(VTK COMPONENTS > > vtkFiltersModeling > > vtkFiltersSources > > vtkInteractionStyle > > vtkRenderingOpenGL > > vtkTestingRendering > > ) > > Your application code includes 5 of 189 vtk modules. > > > > > > estan at newton:~/orexplore/VTK$ > > > > It's the middle one of these three sets of modules that you probably wants > > to use (the one listed under "All modules referenced in the files:"). > > > > The script is not perfect, but has been a great help to me. > > > > Elvis > > > >> > >> How can I report a bug? Sent to vtkdevelopers at vtk.org but with no success. > >> > >> Best > >> CP > >> > >> > >> _______________________________________________ > >> 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 > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.gavana at gmail.com Wed Nov 30 03:08:17 2016 From: andrea.gavana at gmail.com (Andrea Gavana) Date: Wed, 30 Nov 2016 09:08:17 +0100 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: Hi Ken & All, On 29 November 2016 at 17:16, Ken Martin wrote: > The ReportCapabilities() method on RenderWindow provides a lot of > information. You can do something like > > renWin->Render(); > const char *info = renWin->ReportCapabilities(); > cerr << info; > > or some sort of message box that displays info. That should tell you what > is being used for your rendering by VTK. > > If you are changing your data, then modified is fine, but then the first > render after you change data will be slow because it is re executing the > pipeline to account for the new data. So really the use case matters here. > If you have a GUI pulldown with a few different scalar fields then a 0.25 > second delay on the first render is a non issue. All renders after that > first one (until you change the data again) will be super fast. > > If you are trying to make an animation loop where you change the data > every frame then you either have to cache the data or deal with the delay. > Simple caching of the data means creating a filter/mapper/actor for each > timestep/scalarfield and just turning the visibility on for the one you > currently want rendered, leaving the others off. After one time through the > loop it should be fast assuming it fits in memory. > That is exactly what I am trying to do, a timestepped animation of various properties over time. If I don't do the animation, the rendering is of course super-fast, but that was not my issue :-) . The issue was related to changing the scalars and re-display the grid. By the way, I have run your snippet of code using the ReportCapabilities() method on the render window... It's fairly long and a bit impenetrable to me, I'll put it at the end just in case anyone is interested in taking a look at it... I have also run the recommendation from David to check what backend was used for rendering with this code: rw = vtk.vtkRenderWindow() print rw.GetRenderingBackend() And it prints out "OpenGL2". I will try to think about your approach of caching and see if it can be integrated in my application without too much headache... Thank you again for all your support, it is much appreciated! Andrea. ******************************************************************** Output of renWin.ReportCapabilities() OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: Quadro 6000/PCIe/SSE2 OpenGL version string: 4.5.0 NVIDIA 347.88 OpenGL extensions: GL_AMD_multi_draw_indirect GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_compute_shader GL_ARB_compute_variable_group_size GL_ARB_conditional_render_inverted GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_ES3_1_compatibility GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_NV_internalformat_sample_query GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counters GL_ARB_shader_bit_encoding GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_query_buffer_object GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_sparse_buffer GL_ARB_sparse_texture GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset_clamp GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects GL_EXT_separate_specular_color GL_EXT_shader_image_load_store GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback2 GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_EXT_import_sync_object GL_NVX_shared_sync_object GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KHR_context_flush_control GL_KHR_debug GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_KTX_buffer_region GL_NV_bindless_multi_draw_indirect GL_NV_bindless_multi_draw_indirect_count GL_NV_blend_equation_advanced GL_NV_blend_square GL_NV_command_list GL_NV_compute_program5 GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_draw_texture GL_NV_ES1_1_compatibility GL_NV_ES3_1_compatibility GL_NV_explicit_multisample GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_gpu_program4 GL_NV_gpu_program4_1 GL_NV_gpu_program5 GL_NV_gpu_program5_mem_extended GL_NV_gpu_program_fp64 GL_NV_gpu_shader5 GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_parameter_buffer_object2 GL_NV_path_rendering GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_shader_atomic_counters GL_NV_shader_atomic_float GL_NV_shader_buffer_load GL_NV_shader_storage_buffer_object GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_multisample GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_transform_feedback2 GL_NV_uniform_buffer_unified_memory GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_attrib_integer_64bit GL_NV_vertex_buffer_unified_memory GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NV_video_capture GL_NVX_sysmem_buffer GL_NVX_conditional_render GL_NVX_gpu_memory_info GL_NV_shader_thread_group GL_KHR_blend_equation_advanced GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control PixelFormat Descriptor: depth: 24 class: TrueColor buffer size: 32 level: 0 renderType: rgba double buffer: True stereo: False hardware acceleration: True rgba: redSize=8 greenSize=8blueSize=8alphaSize=8 aux buffers: 4 depth size: 24 stencil size: 0 accum: redSize=16 greenSize=16blueSize=16alphaSize=16 ******************************************************************** > > Hope that helps! > Ken > > > > > > > > On Tue, Nov 29, 2016 at 11:01 AM, Andrea Gavana > wrote: > >> Hi Ken, >> >> Thank you for your answer. So it seems to me that I should not call >> grid.Modified() if I only change the scalars? In my script there is almost >> no pipeline, I.e. I have: >> >> Grid --> Mapper --> Actor >> >> No filters, no updating, no nothing. >> >> I will try your loop example tomorrow from my work computer. Also, how >> can I know if the rendering engine is using the GPU? I have a fairly >> powerful machine at work, able to run commercial 3D visualization software >> (on a geological scale) with multi-million cells with no problem... >> >> Thank you again! >> >> Andrea. >> >> On Tue, 29 Nov 2016 at 16:37, Ken Martin wrote: >> >>> >>> The timing are all taken after the first rendering. I have a little GUI >>> with a VTK render window and a single button. Every time I press the button >>> new data is randomly generated and I time the rendering only process, i.e.: >>> >>> >>> VTK with OpenGL2 can render 500 million cells/second on a laptop GPU. If >>> you are seeing performance significantly off from that and think you are >>> using a GPU then something is wrong. To do timings do not rely on >>> GetLastRenderTimeInSeconds but rather time a render loop like ala >>> >>> startTimer >>> for (i = 0; i < 500; i++) >>> { >>> renWin->Render(); >>> } >>> endTimer >>> print elapsedTime/500; >>> >>> >>> >>> grid.GetCellData().SetScalars(data) >>> grid.Modified() >>> renwin.Render() >>> >>> >>> The render above is a first render, in that it is the first render after >>> you modified your data. The entire >>> pipeline has to be run then. You are probably timing how has the >>> pipeline can be modified and recalaculated when you change your data. >>> >>> >>> >>> And I have a little rendering listener setup like this: >>> >>> >>> renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) >>> >>> >>> def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): >>> >>> timeInSeconds = caller.GetLastRenderTimeInSeconds() >>> fps = 1.0/timeInSeconds >>> print timeInSeconds, fps >>> >>> >>> However, I realized that the simulator outputs the grid with a lot of >>> redundant information - i.e., duplicated points. So I did the following: >>> >>> clean = vtk.vtkExtractUnstructuredGrid() >>> clean.SetInputData(grid.GetOutput()) >>> clean.MergingOn() >>> clean.CellClippingOn() >>> >>> clean.SetCellMinimum(0) >>> clean.SetCellMaximum(nx*ny*nz) >>> clean.Update() >>> >>> >>> the "clean" grid contains far far far less points than the original one >>> (as the coincident points have been merged), and the rendering is much >>> faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the >>> rendering engine to ignore the points (i.e., don't render the points, I >>> only care about the cells...) that would be even better :-) . >>> >>> >>> Thank you again for all your hints. >>> >>> Andrea. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana >>> wrote: >>> >>> Dear All, >>> >>> >>> On 28 November 2016 at 16:12, Andrea Gavana >>> wrote: >>> >>> Hi David, >>> >>> thank you for your answer. I will put some more comments inline too. >>> Any insight or suggestion is more than welcome. >>> >>> On 28 November 2016 at 15:40, David E DeMarle wrote: >>> >>> Responses inline. Mostly though, make sure you are using the "OpenGL2" >>> rendering backend, which is the default for 7.0 and 7.1. >>> >>> >>> >>> I am using VTK 7.0 through the Python bindings (the official ones from >>> the Kitware website here: >>> >>> http://www.vtk.org/download/ >>> >>> >>> So I was assuming that the rendering backend was already OpenGL2... is >>> there any way to check if this is really the case? >>> >>> Also, I have tried to load my dataset in ParaView, and ParaView seems to >>> be doing some kind of black magic on my vtkUnstructuredGrid as I get these >>> kind of messages when I load the vtk file: >>> >>> Warning: In C:\bbd\df0abce0\source-paraview\VTK\Rendering\VolumeOpenGL2\ >>> vtkOpenGLProjectedTetrahedraMapper.cxx, line 251 >>> >>> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >>> support. The algorithm may produce visual artifacts. >>> >>> >>> >>> >>> Which, I believe, is telling me that ParaView is not doing what I am >>> doing but maybe using some kind of volume-based rendering - when I rotate >>> the grid the (almost cube-shaped) cells becomes subdivided in small >>> triangles, when I stop interacting with them they go back to their normal >>> appearance. It would be nice to know what ParaView is doing though, and >>> also what "FBO support" means :-). I also noticed that ParaView is slightly >>> faster in changing the displayed property - maybe 2 or 3 times faster than >>> my bare-bone script. >>> >>> >>> >>> >>> Just to add some more information: it is true that ParaView is faster in >>> the re-rendering when I switch to another property, but it also shows heavy >>> visual artifacts (i.e., cells with multiple colors in them?!? - see >>> attached screenshot). So, if I understood it correctly, ParaView uses some >>> kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask >>> it to... should it not use the default vtkDataSetMapper?). >>> >>> Based on my original pipeline: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>> >>> I have tried everything I know to speed up the re-rendering of the grid, >>> I actually operate directly on the output of vtkThreshold (that is still a >>> vtkUnstructuredGrid), so I simply throw away the original grid. With and >>> without ImmediateModeRendering, with and without backface culling. My best >>> improvements so far took the rendering time from 1.04 seconds to 0.94 >>> seconds... so not much of an improvement :-) . >>> >>> I am of course open to any suggestions anyone may have on the rendering >>> part - assuming that my geometry is fixed (it is not, but I'll worry about >>> that later...), basically only on the process: >>> >>> vtkUnstructuredGrid.SetScalars(my_data) >>> vtkUnstructuredGrid.Modified() >>> vtkRenderWindow.Render() >>> >>> And of course - if there are other visualization strategies I may use, >>> please shout :-) >>> >>> Thank you. >>> >>> Andrea. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >>> wrote: >>> >>> Dear All, >>> >>> I am working with some stuff coming out of CFD simulations, and in >>> the current work the simulator produces a 3D grid (unstructured grid made >>> of hexahedrons). The full grid is about 4 million cells, but due to other >>> settings in the simulator the number of "active" cells in the simulation >>> ends up being "only" 270,000. In order to visualize all this, I create a >>> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >>> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >>> active grid: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>> >>> However, the rendering speed for the 270,000 cells grid is quite low - >>> it takes about one second to display a new property by using SetScalars on >>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>> on the output of vtkThreshold to try and speed up the rendering. So, the >>> current visualization strategy I have implemented is the following: >>> >>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>> vtkPolyDataMapper --> vtkActor >>> >>> This is still as slow as my first approach, and I also have a couple of >>> questions - which stems from my ignorance in VTK things: >>> >>> >>> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >>> when given something other than PolyData, so not surprising that it isn't >>> faster. >>> >>> >>> 1. When I load (from the simulator outputs) a new property (cell-based) >>> and I assign its values to the original vtkUnstructuredGrid (by using >>> SetScalars on it), do all the filters (vtkThreshold and >>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>> the active/inactive cells nor the geometry of the grid, only assigning >>> different scalars. And, if yes, is there any way to tell the pipeline: >>> "look, I've only changed the scalars, there's no need to re-run all the >>> thresholds and surface filters *again*"? >>> >>> >>> Yes they do, since the Executive classes' Modified time tracking is not >>> fine grained enough to know the difference, and few if any of the filters >>> would know how to update just the changed portions. >>> >>> >>> 2. Is there any other pipeline style or visualization technique in VTK >>> or any settings whatsoever that could bring down the rendering time (memory >>> is not that much of a concern)? Basically, what I have a the moment - in >>> terms of timing - is as follows: >>> >>> >>> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >>> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >>> >>> >>> Reading data from simulator: 0.042 seconds >>> Create VTK array with data : 0.002 seconds >>> Call to SetScalars : 0.000 seconds >>> Create Lookup Table : 0.001 seconds >>> Render on screen : about 1 second >>> >>> >>> Thank you in advance for any suggestion, my apologies for the long >>> message. >>> >>> Andrea. >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >>> >>> -- >>> 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 felipebordeu at gmail.com Wed Nov 30 04:49:36 2016 From: felipebordeu at gmail.com (Felipe Bordeu) Date: Wed, 30 Nov 2016 10:49:36 +0100 Subject: [vtkusers] Polyhedron to regular cell type Message-ID: hi, I'm working on a filter, and I use a Voronoi library (external) to generate polyhedron cells (VTK_POLYHEDRON). I will like to know if there is any easy way to identified and to convert some of my polyedron cells to a regular cells (hexaedron for example). In most for my cases all the voronoi cells are "classic" cells ( tetras, hexas, wedge...). I dont care if the code is expensive, because I do it only in a limited number of elements (less than 50). Thanks Felipe using c++, (paraview 5.2) -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Nov 30 08:29:24 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 30 Nov 2016 08:29:24 -0500 Subject: [vtkusers] Render scene without shading, light, interpolation In-Reply-To: References: Message-ID: Hi, It seems like you are doing the right things and should expect to get the color values you set. Could you attach a small image showing the output you get and maybe highlight a cell that does not have the expected color? Are the colors way off from what you expect, or just slightly different? Thanks, Cory On Wed, Nov 30, 2016 at 2:20 AM, Jaehyun Jang wrote: > Dear vtk users, > > I am trying to these tasks using vtkPolyDataMapper with > vtkUnsignedCharArray, vtkRenderer, vtkRenderWindow to get pixel count of a > specific cell > > 1. Translate index value(within 1 ~ 16777215) to R, G, B value (using R = > idx & 255, G = (idx >> 8) & 255, B = (idx >> 16) & 255 > 2. From all points of each cell, assigning those color values into > vtkUnsignedCharArray with SetTupleValue(point index of same cell, color) > (the forth value of color is always 255) > - i.e, All different cells have different RGB value. (If I set only 50 cells > in the model, only 50 cells have distinct color in 1 ~ 50) > 3. Setting the model using vtkProperty with these settings > m_actor->GetProperty()->BackfaceCullingOn(); > m_actor->GetProperty()->LightingOff(); > m_actor->GetProperty()->ShadingOff(); > m_actor->GetProperty()->SetInterpolationToFlat(); > > 4. Render this model using vtkRenderWindow with these settings > renderwindow->SetOffScreenRendering(1); > renderwindow->AddRenderer(renderer); > renderwindow->SetSize(600, 600); > renderwindow->Render() > 5. Get vtkImageData using vtkWindowToImageFilter and access GetScalarPointer > 6. Translate RGB to index and count it. > > However, RGB values translate wrong indices which I did not expect, I want > to know how to set my renderer or actor without interpolation and shading to > get the expected color. > > Thanks. > > -- > Jaehyun Jang > Master's candidate > School of Computing, KAIST > 291, Daehak-ro, Yuseong-gu, Daejeon > E3-1, 2413 STE > Computer Graphics and Visualization Lab > Resume | Github | Personal > > _______________________________________________ > 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 dave.demarle at kitware.com Wed Nov 30 08:36:57 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 30 Nov 2016 08:36:57 -0500 Subject: [vtkusers] Render scene without shading, light, interpolation In-Reply-To: References: Message-ID: You might also want to investigate vtkHardwareSelector. It internally does what you are trying to do. Another approach is the more recent vtkValuePass, which is more general but if you associate an index array with the cells you can make it do the same thing. See the regression test suite for examples of use. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Nov 30, 2016 at 8:29 AM, Cory Quammen wrote: > Hi, > > It seems like you are doing the right things and should expect to get > the color values you set. Could you attach a small image showing the > output you get and maybe highlight a cell that does not have the > expected color? Are the colors way off from what you expect, or just > slightly different? > > Thanks, > Cory > > On Wed, Nov 30, 2016 at 2:20 AM, Jaehyun Jang wrote: > > Dear vtk users, > > > > I am trying to these tasks using vtkPolyDataMapper with > > vtkUnsignedCharArray, vtkRenderer, vtkRenderWindow to get pixel count of > a > > specific cell > > > > 1. Translate index value(within 1 ~ 16777215) to R, G, B value (using R = > > idx & 255, G = (idx >> 8) & 255, B = (idx >> 16) & 255 > > 2. From all points of each cell, assigning those color values into > > vtkUnsignedCharArray with SetTupleValue(point index of same cell, color) > > (the forth value of color is always 255) > > - i.e, All different cells have different RGB value. (If I set only 50 > cells > > in the model, only 50 cells have distinct color in 1 ~ 50) > > 3. Setting the model using vtkProperty with these settings > > m_actor->GetProperty()->BackfaceCullingOn(); > > m_actor->GetProperty()->LightingOff(); > > m_actor->GetProperty()->ShadingOff(); > > m_actor->GetProperty()->SetInterpolationToFlat(); > > > > 4. Render this model using vtkRenderWindow with these settings > > renderwindow->SetOffScreenRendering(1); > > renderwindow->AddRenderer(renderer); > > renderwindow->SetSize(600, 600); > > renderwindow->Render() > > 5. Get vtkImageData using vtkWindowToImageFilter and access > GetScalarPointer > > 6. Translate RGB to index and count it. > > > > However, RGB values translate wrong indices which I did not expect, I > want > > to know how to set my renderer or actor without interpolation and > shading to > > get the expected color. > > > > Thanks. > > > > -- > > Jaehyun Jang > > Master's candidate > > School of Computing, KAIST > > 291, Daehak-ro, Yuseong-gu, Daejeon > > E3-1, 2413 STE > > Computer Graphics and Visualization Lab > > Resume | Github | Personal > > > > _______________________________________________ > > 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 cory.quammen at kitware.com Wed Nov 30 08:38:26 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 30 Nov 2016 08:38:26 -0500 Subject: [vtkusers] Cannot use vtkParallelCoordinatesActor in VTK 7.0.0 and how to report a bug? In-Reply-To: References: Message-ID: [snip] > Ah yes, I know the information is there, if you care to do some pusseling :) > > I just meant it would be nice if it was visible in a more prominent way, > kind of like how the Qt docs has a list of modules [1], a page for each > module (e.g QtNetwork [2]), a list of classes in each module [3], and where > the module a class resides in is visible at the top of the class docs (e.g. > QNetworkReply [4], see the breadcrumb at the top). > > I think it would help make the VTK docs less flat and hard to navigate. Agreed, that would be nice to have. As you know, we welcome contributions that work towards this goal. > Not sure it's easily doable with just Doxygen though. Qt has its own > tooling. > > BTW the heuristic you used above, will it work for all classes? I mean, are > all modules laid out in the file system like this, and all module names > correspond to directory names like that? As far as I know. This won't necessarily find you all the modules you need to add as dependencies, though, as there may be additional module dependencies brought in when using interface modules that support different implementations. For example, if you are using classes in vtkRenderingContext2D, I believe you need to add the implementation that is used, either vtkRenderingContextOpenGL or vtkRenderingContextOpenGL2 depending on which OpenGL backend you are using. This can be a little harder to suss out. - Cory > Elvis > > [1] https://doc.qt.io/qt-5/qtmodules.html > [2] https://doc.qt.io/qt-5/qtnetwork-index.html > [3] https://doc.qt.io/qt-5/qtnetwork-module.html > [4] https://doc.qt.io/qt-5/qnetworkreply.html > >> >> - Cory >> >> > but you can >> > run the Utilities/Maintenance/WhatModules.py script from VTK against >> > your >> > sources, to find out the list of modules you need to link against based >> > on >> > what headers you are including. >> > >> > E.g: >> > >> > estan at newton:~/orexplore/VTK$ ./Utilities/Maintenance/WhatModulesVTK.py >> > . >> > Filters/Modeling/Testing/Cxx/TestRotationalExtrusion.cxx >> > Modules and their dependencies: >> > find_package(VTK COMPONENTS >> > vtkCommonCore >> > vtkCommonDataModel >> > vtkCommonExecutionModel >> > vtkCommonMath >> > vtkCommonMisc >> > vtkCommonTransforms >> > vtkFiltersCore >> > vtkFiltersGeneral >> > vtkFiltersModeling >> > vtkFiltersSources >> > vtkInteractionStyle >> > vtkRenderingCore >> > vtkRenderingOpenGL >> > vtkTestingCore >> > vtkTestingRendering >> > vtkkwiml >> > ) >> > Your application code includes 16 of 189 vtk modules. >> > >> > All modules referenced in the files: >> > find_package(VTK COMPONENTS >> > vtkCommonCore >> > vtkFiltersCore >> > vtkFiltersModeling >> > vtkFiltersSources >> > vtkInteractionStyle >> > vtkRenderingCore >> > vtkRenderingOpenGL >> > vtkTestingCore >> > vtkTestingRendering >> > ) >> > Your application code includes 9 of 189 vtk modules. >> > >> > Minimal set of modules: >> > find_package(VTK COMPONENTS >> > vtkFiltersModeling >> > vtkFiltersSources >> > vtkInteractionStyle >> > vtkRenderingOpenGL >> > vtkTestingRendering >> > ) >> > Your application code includes 5 of 189 vtk modules. >> > >> > >> > estan at newton:~/orexplore/VTK$ >> > >> > It's the middle one of these three sets of modules that you probably >> > wants >> > to use (the one listed under "All modules referenced in the files:"). >> > >> > The script is not perfect, but has been a great help to me. >> > >> > Elvis >> > >> >> >> >> How can I report a bug? Sent to vtkdevelopers at vtk.org but with no >> >> success. >> >> >> >> Best >> >> CP >> >> >> >> >> >> _______________________________________________ >> >> 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 >> > >> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. -- Cory Quammen Staff R&D Engineer Kitware, Inc. From lplavorante at gmail.com Wed Nov 30 08:39:25 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Wed, 30 Nov 2016 11:39:25 -0200 Subject: [vtkusers] vtkDataSetSurfaceFIlter doesn not extract boundary faces Message-ID: Hi vtkusers, regarding my previous post, in which I wrote about visualizing a smooth polygonal boundary obtained from an unstructured grid, I have verified that vtkDataSetSurfaceFilter returns all the faces of the cells in the original grid instead of the boundary cells. There is a similar 2009 post about this issue by Teresa Azevedo: http://public.kitware.com/pipermail/vtkusers/2009-October/054301.html She used vtkGeometryFilter to obtain the boundary (vtkDataSetSurfaceFilter, which I use, is a faster version, as stated in the documentation), but instead the filter returned all the faces of the grid's cells. Is there anything I am missing? Most of the external edges generated by vtkDataSetSurfaceFilter are non-manifold because two adjacent triangles on the boundary share an edge with an internal triangle from the non-boundary face of a 3D cell (Triquadratic hexahedron). I think this is the cause for the non-smooth appearance that the rendered surface gets after applying vtkPolyDataNormals. So I though I should remove all non-boundary faces in order to get a correct normal generation. I know the 3D cells do share 2D faces in the non-boundary portion of the grid because I am providing the cells' coordinates myself. How can I get only the boundary faces? Is there any condition in the vtkDataSetSurfaceFilter and vtkGeometryFilter classes which maybe my unstructured grid is not respecting? Thank you very much, Luca -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Nov 30 08:42:02 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 30 Nov 2016 06:42:02 -0700 (MST) Subject: [vtkusers] Missing functions after building of VTK 7.1.0 with Java-wrapper Message-ID: <1480513322165-5741366.post@n5.nabble.com> Hi all, the building of VTK 7.1.0 with cmake (and Visual Studio) works without problems. However, if I want to use this created vtk.jar in my projects, some features are no longer available. For example are missing: vtkCellArray -> GetMTime() or vtkSplineWidget -> GetParametricSpline() or vtkPolyDataSilhouette -> SetCamera(..) or vtkDijkstraImageContourLineInterpolator -> GetDijkstraImageGeodesicPath() Have I forgotten something to set or activate? Or are the functions not more available in vtk 7.1? Can anybody help me? -- View this message in context: http://vtk.1045678.n5.nabble.com/Missing-functions-after-building-of-VTK-7-1-0-with-Java-wrapper-tp5741366.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Wed Nov 30 09:20:51 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 30 Nov 2016 09:20:51 -0500 Subject: [vtkusers] VTK pipeline & rendering strategies In-Reply-To: References: Message-ID: OK, so for that use case you could be rerunning the pipeline every time and you want to minimize that. My suggestion would be 1) if it fits in memory (say 4 gig) then precompute all the timesteps/frames, storing each in a polydata/mapper/actor and then turn on the visibility of the timestep you want, keep all the actors in the renderer, just change visibility so that one is on at a time. 2) make sure you only have the points you need. Aka lastFilter->GetOutput()->GetPoints()->GetNumberOfPoints(), given that you are starting with a 4 million cell mesh you want to make sure all those points are not still around. If they are you need to use a filter to remove them so you only have the points needed. All points get sent to the graphics card so this can make a big difference if you prune unused points. 3) if possible reuse parts of your pipeline/data, insert your scalars as close to the end as you can. Even for (1) this will save memory. 4) if all your timesteps are bigger than 4gig, but would fit in main memory, then precompute all the PolyData's for them and then just change the mapper->SetInput() each frame. This will be slower than (1) as the data will be uploaded to the graphics card each frame, but at least the pipeline computation part will be skipped. Hope that gives you some ideas. Thanks! Ken On Wed, Nov 30, 2016 at 3:08 AM, Andrea Gavana wrote: > Hi Ken & All, > > On 29 November 2016 at 17:16, Ken Martin wrote: > >> The ReportCapabilities() method on RenderWindow provides a lot of >> information. You can do something like >> >> renWin->Render(); >> const char *info = renWin->ReportCapabilities(); >> cerr << info; >> >> or some sort of message box that displays info. That should tell you what >> is being used for your rendering by VTK. >> >> If you are changing your data, then modified is fine, but then the first >> render after you change data will be slow because it is re executing the >> pipeline to account for the new data. So really the use case matters here. >> If you have a GUI pulldown with a few different scalar fields then a 0.25 >> second delay on the first render is a non issue. All renders after that >> first one (until you change the data again) will be super fast. >> >> If you are trying to make an animation loop where you change the data >> every frame then you either have to cache the data or deal with the delay. >> Simple caching of the data means creating a filter/mapper/actor for each >> timestep/scalarfield and just turning the visibility on for the one you >> currently want rendered, leaving the others off. After one time through the >> loop it should be fast assuming it fits in memory. >> > > > That is exactly what I am trying to do, a timestepped animation of various > properties over time. If I don't do the animation, the rendering is of > course super-fast, but that was not my issue :-) . The issue was related to > changing the scalars and re-display the grid. > > By the way, I have run your snippet of code using the ReportCapabilities() > method on the render window... It's fairly long and a bit impenetrable to > me, I'll put it at the end just in case anyone is interested in taking a > look at it... > > I have also run the recommendation from David to check what backend was > used for rendering with this code: > > rw = vtk.vtkRenderWindow() > print rw.GetRenderingBackend() > > And it prints out "OpenGL2". > > I will try to think about your approach of caching and see if it can be > integrated in my application without too much headache... > > Thank you again for all your support, it is much appreciated! > > Andrea. > > > > ******************************************************************** > Output of renWin.ReportCapabilities() > > OpenGL vendor string: NVIDIA Corporation > OpenGL renderer string: Quadro 6000/PCIe/SSE2 > OpenGL version string: 4.5.0 NVIDIA 347.88 > OpenGL extensions: > GL_AMD_multi_draw_indirect > GL_ARB_arrays_of_arrays > GL_ARB_base_instance > GL_ARB_blend_func_extended > GL_ARB_buffer_storage > GL_ARB_clear_buffer_object > GL_ARB_clear_texture > GL_ARB_clip_control > GL_ARB_color_buffer_float > GL_ARB_compressed_texture_pixel_storage > GL_ARB_conservative_depth > GL_ARB_compute_shader > GL_ARB_compute_variable_group_size > GL_ARB_conditional_render_inverted > GL_ARB_copy_buffer > GL_ARB_copy_image > GL_ARB_cull_distance > GL_ARB_debug_output > GL_ARB_depth_buffer_float > GL_ARB_depth_clamp > GL_ARB_depth_texture > GL_ARB_derivative_control > GL_ARB_direct_state_access > GL_ARB_draw_buffers > GL_ARB_draw_buffers_blend > GL_ARB_draw_indirect > GL_ARB_draw_elements_base_vertex > GL_ARB_draw_instanced > GL_ARB_enhanced_layouts > GL_ARB_ES2_compatibility > GL_ARB_ES3_compatibility > GL_ARB_ES3_1_compatibility > GL_ARB_explicit_attrib_location > GL_ARB_explicit_uniform_location > GL_ARB_fragment_coord_conventions > GL_ARB_fragment_layer_viewport > GL_ARB_fragment_program > GL_ARB_fragment_program_shadow > GL_ARB_fragment_shader > GL_ARB_framebuffer_no_attachments > GL_ARB_framebuffer_object > GL_ARB_framebuffer_sRGB > GL_ARB_geometry_shader4 > GL_ARB_get_program_binary > GL_ARB_get_texture_sub_image > GL_ARB_gpu_shader5 > GL_ARB_gpu_shader_fp64 > GL_ARB_half_float_pixel > GL_ARB_half_float_vertex > GL_ARB_imaging > GL_ARB_indirect_parameters > GL_ARB_instanced_arrays > GL_ARB_internalformat_query > GL_ARB_internalformat_query2 > GL_NV_internalformat_sample_query > GL_ARB_invalidate_subdata > GL_ARB_map_buffer_alignment > GL_ARB_map_buffer_range > GL_ARB_multi_bind > GL_ARB_multi_draw_indirect > GL_ARB_multisample > GL_ARB_multitexture > GL_ARB_occlusion_query > GL_ARB_occlusion_query2 > GL_ARB_pipeline_statistics_query > GL_ARB_pixel_buffer_object > GL_ARB_point_parameters > GL_ARB_point_sprite > GL_ARB_program_interface_query > GL_ARB_provoking_vertex > GL_ARB_robust_buffer_access_behavior > GL_ARB_robustness > GL_ARB_sample_shading > GL_ARB_sampler_objects > GL_ARB_seamless_cube_map > GL_ARB_separate_shader_objects > GL_ARB_shader_atomic_counters > GL_ARB_shader_bit_encoding > GL_ARB_shader_draw_parameters > GL_ARB_shader_group_vote > GL_ARB_shader_image_load_store > GL_ARB_shader_image_size > GL_ARB_shader_objects > GL_ARB_shader_precision > GL_ARB_query_buffer_object > GL_ARB_shader_storage_buffer_object > GL_ARB_shader_subroutine > GL_ARB_shader_texture_image_samples > GL_ARB_shader_texture_lod > GL_ARB_shading_language_100 > GL_ARB_shading_language_420pack > GL_ARB_shading_language_include > GL_ARB_shading_language_packing > GL_ARB_shadow > GL_ARB_sparse_buffer > GL_ARB_sparse_texture > GL_ARB_stencil_texturing > GL_ARB_sync > GL_ARB_tessellation_shader > GL_ARB_texture_barrier > GL_ARB_texture_border_clamp > GL_ARB_texture_buffer_object > GL_ARB_texture_buffer_object_rgb32 > GL_ARB_texture_buffer_range > GL_ARB_texture_compression > GL_ARB_texture_compression_bptc > GL_ARB_texture_compression_rgtc > GL_ARB_texture_cube_map > GL_ARB_texture_cube_map_array > GL_ARB_texture_env_add > GL_ARB_texture_env_combine > GL_ARB_texture_env_crossbar > GL_ARB_texture_env_dot3 > GL_ARB_texture_float > GL_ARB_texture_gather > GL_ARB_texture_mirror_clamp_to_edge > GL_ARB_texture_mirrored_repeat > GL_ARB_texture_multisample > GL_ARB_texture_non_power_of_two > GL_ARB_texture_query_levels > GL_ARB_texture_query_lod > GL_ARB_texture_rectangle > GL_ARB_texture_rg > GL_ARB_texture_rgb10_a2ui > GL_ARB_texture_stencil8 > GL_ARB_texture_storage > GL_ARB_texture_storage_multisample > GL_ARB_texture_swizzle > GL_ARB_texture_view > GL_ARB_timer_query > GL_ARB_transform_feedback2 > GL_ARB_transform_feedback3 > GL_ARB_transform_feedback_instanced > GL_ARB_transform_feedback_overflow_query > GL_ARB_transpose_matrix > GL_ARB_uniform_buffer_object > GL_ARB_vertex_array_bgra > GL_ARB_vertex_array_object > GL_ARB_vertex_attrib_64bit > GL_ARB_vertex_attrib_binding > GL_ARB_vertex_buffer_object > GL_ARB_vertex_program > GL_ARB_vertex_shader > GL_ARB_vertex_type_10f_11f_11f_rev > GL_ARB_vertex_type_2_10_10_10_rev > GL_ARB_viewport_array > GL_ARB_window_pos > GL_ATI_draw_buffers > GL_ATI_texture_float > GL_ATI_texture_mirror_once > GL_S3_s3tc > GL_EXT_texture_env_add > GL_EXT_abgr > GL_EXT_bgra > GL_EXT_bindable_uniform > GL_EXT_blend_color > GL_EXT_blend_equation_separate > GL_EXT_blend_func_separate > GL_EXT_blend_minmax > GL_EXT_blend_subtract > GL_EXT_compiled_vertex_array > GL_EXT_Cg_shader > GL_EXT_depth_bounds_test > GL_EXT_direct_state_access > GL_EXT_draw_buffers2 > GL_EXT_draw_instanced > GL_EXT_draw_range_elements > GL_EXT_fog_coord > GL_EXT_framebuffer_blit > GL_EXT_framebuffer_multisample > GL_EXTX_framebuffer_mixed_formats > GL_EXT_framebuffer_multisample_blit_scaled > GL_EXT_framebuffer_object > GL_EXT_framebuffer_sRGB > GL_EXT_geometry_shader4 > GL_EXT_gpu_program_parameters > GL_EXT_gpu_shader4 > GL_EXT_multi_draw_arrays > GL_EXT_packed_depth_stencil > GL_EXT_packed_float > GL_EXT_packed_pixels > GL_EXT_pixel_buffer_object > GL_EXT_point_parameters > GL_EXT_polygon_offset_clamp > GL_EXT_provoking_vertex > GL_EXT_rescale_normal > GL_EXT_secondary_color > GL_EXT_separate_shader_objects > GL_EXT_separate_specular_color > GL_EXT_shader_image_load_store > GL_EXT_shader_integer_mix > GL_EXT_shadow_funcs > GL_EXT_stencil_two_side > GL_EXT_stencil_wrap > GL_EXT_texture3D > GL_EXT_texture_array > GL_EXT_texture_buffer_object > GL_EXT_texture_compression_dxt1 > GL_EXT_texture_compression_latc > GL_EXT_texture_compression_rgtc > GL_EXT_texture_compression_s3tc > GL_EXT_texture_cube_map > GL_EXT_texture_edge_clamp > GL_EXT_texture_env_combine > GL_EXT_texture_env_dot3 > GL_EXT_texture_filter_anisotropic > GL_EXT_texture_integer > GL_EXT_texture_lod > GL_EXT_texture_lod_bias > GL_EXT_texture_mirror_clamp > GL_EXT_texture_object > GL_EXT_texture_shared_exponent > GL_EXT_texture_sRGB > GL_EXT_texture_sRGB_decode > GL_EXT_texture_storage > GL_EXT_texture_swizzle > GL_EXT_timer_query > GL_EXT_transform_feedback2 > GL_EXT_vertex_array > GL_EXT_vertex_array_bgra > GL_EXT_vertex_attrib_64bit > GL_EXT_import_sync_object > GL_NVX_shared_sync_object > GL_IBM_rasterpos_clip > GL_IBM_texture_mirrored_repeat > GL_KHR_context_flush_control > GL_KHR_debug > GL_KHR_robust_buffer_access_behavior > GL_KHR_robustness > GL_KTX_buffer_region > GL_NV_bindless_multi_draw_indirect > GL_NV_bindless_multi_draw_indirect_count > GL_NV_blend_equation_advanced > GL_NV_blend_square > GL_NV_command_list > GL_NV_compute_program5 > GL_NV_conditional_render > GL_NV_copy_depth_to_color > GL_NV_copy_image > GL_NV_depth_buffer_float > GL_NV_depth_clamp > GL_NV_draw_texture > GL_NV_ES1_1_compatibility > GL_NV_ES3_1_compatibility > GL_NV_explicit_multisample > GL_NV_fence > GL_NV_float_buffer > GL_NV_fog_distance > GL_NV_fragment_program > GL_NV_fragment_program_option > GL_NV_fragment_program2 > GL_NV_framebuffer_multisample_coverage > GL_NV_geometry_shader4 > GL_NV_gpu_program4 > GL_NV_gpu_program4_1 > GL_NV_gpu_program5 > GL_NV_gpu_program5_mem_extended > GL_NV_gpu_program_fp64 > GL_NV_gpu_shader5 > GL_NV_half_float > GL_NV_light_max_exponent > GL_NV_multisample_coverage > GL_NV_multisample_filter_hint > GL_NV_occlusion_query > GL_NV_packed_depth_stencil > GL_NV_parameter_buffer_object > GL_NV_parameter_buffer_object2 > GL_NV_path_rendering > GL_NV_pixel_data_range > GL_NV_point_sprite > GL_NV_primitive_restart > GL_NV_register_combiners > GL_NV_register_combiners2 > GL_NV_shader_atomic_counters > GL_NV_shader_atomic_float > GL_NV_shader_buffer_load > GL_NV_shader_storage_buffer_object > GL_NV_texgen_reflection > GL_NV_texture_barrier > GL_NV_texture_compression_vtc > GL_NV_texture_env_combine4 > GL_NV_texture_multisample > GL_NV_texture_rectangle > GL_NV_texture_shader > GL_NV_texture_shader2 > GL_NV_texture_shader3 > GL_NV_transform_feedback > GL_NV_transform_feedback2 > GL_NV_uniform_buffer_unified_memory > GL_NV_vertex_array_range > GL_NV_vertex_array_range2 > GL_NV_vertex_attrib_integer_64bit > GL_NV_vertex_buffer_unified_memory > GL_NV_vertex_program > GL_NV_vertex_program1_1 > GL_NV_vertex_program2 > GL_NV_vertex_program2_option > GL_NV_vertex_program3 > GL_NV_video_capture > GL_NVX_sysmem_buffer > GL_NVX_conditional_render > GL_NVX_gpu_memory_info > GL_NV_shader_thread_group > GL_KHR_blend_equation_advanced > GL_SGIS_generate_mipmap > GL_SGIS_texture_lod > GL_SGIX_depth_texture > GL_SGIX_shadow > GL_SUN_slice_accum > GL_WIN_swap_hint > WGL_EXT_swap_control > PixelFormat Descriptor: > depth: 24 > class: TrueColor > buffer size: 32 > level: 0 > renderType: rgba > double buffer: True > stereo: False > hardware acceleration: True > rgba: redSize=8 greenSize=8blueSize=8alphaSize=8 > aux buffers: 4 > depth size: 24 > stencil size: 0 > accum: redSize=16 greenSize=16blueSize=16alphaSize=16 > > ******************************************************************** > > > > > > > > > >> >> Hope that helps! >> Ken >> >> >> >> >> >> >> >> On Tue, Nov 29, 2016 at 11:01 AM, Andrea Gavana >> wrote: >> >>> Hi Ken, >>> >>> Thank you for your answer. So it seems to me that I should not call >>> grid.Modified() if I only change the scalars? In my script there is almost >>> no pipeline, I.e. I have: >>> >>> Grid --> Mapper --> Actor >>> >>> No filters, no updating, no nothing. >>> >>> I will try your loop example tomorrow from my work computer. Also, how >>> can I know if the rendering engine is using the GPU? I have a fairly >>> powerful machine at work, able to run commercial 3D visualization software >>> (on a geological scale) with multi-million cells with no problem... >>> >>> Thank you again! >>> >>> Andrea. >>> >>> On Tue, 29 Nov 2016 at 16:37, Ken Martin wrote: >>> >>>> >>>> The timing are all taken after the first rendering. I have a little GUI >>>> with a VTK render window and a single button. Every time I press the button >>>> new data is randomly generated and I time the rendering only process, i.e.: >>>> >>>> >>>> VTK with OpenGL2 can render 500 million cells/second on a laptop GPU. >>>> If you are seeing performance significantly off from that and think you are >>>> using a GPU then something is wrong. To do timings do not rely on >>>> GetLastRenderTimeInSeconds but rather time a render loop like ala >>>> >>>> startTimer >>>> for (i = 0; i < 500; i++) >>>> { >>>> renWin->Render(); >>>> } >>>> endTimer >>>> print elapsedTime/500; >>>> >>>> >>>> >>>> grid.GetCellData().SetScalars(data) >>>> grid.Modified() >>>> renwin.Render() >>>> >>>> >>>> The render above is a first render, in that it is the first render >>>> after you modified your data. The entire >>>> pipeline has to be run then. You are probably timing how has the >>>> pipeline can be modified and recalaculated when you change your data. >>>> >>>> >>>> >>>> And I have a little rendering listener setup like this: >>>> >>>> >>>> renderer.AddObserver(vtk.vtkCommand.EndEvent, self.OnEndEvent) >>>> >>>> >>>> def OnEndEvent(self, caller, dummy1=None, dummy2=None, dummy3=None): >>>> >>>> timeInSeconds = caller.GetLastRenderTimeInSeconds() >>>> fps = 1.0/timeInSeconds >>>> print timeInSeconds, fps >>>> >>>> >>>> However, I realized that the simulator outputs the grid with a lot of >>>> redundant information - i.e., duplicated points. So I did the following: >>>> >>>> clean = vtk.vtkExtractUnstructuredGrid() >>>> clean.SetInputData(grid.GetOutput()) >>>> clean.MergingOn() >>>> clean.CellClippingOn() >>>> >>>> clean.SetCellMinimum(0) >>>> clean.SetCellMaximum(nx*ny*nz) >>>> clean.Update() >>>> >>>> >>>> the "clean" grid contains far far far less points than the original one >>>> (as the coincident points have been merged), and the rendering is much >>>> faster - about 0.24 seconds or 4.2 fps. Now, if there was a way to tell the >>>> rendering engine to ignore the points (i.e., don't render the points, I >>>> only care about the cells...) that would be even better :-) . >>>> >>>> >>>> Thank you again for all your hints. >>>> >>>> Andrea. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Tue, Nov 29, 2016 at 3:39 AM, Andrea Gavana >>> > wrote: >>>> >>>> Dear All, >>>> >>>> >>>> On 28 November 2016 at 16:12, Andrea Gavana >>>> wrote: >>>> >>>> Hi David, >>>> >>>> thank you for your answer. I will put some more comments inline >>>> too. Any insight or suggestion is more than welcome. >>>> >>>> On 28 November 2016 at 15:40, David E DeMarle wrote: >>>> >>>> Responses inline. Mostly though, make sure you are using the "OpenGL2" >>>> rendering backend, which is the default for 7.0 and 7.1. >>>> >>>> >>>> >>>> I am using VTK 7.0 through the Python bindings (the official ones from >>>> the Kitware website here: >>>> >>>> http://www.vtk.org/download/ >>>> >>>> >>>> So I was assuming that the rendering backend was already OpenGL2... is >>>> there any way to check if this is really the case? >>>> >>>> Also, I have tried to load my dataset in ParaView, and ParaView seems >>>> to be doing some kind of black magic on my vtkUnstructuredGrid as I get >>>> these kind of messages when I load the vtk file: >>>> >>>> Warning: In C:\bbd\df0abce0\source-paravie >>>> w\VTK\Rendering\VolumeOpenGL2\vtkOpenGLProjectedTetrahedraMapper.cxx, >>>> line 251 >>>> >>>> vtkOpenGLProjectedTetrahedraMapper (000000000D3CAA60): Missing FBO >>>> support. The algorithm may produce visual artifacts. >>>> >>>> >>>> >>>> >>>> Which, I believe, is telling me that ParaView is not doing what I am >>>> doing but maybe using some kind of volume-based rendering - when I rotate >>>> the grid the (almost cube-shaped) cells becomes subdivided in small >>>> triangles, when I stop interacting with them they go back to their normal >>>> appearance. It would be nice to know what ParaView is doing though, and >>>> also what "FBO support" means :-). I also noticed that ParaView is slightly >>>> faster in changing the displayed property - maybe 2 or 3 times faster than >>>> my bare-bone script. >>>> >>>> >>>> >>>> >>>> Just to add some more information: it is true that ParaView is faster >>>> in the re-rendering when I switch to another property, but it also shows >>>> heavy visual artifacts (i.e., cells with multiple colors in them?!? - see >>>> attached screenshot). So, if I understood it correctly, ParaView uses some >>>> kind of volume rendering of my vtkUnstructuredGrid (although I didn't ask >>>> it to... should it not use the default vtkDataSetMapper?). >>>> >>>> Based on my original pipeline: >>>> >>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>>> >>>> I have tried everything I know to speed up the re-rendering of the >>>> grid, I actually operate directly on the output of vtkThreshold (that is >>>> still a vtkUnstructuredGrid), so I simply throw away the original grid. >>>> With and without ImmediateModeRendering, with and without backface culling. >>>> My best improvements so far took the rendering time from 1.04 seconds to >>>> 0.94 seconds... so not much of an improvement :-) . >>>> >>>> I am of course open to any suggestions anyone may have on the rendering >>>> part - assuming that my geometry is fixed (it is not, but I'll worry about >>>> that later...), basically only on the process: >>>> >>>> vtkUnstructuredGrid.SetScalars(my_data) >>>> vtkUnstructuredGrid.Modified() >>>> vtkRenderWindow.Render() >>>> >>>> And of course - if there are other visualization strategies I may use, >>>> please shout :-) >>>> >>>> Thank you. >>>> >>>> Andrea. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Mon, Nov 28, 2016 at 7:35 AM, Andrea Gavana >>> > wrote: >>>> >>>> Dear All, >>>> >>>> I am working with some stuff coming out of CFD simulations, and in >>>> the current work the simulator produces a 3D grid (unstructured grid made >>>> of hexahedrons). The full grid is about 4 million cells, but due to other >>>> settings in the simulator the number of "active" cells in the simulation >>>> ends up being "only" 270,000. In order to visualize all this, I create a >>>> vtkUnstructuredGrid to hold the full grid, use a vtkThreshold to remove the >>>> "inactive" cells and then use a vtkDataSetMapper to visualize the resulting >>>> active grid: >>>> >>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetMapper --> vtkActor >>>> >>>> However, the rendering speed for the 270,000 cells grid is quite low - >>>> it takes about one second to display a new property by using SetScalars on >>>> the output of vtkThreshold. So I thought of using a vtkDataSetSurfaceFilter >>>> on the output of vtkThreshold to try and speed up the rendering. So, the >>>> current visualization strategy I have implemented is the following: >>>> >>>> vtkUnstructuredGrid --> vtkThreshold --> vtkDataSetSurfaceFilter --> >>>> vtkPolyDataMapper --> vtkActor >>>> >>>> This is still as slow as my first approach, and I also have a couple of >>>> questions - which stems from my ignorance in VTK things: >>>> >>>> >>>> DataSetMapper internally does vtkDataSetSurfaceFilter->vtkPolyDataMapper >>>> when given something other than PolyData, so not surprising that it isn't >>>> faster. >>>> >>>> >>>> 1. When I load (from the simulator outputs) a new property (cell-based) >>>> and I assign its values to the original vtkUnstructuredGrid (by using >>>> SetScalars on it), do all the filters (vtkThreshold and >>>> vtkDataSetSurfaceFilter) need to be re-run? If yes, why? I am not changing >>>> the active/inactive cells nor the geometry of the grid, only assigning >>>> different scalars. And, if yes, is there any way to tell the pipeline: >>>> "look, I've only changed the scalars, there's no need to re-run all the >>>> thresholds and surface filters *again*"? >>>> >>>> >>>> Yes they do, since the Executive classes' Modified time tracking is not >>>> fine grained enough to know the difference, and few if any of the filters >>>> would know how to update just the changed portions. >>>> >>>> >>>> 2. Is there any other pipeline style or visualization technique in VTK >>>> or any settings whatsoever that could bring down the rendering time (memory >>>> is not that much of a concern)? Basically, what I have a the moment - in >>>> terms of timing - is as follows: >>>> >>>> >>>> Yes, use OpenGL"2". Modern OpenGL programming techniques make it up to >>>> hundreds of times faster than the Legacy fixed function "OpenGL" backend. >>>> >>>> >>>> Reading data from simulator: 0.042 seconds >>>> Create VTK array with data : 0.002 seconds >>>> Call to SetScalars : 0.000 seconds >>>> Create Lookup Table : 0.001 seconds >>>> Render on screen : about 1 second >>>> >>>> >>>> Thank you in advance for any suggestion, my apologies for the long >>>> message. >>>> >>>> Andrea. >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> >>>> >>>> -- >>>> 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 ken.martin at kitware.com Wed Nov 30 09:35:54 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 30 Nov 2016 09:35:54 -0500 Subject: [vtkusers] Render scene without shading, light, interpolation In-Reply-To: References: Message-ID: Did you make sure none of the points were shared between cells? That would cause issues. Other than that you want renWin->SetMultisamples(0); // MSAA will create interpolated pixels actor->GetProperty()->SetAmbient(1.0) actor->GetProperty()->SetDiffuse(0.0) actor->GetProperty()->SetSpecular(0.0) and you should be good. Interpolation **should** be irrelevant if the cell's points have the same color. On Wed, Nov 30, 2016 at 2:20 AM, Jaehyun Jang wrote: > Dear vtk users, > > I am trying to these tasks using *vtkPolyDataMapper with > vtkUnsignedCharArray*, *vtkRenderer, vtkRenderWindow *to get pixel count > of a specific cell > > 1. Translate index value(within 1 ~ 16777215) to R, G, B value (using R = > idx & 255, G = (idx >> 8) & 255, B = (idx >> 16) & 255 > 2. From all points of each cell, assigning those color values into *vtkUnsignedCharArray > *with SetTupleValue(point index of same cell, color) (the forth value of > color is always 255) > - i.e, All different cells have different RGB value. (If I set only 50 > cells in the model, only 50 cells have distinct color in 1 ~ 50) > 3. Setting the model using *vtkProperty *with these settings > m_actor->GetProperty()->BackfaceCullingOn(); > m_actor->GetProperty()->LightingOff(); > m_actor->GetProperty()->ShadingOff(); > m_actor->GetProperty()->SetInterpolationToFlat(); > > 4. Render this model using *vtkRenderWindow *with these settings > renderwindow->SetOffScreenRendering(1); > renderwindow->AddRenderer(renderer); > renderwindow->SetSize(600, 600); > renderwindow->Render() > 5. Get vtkImageData using *vtkWindowToImageFilter *and access > GetScalarPointer > 6. Translate RGB to index and count it. > > However, RGB values translate wrong indices which I did not expect, I want > to know how to set my renderer or actor without interpolation and shading > to get the expected color. > > Thanks. > > -- > *Jaehyun Jang* > Master's candidate > School of Computing, KAIST > 291, Daehak-ro, Yuseong-gu, Daejeon > E3-1, 2413 STE > Computer Graphics and Visualization Lab > Resume | Github > | Personal > > _______________________________________________ > 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 dkxls23 at gmail.com Wed Nov 30 10:50:45 2016 From: dkxls23 at gmail.com (Armin Wehrfritz) Date: Wed, 30 Nov 2016 17:50:45 +0200 Subject: [vtkusers] Polyhedron to regular cell type In-Reply-To: References: Message-ID: <78ab4331-861d-6ef9-7765-073b879560ff@gmail.com> Hi Felipe, I don't think there is an "easy way" in the sense of a ready made implementation in a basic VTK class (though I think that would be a very nice feature to have). However, the OpenFOAM reader in VTK has an option to decompose polyhedral cells into VTK_TETRA or VTK_PYRAMID. Maybe you have a look at the implementation there: https://gitlab.kitware.com/vtk/vtk/blob/master/IO/Geometry/vtkOpenFOAMReader.cxx#L6470 https://gitlab.kitware.com/vtk/vtk/blob/master/IO/Geometry/vtkOpenFOAMReader.cxx#L6184 Hope this helps! Cheers, Armin On 11/30/2016 11:49 AM, Felipe Bordeu wrote: > hi, > I'm working on a filter, and I use a Voronoi library (external) to > generate polyhedron cells (VTK_POLYHEDRON). I will like to know if there > is any easy way to identified and to convert some of my polyedron cells > to a regular cells (hexaedron for example). In most for my cases all > the voronoi cells are "classic" cells ( tetras, hexas, wedge...). > > I dont care if the code is expensive, because I do it only in a limited > number of elements (less than 50). > > Thanks > Felipe > > using c++, (paraview 5.2) > > > _______________________________________________ > 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 sebastien.jourdain at kitware.com Wed Nov 30 11:19:45 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 30 Nov 2016 09:19:45 -0700 Subject: [vtkusers] Missing functions after building of VTK 7.1.0 with Java-wrapper In-Reply-To: <1480513322165-5741366.post@n5.nabble.com> References: <1480513322165-5741366.post@n5.nabble.com> Message-ID: I've tried it and confirm the issue. Daniel do you mind reporting a bug? But maybe David Gobbi or any Kitware folks may have an idea of what may have caused those methods to disappear in the Java wrapping language. (Wondering if that's the same for Python?) Just as a add-on the GetMTime() method does not seems to be available anymore on any VTK Object in Java. On Wed, Nov 30, 2016 at 6:42 AM, -Daniel- wrote: > Hi all, > > the building of VTK 7.1.0 with cmake (and Visual Studio) works without > problems. > However, if I want to use this created vtk.jar in my projects, some > features > are no longer available. > > For example are missing: > vtkCellArray -> GetMTime() or > vtkSplineWidget -> GetParametricSpline() or > vtkPolyDataSilhouette -> SetCamera(..) or > vtkDijkstraImageContourLineInterpolator -> GetDijkstraImageGeodesicPath() > > Have I forgotten something to set or activate? > Or are the functions not more available in vtk 7.1? > > Can anybody help me? > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Missing-functions-after-building-of-VTK-7-1-0-with- > Java-wrapper-tp5741366.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 cp.vtk.user at googlemail.com Wed Nov 30 11:23:55 2016 From: cp.vtk.user at googlemail.com (C P) Date: Wed, 30 Nov 2016 17:23:55 +0100 Subject: [vtkusers] Parallel Coordinates + 2d curves + 3d content Message-ID: Dear VTK users, I would like to have three different "draw areas": one for parallel coordinates, one for a vtkXYPlotActor and a third one for normal 3D stuff. So far, I managed to combine the 3D stuff with the vtkXYPlotActor. However, I do not know how to add the parallel coordinates. I tried to use vtkParallelCoordinatesActor but it keeps telling me "vtkParallelCoordinatesActor (0xdc79f0): No field data to plot" and "vtkParallelCoordinatesActor (0xdc79f0): Nothing to plot!" even though I feed it with the following: vtkTable* vtk_table = vtkTable::New(); for (int d = 0; d < dimension; ++d) { vtkDoubleArray* coordinates = vtkDoubleArray::New(); for (size_t i = 0; i < num_points; ++i) coordinates->InsertNextValue(static_cast(d*i)); vtk_table->AddColumn(coordinates); coordinates->Delete(); } m_actor->SetInputData(vtk_table); vtk_table->Delete(); Does someone have an idea how to make it work or use some other class? Best CP -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Nov 30 11:26:58 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 30 Nov 2016 11:26:58 -0500 Subject: [vtkusers] Missing functions after building of VTK 7.1.0 with Java-wrapper In-Reply-To: References: <1480513322165-5741366.post@n5.nabble.com> Message-ID: Please assign the bug to the 7.1.1 milestone. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Nov 30, 2016 at 11:19 AM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > I've tried it and confirm the issue. Daniel do you mind reporting a bug? > > But maybe David Gobbi or any Kitware folks may have an idea of what may > have caused those methods to disappear in the Java wrapping language. > (Wondering if that's the same for Python?) > > Just as a add-on the GetMTime() method does not seems to be available > anymore on any VTK Object in Java. > > > On Wed, Nov 30, 2016 at 6:42 AM, -Daniel- > wrote: > >> Hi all, >> >> the building of VTK 7.1.0 with cmake (and Visual Studio) works without >> problems. >> However, if I want to use this created vtk.jar in my projects, some >> features >> are no longer available. >> >> For example are missing: >> vtkCellArray -> GetMTime() or >> vtkSplineWidget -> GetParametricSpline() or >> vtkPolyDataSilhouette -> SetCamera(..) or >> vtkDijkstraImageContourLineInterpolator -> GetDijkstraImageGeodesicPath() >> >> Have I forgotten something to set or activate? >> Or are the functions not more available in vtk 7.1? >> >> Can anybody help me? >> >> >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/Missing-functions-after-building-of-VTK-7-1-0-with-Java- >> wrapper-tp5741366.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 m.nunes at fratoria.com Wed Nov 30 11:56:13 2016 From: m.nunes at fratoria.com (Shark) Date: Wed, 30 Nov 2016 09:56:13 -0700 (MST) Subject: [vtkusers] GDCM installation problem (openGL?) In-Reply-To: References: <1479309067222-5741192.post@n5.nabble.com> <1479810159854-5741259.post@n5.nabble.com> <1480433033848-5741335.post@n5.nabble.com> <1480434606050-5741340.post@n5.nabble.com> <1480436475922-5741345.post@n5.nabble.com> Message-ID: <1480524973709-5741373.post@n5.nabble.com> Hi there! I am also trying to achieve this under windows 10, visual studio 2013, both x64 and win32. I am using 2.6.6, checked the cmakefile, but no success. I have the same errors: vtkGDCMImageReader.obj : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingCore_AutoInit::vtkRenderingCore_AutoInit(void)" (??0vtkRenderingCore_AutoInit@@QAE at XZ) vtkGDCMImageReader2.obj : error LNK2001: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) vtkImageColorViewer.obj : error LNK2001: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) vtkGDCMImageReader.obj : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Destruct(void)" (?vtkRenderingOpenGL_AutoInit_Destruct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit(void)" (??1vtkRenderingCore_AutoInit@@QAE at XZ) vtkGDCMImageReader2.obj : error LNK2001: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Destruct(void)" (?vtkRenderingOpenGL_AutoInit_Destruct@@YAXXZ) vtkImageColorViewer.obj : error LNK2001: unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Destruct(void)" (?vtkRenderingOpenGL_AutoInit_Destruct@@YAXXZ) vtkGDCMImageReader.obj : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingVolumeOpenGL_AutoInit_Construct(void)" (?vtkRenderingVolumeOpenGL_AutoInit_Construct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingVolumeOpenGL_ModuleInit::vtkRenderingVolumeOpenGL_ModuleInit(void)" (??0vtkRenderingVolumeOpenGL_ModuleInit@@QAE at XZ) vtkGDCMImageReader.obj : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingVolumeOpenGL_AutoInit_Destruct(void)" (?vtkRenderingVolumeOpenGL_AutoInit_Destruct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingVolumeOpenGL_ModuleInit::~vtkRenderingVolumeOpenGL_ModuleInit(void)" (??1vtkRenderingVolumeOpenGL_ModuleInit@@QAE at XZ) if you believe it's best to contact GDCM directly, I will do it. Best regards -- View this message in context: http://vtk.1045678.n5.nabble.com/GDCM-installation-problem-openGL-tp5741192p5741373.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.lonie at kitware.com Wed Nov 30 12:10:58 2016 From: david.lonie at kitware.com (David Lonie) Date: Wed, 30 Nov 2016 12:10:58 -0500 Subject: [vtkusers] building VTK 7.1.0 on MSYS2: undefined references In-Reply-To: <9c3d57d5-ea39-f361-2c77-ea9619210d2b@emmenlauer.de> References: <5b7f6ad8-5793-6148-f755-e1741e43e5ed@emmenlauer.de> <9c3d57d5-ea39-f361-2c77-ea9619210d2b@emmenlauer.de> Message-ID: In VTK, all of the linkages are handled by the vtk_module CMake command in the module.cmake file of each module. The DEPENDS modules are linked to the current module. IIRC, you can run "make VERBOSE=1" to print out the actual gcc/ld commands that are called, that might give you some clues. Dave On Mon, Nov 28, 2016 at 3:45 PM, Mario Emmenlauer wrote: > > Thanks David for the reply. Its a bit strange because 7.0.0 worked fine, > so it must be something introduced in 7.1.0. I can also see the text > definition of the missing symbol in vtkCommonCore, so it must be the > missing linker command. Could you tell me how the dependency is defined > in VTK? I would be curious to learn the build system a bit. > > Cheers, > > Mario > > > > On 28.11.2016 17:44, David Lonie wrote: > > According to Common/DataModel/module.cmake, vtkCommonDataModel already > has a > > dependency on vtkCommonCore inside of VTK. Everything should be linked > already. Hmm. > > > > It's likely that the mingw support needs some love. I don't think we > have any > > customers that rely on it at the moment, but maybe someone can pick it > up. > > > > On Fri, Nov 25, 2016 at 4:23 AM, Mario Emmenlauer > > wrote: > > > > > > Dear All, > > > > I've reported this issue already here: > > https://gitlab.kitware.com/vtk/vtk/issues/16916 > > > > But I hope somebody here on the mailing list might be knowledgeable > about > > how to add > > linker dependencies inside VTK? > > > > When building VTK 7.1.0 I get an error about an undefined reference > on > > MSYS2. Everything > > works fine on Linux. The error on MSYS2 is: > > > > CMakeFiles/vtkCommonDataModel.dir/objects.a( > vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a7c): > > undefined reference to > > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > > CMakeFiles/vtkCommonDataModel.dir/objects.a( > vtkDataSetAttributes.cxx.obj):vtkDataSetAttributes.cxx:(.text+0x4a92): > > undefined reference to > > `vtkAOSDataArrayTemplate::FastDownCast(vtkAbstractArray*)' > > > > I think its required that vtkCommonDataModel links against > vtkCommonCore? I > > do not > > know how to achieve this. I've tried various combinations to add the > > dependency to > > Common/DataModel/CMakeLists.txt but without success. How is this > done correctly? > > > > Cheers, > > > > Mario > > _______________________________________________ > > 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 > > > > > > > > > > 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/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From meow at mat.uni.torun.pl Wed Nov 30 13:26:36 2016 From: meow at mat.uni.torun.pl (meow_fiz) Date: Wed, 30 Nov 2016 11:26:36 -0700 (MST) Subject: [vtkusers] vtkGPUVolumeRayCastMapper (OpenGL2) - Mask Input update In-Reply-To: References: <1480373793774-5741322.post@n5.nabble.com> Message-ID: <1480530396414-5741375.post@n5.nabble.com> I've downloaded latest VTK from GIT (git clone https://gitlab.kitware.com/vtk/vtk.git VTK). I guess it's the latest. But the problem remains. calling MaskInputData->Modified(); does not do any update to volume Mask My temp solution until I find the right one: (temporarily i've edited vtkOpenGLGPUVolumeRayCastMapper.cxx file - GPURender( ... ) by forcing to call LoadMask when mask was modified: if (this->Impl->NeedToInitializeResources || (input->GetMTime() > this->Impl->InputUpdateTime.GetMTime())) { volumeModified = true; input->GetDimensions(this->Impl->Dimensions); // Update bounds, data, and geometry this->Impl->ComputeBounds(input); this->Impl->LoadVolume(ren, input, volumeProperty, scalars, independentComponents); this->Impl->ComputeCellToPointMatrix(); this->Impl->LoadMask(ren, input, this->MaskInput, this->Impl->Extents, vol); } else { ///---------------------changed lines if (MaskInput->GetMTime() >Impl->ShaderBuildTime.GetMTime()) this->Impl->LoadMask(ren, input, this->MaskInput, this->Impl->Extents, vol); //-------------------- end of changed lines this->Impl->UpdateVolume(volumeProperty); } Regards, Michal -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkGPUVolumeRayCastMapper-OpenGL2-Mask-Input-update-tp5741322p5741375.html Sent from the VTK - Users mailing list archive at Nabble.com. From lplavorante at gmail.com Wed Nov 30 14:27:11 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Wed, 30 Nov 2016 17:27:11 -0200 Subject: [vtkusers] vtkDataSetSurfaceFIlter doesn not extract boundary faces In-Reply-To: References: Message-ID: Hi everybody, I would like to confirm that I have successfully obtained the polygonal boundary of my vtkUnstructuredGrid using vtkDataSetSurfaceFilter. The problem was in the way I was building the mesh. Even if the coordinates of geometric coincident points between adjacent cells were the same, I was inserting them with different point id's so the cells were considered as disconnected by the filter. I apologize for bothering the list with the previous post. Thank you Luca On Wed, Nov 30, 2016 at 11:39 AM, Luca Pallozzi Lavorante < lplavorante at gmail.com> wrote: > Hi vtkusers, > > regarding my previous post, in which I wrote about visualizing a smooth > polygonal boundary obtained from an unstructured grid, I have verified that > vtkDataSetSurfaceFilter returns all the faces of the cells in the original > grid instead of the boundary cells. There is a similar 2009 post about this > issue by Teresa Azevedo: > > http://public.kitware.com/pipermail/vtkusers/2009-October/054301.html > > She used vtkGeometryFilter to obtain the boundary > (vtkDataSetSurfaceFilter, which I use, is a faster version, as stated in > the documentation), but instead the filter returned all the faces of the > grid's cells. > Is there anything I am missing? Most of the external edges generated by > vtkDataSetSurfaceFilter are non-manifold because two adjacent triangles on > the boundary share an edge with an internal triangle from the non-boundary > face of a 3D cell (Triquadratic hexahedron). I think this is the cause for > the non-smooth appearance that the rendered surface gets after applying > vtkPolyDataNormals. So I though I should remove all non-boundary faces in > order to get a correct normal generation. > I know the 3D cells do share 2D faces in the non-boundary portion of the > grid because I am providing the cells' coordinates myself. How can I get > only the boundary faces? Is there any condition in the > vtkDataSetSurfaceFilter and vtkGeometryFilter classes which maybe my > unstructured grid is not respecting? > > Thank you very much, > > Luca > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Nov 30 16:02:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 30 Nov 2016 14:02:35 -0700 Subject: [vtkusers] Missing functions after building of VTK 7.1.0 with Java-wrapper In-Reply-To: References: <1480513322165-5741366.post@n5.nabble.com> Message-ID: All those methods are present in the Tcl and Python wrappers, only the Java wrappers seem to be missing them. I have an idea about why the methods are missing, and I think it has to do with the rearrangement of the public and private dependencies in the module.cmake files that occurred a few months ago (commit 6e113ad4). For "vtkParametricSpline *vtkSplineWidget::GetParametricSpline()", the vtkParametricSpline class is in vtkCommonComputationalGeometry, which is in the PRIVATE_DEPENDS section of the module.cmake for vtkInteractionWidgets (the module that vtkSplineWidget is inside of). In C++, this private dependency works fine because the forward declaration of vtkParametricSpline in vtkSplineWidget.h is sufficient. All C++ needs to know is that the vtkParametricSpline class has a definition somewhere, but it doesn't actually need the definition. Not so for Java. Unfortunately, Java needs the definition of vtkParametricSpline in order to wrap the vtkSplineWidget.GetParametricSpline() method. For the wrappers, it would usually get the definition through a complicated mechanism involving the vtkInteractionWidgetsHierarchy.txt that the wrappers build, but the Hierarchy.txt files are built according to the DEPENDS section of the module.cmake files and they ignore the PRIVATE_DEPENDS section. So a potential solution is use both the DEPENDS and PRIVATE_DEPENDS when building the Hierarchy.txt files for the wrappers. This is something that I can look into. - David On Wed, Nov 30, 2016 at 9:26 AM, David E DeMarle wrote: > Please assign the bug to the 7.1.1 milestone. > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Wed, Nov 30, 2016 at 11:19 AM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> I've tried it and confirm the issue. Daniel do you mind reporting a bug? >> >> But maybe David Gobbi or any Kitware folks may have an idea of what may >> have caused those methods to disappear in the Java wrapping language. >> (Wondering if that's the same for Python?) >> >> Just as a add-on the GetMTime() method does not seems to be available >> anymore on any VTK Object in Java. >> >> >> On Wed, Nov 30, 2016 at 6:42 AM, -Daniel- >> wrote: >> >>> Hi all, >>> >>> the building of VTK 7.1.0 with cmake (and Visual Studio) works without >>> problems. >>> However, if I want to use this created vtk.jar in my projects, some >>> features >>> are no longer available. >>> >>> For example are missing: >>> vtkCellArray -> GetMTime() or >>> vtkSplineWidget -> GetParametricSpline() or >>> vtkPolyDataSilhouette -> SetCamera(..) or >>> vtkDijkstraImageContourLineInterpolator -> >>> GetDijkstraImageGeodesicPath() >>> >>> Have I forgotten something to set or activate? >>> Or are the functions not more available in vtk 7.1? >>> >>> Can anybody help me? >>> >>> >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.c >>> om/Missing-functions-after-building-of-VTK-7-1-0-with-Java-w >>> rapper-tp5741366.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 david.gobbi at gmail.com Wed Nov 30 17:40:36 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 30 Nov 2016 15:40:36 -0700 Subject: [vtkusers] Missing functions after building of VTK 7.1.0 with Java-wrapper In-Reply-To: References: <1480513322165-5741366.post@n5.nabble.com> Message-ID: So the PRIVATE_DEPENDS issue that I brought up in my previous email is just part of the problem. The second part of the problem is that the Tcl and Java wrappers don't like the new vtkMTimeType typedef for 64-bit timestamps (though the Python wrappers don't have any problems with this typedef). In summary, for VTK 7.1 (and the current master) the Tcl and Java wrappers are missing the MTime methods, and the Java wrappers are missing a smattering of other methods, too. Python wrappers seem to be fine, as far as I've checked. - David On Wed, Nov 30, 2016 at 2:02 PM, David Gobbi wrote: > All those methods are present in the Tcl and Python wrappers, only the > Java wrappers seem to be missing them. > > I have an idea about why the methods are missing, and I think it has to do > with the rearrangement of the public and private dependencies in the > module.cmake files that occurred a few months ago (commit 6e113ad4). > > For "vtkParametricSpline *vtkSplineWidget::GetParametricSpline()", the > vtkParametricSpline class is in vtkCommonComputationalGeometry, which is > in the PRIVATE_DEPENDS section of the module.cmake for vtkInteractionWidgets > (the module that vtkSplineWidget is inside of). > > In C++, this private dependency works fine because the forward declaration > of vtkParametricSpline in vtkSplineWidget.h is sufficient. All C++ needs > to know is that the vtkParametricSpline class has a definition somewhere, > but it doesn't actually need the definition. Not so for Java. > Unfortunately, Java needs the definition of vtkParametricSpline in order to > wrap the vtkSplineWidget.GetParametricSpline() method. For the wrappers, > it would usually get the definition through a complicated mechanism > involving the vtkInteractionWidgetsHierarchy.txt that the wrappers build, > but the Hierarchy.txt files are built according to the DEPENDS section of > the module.cmake files and they ignore the PRIVATE_DEPENDS section. > > So a potential solution is use both the DEPENDS and PRIVATE_DEPENDS when > building the Hierarchy.txt files for the wrappers. This is something that > I can look into. > > - David > > > On Wed, Nov 30, 2016 at 9:26 AM, David E DeMarle > wrote: > >> Please assign the bug to the 7.1.1 milestone. >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 <(518)%20881-4909> >> >> On Wed, Nov 30, 2016 at 11:19 AM, Sebastien Jourdain < >> sebastien.jourdain at kitware.com> wrote: >> >>> I've tried it and confirm the issue. Daniel do you mind reporting a bug? >>> >>> But maybe David Gobbi or any Kitware folks may have an idea of what may >>> have caused those methods to disappear in the Java wrapping language. >>> (Wondering if that's the same for Python?) >>> >>> Just as a add-on the GetMTime() method does not seems to be available >>> anymore on any VTK Object in Java. >>> >>> >>> On Wed, Nov 30, 2016 at 6:42 AM, -Daniel- >>> wrote: >>> >>>> Hi all, >>>> >>>> the building of VTK 7.1.0 with cmake (and Visual Studio) works without >>>> problems. >>>> However, if I want to use this created vtk.jar in my projects, some >>>> features >>>> are no longer available. >>>> >>>> For example are missing: >>>> vtkCellArray -> GetMTime() or >>>> vtkSplineWidget -> GetParametricSpline() or >>>> vtkPolyDataSilhouette -> SetCamera(..) or >>>> vtkDijkstraImageContourLineInterpolator -> >>>> GetDijkstraImageGeodesicPath() >>>> >>>> Have I forgotten something to set or activate? >>>> Or are the functions not more available in vtk 7.1? >>>> >>>> Can anybody help me? >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://vtk.1045678.n5.nabble.c >>>> om/Missing-functions-after-building-of-VTK-7-1-0-with-Java-w >>>> rapper-tp5741366.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 jaehyunjang at kaist.ac.kr Wed Nov 30 20:44:13 2016 From: jaehyunjang at kaist.ac.kr (Jaehyun Jang) Date: Thu, 01 Dec 2016 10:44:13 +0900 Subject: [vtkusers] Render scene without shading, light, interpolation In-Reply-To: References: Message-ID: <77c1ee55-714e-4d43-b7a6-671c0b128e17@getmailbird.com> Thank you. I will figure out my problems with https://github.com/Kitware/VTK/blob/master/Rendering/Core/vtkHardwareSelector.cxx . On 11/30/2016 10:37:17 PM, David E DeMarle wrote: You might also want to investigate vtkHardwareSelector. It internally does what you are trying to do. Another approach is the more recent vtkValuePass, which is more general but if you associate an index array with the cells you can make it do the same thing. See the regression test suite for examples of use. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Nov 30, 2016 at 8:29 AM, Cory Quammen wrote: Hi, It seems like you are doing the right things and should expect to get the color values you set. Could you attach a small image showing the output you get and maybe highlight a cell that does not have the expected color? Are the colors way off from what you expect, or just slightly different? Thanks, Cory On Wed, Nov 30, 2016 at 2:20 AM, Jaehyun Jang wrote: > Dear vtk users, > > I am trying to these tasks using vtkPolyDataMapper with > vtkUnsignedCharArray, vtkRenderer, vtkRenderWindow to get pixel count of a > specific cell > > 1. Translate index value(within 1 ~ 16777215) to R, G, B value (using R = > idx & 255, G = (idx >> 8) & 255, B = (idx >> 16) & 255 > 2. From all points of each cell, assigning those color values into > vtkUnsignedCharArray with SetTupleValue(point index of same cell, color) > (the forth value of color is always 255) > - i.e, All different cells have different RGB value. (If I set only 50 cells > in the model, only 50 cells have distinct color in 1 ~ 50) > 3. Setting the model using vtkProperty with these settings >? ? ?m_actor->GetProperty()->BackfaceCullingOn(); >? ? ?m_actor->GetProperty()->LightingOff(); >? ? ?m_actor->GetProperty()->ShadingOff(); >? ? ?m_actor->GetProperty()->SetInterpolationToFlat(); > > 4. Render this model using vtkRenderWindow with these settings >? ? ?renderwindow->SetOffScreenRendering(1); >? ? ?renderwindow->AddRenderer(renderer); >? ? ?renderwindow->SetSize(600, 600); >? ? ?renderwindow->Render() > 5. Get vtkImageData using vtkWindowToImageFilter and access GetScalarPointer > 6. Translate RGB to index and count it. > > However, RGB values translate wrong indices which I did not expect, I want > to know how to set my renderer or actor without interpolation and shading to > get the expected color. > > Thanks. > > -- > Jaehyun Jang > Master's candidate > School of Computing, KAIST > 291, Daehak-ro, Yuseong-gu, Daejeon > E3-1, 2413 STE > Computer Graphics and Visualization Lab > Resume | Github | Personal > > _______________________________________________ > Powered by www.kitware.com [http://www.kitware.com] > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [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 [http://markmail.org/search/?q=vtkusers] > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [http://public.kitware.com/mailman/listinfo/vtkusers] > -- Cory Quammen Staff R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com [http://www.kitware.com] Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html [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 [http://markmail.org/search/?q=vtkusers] Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers [http://public.kitware.com/mailman/listinfo/vtkusers] -------------- next part -------------- An HTML attachment was scrubbed... URL: From priyavashistha2 at gmail.com Wed Nov 30 22:14:10 2016 From: priyavashistha2 at gmail.com (Priya Vashistha) Date: Wed, 30 Nov 2016 21:14:10 -0600 Subject: [vtkusers] No override found for 'vtkPolyDataMapper'. Message-ID: Dear vtk users and developers, I haven't been able to find a solution to this problem, hence posting this again. Please let me know if something worked for you for the following issue. *Generic Warning:* In/home/direction/Downloads/VTK-.0.0/Rendering/Core/vtkPolyDataMapper.cxx, line 28 *Error*: no override found for 'vtkPolyDataMapper'. I am using VTK7.0.0 (built using CMake on win 10) and running a project in Visual studio 15 express. This error appears in vtkOutputWindow. I saw the same issue been posted on forum online but I haven't been able to find a clear solution. Any help would be greatly appreciated. Thank You, Priya -------------- next part -------------- An HTML attachment was scrubbed... URL: From czuba at utexas.edu Wed Nov 30 22:51:37 2016 From: czuba at utexas.edu (Thad Czuba) Date: Wed, 30 Nov 2016 21:51:37 -0600 Subject: [vtkusers] vtk 4.2 download? Message-ID: <6F2904E6-7C0B-4AEE-B0CF-E0EEB2FBD718@utexas.edu> Hi guys, I'm needing to revive an ancient piece of software (circa mid 2000s; needs 32-bit Ubuntu ?12.04 i386 with qt3) that keeps getting hung up on a vtkPatented.so dependency. It doesn't appear in any of the currently available VTK distributions, so I'm guessing it must be lurking in VTK 4.2. There doesn't seem to be any way to download it though, as all the promising links to kitware or vtk.org are deadends. Any help would be greatly appreciated! From chinander at gmail.com Wed Nov 30 23:13:29 2016 From: chinander at gmail.com (Mike Chinander) Date: Wed, 30 Nov 2016 22:13:29 -0600 Subject: [vtkusers] vtk 4.2 download? In-Reply-To: <6F2904E6-7C0B-4AEE-B0CF-E0EEB2FBD718@utexas.edu> References: <6F2904E6-7C0B-4AEE-B0CF-E0EEB2FBD718@utexas.edu> Message-ID: You could download and build it. You might need an older version of Ubuntu of similar vintage as VTK 4.2.x to build it. https://github.com/Kitware/VTK/releases?after=v5.4.0 On Wed, Nov 30, 2016 at 9:51 PM, Thad Czuba wrote: > Hi guys, > > I'm needing to revive an ancient piece of software (circa mid 2000s; needs > 32-bit Ubuntu ?12.04 i386 with qt3) that keeps getting hung up on a > vtkPatented.so dependency. > > It doesn't appear in any of the currently available VTK distributions, so > I'm guessing it must be lurking in VTK 4.2. > > There doesn't seem to be any way to download it though, as all the > promising links to kitware or vtk.org are deadends. > > Any help would be greatly appreciated! > _______________________________________________ > 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: