From lars.matthaeus at web.de Thu Oct 1 03:21:59 2015 From: lars.matthaeus at web.de (=?UTF-8?Q?Lars_Matth=c3=a4us?=) Date: Thu, 1 Oct 2015 09:21:59 +0200 Subject: [vtkusers] ImagePlaneWidget mapping ImageData with 3 scalars to rgb In-Reply-To: References: <56094ECD.6030603@web.de> <560B92F2.3040402@web.de> Message-ID: <560CDF17.8070400@web.de> Great, that worked! Never had the idea that it would be possible to set just no color table at all... Thanks very much, Lars Am 30.09.2015 um 21:00 schrieb DL I: > Hi Lars, > > I think the problem is the vtkLookupTable is meant to take a single > component (scalar value) and map it to RGB. > So even though the image has 3 unsigned char components, only the first > component gets mapped through. What you want > to do in this case is just pass the image directly through without using > a lookup table. However, with 3D image data, you might > not be able to do window levelling: not sure, just a hunch at this > point. Also, you dont need to set a vtkLookupTable to > the vtkImageSlice's vtkImageProperty since the image is already 3 > unsigned char. > The following worked for me: > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(void) { > > // Setup renderers > vtkSmartPointer renderer = > vtkSmartPointer::New(); > > // Setup render window > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->SetSize(800, 800); > renderWindow->AddRenderer(renderer); > > // Setup render window interactor > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > // create input > vtkSmartPointer reader = > vtkSmartPointer::New(); > > reader->SetFileName("/home/dean/files/repository/VTKData/Data/beach.jpg"); > vtkImageData* id = reader->GetOutput(); > reader->Update(); > int* dim = id->GetDimensions(); > > // image plane widget > vtkSmartPointer ipw = > vtkSmartPointer::New(); > ipw->SetInteractor(renderWindowInteractor); > ipw->SetInput(reader->GetOutput()); > ipw->SetPlaneOrientation(2); > ipw->GetColorMap()->SetLookupTable(NULL); > ipw->GetColorMap()->SetOutputFormatToRGB(); > ipw->On(); > > // slice mapper > vtkSmartPointer imageMapper = > vtkSmartPointer::New(); > imageMapper->SetInput(reader->GetOutput()); > > vtkSmartPointer image = > vtkSmartPointer::New(); > image->SetMapper(imageMapper); > image->SetPosition(1.5 * dim[0], 0, 0); // shift in x direction > renderer->AddViewProp(image); > > // proper initial display > renderer->ResetCamera(); > > // Render and start interaction > renderWindowInteractor->Initialize(); > > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > - Dean > > 1,5 Top > > > > > On Wed, Sep 30, 2015 at 3:44 AM, Lars Matth?us > wrote: > > Dear Dean, > > Thanks for your help! Unfortunately, it doesn't solve the problem. The > image in the vtkImagePlaneWidget is still not like the original rgb. I > attach again some screenshots for comparison (vtkImagePlaneWidget on the > left, vtkImageSliceMapper on the right). Is there anything else I > could try? > > Best, > Lars > > Am 29.09.2015 um 15:22 schrieb DL I: > > Lars, > > try changing your value and saturation ranges to something else, like (1,1) > > regards, > > Dean > > > > On Mon, Sep 28, 2015 at 10:29 AM, Lars Matth?us > > >> wrote: > > > > I have a DataSet with 3 scalar components, e.g. from loading a stack of > > rgb images with the vtkJPEGReader. I want to slice through it using a > > vtkImagePlaneWidget. Unfortunately, I cannot get the widget to display > > the rgb image; I only get a grey image. > > > > I played with the vtkLookupTable::SetVectorModeToRGBColors successfully > > to display the image as rgb using a vtkImageSliceMapper, but when I use > > the same lookup table for the vtkImagePlaneWidget, I get a grey > > image again. > > > > I attach some java sample code comparing the vtkImagePlaneWidget and the > > vtkImageSliceMapper as well as the output of the program. > > > > Any help appreciated! > > Lars > > > > _______________________________________________ > > Powered by www.kitware.com > > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 j.ascenso at campus.fct.unl.pt Thu Oct 1 21:11:20 2015 From: j.ascenso at campus.fct.unl.pt (Joao Ascenso) Date: Fri, 2 Oct 2015 02:11:20 +0100 Subject: [vtkusers] Integrating simpleITK with Activiz 5.8 Message-ID: Hi, I'm working in C# and trying to connect simpleITK with Activiz. I tried to use itkImageToVTKImageFilter from ManagedITK but can't get around the image data formats. Any suggestions on how to achieve this? Thank you, -- Jo?o Ascenso -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.Buykx at tnodiana.com Fri Oct 2 03:11:15 2015 From: A.Buykx at tnodiana.com (Andreas Buykx) Date: Fri, 2 Oct 2015 07:11:15 +0000 Subject: [vtkusers] vtkCutter gaps using polyhedron cells In-Reply-To: <560C03F6.7080407@aerosoftinc.com> References: <560C03F6.7080407@aerosoftinc.com> Message-ID: <65D987BE62E58141AA480A59A8B5BBEA71AE5F67@srv-mail.diana.local> Hi, I reported a similar issue (15582) which has been fixed for VTK6.3.0 Kind regards, Andreas -----Original Message----- From: Reece Neel [mailto:neel at aerosoftinc.com] Sent: Wednesday, September 30, 2015 5:47 PM To: vtkusers at vtk.org Subject: [vtkusers] vtkCutter gaps using polyhedron cells Hi, I'm having a similar issue as the following bug report: http://www.vtk.org/Bug/bug_relationship_graph.php?bug_id=14485&graph=relation where the vtkCutter leaves holes or gaps for a vtkUnstructuredGrid that is composed of VTK_POLYHEDRON type cells. Has there been a fix to this issue. I'm using vtk 6.2.0 ____________________________________________________________ TNO DIANA BV is a limited liability company registered in the trade register of the Chamber of Commerce as TNO DIANA BV with registered number 27252655. ____________________________________________________________ This e-mail and its contents are subject to the DISCLAIMER at http://tnodiana.com/content/Disclaimer ____________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Fri Oct 2 08:43:15 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Fri, 2 Oct 2015 14:43:15 +0200 Subject: [vtkusers] Call to Render on WM_PAINT in vtkWin32RenderWindowInteractor Message-ID: Hi, Does someone know why in vtkWin32RenderWindowInteractor::vtkHandleMessage2 there is the Render() call on WM_PAINT: case WM_PAINT: me->Render(); return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); break; since CallWindowProc will lead to vtkWin32OpenGLRenderWindow::MessageProc that performs the rendering on WM_PAINT So we have a double rendering that can be slow... For example, resize a render window and you can see this happening. Thanks for any info about that -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Oct 2 14:21:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 2 Oct 2015 14:21:53 -0400 Subject: [vtkusers] Integrating simpleITK with Activiz 5.8 In-Reply-To: References: Message-ID: <2389B491-1330-4819-8D1D-16E38E869A38@mail.nih.gov> Hello Jo?o, You may find this CSharp SimpleITK example useful: http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html It demonstrates 2 ways to access the raw SimpleITK image buffer, which should be able to be shared or converted to VTK. HTH, Brad On Oct 1, 2015, at 9:11 PM, Joao Ascenso wrote: > Hi, > > I'm working in C# and trying to connect simpleITK with Activiz. > I tried to use itkImageToVTKImageFilter from ManagedITK but can't get around the image data formats. > > Any suggestions on how to achieve this? > > Thank you, > -- > Jo?o Ascenso > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 15891495523 at 126.com Sat Oct 3 01:02:47 2015 From: 15891495523 at 126.com (zhq) Date: Fri, 2 Oct 2015 22:02:47 -0700 (MST) Subject: [vtkusers] How to set the boundary of vtkDelaunay2D ? In-Reply-To: References: <1443277532130-5734142.post@n5.nabble.com> <1443280281055-5734143.post@n5.nabble.com> <1443314989143-5734146.post@n5.nabble.com> <1443352584901-5734149.post@n5.nabble.com> <1443405024462-5734151.post@n5.nabble.com> Message-ID: <1443848567344-5734216.post@n5.nabble.com> Dear David: I have another problem. After triangulation work, how to get the edges of result? My test is : vtksmartpointer tri = triangulator->GetOutput(); vtksmartpointer triCell = tri->GetPolys(); vtksmartpointer triList = vtksmartpointer::new(); triCell->GetCell(i,triList); for(int j=0;j<3;j++) { vtkIdtype point1 = triList->GetId(i); vtkIdtype point2 = triList->GetId((i+1)%3); if point1 and point2 located in differ circle double p1[3],p2[3]; tri->GetPoint(point1,p1); tri->GetPoint(point2,p2); double dis = distance( p1,p2 ); } I though that the triList record the ids of triangle points, and the id number of triList is 3. But, I am wrong. Because the id number of triList can be 70. And the length of edge can be 2 which should be around 1. So, how can I get the length of edges of the result ? ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-the-boundary-of-vtkDelaunay2D-tp5734142p5734216.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Sat Oct 3 05:56:15 2015 From: sam24666806 at gmail.com (LaChen) Date: Sat, 3 Oct 2015 02:56:15 -0700 (MST) Subject: [vtkusers] failed at glTexImage2D 1 OpenGL errors detected Message-ID: <1443866175937-5734217.post@n5.nabble.com> Hi, I use the component vtkSmartVolumeMapper and render it into rendering window of QVtkWidget. But I othen get message (not every time)"vtkTextureObject (06259D38): failed at glTexImage2D 1 OpenGL errors detected 0 : (1285) Out of memory". At first, I think its problem about hardward support of graphics card. But I run same program and get same error message on two video graphics card(GTX960 and ATI 8450). Does someone encounter same problem, too? -- View this message in context: http://vtk.1045678.n5.nabble.com/failed-at-glTexImage2D-1-OpenGL-errors-detected-tp5734217.html Sent from the VTK - Users mailing list archive at Nabble.com. From alex.med.marco at gmail.com Sat Oct 3 06:23:44 2015 From: alex.med.marco at gmail.com (Alex Med) Date: Sat, 3 Oct 2015 13:53:44 +0330 Subject: [vtkusers] GBR in vtkcolortransferfunction Message-ID: Hi, how to create BGR CLUT table with vtkcolortransferfunction ?? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From 15891495523 at 126.com Sat Oct 3 08:09:20 2015 From: 15891495523 at 126.com (zhq) Date: Sat, 3 Oct 2015 05:09:20 -0700 (MST) Subject: [vtkusers] How to set the boundary of vtkDelaunay2D ? In-Reply-To: References: <1443277532130-5734142.post@n5.nabble.com> <1443280281055-5734143.post@n5.nabble.com> <1443314989143-5734146.post@n5.nabble.com> <1443352584901-5734149.post@n5.nabble.com> <1443405024462-5734151.post@n5.nabble.com> Message-ID: <1443874160351-5734219.post@n5.nabble.com> Dear David: I have solved the problem that obtaining the edges of triangle. My code is: vtkIdType value=3; vtkIdType & a = value; vtkIdType * triPoint; triCell->InitTraversal(); while (true) { int flag = triCell->GetNextCell(a,triPoint); if (flag == 0) { break; } for (int i=0;i<3;i++) { vtkIdType point1 = triPoint[i]; vtkIdType point2 = triPoint[(i+1)%3]; if ( (point1=N) || (point1>=N && point2GetPoint(point1,p1); tri->GetPoint(point2,p2); distance = sqrt( (p1[0]-p2[0])*(p1[0]-p2[0]) + (p1[1]-p2[1])*(p1[1]-p2[1]) + (p1[2]-p2[2])*(p1[2]-p2[2]) ); printf("%.2f\n",distance); } } } But, I still have a question. Why GetNextCell worked but GetCell don't ? What's the different between they ? ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-the-boundary-of-vtkDelaunay2D-tp5734142p5734219.html Sent from the VTK - Users mailing list archive at Nabble.com. From piers.barber at logicmonkey.co.uk Sat Oct 3 20:48:28 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Sun, 04 Oct 2015 01:48:28 +0100 Subject: [vtkusers] =?utf-8?q?Computational_Geometry_-_user_equations=3F?= In-Reply-To: References: Message-ID: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Andrew, Cory, Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done. I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows. I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2. I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas? For the VTK user list, the zipped files I mention are here: https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot ) Thanks again for your help. -- Piers Barber (-=:LogicMonkey;=-) On 2015-10-01 00:19, Andrew Maclean wrote: > If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdf [10]in " How to create your own surface" should work for you. If you adopt this approach, you just build using the library and you do not need to modify the VTK library. > > I attach a VTK 6.3+ version of the example for you to try out. > > I'll add this to the VTK examples sometime next week. > > Once you get a surface you might like to look at: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs [11] > and > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs [12] > for some visualisation ideas. > > Regards > Andrew > >> ---------- Forwarded message ---------- >> From: Cory Quammen >> To: piers.barber at logicmonkey.co.uk [6] >> Cc: "vtkusers at vtk.org [7]" >> Date: Wed, 30 Sep 2015 09:15:45 -0400 >> Subject: Re: [vtkusers] Computational Geometry - user equations? >> >> On Tue, Sep 29, 2015 at 12:13 PM, wrote: >> >>> Hi All, >>> >>> I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>> >>> The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here: >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt [1] >> >> Yep, that looks like a good way to go. >> >>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this? >> >> You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above. >> >> Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have. >> >> Cory >> Thanks! >> >> -=:LM:=- >> _______________________________________________ >> Powered by > -- > > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ Links: ------ [1] http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt [2] http://www.vtk.org/Wiki/VTK_FAQ [3] http://markmail.org/search/?q=vtkusers [4] http://public.kitware.com/mailman/listinfo/vtkusers [5] mailto:cory.quammen at kitware.com [6] mailto:piers.barber at logicmonkey.co.uk [7] mailto:vtkusers at vtk.org [8] mailto:vtkusers at vtk.org [9] mailto:piers.barber at logicmonkey.co.uk [10] http://www.vtk.org/img/ParametricSurfaces.pdf [11] http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs [12] http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TrefoilKnot.zip Type: application/octet-stream Size: 4577 bytes Desc: not available URL: From g.bogle at auckland.ac.nz Sat Oct 3 21:35:41 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 4 Oct 2015 01:35:41 +0000 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> References: , <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: Hi Piers, Andrew, Cory, This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a version that works with 5.10? Thanks Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] Sent: Sunday, 4 October 2015 1:48 p.m. To: andrew.amaclean at gmail.com Cc: vtk Subject: Re: [vtkusers] Computational Geometry - user equations? Andrew, Cory, Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done. I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows. I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2. I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas? For the VTK user list, the zipped files I mention are here: https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot ) Thanks again for your help. -- Piers Barber (-=:LogicMonkey;=-) On 2015-10-01 00:19, Andrew Maclean wrote: If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own surface" should work for you. If you adopt this approach, you just build using the library and you do not need to modify the VTK library. I attach a VTK 6.3+ version of the example for you to try out. I'll add this to the VTK examples sometime next week. Once you get a surface you might like to look at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs and http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs for some visualisation ideas. Regards Andrew ---------- Forwarded message ---------- From: Cory Quammen > To: piers.barber at logicmonkey.co.uk Cc: "vtkusers at vtk.org" > Date: Wed, 30 Sep 2015 09:15:45 -0400 Subject: Re: [vtkusers] Computational Geometry - user equations? On Tue, Sep 29, 2015 at 12:13 PM, > wrote: Hi All, I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt Yep, that looks like a good way to go. I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this? You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above. Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have. Cory Thanks! -=:LM:=- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 R&D Engineer Kitware, Inc. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sat Oct 3 21:53:33 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 4 Oct 2015 12:53:33 +1100 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values. e.g something like: unsigned char red[3] = {255, 0, 0}; actor->GetProperty()->SetColor(red[0], red[1], red[2]); Andrew Maclean On 4 Oct 2015 12:35 pm, "Gib Bogle" wrote: > Hi Piers, Andrew, Cory, > > This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a > version that works with 5.10? > > Thanks > Gib > ------------------------------ > *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of > piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] > *Sent:* Sunday, 4 October 2015 1:48 p.m. > *To:* andrew.amaclean at gmail.com > *Cc:* vtk > *Subject:* Re: [vtkusers] Computational Geometry - user equations? > > Andrew, Cory, > > Thanks for the attachment - as a non-coder it bridged the gap between the > PDF that I've seen before and what actually needed to be done. > > I've attached my trefoil knot code in a zip. The partial derivatives make > a big difference to shadows. > > I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to > get the example to build was to the CMakeLists.txt - so it picks up OpenGL > rather than OpenGL2. > > I'm pleased that this works, but the output surface is rather jagged when > compared to what I get with MathMod. Any ideas? > > For the VTK user list, the zipped files I mention are here: > > https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot > > ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; > ./bin/TrefoilKnot ) > > Thanks again for your help. > > -- > > Piers Barber (-=:LogicMonkey;=-) > > On 2015-10-01 00:19, Andrew Maclean wrote: > > If I understand you correctly, then the approach described in > http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own > surface" should work for you. If you adopt this approach, you just build > using the library and you do not need to modify the VTK library. > > I attach a VTK 6.3+ version of the example for you to try out. > > I'll add this to the VTK examples sometime next week. > > Once you get a surface you might like to look at: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs > and > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs > for some visualisation ideas. > > > Regards > Andrew > > > >> ---------- Forwarded message ---------- >> From: Cory Quammen >> To: piers.barber at logicmonkey.co.uk >> Cc: "vtkusers at vtk.org" >> Date: Wed, 30 Sep 2015 09:15:45 -0400 >> Subject: Re: [vtkusers] Computational Geometry - user equations? >> On Tue, Sep 29, 2015 at 12:13 PM, wrote: >> >>> Hi All, >>> >>> I'd like to specify a surface f(u,v) in 3D with my own parametric >>> equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>> >>> The only way I can see to do this is to add my function to the library >>> source code, build the library and then call my function as described here: >>> >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt >> >> >> Yep, that looks like a good way to go. >> >> >>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an >>> easier and more direct way to do this? >> >> >> You can define your subclass of vtkParametricFunction in your local >> project - no need to add it to VTK, which is what I think you were saying >> above. >> >> Were you looking for a vtkParametricFunction subclass that takes an >> expression for x(u,v), etc.? That doesn't exist as far as I know, but that >> would be cool to have. >> >> Cory >> >> >>> Thanks! >>> >>> -=:LM:=- >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 >> R&D Engineer >> Kitware, Inc. >> >> >> -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sat Oct 3 22:01:04 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 4 Oct 2015 02:01:04 +0000 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> , Message-ID: That was easily circumvented, but turned out to be the least of the problems: 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkParametricFunction::vtkParametricFunction(void)" (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function "protected: __thiscall myParametricTrefoilKnot::myParametricTrefoilKnot(void)" (??0myParametricTrefoilKnot@@IAE at XZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::FastDelete(void)" (?FastDelete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintHeader(class std::basic_ostream > &,class vtkIndent)" (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintTrailer(class std::basic_ostream > &,class vtkIndent)" (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" (?Register at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class std::basic_ostream > &)" (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase@@MAEXPAVvtkGarbageCollector@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall vtkObject::GetMTime(void)" (?GetMTime at vtkObject@@UAEKXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" (?GetMinimumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" (?GetMaximumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" (?GetMinimumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" (?GetMaximumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" (?GetMinimumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" (?GetMaximumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinU(int)" (?SetJoinU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinU(void)" (?GetJoinU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOn(void)" (?JoinUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOff(void)" (?JoinUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinV(int)" (?SetJoinV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinV(void)" (?GetJoinV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOn(void)" (?JoinVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOff(void)" (?JoinVOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistU(int)" (?SetTwistU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistU(void)" (?GetTwistU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOn(void)" (?TwistUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOff(void)" (?TwistUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistV(int)" (?SetTwistV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistV(void)" (?GetTwistV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOn(void)" (?TwistVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOff(void)" (?TwistVOff at vtkParametricFunction@@UAEXXZ) etc. etc. ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 2:53 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: RE: [vtkusers] Computational Geometry - user equations? vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values. e.g something like: unsigned char red[3] = {255, 0, 0}; actor->GetProperty()->SetColor(red[0], red[1], red[2]); Andrew Maclean On 4 Oct 2015 12:35 pm, "Gib Bogle" > wrote: Hi Piers, Andrew, Cory, This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a version that works with 5.10? Thanks Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] Sent: Sunday, 4 October 2015 1:48 p.m. To: andrew.amaclean at gmail.com Cc: vtk Subject: Re: [vtkusers] Computational Geometry - user equations? Andrew, Cory, Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done. I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows. I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2. I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas? For the VTK user list, the zipped files I mention are here: https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot ) Thanks again for your help. -- Piers Barber (-=:LogicMonkey;=-) On 2015-10-01 00:19, Andrew Maclean wrote: If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own surface" should work for you. If you adopt this approach, you just build using the library and you do not need to modify the VTK library. I attach a VTK 6.3+ version of the example for you to try out. I'll add this to the VTK examples sometime next week. Once you get a surface you might like to look at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs and http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs for some visualisation ideas. Regards Andrew ---------- Forwarded message ---------- From: Cory Quammen > To: piers.barber at logicmonkey.co.uk Cc: "vtkusers at vtk.org" > Date: Wed, 30 Sep 2015 09:15:45 -0400 Subject: Re: [vtkusers] Computational Geometry - user equations? On Tue, Sep 29, 2015 at 12:13 PM, > wrote: Hi All, I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt Yep, that looks like a good way to go. I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this? You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above. Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have. Cory Thanks! -=:LM:=- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 R&D Engineer Kitware, Inc. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sat Oct 3 22:32:26 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 4 Oct 2015 13:32:26 +1100 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: VT6 is modular in contrast to VTK 5 so I would replace the section in the CMakeLists.txt file dealing with including the modules with something like this: find_package(VTK REQUIRED) include(${VTK_USE_FILE}) I hope this helps. Andrew Maclean On 4 Oct 2015 1:01 pm, "Gib Bogle" wrote: > That was easily circumvented, but turned out to be the least of the > problems: > > 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) protected: __thiscall > vtkParametricFunction::vtkParametricFunction(void)" > (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function > "protected: __thiscall > myParametricTrefoilKnot::myParametricTrefoilKnot(void)" > (??0myParametricTrefoilKnot@@IAE at XZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase > @@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::FastDelete(void)" > (?FastDelete at vtkObjectBase@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::PrintHeader(class > std::basic_ostream > &,class vtkIndent)" > (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@ > @@std@@VvtkIndent@@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::PrintTrailer(class > std::basic_ostream > &,class vtkIndent)" > (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D > @std@@@std@@VvtkIndent@@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" > (?Register at vtkObjectBase@@UAEXPAV1@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" > (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: > virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class > std::basic_ostream > &)" > (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU > ?$char_traits at D@std@@@std@@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: > virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase > *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: > virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase > *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: > virtual void __thiscall vtkObjectBase::ReportReferences(class > vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase > @@MAEXPAVvtkGarbageCollector@@@Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject > @@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject > @@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject > @@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual unsigned long __thiscall vtkObject::GetMTime(void)" > (?GetMTime at vtkObject@@UAEKXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" > (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" > (?GetMinimumU at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" > (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" > (?GetMaximumU at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" > (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" > (?GetMinimumV at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" > (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" > (?GetMaximumV at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" > (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" > (?GetMinimumW at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" > (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" > (?GetMaximumW at vtkParametricFunction@@UAENXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetJoinU(int)" > (?SetJoinU at vtkParametricFunction@@UAEXH at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual int __thiscall vtkParametricFunction::GetJoinU(void)" > (?GetJoinU at vtkParametricFunction@@UAEHXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::JoinUOn(void)" > (?JoinUOn at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::JoinUOff(void)" > (?JoinUOff at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetJoinV(int)" > (?SetJoinV at vtkParametricFunction@@UAEXH at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual int __thiscall vtkParametricFunction::GetJoinV(void)" > (?GetJoinV at vtkParametricFunction@@UAEHXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::JoinVOn(void)" > (?JoinVOn at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::JoinVOff(void)" > (?JoinVOff at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetTwistU(int)" > (?SetTwistU at vtkParametricFunction@@UAEXH at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual int __thiscall vtkParametricFunction::GetTwistU(void)" > (?GetTwistU at vtkParametricFunction@@UAEHXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::TwistUOn(void)" > (?TwistUOn at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::TwistUOff(void)" > (?TwistUOff at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::SetTwistV(int)" > (?SetTwistV at vtkParametricFunction@@UAEXH at Z) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual int __thiscall vtkParametricFunction::GetTwistV(void)" > (?GetTwistV at vtkParametricFunction@@UAEHXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::TwistVOn(void)" > (?TwistVOn at vtkParametricFunction@@UAEXXZ) > 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: > virtual void __thiscall vtkParametricFunction::TwistVOff(void)" > (?TwistVOff at vtkParametricFunction@@UAEXXZ) > etc. etc. > ------------------------------ > *From:* Andrew Maclean [andrew.amaclean at gmail.com] > *Sent:* Sunday, 4 October 2015 2:53 p.m. > *To:* Gib Bogle > *Cc:* vtk; logicmonkeyuk > *Subject:* RE: [vtkusers] Computational Geometry - user equations? > > vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify > colours using RGB values. > > e.g something like: > unsigned char red[3] = {255, 0, 0}; > actor->GetProperty()->SetColor(red[0], red[1], red[2]); > > Andrew Maclean > On 4 Oct 2015 12:35 pm, "Gib Bogle" wrote: > >> Hi Piers, Andrew, Cory, >> >> This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a >> version that works with 5.10? >> >> Thanks >> Gib >> ------------------------------ >> *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of >> piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] >> *Sent:* Sunday, 4 October 2015 1:48 p.m. >> *To:* andrew.amaclean at gmail.com >> *Cc:* vtk >> *Subject:* Re: [vtkusers] Computational Geometry - user equations? >> >> Andrew, Cory, >> >> Thanks for the attachment - as a non-coder it bridged the gap between the >> PDF that I've seen before and what actually needed to be done. >> >> I've attached my trefoil knot code in a zip. The partial derivatives make >> a big difference to shadows. >> >> I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to >> get the example to build was to the CMakeLists.txt - so it picks up OpenGL >> rather than OpenGL2. >> >> I'm pleased that this works, but the output surface is rather jagged when >> compared to what I get with MathMod. Any ideas? >> >> For the VTK user list, the zipped files I mention are here: >> >> https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot >> >> ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; >> ./bin/TrefoilKnot ) >> >> Thanks again for your help. >> >> -- >> >> Piers Barber (-=:LogicMonkey;=-) >> >> On 2015-10-01 00:19, Andrew Maclean wrote: >> >> If I understand you correctly, then the approach described in >> http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own >> surface" should work for you. If you adopt this approach, you just build >> using the library and you do not need to modify the VTK library. >> >> I attach a VTK 6.3+ version of the example for you to try out. >> >> I'll add this to the VTK examples sometime next week. >> >> Once you get a surface you might like to look at: >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs >> and >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs >> for some visualisation ideas. >> >> >> Regards >> Andrew >> >> >> >>> ---------- Forwarded message ---------- >>> From: Cory Quammen >>> To: piers.barber at logicmonkey.co.uk >>> Cc: "vtkusers at vtk.org" >>> Date: Wed, 30 Sep 2015 09:15:45 -0400 >>> Subject: Re: [vtkusers] Computational Geometry - user equations? >>> On Tue, Sep 29, 2015 at 12:13 PM, >>> wrote: >>> >>>> Hi All, >>>> >>>> I'd like to specify a surface f(u,v) in 3D with my own parametric >>>> equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>>> >>>> The only way I can see to do this is to add my function to the library >>>> source code, build the library and then call my function as described here: >>>> >>>> >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt >>> >>> >>> Yep, that looks like a good way to go. >>> >>> >>>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an >>>> easier and more direct way to do this? >>> >>> >>> You can define your subclass of vtkParametricFunction in your local >>> project - no need to add it to VTK, which is what I think you were saying >>> above. >>> >>> Were you looking for a vtkParametricFunction subclass that takes an >>> expression for x(u,v), etc.? That doesn't exist as far as I know, but that >>> would be cool to have. >>> >>> Cory >>> >>> >>>> Thanks! >>>> >>>> -=:LM:=- >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 >>> R&D Engineer >>> Kitware, Inc. >>> >>> >>> -- >> ___________________________________________ >> Andrew J. P. Maclean >> >> ___________________________________________ >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sat Oct 3 22:38:09 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 4 Oct 2015 02:38:09 +0000 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> , Message-ID: Thanks for your help, Andrew. I did this: #find_package(VTK COMPONENTS # vtkCommonColor # vtkCommonCore # vtkFiltersHybrid # vtkFiltersSources # vtkIOImage # vtkInteractionStyle # vtkRenderingOpenGL #) find_package(VTK REQUIRED) but unfortunately the list of errors looks much the same. Cheers Gib ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 3:32 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: RE: [vtkusers] Computational Geometry - user equations? VT6 is modular in contrast to VTK 5 so I would replace the section in the CMakeLists.txt file dealing with including the modules with something like this: find_package(VTK REQUIRED) include(${VTK_USE_FILE}) I hope this helps. Andrew Maclean On 4 Oct 2015 1:01 pm, "Gib Bogle" > wrote: That was easily circumvented, but turned out to be the least of the problems: 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkParametricFunction::vtkParametricFunction(void)" (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function "protected: __thiscall myParametricTrefoilKnot::myParametricTrefoilKnot(void)" (??0myParametricTrefoilKnot@@IAE at XZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::FastDelete(void)" (?FastDelete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintHeader(class std::basic_ostream > &,class vtkIndent)" (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintTrailer(class std::basic_ostream > &,class vtkIndent)" (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" (?Register at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class std::basic_ostream > &)" (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase@@MAEXPAVvtkGarbageCollector@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall vtkObject::GetMTime(void)" (?GetMTime at vtkObject@@UAEKXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" (?GetMinimumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" (?GetMaximumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" (?GetMinimumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" (?GetMaximumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" (?GetMinimumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" (?GetMaximumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinU(int)" (?SetJoinU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinU(void)" (?GetJoinU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOn(void)" (?JoinUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOff(void)" (?JoinUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinV(int)" (?SetJoinV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinV(void)" (?GetJoinV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOn(void)" (?JoinVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOff(void)" (?JoinVOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistU(int)" (?SetTwistU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistU(void)" (?GetTwistU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOn(void)" (?TwistUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOff(void)" (?TwistUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistV(int)" (?SetTwistV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistV(void)" (?GetTwistV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOn(void)" (?TwistVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOff(void)" (?TwistVOff at vtkParametricFunction@@UAEXXZ) etc. etc. ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 2:53 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: RE: [vtkusers] Computational Geometry - user equations? vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values. e.g something like: unsigned char red[3] = {255, 0, 0}; actor->GetProperty()->SetColor(red[0], red[1], red[2]); Andrew Maclean On 4 Oct 2015 12:35 pm, "Gib Bogle" > wrote: Hi Piers, Andrew, Cory, This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a version that works with 5.10? Thanks Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] Sent: Sunday, 4 October 2015 1:48 p.m. To: andrew.amaclean at gmail.com Cc: vtk Subject: Re: [vtkusers] Computational Geometry - user equations? Andrew, Cory, Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done. I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows. I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2. I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas? For the VTK user list, the zipped files I mention are here: https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot ) Thanks again for your help. -- Piers Barber (-=:LogicMonkey;=-) On 2015-10-01 00:19, Andrew Maclean wrote: If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own surface" should work for you. If you adopt this approach, you just build using the library and you do not need to modify the VTK library. I attach a VTK 6.3+ version of the example for you to try out. I'll add this to the VTK examples sometime next week. Once you get a surface you might like to look at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs and http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs for some visualisation ideas. Regards Andrew ---------- Forwarded message ---------- From: Cory Quammen > To: piers.barber at logicmonkey.co.uk Cc: "vtkusers at vtk.org" > Date: Wed, 30 Sep 2015 09:15:45 -0400 Subject: Re: [vtkusers] Computational Geometry - user equations? On Tue, Sep 29, 2015 at 12:13 PM, > wrote: Hi All, I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt Yep, that looks like a good way to go. I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this? You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above. Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have. Cory Thanks! -=:LM:=- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 R&D Engineer Kitware, Inc. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sat Oct 3 23:55:27 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 4 Oct 2015 14:55:27 +1100 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: It's a long while since I have used VTK 5.10. Try deleting your cmake cache file, then run cmake again and rebuild. On Sun, Oct 4, 2015 at 1:38 PM, Gib Bogle wrote: > Thanks for your help, Andrew. > I did this: > #find_package(VTK COMPONENTS > # vtkCommonColor > # vtkCommonCore > # vtkFiltersHybrid > # vtkFiltersSources > # vtkIOImage > # vtkInteractionStyle > # vtkRenderingOpenGL > #) > find_package(VTK REQUIRED) > but unfortunately the list of errors looks much the same. > > Cheers > Gib > ------------------------------ > *From:* Andrew Maclean [andrew.amaclean at gmail.com] > *Sent:* Sunday, 4 October 2015 3:32 p.m. > > *To:* Gib Bogle > *Cc:* vtk; logicmonkeyuk > *Subject:* RE: [vtkusers] Computational Geometry - user equations? > > VT6 is modular in contrast to VTK 5 so I would replace the section in the > CMakeLists.txt file dealing with including the modules with something like > this: > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > I hope this helps. > > Andrew Maclean > On 4 Oct 2015 1:01 pm, "Gib Bogle" wrote: > >> That was easily circumvented, but turned out to be the least of the >> problems: >> >> 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol >> "__declspec(dllimport) protected: __thiscall >> vtkParametricFunction::vtkParametricFunction(void)" >> (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function >> "protected: __thiscall >> myParametricTrefoilKnot::myParametricTrefoilKnot(void)" >> (??0myParametricTrefoilKnot@@IAE at XZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase >> @@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::FastDelete(void)" >> (?FastDelete at vtkObjectBase@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::PrintHeader(class >> std::basic_ostream > &,class vtkIndent)" >> (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >> @std@@@std@@VvtkIndent@@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::PrintTrailer(class >> std::basic_ostream > &,class vtkIndent)" >> (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >> @std@@@std@@VvtkIndent@@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" >> (?Register at vtkObjectBase@@UAEXPAV1@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" >> (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: >> virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class >> std::basic_ostream > &)" >> (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU >> ?$char_traits at D@std@@@std@@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: >> virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase >> *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: >> virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase >> *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: >> virtual void __thiscall vtkObjectBase::ReportReferences(class >> vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase >> @@MAEXPAVvtkGarbageCollector@@@Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject >> @@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject >> @@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject >> @@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual unsigned long __thiscall vtkObject::GetMTime(void)" >> (?GetMTime at vtkObject@@UAEKXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" >> (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" >> (?GetMinimumU at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" >> (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" >> (?GetMaximumU at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" >> (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" >> (?GetMinimumV at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" >> (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" >> (?GetMaximumV at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" >> (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" >> (?GetMinimumW at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" >> (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" >> (?GetMaximumW at vtkParametricFunction@@UAENXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetJoinU(int)" >> (?SetJoinU at vtkParametricFunction@@UAEXH at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual int __thiscall vtkParametricFunction::GetJoinU(void)" >> (?GetJoinU at vtkParametricFunction@@UAEHXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::JoinUOn(void)" >> (?JoinUOn at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::JoinUOff(void)" >> (?JoinUOff at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetJoinV(int)" >> (?SetJoinV at vtkParametricFunction@@UAEXH at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual int __thiscall vtkParametricFunction::GetJoinV(void)" >> (?GetJoinV at vtkParametricFunction@@UAEHXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::JoinVOn(void)" >> (?JoinVOn at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::JoinVOff(void)" >> (?JoinVOff at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetTwistU(int)" >> (?SetTwistU at vtkParametricFunction@@UAEXH at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual int __thiscall vtkParametricFunction::GetTwistU(void)" >> (?GetTwistU at vtkParametricFunction@@UAEHXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::TwistUOn(void)" >> (?TwistUOn at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::TwistUOff(void)" >> (?TwistUOff at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::SetTwistV(int)" >> (?SetTwistV at vtkParametricFunction@@UAEXH at Z) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual int __thiscall vtkParametricFunction::GetTwistV(void)" >> (?GetTwistV at vtkParametricFunction@@UAEHXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::TwistVOn(void)" >> (?TwistVOn at vtkParametricFunction@@UAEXXZ) >> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >> virtual void __thiscall vtkParametricFunction::TwistVOff(void)" >> (?TwistVOff at vtkParametricFunction@@UAEXXZ) >> etc. etc. >> ------------------------------ >> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >> *Sent:* Sunday, 4 October 2015 2:53 p.m. >> *To:* Gib Bogle >> *Cc:* vtk; logicmonkeyuk >> *Subject:* RE: [vtkusers] Computational Geometry - user equations? >> >> vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to >> specify colours using RGB values. >> >> e.g something like: >> unsigned char red[3] = {255, 0, 0}; >> actor->GetProperty()->SetColor(red[0], red[1], red[2]); >> >> Andrew Maclean >> On 4 Oct 2015 12:35 pm, "Gib Bogle" wrote: >> >>> Hi Piers, Andrew, Cory, >>> >>> This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a >>> version that works with 5.10? >>> >>> Thanks >>> Gib >>> ------------------------------ >>> *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of >>> piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] >>> *Sent:* Sunday, 4 October 2015 1:48 p.m. >>> *To:* andrew.amaclean at gmail.com >>> *Cc:* vtk >>> *Subject:* Re: [vtkusers] Computational Geometry - user equations? >>> >>> Andrew, Cory, >>> >>> Thanks for the attachment - as a non-coder it bridged the gap between >>> the PDF that I've seen before and what actually needed to be done. >>> >>> I've attached my trefoil knot code in a zip. The partial derivatives >>> make a big difference to shadows. >>> >>> I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make >>> to get the example to build was to the CMakeLists.txt - so it picks up >>> OpenGL rather than OpenGL2. >>> >>> I'm pleased that this works, but the output surface is rather jagged >>> when compared to what I get with MathMod. Any ideas? >>> >>> For the VTK user list, the zipped files I mention are here: >>> >>> https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot >>> >>> ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; >>> ./bin/TrefoilKnot ) >>> >>> Thanks again for your help. >>> >>> -- >>> >>> Piers Barber (-=:LogicMonkey;=-) >>> >>> On 2015-10-01 00:19, Andrew Maclean wrote: >>> >>> If I understand you correctly, then the approach described in >>> http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your >>> own surface" should work for you. If you adopt this approach, you just >>> build using the library and you do not need to modify the VTK library. >>> >>> I attach a VTK 6.3+ version of the example for you to try out. >>> >>> I'll add this to the VTK examples sometime next week. >>> >>> Once you get a surface you might like to look at: >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs >>> and >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs >>> for some visualisation ideas. >>> >>> >>> Regards >>> Andrew >>> >>> >>> >>>> ---------- Forwarded message ---------- >>>> From: Cory Quammen >>>> To: piers.barber at logicmonkey.co.uk >>>> Cc: "vtkusers at vtk.org" >>>> Date: Wed, 30 Sep 2015 09:15:45 -0400 >>>> Subject: Re: [vtkusers] Computational Geometry - user equations? >>>> On Tue, Sep 29, 2015 at 12:13 PM, >>>> wrote: >>>> >>>>> Hi All, >>>>> >>>>> I'd like to specify a surface f(u,v) in 3D with my own parametric >>>>> equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>>>> >>>>> The only way I can see to do this is to add my function to the library >>>>> source code, build the library and then call my function as described here: >>>>> >>>>> >>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt >>>> >>>> >>>> Yep, that looks like a good way to go. >>>> >>>> >>>>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an >>>>> easier and more direct way to do this? >>>> >>>> >>>> You can define your subclass of vtkParametricFunction in your local >>>> project - no need to add it to VTK, which is what I think you were saying >>>> above. >>>> >>>> Were you looking for a vtkParametricFunction subclass that takes an >>>> expression for x(u,v), etc.? That doesn't exist as far as I know, but that >>>> would be cool to have. >>>> >>>> Cory >>>> >>>> >>>>> Thanks! >>>>> >>>>> -=:LM:=- >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> 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 >>>> R&D Engineer >>>> Kitware, Inc. >>>> >>>> >>>> -- >>> ___________________________________________ >>> Andrew J. P. Maclean >>> >>> ___________________________________________ >>> >>> >>> >>> >> -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Oct 4 00:00:37 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 4 Oct 2015 04:00:37 +0000 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> , Message-ID: I did that Andrew, in fact I deleted everything except the source files and CMakeLists.txt. I've been holding off from updating my VTK, because I don't want to break running programs. How easy is the migration from 5 to 6? Gib ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 4:55 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: Re: [vtkusers] Computational Geometry - user equations? It's a long while since I have used VTK 5.10. Try deleting your cmake cache file, then run cmake again and rebuild. On Sun, Oct 4, 2015 at 1:38 PM, Gib Bogle > wrote: Thanks for your help, Andrew. I did this: #find_package(VTK COMPONENTS # vtkCommonColor # vtkCommonCore # vtkFiltersHybrid # vtkFiltersSources # vtkIOImage # vtkInteractionStyle # vtkRenderingOpenGL #) find_package(VTK REQUIRED) but unfortunately the list of errors looks much the same. Cheers Gib ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 3:32 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: RE: [vtkusers] Computational Geometry - user equations? VT6 is modular in contrast to VTK 5 so I would replace the section in the CMakeLists.txt file dealing with including the modules with something like this: find_package(VTK REQUIRED) include(${VTK_USE_FILE}) I hope this helps. Andrew Maclean On 4 Oct 2015 1:01 pm, "Gib Bogle" > wrote: That was easily circumvented, but turned out to be the least of the problems: 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkParametricFunction::vtkParametricFunction(void)" (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function "protected: __thiscall myParametricTrefoilKnot::myParametricTrefoilKnot(void)" (??0myParametricTrefoilKnot@@IAE at XZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::FastDelete(void)" (?FastDelete at vtkObjectBase@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintHeader(class std::basic_ostream > &,class vtkIndent)" (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintTrailer(class std::basic_ostream > &,class vtkIndent)" (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" (?Register at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class std::basic_ostream > &)" (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase@@MAEXPAVvtkGarbageCollector@@@Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall vtkObject::GetMTime(void)" (?GetMTime at vtkObject@@UAEKXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" (?GetMinimumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" (?GetMaximumU at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" (?GetMinimumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" (?GetMaximumV at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" (?GetMinimumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" (?GetMaximumW at vtkParametricFunction@@UAENXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinU(int)" (?SetJoinU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinU(void)" (?GetJoinU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOn(void)" (?JoinUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOff(void)" (?JoinUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinV(int)" (?SetJoinV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinV(void)" (?GetJoinV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOn(void)" (?JoinVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOff(void)" (?JoinVOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistU(int)" (?SetTwistU at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistU(void)" (?GetTwistU at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOn(void)" (?TwistUOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOff(void)" (?TwistUOff at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistV(int)" (?SetTwistV at vtkParametricFunction@@UAEXH at Z) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistV(void)" (?GetTwistV at vtkParametricFunction@@UAEHXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOn(void)" (?TwistVOn at vtkParametricFunction@@UAEXXZ) 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOff(void)" (?TwistVOff at vtkParametricFunction@@UAEXXZ) etc. etc. ________________________________ From: Andrew Maclean [andrew.amaclean at gmail.com] Sent: Sunday, 4 October 2015 2:53 p.m. To: Gib Bogle Cc: vtk; logicmonkeyuk Subject: RE: [vtkusers] Computational Geometry - user equations? vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values. e.g something like: unsigned char red[3] = {255, 0, 0}; actor->GetProperty()->SetColor(red[0], red[1], red[2]); Andrew Maclean On 4 Oct 2015 12:35 pm, "Gib Bogle" > wrote: Hi Piers, Andrew, Cory, This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a version that works with 5.10? Thanks Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] Sent: Sunday, 4 October 2015 1:48 p.m. To: andrew.amaclean at gmail.com Cc: vtk Subject: Re: [vtkusers] Computational Geometry - user equations? Andrew, Cory, Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done. I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows. I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2. I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas? For the VTK user list, the zipped files I mention are here: https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot ) Thanks again for your help. -- Piers Barber (-=:LogicMonkey;=-) On 2015-10-01 00:19, Andrew Maclean wrote: If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your own surface" should work for you. If you adopt this approach, you just build using the library and you do not need to modify the VTK library. I attach a VTK 6.3+ version of the example for you to try out. I'll add this to the VTK examples sometime next week. Once you get a surface you might like to look at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs and http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs for some visualisation ideas. Regards Andrew ---------- Forwarded message ---------- From: Cory Quammen > To: piers.barber at logicmonkey.co.uk Cc: "vtkusers at vtk.org" > Date: Wed, 30 Sep 2015 09:15:45 -0400 Subject: Re: [vtkusers] Computational Geometry - user equations? On Tue, Sep 29, 2015 at 12:13 PM, > wrote: Hi All, I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt Yep, that looks like a good way to go. I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this? You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above. Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have. Cory Thanks! -=:LM:=- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 R&D Engineer Kitware, Inc. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Oct 4 00:17:51 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 4 Oct 2015 15:17:51 +1100 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: This is my own opinion but in the long run it is probably better to move to VTK 6.3 at least. However, having said this you need to evaluate your own code in the light of: http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide and http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Overview in order to see how much work will be involved. VTK 6. was a big change from VTK 5 but there are lots of nice extras in VTK 6.3, such as OpenGL2, QT 5 and VTk 7 (the master) is taking things even further with Python 3 support, vtkFlyingEdges etc. Also there has been a lot of work done for other platforms such as Android and IOS. These links may help: http://www.kitware.com/source/home/post/116 http://www.kitware.com/blog/home/post/941 Regards Andrew On Sun, Oct 4, 2015 at 3:00 PM, Gib Bogle wrote: > I did that Andrew, in fact I deleted everything except the source files > and CMakeLists.txt. > > I've been holding off from updating my VTK, because I don't want to break > running programs. How easy is the migration from 5 to 6? > > Gib > ------------------------------ > *From:* Andrew Maclean [andrew.amaclean at gmail.com] > *Sent:* Sunday, 4 October 2015 4:55 p.m. > *To:* Gib Bogle > *Cc:* vtk; logicmonkeyuk > *Subject:* Re: [vtkusers] Computational Geometry - user equations? > > It's a long while since I have used VTK 5.10. Try deleting your cmake > cache file, then run cmake again and rebuild. > > On Sun, Oct 4, 2015 at 1:38 PM, Gib Bogle wrote: > >> Thanks for your help, Andrew. >> I did this: >> #find_package(VTK COMPONENTS >> # vtkCommonColor >> # vtkCommonCore >> # vtkFiltersHybrid >> # vtkFiltersSources >> # vtkIOImage >> # vtkInteractionStyle >> # vtkRenderingOpenGL >> #) >> find_package(VTK REQUIRED) >> but unfortunately the list of errors looks much the same. >> >> Cheers >> Gib >> ------------------------------ >> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >> *Sent:* Sunday, 4 October 2015 3:32 p.m. >> >> *To:* Gib Bogle >> *Cc:* vtk; logicmonkeyuk >> *Subject:* RE: [vtkusers] Computational Geometry - user equations? >> >> VT6 is modular in contrast to VTK 5 so I would replace the section in the >> CMakeLists.txt file dealing with including the modules with something like >> this: >> >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> I hope this helps. >> >> Andrew Maclean >> On 4 Oct 2015 1:01 pm, "Gib Bogle" wrote: >> >>> That was easily circumvented, but turned out to be the least of the >>> problems: >>> >>> 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol >>> "__declspec(dllimport) protected: __thiscall >>> vtkParametricFunction::vtkParametricFunction(void)" >>> (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function >>> "protected: __thiscall >>> myParametricTrefoilKnot::myParametricTrefoilKnot(void)" >>> (??0myParametricTrefoilKnot@@IAE at XZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase >>> @@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::FastDelete(void)" >>> (?FastDelete at vtkObjectBase@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::PrintHeader(class >>> std::basic_ostream > &,class vtkIndent)" >>> (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >>> @std@@@std@@VvtkIndent@@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::PrintTrailer(class >>> std::basic_ostream > &,class vtkIndent)" >>> (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >>> @std@@@std@@VvtkIndent@@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" >>> (?Register at vtkObjectBase@@UAEXPAV1@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" >>> (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>> "protected: virtual void __thiscall >>> myParametricTrefoilKnot::CollectRevisions(class >>> std::basic_ostream > &)" >>> (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU >>> ?$char_traits at D@std@@@std@@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>> "protected: virtual void __thiscall vtkObject::RegisterInternal(class >>> vtkObjectBase *,int)" (?RegisterInternal at vtkObject >>> @@MAEXPAVvtkObjectBase@@H at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>> "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class >>> vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject >>> @@MAEXPAVvtkObjectBase@@H at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>> "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class >>> vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase >>> @@MAEXPAVvtkGarbageCollector@@@Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject >>> @@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject >>> @@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject >>> @@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual unsigned long __thiscall vtkObject::GetMTime(void)" >>> (?GetMTime at vtkObject@@UAEKXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" >>> (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" >>> (?GetMinimumU at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" >>> (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" >>> (?GetMaximumU at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" >>> (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" >>> (?GetMinimumV at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" >>> (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" >>> (?GetMaximumV at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" >>> (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" >>> (?GetMinimumW at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" >>> (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" >>> (?GetMaximumW at vtkParametricFunction@@UAENXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetJoinU(int)" >>> (?SetJoinU at vtkParametricFunction@@UAEXH at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual int __thiscall vtkParametricFunction::GetJoinU(void)" >>> (?GetJoinU at vtkParametricFunction@@UAEHXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::JoinUOn(void)" >>> (?JoinUOn at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::JoinUOff(void)" >>> (?JoinUOff at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetJoinV(int)" >>> (?SetJoinV at vtkParametricFunction@@UAEXH at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual int __thiscall vtkParametricFunction::GetJoinV(void)" >>> (?GetJoinV at vtkParametricFunction@@UAEHXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::JoinVOn(void)" >>> (?JoinVOn at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::JoinVOff(void)" >>> (?JoinVOff at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetTwistU(int)" >>> (?SetTwistU at vtkParametricFunction@@UAEXH at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual int __thiscall vtkParametricFunction::GetTwistU(void)" >>> (?GetTwistU at vtkParametricFunction@@UAEHXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::TwistUOn(void)" >>> (?TwistUOn at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::TwistUOff(void)" >>> (?TwistUOff at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::SetTwistV(int)" >>> (?SetTwistV at vtkParametricFunction@@UAEXH at Z) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual int __thiscall vtkParametricFunction::GetTwistV(void)" >>> (?GetTwistV at vtkParametricFunction@@UAEHXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::TwistVOn(void)" >>> (?TwistVOn at vtkParametricFunction@@UAEXXZ) >>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>> virtual void __thiscall vtkParametricFunction::TwistVOff(void)" >>> (?TwistVOff at vtkParametricFunction@@UAEXXZ) >>> etc. etc. >>> ------------------------------ >>> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >>> *Sent:* Sunday, 4 October 2015 2:53 p.m. >>> *To:* Gib Bogle >>> *Cc:* vtk; logicmonkeyuk >>> *Subject:* RE: [vtkusers] Computational Geometry - user equations? >>> >>> vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to >>> specify colours using RGB values. >>> >>> e.g something like: >>> unsigned char red[3] = {255, 0, 0}; >>> actor->GetProperty()->SetColor(red[0], red[1], red[2]); >>> >>> Andrew Maclean >>> On 4 Oct 2015 12:35 pm, "Gib Bogle" wrote: >>> >>>> Hi Piers, Andrew, Cory, >>>> >>>> This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a >>>> version that works with 5.10? >>>> >>>> Thanks >>>> Gib >>>> ------------------------------ >>>> *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of >>>> piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] >>>> *Sent:* Sunday, 4 October 2015 1:48 p.m. >>>> *To:* andrew.amaclean at gmail.com >>>> *Cc:* vtk >>>> *Subject:* Re: [vtkusers] Computational Geometry - user equations? >>>> >>>> Andrew, Cory, >>>> >>>> Thanks for the attachment - as a non-coder it bridged the gap between >>>> the PDF that I've seen before and what actually needed to be done. >>>> >>>> I've attached my trefoil knot code in a zip. The partial derivatives >>>> make a big difference to shadows. >>>> >>>> I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make >>>> to get the example to build was to the CMakeLists.txt - so it picks up >>>> OpenGL rather than OpenGL2. >>>> >>>> I'm pleased that this works, but the output surface is rather jagged >>>> when compared to what I get with MathMod. Any ideas? >>>> >>>> For the VTK user list, the zipped files I mention are here: >>>> >>>> https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot >>>> >>>> ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; >>>> make; ./bin/TrefoilKnot ) >>>> >>>> Thanks again for your help. >>>> >>>> -- >>>> >>>> Piers Barber (-=:LogicMonkey;=-) >>>> >>>> On 2015-10-01 00:19, Andrew Maclean wrote: >>>> >>>> If I understand you correctly, then the approach described in >>>> http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your >>>> own surface" should work for you. If you adopt this approach, you just >>>> build using the library and you do not need to modify the VTK library. >>>> >>>> I attach a VTK 6.3+ version of the example for you to try out. >>>> >>>> I'll add this to the VTK examples sometime next week. >>>> >>>> Once you get a surface you might like to look at: >>>> >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs >>>> and >>>> >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs >>>> for some visualisation ideas. >>>> >>>> >>>> Regards >>>> Andrew >>>> >>>> >>>> >>>>> ---------- Forwarded message ---------- >>>>> From: Cory Quammen >>>>> To: piers.barber at logicmonkey.co.uk >>>>> Cc: "vtkusers at vtk.org" >>>>> Date: Wed, 30 Sep 2015 09:15:45 -0400 >>>>> Subject: Re: [vtkusers] Computational Geometry - user equations? >>>>> On Tue, Sep 29, 2015 at 12:13 PM, >>>>> wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> I'd like to specify a surface f(u,v) in 3D with my own parametric >>>>>> equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>>>>> >>>>>> The only way I can see to do this is to add my function to the >>>>>> library source code, build the library and then call my function as >>>>>> described here: >>>>>> >>>>>> >>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt >>>>> >>>>> >>>>> Yep, that looks like a good way to go. >>>>> >>>>> >>>>>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an >>>>>> easier and more direct way to do this? >>>>> >>>>> >>>>> You can define your subclass of vtkParametricFunction in your local >>>>> project - no need to add it to VTK, which is what I think you were saying >>>>> above. >>>>> >>>>> Were you looking for a vtkParametricFunction subclass that takes an >>>>> expression for x(u,v), etc.? That doesn't exist as far as I know, but that >>>>> would be cool to have. >>>>> >>>>> Cory >>>>> >>>>> >>>>>> Thanks! >>>>>> >>>>>> -=:LM:=- >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> 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 >>>>> R&D Engineer >>>>> Kitware, Inc. >>>>> >>>>> >>>>> -- >>>> ___________________________________________ >>>> Andrew J. P. Maclean >>>> >>>> ___________________________________________ >>>> >>>> >>>> >>>> >>> > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Oct 4 00:38:04 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Sun, 4 Oct 2015 15:38:04 +1100 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: I just had a look at what you did. It looks very nice try increasing U/V resolution. e.g: pfnSrc->SetUResolution(100); pfnSrc->SetUResolution(100); And you should get a really smooth surface. On Sun, Oct 4, 2015 at 3:17 PM, Andrew Maclean wrote: > This is my own opinion but in the long run it is probably better to move > to VTK 6.3 at least. > > However, having said this you need to evaluate your own code in the light > of: http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide and > http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Overview in order to see how > much work will be involved. > > VTK 6. was a big change from VTK 5 but there are lots of nice extras in > VTK 6.3, such as OpenGL2, QT 5 and VTk 7 (the master) is taking things > even further with Python 3 support, vtkFlyingEdges etc. Also there has been > a lot of work done for other platforms such as Android and IOS. > > These links may help: > > http://www.kitware.com/source/home/post/116 > http://www.kitware.com/blog/home/post/941 > > Regards > Andrew > > > > On Sun, Oct 4, 2015 at 3:00 PM, Gib Bogle wrote: > >> I did that Andrew, in fact I deleted everything except the source files >> and CMakeLists.txt. >> >> I've been holding off from updating my VTK, because I don't want to break >> running programs. How easy is the migration from 5 to 6? >> >> Gib >> ------------------------------ >> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >> *Sent:* Sunday, 4 October 2015 4:55 p.m. >> *To:* Gib Bogle >> *Cc:* vtk; logicmonkeyuk >> *Subject:* Re: [vtkusers] Computational Geometry - user equations? >> >> It's a long while since I have used VTK 5.10. Try deleting your cmake >> cache file, then run cmake again and rebuild. >> >> On Sun, Oct 4, 2015 at 1:38 PM, Gib Bogle wrote: >> >>> Thanks for your help, Andrew. >>> I did this: >>> #find_package(VTK COMPONENTS >>> # vtkCommonColor >>> # vtkCommonCore >>> # vtkFiltersHybrid >>> # vtkFiltersSources >>> # vtkIOImage >>> # vtkInteractionStyle >>> # vtkRenderingOpenGL >>> #) >>> find_package(VTK REQUIRED) >>> but unfortunately the list of errors looks much the same. >>> >>> Cheers >>> Gib >>> ------------------------------ >>> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >>> *Sent:* Sunday, 4 October 2015 3:32 p.m. >>> >>> *To:* Gib Bogle >>> *Cc:* vtk; logicmonkeyuk >>> *Subject:* RE: [vtkusers] Computational Geometry - user equations? >>> >>> VT6 is modular in contrast to VTK 5 so I would replace the section in >>> the CMakeLists.txt file dealing with including the modules with something >>> like this: >>> >>> find_package(VTK REQUIRED) >>> include(${VTK_USE_FILE}) >>> >>> I hope this helps. >>> >>> Andrew Maclean >>> On 4 Oct 2015 1:01 pm, "Gib Bogle" wrote: >>> >>>> That was easily circumvented, but turned out to be the least of the >>>> problems: >>>> >>>> 2>TrefoilKnot.obj : error LNK2019: unresolved external symbol >>>> "__declspec(dllimport) protected: __thiscall >>>> vtkParametricFunction::vtkParametricFunction(void)" >>>> (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function >>>> "protected: __thiscall >>>> myParametricTrefoilKnot::myParametricTrefoilKnot(void)" >>>> (??0myParametricTrefoilKnot@@IAE at XZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase >>>> @@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::FastDelete(void)" >>>> (?FastDelete at vtkObjectBase@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::PrintHeader(class >>>> std::basic_ostream > &,class vtkIndent)" >>>> (?PrintHeader at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >>>> @std@@@std@@VvtkIndent@@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::PrintTrailer(class >>>> std::basic_ostream > &,class vtkIndent)" >>>> (?PrintTrailer at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D >>>> @std@@@std@@VvtkIndent@@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" >>>> (?Register at vtkObjectBase@@UAEXPAV1@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" >>>> (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>>> "protected: virtual void __thiscall >>>> myParametricTrefoilKnot::CollectRevisions(class >>>> std::basic_ostream > &)" >>>> (?CollectRevisions at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU >>>> ?$char_traits at D@std@@@std@@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>>> "protected: virtual void __thiscall vtkObject::RegisterInternal(class >>>> vtkObjectBase *,int)" (?RegisterInternal at vtkObject >>>> @@MAEXPAVvtkObjectBase@@H at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>>> "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class >>>> vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject >>>> @@MAEXPAVvtkObjectBase@@H at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol >>>> "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class >>>> vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase >>>> @@MAEXPAVvtkGarbageCollector@@@Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject >>>> @@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject >>>> @@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject >>>> @@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual unsigned long __thiscall vtkObject::GetMTime(void)" >>>> (?GetMTime at vtkObject@@UAEKXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" >>>> (?SetMinimumU at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" >>>> (?GetMinimumU at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" >>>> (?SetMaximumU at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" >>>> (?GetMaximumU at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" >>>> (?SetMinimumV at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" >>>> (?GetMinimumV at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" >>>> (?SetMaximumV at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" >>>> (?GetMaximumV at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" >>>> (?SetMinimumW at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" >>>> (?GetMinimumW at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" >>>> (?SetMaximumW at vtkParametricFunction@@UAEXN at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" >>>> (?GetMaximumW at vtkParametricFunction@@UAENXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetJoinU(int)" >>>> (?SetJoinU at vtkParametricFunction@@UAEXH at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual int __thiscall vtkParametricFunction::GetJoinU(void)" >>>> (?GetJoinU at vtkParametricFunction@@UAEHXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::JoinUOn(void)" >>>> (?JoinUOn at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::JoinUOff(void)" >>>> (?JoinUOff at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetJoinV(int)" >>>> (?SetJoinV at vtkParametricFunction@@UAEXH at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual int __thiscall vtkParametricFunction::GetJoinV(void)" >>>> (?GetJoinV at vtkParametricFunction@@UAEHXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::JoinVOn(void)" >>>> (?JoinVOn at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::JoinVOff(void)" >>>> (?JoinVOff at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetTwistU(int)" >>>> (?SetTwistU at vtkParametricFunction@@UAEXH at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual int __thiscall vtkParametricFunction::GetTwistU(void)" >>>> (?GetTwistU at vtkParametricFunction@@UAEHXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::TwistUOn(void)" >>>> (?TwistUOn at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::TwistUOff(void)" >>>> (?TwistUOff at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::SetTwistV(int)" >>>> (?SetTwistV at vtkParametricFunction@@UAEXH at Z) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual int __thiscall vtkParametricFunction::GetTwistV(void)" >>>> (?GetTwistV at vtkParametricFunction@@UAEHXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::TwistVOn(void)" >>>> (?TwistVOn at vtkParametricFunction@@UAEXXZ) >>>> 2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: >>>> virtual void __thiscall vtkParametricFunction::TwistVOff(void)" >>>> (?TwistVOff at vtkParametricFunction@@UAEXXZ) >>>> etc. etc. >>>> ------------------------------ >>>> *From:* Andrew Maclean [andrew.amaclean at gmail.com] >>>> *Sent:* Sunday, 4 October 2015 2:53 p.m. >>>> *To:* Gib Bogle >>>> *Cc:* vtk; logicmonkeyuk >>>> *Subject:* RE: [vtkusers] Computational Geometry - user equations? >>>> >>>> vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to >>>> specify colours using RGB values. >>>> >>>> e.g something like: >>>> unsigned char red[3] = {255, 0, 0}; >>>> actor->GetProperty()->SetColor(red[0], red[1], red[2]); >>>> >>>> Andrew Maclean >>>> On 4 Oct 2015 12:35 pm, "Gib Bogle" wrote: >>>> >>>>> Hi Piers, Andrew, Cory, >>>>> >>>>> This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a >>>>> version that works with 5.10? >>>>> >>>>> Thanks >>>>> Gib >>>>> ------------------------------ >>>>> *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of >>>>> piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] >>>>> *Sent:* Sunday, 4 October 2015 1:48 p.m. >>>>> *To:* andrew.amaclean at gmail.com >>>>> *Cc:* vtk >>>>> *Subject:* Re: [vtkusers] Computational Geometry - user equations? >>>>> >>>>> Andrew, Cory, >>>>> >>>>> Thanks for the attachment - as a non-coder it bridged the gap between >>>>> the PDF that I've seen before and what actually needed to be done. >>>>> >>>>> I've attached my trefoil knot code in a zip. The partial derivatives >>>>> make a big difference to shadows. >>>>> >>>>> I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make >>>>> to get the example to build was to the CMakeLists.txt - so it picks up >>>>> OpenGL rather than OpenGL2. >>>>> >>>>> I'm pleased that this works, but the output surface is rather jagged >>>>> when compared to what I get with MathMod. Any ideas? >>>>> >>>>> For the VTK user list, the zipped files I mention are here: >>>>> >>>>> https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot >>>>> >>>>> ( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; >>>>> make; ./bin/TrefoilKnot ) >>>>> >>>>> Thanks again for your help. >>>>> >>>>> -- >>>>> >>>>> Piers Barber (-=:LogicMonkey;=-) >>>>> >>>>> On 2015-10-01 00:19, Andrew Maclean wrote: >>>>> >>>>> If I understand you correctly, then the approach described in >>>>> http://www.vtk.org/img/ParametricSurfaces.pdfin " How to create your >>>>> own surface" should work for you. If you adopt this approach, you just >>>>> build using the library and you do not need to modify the VTK library. >>>>> >>>>> I attach a VTK 6.3+ version of the example for you to try out. >>>>> >>>>> I'll add this to the VTK examples sometime next week. >>>>> >>>>> Once you get a surface you might like to look at: >>>>> >>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs >>>>> and >>>>> >>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs >>>>> for some visualisation ideas. >>>>> >>>>> >>>>> Regards >>>>> Andrew >>>>> >>>>> >>>>> >>>>>> ---------- Forwarded message ---------- >>>>>> From: Cory Quammen >>>>>> To: piers.barber at logicmonkey.co.uk >>>>>> Cc: "vtkusers at vtk.org" >>>>>> Date: Wed, 30 Sep 2015 09:15:45 -0400 >>>>>> Subject: Re: [vtkusers] Computational Geometry - user equations? >>>>>> On Tue, Sep 29, 2015 at 12:13 PM, >>>>>> wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> I'd like to specify a surface f(u,v) in 3D with my own parametric >>>>>>> equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it. >>>>>>> >>>>>>> The only way I can see to do this is to add my function to the >>>>>>> library source code, build the library and then call my function as >>>>>>> described here: >>>>>>> >>>>>>> >>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt >>>>>> >>>>>> >>>>>> Yep, that looks like a good way to go. >>>>>> >>>>>> >>>>>>> I'm using vtkParametricTorus[.h, .cxx] as a template, but is there >>>>>>> an easier and more direct way to do this? >>>>>> >>>>>> >>>>>> You can define your subclass of vtkParametricFunction in your local >>>>>> project - no need to add it to VTK, which is what I think you were saying >>>>>> above. >>>>>> >>>>>> Were you looking for a vtkParametricFunction subclass that takes an >>>>>> expression for x(u,v), etc.? That doesn't exist as far as I know, but that >>>>>> would be cool to have. >>>>>> >>>>>> Cory >>>>>> >>>>>> >>>>>>> Thanks! >>>>>>> >>>>>>> -=:LM:=- >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> 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 >>>>>> R&D Engineer >>>>>> Kitware, Inc. >>>>>> >>>>>> >>>>>> -- >>>>> ___________________________________________ >>>>> Andrew J. P. Maclean >>>>> >>>>> ___________________________________________ >>>>> >>>>> >>>>> >>>>> >>>> >> >> >> -- >> ___________________________________________ >> Andrew J. P. Maclean >> >> ___________________________________________ >> > > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From piers.barber at logicmonkey.co.uk Sun Oct 4 04:19:58 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Sun, 04 Oct 2015 09:19:58 +0100 Subject: [vtkusers] =?utf-8?q?Computational_Geometry_-_user_equations=3F?= In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> Message-ID: <6a222acfec7caa72d2c03ec9769c6418@logicmonkey.co.uk> vtkusers, On 2015-10-04 05:38, Andrew Maclean wrote: > pfnSrc->SetUResolution(100); > pfnSrc->SetVResolution(100); > > And you should get a really smooth surface. Thanks - that works - I've pushed a change that sets 200. This is a nice solution to visualisation. MathMod does a similar job but has a clunky GUI. -- Piers Barber -:=LogicMonkey;=- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Oct 4 05:05:51 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 4 Oct 2015 09:05:51 +0000 Subject: [vtkusers] Computational Geometry - user equations? In-Reply-To: <6a222acfec7caa72d2c03ec9769c6418@logicmonkey.co.uk> References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> , <6a222acfec7caa72d2c03ec9769c6418@logicmonkey.co.uk> Message-ID: Hi Piers, Do know if it's possible, and how, to build this program with VTK 5.10? Cheers Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] Sent: Sunday, 4 October 2015 9:19 p.m. To: andrew.amaclean at gmail.com Cc: vtk Subject: Re: [vtkusers] Computational Geometry - user equations? vtkusers, On 2015-10-04 05:38, Andrew Maclean wrote: pfnSrc->SetUResolution(100); pfnSrc->SetVResolution(100); And you should get a really smooth surface. Thanks - that works - I've pushed a change that sets 200. This is a nice solution to visualisation. MathMod does a similar job but has a clunky GUI. -- Piers Barber -:=LogicMonkey;=- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Sun Oct 4 11:10:26 2015 From: sam24666806 at gmail.com (LaChen) Date: Sun, 4 Oct 2015 08:10:26 -0700 (MST) Subject: [vtkusers] failed at glTexImage2D 1 OpenGL errors detected In-Reply-To: <1443866175937-5734217.post@n5.nabble.com> References: <1443866175937-5734217.post@n5.nabble.com> Message-ID: <1443971426279-5734233.post@n5.nabble.com> Sorry, I forget to tell my test data and environment. My OS is Win7. My data is 512x512x599. -- View this message in context: http://vtk.1045678.n5.nabble.com/failed-at-glTexImage2D-1-OpenGL-errors-detected-tp5734217p5734233.html Sent from the VTK - Users mailing list archive at Nabble.com. From matthias at blaicher.com Sun Oct 4 13:51:56 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Sun, 4 Oct 2015 19:51:56 +0200 Subject: [vtkusers] Simultaneously build Python 2&3 interface Message-ID: <5611673C.30400@blaicher.com> Hi all, I'd like to start saying that I'm really glad that there is work on a Python 3 binding. VTK is the last showstopper for me to convert to Python 3 and I can hardly wait until it's in an official release (6.4?). I'm unclear though, how I'm supposed to build a python 2 and python 3 interface at the same time. Is this even possible right now? Hints on how to do this would be greatly appreciated! Very best, Matthias From david.gobbi at gmail.com Sun Oct 4 14:26:07 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 4 Oct 2015 12:26:07 -0600 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: <5611673C.30400@blaicher.com> References: <5611673C.30400@blaicher.com> Message-ID: On Sun, Oct 4, 2015 at 11:51 AM, Matthias Blaicher wrote: > Hi all, > > I'd like to start saying that I'm really glad that there is work on a > Python 3 binding. VTK is the last showstopper for me to convert to > Python 3 and I can hardly wait until it's in an official release (6.4?). > It has already been merged into the upcoming release branch, the next release will probably be 6.3.1 (I have no control over releases, but I'm guessing it will be soon i.e. within a few weeks). I'm unclear though, how I'm supposed to build a python 2 and python 3 > interface at the same time. Is this even possible right now? Hints on > how to do this would be greatly appreciated! > They can't be built simultaneously, but you can try building one and then the other. The libraries are versioned (e.g. vtkCommonCorePython27D.dll) but the extension modules are not (vtkCommonCorePython.pyd) so when doing the second build, make sure that you don't overwrite the first set of extension modules with the second. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at blaicher.com Sun Oct 4 16:30:28 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Sun, 4 Oct 2015 22:30:28 +0200 Subject: [vtkusers] Python 3.5 build failures Message-ID: <56118C64.3020304@blaicher.com> Hi, I've just tried to build the master and release-6.3, both fail to build for me. However, it used to work some weeks ago. In that time Arch Linux switched to Python 3.5. Is the current master branch expected to build against Python 3.5? > In file included from /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:21:0: > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: invalid conversion from ?char*? to ?Py_ssize_t {aka long int}? [-fpermissive] > }; > ^ > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: invalid conversion from ?PyObject* (*)(PyObject*, PyObject*) {aka _object* (*)(_object*, _object*)}? to ?setattrofunc {aka int (*)(_object*, _object*, _object*)}? [-fpermissive] > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: cannot convert ?int (*)(PyObject*, PyObject*, PyObject*) {aka int (*)(_object*, _object*, _object*)}? to ?PyBufferProcs*? in initialization > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: invalid conversion from ?long unsigned int? to ?const char*? [-fpermissive] > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: cannot convert ?char*? to ?traverseproc {aka int (*)(_object*, int (*)(_object*, void*), void*)}? in initialization > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: cannot convert ?PyMethodDef*? to ?PyMemberDef*? in initialization > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: cannot convert ?PyMemberDef*? to ?PyGetSetDef*? in initialization > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: error: invalid conversion from ?PyObject* (*)(PyTypeObject*, PyObject*, PyObject*) {aka _object* (*)(_typeobject*, _object*, _object*)}? to ?freefunc {aka void (*)(void*)}? [-fpermissive] > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: In function ?void {anonymous}::vtkPrependPythonPath(const char*)?: > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:64:54: error: ?PyString_FromString? was not declared in this scope > PyObject* newpath = PyString_FromString(pathtoadd); > ^ > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: In static member function ?static void vtkPythonInterpreter::SetProgramName(const char*)?: > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:191:42: error: cannot convert ?char*? to ?wchar_t*? for argument ?1? to ?void Py_SetProgramName(wchar_t*)? > Py_SetProgramName(pool.Strings.back()); > ^ > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: In static member function ?static int vtkPythonInterpreter::PyMain(int, char**)?: > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:228:28: error: cannot convert ?char**? to ?wchar_t**? for argument ?2? to ?int Py_Main(int, wchar_t**)? > return Py_Main(argc, argv); > ^ > Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:72: recipe for target 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o' failed > make[2]: *** [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o] Error 1 > CMakeFiles/Makefile2:38331: recipe for target 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all' failed > make[1]: *** [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all] Error 2 > make[1]: *** Waiting for unfinished jobs.... Very best, Matthias From david.gobbi at gmail.com Sun Oct 4 17:03:33 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 4 Oct 2015 15:03:33 -0600 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: <56118C64.3020304@blaicher.com> References: <56118C64.3020304@blaicher.com> Message-ID: Hi Matthias, Thanks for the report. It looks like the vtkPythonInterpreter module (which is optional and not needed for the Python wrappers) was not updated for Python3. I'll get this fixedASAP, but you can turn this module off as a temporary work around. This isn't related to Python 3.5, this particular module doesn't build with Python 3.4 either. Ben, can you add Module_vtkPythonInterpreter:BOOL=ON to the Python3 dashboard builds? - David On Sun, Oct 4, 2015 at 2:30 PM, Matthias Blaicher wrote: > Hi, > > I've just tried to build the master and release-6.3, both fail to build > for me. However, it used to work some weeks ago. In that time Arch Linux > switched to Python 3.5. Is the current master branch expected to build > against Python 3.5? > > > In file included from > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:21:0: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?char*? to ?Py_ssize_t {aka long int}? > [-fpermissive] > > }; > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?PyObject* (*)(PyObject*, PyObject*) {aka > _object* (*)(_object*, _object*)}? to ?setattrofunc {aka int (*)(_object*, > _object*, _object*)}? [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?int (*)(PyObject*, PyObject*, PyObject*) {aka int > (*)(_object*, _object*, _object*)}? to ?PyBufferProcs*? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?long unsigned int? to ?const char*? > [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?char*? to ?traverseproc {aka int (*)(_object*, int > (*)(_object*, void*), void*)}? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?PyMethodDef*? to ?PyMemberDef*? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?PyMemberDef*? to ?PyGetSetDef*? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?PyObject* (*)(PyTypeObject*, PyObject*, > PyObject*) {aka _object* (*)(_typeobject*, _object*, _object*)}? to > ?freefunc {aka void (*)(void*)}? [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In function ?void {anonymous}::vtkPrependPythonPath(const char*)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:64:54: > error: ?PyString_FromString? was not declared in this scope > > PyObject* newpath = PyString_FromString(pathtoadd); > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In static member function ?static void > vtkPythonInterpreter::SetProgramName(const char*)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:191:42: > error: cannot convert ?char*? to ?wchar_t*? for argument ?1? to ?void > Py_SetProgramName(wchar_t*)? > > Py_SetProgramName(pool.Strings.back()); > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In static member function ?static int vtkPythonInterpreter::PyMain(int, > char**)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:228:28: > error: cannot convert ?char**? to ?wchar_t**? for argument ?2? to ?int > Py_Main(int, wchar_t**)? > > return Py_Main(argc, argv); > > ^ > > > Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:72: > recipe for target > 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o' > failed > > make[2]: *** > [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o] > Error 1 > > CMakeFiles/Makefile2:38331: recipe for target > 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all' failed > > make[1]: *** > [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all] Error > 2 > > make[1]: *** Waiting for unfinished jobs.... > > Very best, > Matthias > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at blaicher.com Sun Oct 4 17:27:04 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Sun, 4 Oct 2015 23:27:04 +0200 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: References: <56118C64.3020304@blaicher.com> Message-ID: <561199A8.5080906@blaicher.com> Hi David, thanks, that helps. However, I think I now found a Python 3.5 issue: > /home/mabl/aur/vtk/src/vtk/Wrapping/Python/vtkPythonAppInit.cxx: In function ?int main(int, char**)?: > /home/mabl/aur/vtk/src/vtk/Wrapping/Python/vtkPythonAppInit.cxx:167:42: error: ?_Py_char2wchar? was not declared in this scope > argv0 = _Py_char2wchar(av0.c_str(), NULL); > ^ > Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:62: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o' failed > make[2]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 > CMakeFiles/Makefile2:53236: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed Looks like _Py_char2wchar is inofficial API and got renamed to Py_DecodeLocale, see > https://bugs.python.org/issue18395 Very best and thank you for your work! Matthias On 10/04/2015 11:03 PM, David Gobbi wrote: > Hi Matthias, > > Thanks for the report. It looks like the vtkPythonInterpreter module (which > is optional and not needed for the Python wrappers) was not updated for > Python3. I'll get this fixedASAP, but you can turn this module off as a > temporary work around. > > This isn't related to Python 3.5, this particular module doesn't build with > Python 3.4 either. > > Ben, can you add Module_vtkPythonInterpreter:BOOL=ON to the Python3 > dashboard builds? > > - David > > > On Sun, Oct 4, 2015 at 2:30 PM, Matthias Blaicher > wrote: > > Hi, > > I've just tried to build the master and release-6.3, both fail to build > for me. However, it used to work some weeks ago. In that time Arch Linux > switched to Python 3.5. Is the current master branch expected to build > against Python 3.5? > > > In file included from > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:21:0: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?char*? to ?Py_ssize_t {aka long > int}? [-fpermissive] > > }; > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?PyObject* (*)(PyObject*, PyObject*) > {aka _object* (*)(_object*, _object*)}? to ?setattrofunc {aka int > (*)(_object*, _object*, _object*)}? [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?int (*)(PyObject*, PyObject*, PyObject*) {aka > int (*)(_object*, _object*, _object*)}? to ?PyBufferProcs*? in > initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?long unsigned int? to ?const char*? > [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?char*? to ?traverseproc {aka int > (*)(_object*, int (*)(_object*, void*), void*)}? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?PyMethodDef*? to ?PyMemberDef*? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: cannot convert ?PyMemberDef*? to ?PyGetSetDef*? in initialization > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: > error: invalid conversion from ?PyObject* (*)(PyTypeObject*, > PyObject*, PyObject*) {aka _object* (*)(_typeobject*, _object*, > _object*)}? to ?freefunc {aka void (*)(void*)}? [-fpermissive] > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In function ?void {anonymous}::vtkPrependPythonPath(const char*)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:64:54: > error: ?PyString_FromString? was not declared in this scope > > PyObject* newpath = PyString_FromString(pathtoadd); > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In static member function ?static void > vtkPythonInterpreter::SetProgramName(const char*)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:191:42: > error: cannot convert ?char*? to ?wchar_t*? for argument ?1? to > ?void Py_SetProgramName(wchar_t*)? > > Py_SetProgramName(pool.Strings.back()); > > ^ > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: > In static member function ?static int > vtkPythonInterpreter::PyMain(int, char**)?: > > > /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:228:28: > error: cannot convert ?char**? to ?wchar_t**? for argument ?2? to > ?int Py_Main(int, wchar_t**)? > > return Py_Main(argc, argv); > > ^ > > > Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:72: > recipe for target > 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o' > failed > > make[2]: *** > [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o] > Error 1 > > CMakeFiles/Makefile2:38331: recipe for target > 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all' failed > > make[1]: *** > [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all] Error > 2 > > make[1]: *** Waiting for unfinished jobs.... > > Very best, > Matthias > From david.gobbi at gmail.com Sun Oct 4 18:05:19 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 4 Oct 2015 16:05:19 -0600 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: <561199A8.5080906@blaicher.com> References: <56118C64.3020304@blaicher.com> <561199A8.5080906@blaicher.com> Message-ID: On Sun, Oct 4, 2015 at 3:27 PM, Matthias Blaicher wrote: > > > Looks like _Py_char2wchar is inofficial API and got renamed to > Py_DecodeLocale, see > > https://bugs.python.org/issue18395 Hmm, my Python 3.5 builds on OS X didn't give that error. I'll make the change. Thanks. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From piers.barber at logicmonkey.co.uk Sun Oct 4 19:47:00 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Mon, 05 Oct 2015 00:47:00 +0100 Subject: [vtkusers] =?utf-8?q?Computational_Geometry_-_user_equations=3F?= In-Reply-To: References: <3fa3b483d461f0bfda0895fa4e60ac03@logicmonkey.co.uk> , <6a222acfec7caa72d2c03ec9769c6418@logicmonkey.co.uk> Message-ID: <1363b542f0aac79a0016dfc934a2b921@logicmonkey.co.uk> Sorry Gib, I can't help. I'm very much on the steep part of the learning curve here. Maybe these images will incentivise someone into helping out. https://github.com/logicmonkey/curves/blob/master/vtk/TrefoilKnot/TrefoilKnot.png https://github.com/logicmonkey/curves/blob/master/vtk/TrefoilKnot/TrefoilKnotNoDerivatives.png -- Piers Barber (-=:LogicMonkey:=-) On 2015-10-04 10:05, Gib Bogle wrote: > Hi Piers, > > Do know if it's possible, and how, to build this program with VTK 5.10? > > Cheers > Gib > > ------------------------- > > FROM: vtkusers [vtkusers-bounces at vtk.org] on behalf of piers.barber at logicmonkey.co.uk [piers.barber at logicmonkey.co.uk] > SENT: Sunday, 4 October 2015 9:19 p.m. > TO: andrew.amaclean at gmail.com > CC: vtk > SUBJECT: Re: [vtkusers] Computational Geometry - user equations? > > vtkusers, > > On 2015-10-04 05:38, Andrew Maclean wrote: > >> pfnSrc->SetUResolution(100); >> pfnSrc->SetVResolution(100); >> >> And you should get a really smooth surface. > > Thanks - that works - I've pushed a change that sets 200. > > This is a nice solution to visualisation. MathMod does a similar job but has a clunky GUI. > > -- > > Piers Barber -:=LogicMonkey;=- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastian.hilbert at gmx.net Sun Oct 4 20:13:09 2015 From: sebastian.hilbert at gmx.net (Sebastian Hilbert) Date: Mon, 05 Oct 2015 02:13:09 +0200 Subject: [vtkusers] how to convert vtk polydata to dif file format Message-ID: <1580488.6Phfrjp2dC@basti-thinkpad-t410> Hi, I am trying to convert a model of the heart which is available as either stl or vtk polydata to a new file format called diffusion image format (dif) All files are provided below. The main question is. How do I construct the dif file when I have only vtk and stl file available ? dif is a format used by the medical software Ensite from St. Jude and looking at the spec for the dif format it seems related to what vtk can provide. It seems to work with vertices , normals and polygons. I wonder if anyone has some advice on how to map data obtained from an stl file or vtk polydata file to data used in the dif format. How do I extract vertices, normals and polygons from either stl and/or vtk ? The target format is like this: 32.4603 6.0825 -40.3249 13.9858 7.9016 -41.0501 16.6287 7.6514 -40.4356 30.7806 7.9503 -41.1414 0.220882 -0.586701 -0.779098 -0.082953 -0.169572 -0.982021 0.393210 -0.647443 -0.652842 -0.106461 -0.248735 -0.962703 3 40 8 17 10 13 41 13 42 4 36 43 Looking at the vtk file the polygons are different from the ones in the xml (dif) file. Looking at the stl file (ascii) I can see some vertex lines that match a line in the vertices section of the xml (dif) file but there are a lot more vertex lines in the stl file then there are in the xml (dif file). I would prefer to use python if that is an option. If anyone wants to have a look here are the correspondig files vtk: https://146.0.105.21/owncloud/index.php/s/NZqGwdQQSramk1w stl: https://146.0.105.21/owncloud/index.php/s/tWv7yKttA15hdoL dif: https://146.0.105.21/owncloud/index.php/s/3R8oKRxXK2oR5DD Any help is appreciated. Sebastian From sam24666806 at gmail.com Sun Oct 4 23:22:27 2015 From: sam24666806 at gmail.com (LaChen) Date: Sun, 4 Oct 2015 20:22:27 -0700 (MST) Subject: [vtkusers] failed at glTexImage2D 1 OpenGL errors detected In-Reply-To: <1443971426279-5734233.post@n5.nabble.com> References: <1443866175937-5734217.post@n5.nabble.com> <1443971426279-5734233.post@n5.nabble.com> Message-ID: <1444015347262-5734243.post@n5.nabble.com> I think I find out the solution of this problem. My OS is x64. But I build my program in Win32 configuration. After I use VTK building in x64 and use x64 Qt, It works fine. -- View this message in context: http://vtk.1045678.n5.nabble.com/failed-at-glTexImage2D-1-OpenGL-errors-detected-tp5734217p5734243.html Sent from the VTK - Users mailing list archive at Nabble.com. From matthias at blaicher.com Mon Oct 5 08:56:40 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Mon, 5 Oct 2015 14:56:40 +0200 Subject: [vtkusers] Python 3 requires relative or correct absolute imports Message-ID: <56127388.2010306@blaicher.com> Hi, in my quest to have a working PKGBUILD for Arch Linux with Python 3 support I've stumbled over a new issue: > Python 3.5.0 (default, Sep 20 2015, 11:28:25) > [GCC 5.2.0] on linux > Type "help", "copyright", "credits" or "license" for more information. >>>> import vtk > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/python3.5/site-packages/vtk/__init__.py", line 39, in > from .vtkCommonCore import * > File "/usr/lib/python3.5/site-packages/vtk/vtkCommonCore.py", line 1, in > from vtkCommonCorePython import * > ImportError: No module named 'vtkCommonCorePython' >>>> It's clear that this fails, since /usr/lib/python3.5/site-packages/vtk/ is not in the search path, so it cannot find /usr/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so. This can be confirmed by adding the vtk package to the search path via > export PYTHONPATH=/usr/lib/python3.5/site-packages/vtk However, this should obviously work without manually defining the search path. I propose to change the line to > from vtk.vtkCommonCorePython import * or > from .vtkCommonCorePython import * I guess the latter one is not backward compatible to python 2 except with a _future_ import. There is quite a list of files effected by this: > grep -r '^from vtk[A-Za-z]\+ import' /usr/lib/python3.5/site-packages/vtk/ > /usr/lib/python3.5/site-packages/vtk/vtkFiltersExtraction.py:from vtkFiltersExtractionPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOSQL.py:from vtkIOSQLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOExodus.py:from vtkIOExodusPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersPython.py:from vtkFiltersPythonPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingContextOpenGL.py:from vtkRenderingContextOpenGLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersProgrammable.py:from vtkFiltersProgrammablePython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingCore.py:from vtkRenderingCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkInfovisCore.py:from vtkInfovisCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingLabel.py:from vtkRenderingLabelPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersImaging.py:from vtkFiltersImagingPython import * > /usr/lib/python3.5/site-packages/vtk/vtkGeovisCore.py:from vtkGeovisCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOMINC.py:from vtkIOMINCPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersGeometry.py:from vtkFiltersGeometryPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOMovie.py:from vtkIOMoviePython import * > /usr/lib/python3.5/site-packages/vtk/vtkIONetCDF.py:from vtkIONetCDFPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingColor.py:from vtkImagingColorPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOGeometry.py:from vtkIOGeometryPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingStencil.py:from vtkImagingStencilPython import * > /usr/lib/python3.5/site-packages/vtk/vtkTestingRendering.py:from vtkTestingRenderingPython import * > /usr/lib/python3.5/site-packages/vtk/vtkViewsCore.py:from vtkViewsCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOLSDyna.py:from vtkIOLSDynaPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOAMR.py:from vtkIOAMRPython import * > /usr/lib/python3.5/site-packages/vtk/vtkDomainsChemistry.py:from vtkDomainsChemistryPython import * > /usr/lib/python3.5/site-packages/vtk/vtkParallelCore.py:from vtkParallelCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersParallel.py:from vtkFiltersParallelPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersSources.py:from vtkFiltersSourcesPython import * > /usr/lib/python3.5/site-packages/vtk/vtkViewsInfovis.py:from vtkViewsInfovisPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersHybrid.py:from vtkFiltersHybridPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersAMR.py:from vtkFiltersAMRPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersParallelImaging.py:from vtkFiltersParallelImagingPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOParallelXML.py:from vtkIOParallelXMLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingAnnotation.py:from vtkRenderingAnnotationPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingCore.py:from vtkImagingCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersVerdict.py:from vtkFiltersVerdictPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOCore.py:from vtkIOCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkChartsCore.py:from vtkChartsCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingOpenGL.py:from vtkRenderingOpenGLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingMorphological.py:from vtkImagingMorphologicalPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOXMLParser.py:from vtkIOXMLParserPython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonDataModel.py:from vtkCommonDataModelPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOLegacy.py:from vtkIOLegacyPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingLOD.py:from vtkRenderingLODPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersSMP.py:from vtkFiltersSMPPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingGeneral.py:from vtkImagingGeneralPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingStatistics.py:from vtkImagingStatisticsPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOEnSight.py:from vtkIOEnSightPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersStatistics.py:from vtkFiltersStatisticsPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOPLY.py:from vtkIOPLYPython import * > /usr/lib/python3.5/site-packages/vtk/vtkInfovisLayout.py:from vtkInfovisLayoutPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingSources.py:from vtkImagingSourcesPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingFreeType.py:from vtkRenderingFreeTypePython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingMath.py:from vtkImagingMathPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOExport.py:from vtkIOExportPython import * > /usr/lib/python3.5/site-packages/vtk/vtkInteractionStyle.py:from vtkInteractionStylePython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOParallel.py:from vtkIOParallelPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersModeling.py:from vtkFiltersModelingPython import * > /usr/lib/python3.5/site-packages/vtk/vtkInteractionWidgets.py:from vtkInteractionWidgetsPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersHyperTree.py:from vtkFiltersHyperTreePython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonTransforms.py:from vtkCommonTransformsPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOXML.py:from vtkIOXMLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingImage.py:from vtkRenderingImagePython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersFlowPaths.py:from vtkFiltersFlowPathsPython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonComputationalGeometry.py:from vtkCommonComputationalGeometryPython import * > /usr/lib/python3.5/site-packages/vtk/vtkInteractionImage.py:from vtkInteractionImagePython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingFourier.py:from vtkImagingFourierPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOImage.py:from vtkIOImagePython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonExecutionModel.py:from vtkCommonExecutionModelPython import * > /usr/lib/python3.5/site-packages/vtk/vtkImagingHybrid.py:from vtkImagingHybridPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersGeneric.py:from vtkFiltersGenericPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersSelection.py:from vtkFiltersSelectionPython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonMisc.py:from vtkCommonMiscPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersGeneral.py:from vtkFiltersGeneralPython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonSystem.py:from vtkCommonSystemPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersCore.py:from vtkFiltersCorePython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingVolume.py:from vtkRenderingVolumePython import * > /usr/lib/python3.5/site-packages/vtk/vtkCommonColor.py:from vtkCommonColorPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOVideo.py:from vtkIOVideoPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingVolumeOpenGL.py:from vtkRenderingVolumeOpenGLPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOImport.py:from vtkIOImportPython import * > /usr/lib/python3.5/site-packages/vtk/vtkRenderingLIC.py:from vtkRenderingLICPython import * > /usr/lib/python3.5/site-packages/vtk/vtkIOInfovis.py:from vtkIOInfovisPython import * > /usr/lib/python3.5/site-packages/vtk/vtkFiltersTexture.py:from vtkFiltersTexturePython import Very best, Matthias From A.Buykx at tnodiana.com Mon Oct 5 08:56:44 2015 From: A.Buykx at tnodiana.com (Andreas Buykx) Date: Mon, 5 Oct 2015 12:56:44 +0000 Subject: [vtkusers] vtkMapper::InterpolateScalarsBeforeMapping and off-screen rendering Message-ID: <65D987BE62E58141AA480A59A8B5BBEA71AE80FD@srv-mail.diana.local> Hi all, I have an issue with color mapping using scalar-interpolation-before-mapping, while rendering off-screen. The attached python script demonstrates the issue. The script defines a bar with linear increasing point-scalars. These are then rendered using a lookup table containing four colors. This work fine when rendering on-screen, but off-screen the number of colors is larger than the number of colors in the on-screen image. This problem occurs with VTK6.3.0 on both windows and linux (using vncserver) platforms. With VTK6.2.0 we saw the same anomaly but only on our windows machines. Debugging (on Linux + VNC server) I found that the root cause of this difference seems to be vtkOpenGLTexture, which will determine whether non-power-of-two textures are supported. If not it will resample the texture map to increase the number of textures to a power of two. I suspect this resampling produces the additional colors. I registered this in the bug tracker (issue 15734) and reported the OpenGL capabilities there. When I load the data into ParaView 4.3.1 (on windows) however, I can render the image, and also save a screen shot that shows the proper color mapping, so apparently it is possible after all. This issue is at the moment blocking our transition to VTK6.3.0 (which we need because it contains fixes to some other issues) because image tests use the off-screen rendering feature. Could someone please help to determine a workaround or fix, and/or explain how ParaView manages to get the color mapping right? Thanks a lot for your help! Andreas ____________________________________________________________ TNO DIANA BV is a limited liability company registered in the trade register of the Chamber of Commerce as TNO DIANA BV with registered number 27252655. ____________________________________________________________ This e-mail and its contents are subject to the DISCLAIMER at http://tnodiana.com/content/Disclaimer ____________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: onscreen.png Type: image/png Size: 43851 bytes Desc: onscreen.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: offscreen.png Type: image/png Size: 835 bytes Desc: offscreen.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: colormapping.py Type: application/octet-stream Size: 3620 bytes Desc: colormapping.py URL: From matthias at blaicher.com Mon Oct 5 09:37:23 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Mon, 5 Oct 2015 15:37:23 +0200 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: References: <5611673C.30400@blaicher.com> Message-ID: <56127D13.1020901@blaicher.com> On 10/04/2015 08:26 PM, David Gobbi wrote: > On Sun, Oct 4, 2015 at 11:51 AM, Matthias Blaicher > > wrote: > > I'm unclear though, how I'm supposed to build a python 2 and python 3 > interface at the same time. Is this even possible right now? Hints on > how to do this would be greatly appreciated! > > > They can't be built simultaneously, but you can try building one and then > the other. The libraries are versioned (e.g. vtkCommonCorePython27D.dll) > but the extension modules are not (vtkCommonCorePython.pyd) so when > doing the second build, make sure that you don't overwrite the first set > of extension modules with the second. I feared that. Unfortunately, this complicates packaging, as Arch Linux PKGBUILDs execute "make install" in a chroot - so no access to build tools. On the other hand even for split packages there is only one build() function - so I cannot reconfigure and build twice. Theoretically, I could build a second time in an independent package and hope that the two packages never diverge.. but I guess this is asking for trouble. Is it theoretically possible to extend the build script to build for both python versions? Best, Matthias From david.gobbi at gmail.com Mon Oct 5 10:17:46 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Oct 2015 08:17:46 -0600 Subject: [vtkusers] Python 3 requires relative or correct absolute imports In-Reply-To: <56127388.2010306@blaicher.com> References: <56127388.2010306@blaicher.com> Message-ID: On Mon, Oct 5, 2015 at 6:56 AM, Matthias Blaicher wrote: > Hi, > > in my quest to have a working PKGBUILD for Arch Linux with Python 3 > support I've stumbled over a new issue: > > > Python 3.5.0 (default, Sep 20 2015, 11:28:25) > > [GCC 5.2.0] on linux > > Type "help", "copyright", "credits" or "license" for more information. > >>>> import vtk > > Traceback (most recent call last): > > File "", line 1, in > > File "/usr/lib/python3.5/site-packages/vtk/__init__.py", line 39, in > > > from .vtkCommonCore import * > > File "/usr/lib/python3.5/site-packages/vtk/vtkCommonCore.py", line 1, > in > > from vtkCommonCorePython import * > > ImportError: No module named 'vtkCommonCorePython' > >>>> > > It's clear that this fails, since /usr/lib/python3.5/site-packages/vtk/ > is not in the search path, so it cannot find > /usr/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so. > > This can be confirmed by adding the vtk package to the search path via > > export PYTHONPATH=/usr/lib/python3.5/site-packages/vtk > > However, this should obviously work without manually defining the search > path. I propose to change the line to > > > from vtk.vtkCommonCorePython import * > or > > from .vtkCommonCorePython import * > This assumes that the extension modules are installed in the same directory as the pure-python modules, which (for me at least) is generally not the case. Often the extension modules are kept in a platform-specific directory somewhere else in the path. Tonight I can look at the PEPs for this. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Mon Oct 5 10:19:09 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 5 Oct 2015 10:19:09 -0400 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: References: <56118C64.3020304@blaicher.com> Message-ID: Hi David, The vtkPythonInterpreter module is added to the dashboards. Shawn On Sun, Oct 4, 2015 at 5:03 PM, David Gobbi wrote: > Hi Matthias, > > Thanks for the report. It looks like the vtkPythonInterpreter module > (which > is optional and not needed for the Python wrappers) was not updated for > Python3. I'll get this fixedASAP, but you can turn this module off as a > temporary work around. > > This isn't related to Python 3.5, this particular module doesn't build with > Python 3.4 either. > > Ben, can you add Module_vtkPythonInterpreter:BOOL=ON to the Python3 > dashboard builds? > > - David > > > On Sun, Oct 4, 2015 at 2:30 PM, Matthias Blaicher > wrote: > >> Hi, >> >> I've just tried to build the master and release-6.3, both fail to build >> for me. However, it used to work some weeks ago. In that time Arch Linux >> switched to Python 3.5. Is the current master branch expected to build >> against Python 3.5? >> >> > In file included from >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:21:0: >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: invalid conversion from ?char*? to ?Py_ssize_t {aka long int}? >> [-fpermissive] >> > }; >> > ^ >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: invalid conversion from ?PyObject* (*)(PyObject*, PyObject*) {aka >> _object* (*)(_object*, _object*)}? to ?setattrofunc {aka int (*)(_object*, >> _object*, _object*)}? [-fpermissive] >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: cannot convert ?int (*)(PyObject*, PyObject*, PyObject*) {aka int >> (*)(_object*, _object*, _object*)}? to ?PyBufferProcs*? in initialization >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: invalid conversion from ?long unsigned int? to ?const char*? >> [-fpermissive] >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: cannot convert ?char*? to ?traverseproc {aka int (*)(_object*, int >> (*)(_object*, void*), void*)}? in initialization >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: cannot convert ?PyMethodDef*? to ?PyMemberDef*? in initialization >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: cannot convert ?PyMemberDef*? to ?PyGetSetDef*? in initialization >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1: >> error: invalid conversion from ?PyObject* (*)(PyTypeObject*, PyObject*, >> PyObject*) {aka _object* (*)(_typeobject*, _object*, _object*)}? to >> ?freefunc {aka void (*)(void*)}? [-fpermissive] >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: >> In function ?void {anonymous}::vtkPrependPythonPath(const char*)?: >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:64:54: >> error: ?PyString_FromString? was not declared in this scope >> > PyObject* newpath = PyString_FromString(pathtoadd); >> > ^ >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: >> In static member function ?static void >> vtkPythonInterpreter::SetProgramName(const char*)?: >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:191:42: >> error: cannot convert ?char*? to ?wchar_t*? for argument ?1? to ?void >> Py_SetProgramName(wchar_t*)? >> > Py_SetProgramName(pool.Strings.back()); >> > ^ >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx: >> In static member function ?static int vtkPythonInterpreter::PyMain(int, >> char**)?: >> > >> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:228:28: >> error: cannot convert ?char**? to ?wchar_t**? for argument ?2? to ?int >> Py_Main(int, wchar_t**)? >> > return Py_Main(argc, argv); >> > ^ >> > >> Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:72: >> recipe for target >> 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o' >> failed >> > make[2]: *** >> [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o] >> Error 1 >> > CMakeFiles/Makefile2:38331: recipe for target >> 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all' failed >> > make[1]: *** >> [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all] Error >> 2 >> > make[1]: *** Waiting for unfinished jobs.... >> >> Very best, >> Matthias >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Mon Oct 5 10:22:51 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Oct 2015 08:22:51 -0600 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: <56127D13.1020901@blaicher.com> References: <5611673C.30400@blaicher.com> <56127D13.1020901@blaicher.com> Message-ID: On Mon, Oct 5, 2015 at 7:37 AM, Matthias Blaicher wrote: > > > On 10/04/2015 08:26 PM, David Gobbi wrote: > > Is it theoretically possible to extend the build script to build for > both python versions? > Of course it's theoretically possible... but it would be a massive change (definitely not something I'd pursue, myself). Lots of cmake variables would have to be duplicated, and much of the build logic would have to be changed. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 5 10:24:09 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Oct 2015 08:24:09 -0600 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: References: <56118C64.3020304@blaicher.com> Message-ID: Thanks, Shawn! I just merged the code fixes this morning. On Mon, Oct 5, 2015 at 8:19 AM, Shawn Waldon wrote: > Hi David, > > The vtkPythonInterpreter module is added to the dashboards. > > Shawn > > On Sun, Oct 4, 2015 at 5:03 PM, David Gobbi wrote: > >> Hi Matthias, >> >> Thanks for the report. It looks like the vtkPythonInterpreter module >> (which >> is optional and not needed for the Python wrappers) was not updated for >> Python3. I'll get this fixedASAP, but you can turn this module off as a >> temporary work around. >> >> This isn't related to Python 3.5, this particular module doesn't build >> with >> Python 3.4 either. >> >> Ben, can you add Module_vtkPythonInterpreter:BOOL=ON to the Python3 >> dashboard builds? >> >> - David >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at blaicher.com Mon Oct 5 10:29:19 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Mon, 5 Oct 2015 16:29:19 +0200 Subject: [vtkusers] Python 3 requires relative or correct absolute imports In-Reply-To: References: <56127388.2010306@blaicher.com> Message-ID: <5612893F.9080809@blaicher.com> On 10/05/2015 04:17 PM, David Gobbi wrote: > On Mon, Oct 5, 2015 at 6:56 AM, Matthias Blaicher > wrote: > > Hi, > > in my quest to have a working PKGBUILD for Arch Linux with Python 3 > support I've stumbled over a new issue: > > > Python 3.5.0 (default, Sep 20 2015, 11:28:25) > > [GCC 5.2.0] on linux > > Type "help", "copyright", "credits" or "license" for more information. > >>>> import vtk > > Traceback (most recent call last): > > File "", line 1, in > > File "/usr/lib/python3.5/site-packages/vtk/__init__.py", line > 39, in > > from .vtkCommonCore import * > > File "/usr/lib/python3.5/site-packages/vtk/vtkCommonCore.py", > line 1, in > > from vtkCommonCorePython import * > > ImportError: No module named 'vtkCommonCorePython' > >>>> > > It's clear that this fails, since /usr/lib/python3.5/site-packages/vtk/ > is not in the search path, so it cannot find > /usr/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so. > > This can be confirmed by adding the vtk package to the search path via > > export PYTHONPATH=/usr/lib/python3.5/site-packages/vtk > > However, this should obviously work without manually defining the search > path. I propose to change the line to > > > from vtk.vtkCommonCorePython import * > or > > from .vtkCommonCorePython import * > > > This assumes that the extension modules are installed in the same > directory as the pure-python modules, which (for me at least) is > generally not the case. Often the extension modules are kept in > a platform-specific directory somewhere else in the path. > > Tonight I can look at the PEPs for this. > > - David > Where would you put them for a system vtk installation? For both the python 2 and the python 3 build, by default they are installed into the site-packages directory. It feels to me that this is a good place to put them. It's just that the import rules changed for py3k. However you are right that both of my proposals would break your workflow. The only thing which comes to my mind is to separate the extension into its own (private) package. Best, Matthias From dave.demarle at kitware.com Mon Oct 5 10:32:42 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 5 Oct 2015 10:32:42 -0400 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: References: <5611673C.30400@blaicher.com> Message-ID: The next VTK release will be 7. That should start in a couple of weeks. There definitely will be a 6.4 but we don't have any timeline for that yet. Both will have Python3 support thanks to David's excellent work! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sun, Oct 4, 2015 at 2:26 PM, David Gobbi wrote: > On Sun, Oct 4, 2015 at 11:51 AM, Matthias Blaicher > wrote: > >> Hi all, >> >> I'd like to start saying that I'm really glad that there is work on a >> Python 3 binding. VTK is the last showstopper for me to convert to >> Python 3 and I can hardly wait until it's in an official release (6.4?). >> > > It has already been merged into the upcoming release branch, > the next release will probably be 6.3.1 (I have no control over > releases, but I'm guessing it will be soon i.e. within a few weeks). > > I'm unclear though, how I'm supposed to build a python 2 and python 3 >> interface at the same time. Is this even possible right now? Hints on >> how to do this would be greatly appreciated! >> > > They can't be built simultaneously, but you can try building one and then > the other. The libraries are versioned (e.g. vtkCommonCorePython27D.dll) > but the extension modules are not (vtkCommonCorePython.pyd) so when > doing the second build, make sure that you don't overwrite the first set > of extension modules with the second. > > - David > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at blaicher.com Mon Oct 5 16:51:10 2015 From: matthias at blaicher.com (Matthias Blaicher) Date: Mon, 5 Oct 2015 22:51:10 +0200 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: References: <5611673C.30400@blaicher.com> Message-ID: <5612E2BE.2030900@blaicher.com> On 10/04/2015 08:26 PM, David Gobbi wrote: > On Sun, Oct 4, 2015 at 11:51 AM, Matthias Blaicher > > wrote: > > It has already been merged into the upcoming release branch, the next > release will probably be 6.3.1 (I have no control over releases, but > I'm guessing it will be soon i.e. within a few weeks). > > I'm unclear though, how I'm supposed to build a python 2 and python > 3 interface at the same time. Is this even possible right now? Hints > on how to do this would be greatly appreciated! > > > They can't be built simultaneously, but you can try building one and > then the other. The libraries are versioned (e.g. > vtkCommonCorePython27D.dll) but the extension modules are not > (vtkCommonCorePython.pyd) so when doing the second build, make sure > that you don't overwrite the first set of extension modules with the > second. So I've looked into this. As you mentioned, the extension modules are not versioned, but since they are placed in their respective site-packages directory that is no problem. All other library files with Python in their name in lib/ are versioned with one exception: lib/libvtkFiltersPython.so exists in the python 2 and python 3 case without a version number. I guess this is not by purpose? Best, Matthias From david.gobbi at gmail.com Mon Oct 5 17:04:18 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Oct 2015 15:04:18 -0600 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: <5612E2BE.2030900@blaicher.com> References: <5611673C.30400@blaicher.com> <5612E2BE.2030900@blaicher.com> Message-ID: On Mon, Oct 5, 2015 at 2:51 PM, Matthias Blaicher wrote: > > > All other library files with Python in their name in lib/ are versioned > with one exception: lib/libvtkFiltersPython.so exists in the python 2 > and python 3 case without a version number. I guess this is not by purpose? > Hmm... it's different from the others because it's a VTK library that uses the Python C API directly (in comparison to other PythonD libraries that are generated by the wrapper-generators). libvtkPythonInterpreter.so also fits into the same category. Yes, all VTK libraries that have a python dependency should have the python version number in their name. Ditto for executables that depend on python (e.g. the vtkpython executable itself). These were overlooked. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From madaramh at gmail.com Tue Oct 6 01:54:00 2015 From: madaramh at gmail.com (madz) Date: Mon, 5 Oct 2015 22:54:00 -0700 (MST) Subject: [vtkusers] Visualize vectors in an unstructured grid (arrays) Message-ID: <1444110840790-5734259.post@n5.nabble.com> I have a 3D unstructured grid file that has a velocity vector points data. When I try to use the vtkGlyph3D all the arrows seem to be originating from the same point. When I view the same file in paraview however, it gives a correct out put. Can anyone point out where I've gone wrong. vtkSmartPointer unstructuredGrid = vtkSmartPointer::New(); unstructuredGrid->ShallowCopy(appendFilter2->GetOutput()); unstructuredGrid->GetPointData()->SetVectors(unstructuredGrid->GetPointData()->GetArray("Velocity_in_Stn_F17")); vtkSmartPointer maskPoints =vtkSmartPointer::New(); maskPoints->SetOnRatio(200); maskPoints->SetInput(unstructuredGrid); maskPoints->Update(); // represent vector field vtkSmartPointer vectorGlyph = vtkSmartPointer::New(); vectorGlyph->SetInput(maskPoints->GetOutput()); vectorGlyph->SetSourceConnection(arrowSource->GetOutputPort()); vectorGlyph->SetScaleModeToScaleByVector(); vectorGlyph->SetVectorModeToUseVector(); vectorGlyph->ScalingOn(); vectorGlyph->OrientOn(); vectorGlyph->SetScaleFactor(0.05); vectorGlyph->Update(); vectorGlyphMapper->SetInputConnection(vectorGlyph->GetOutputPort()); vectorGlyphMapper->Update(); vtkSmartPointer vectorActor = vtkSmartPointer::New(); vectorActor->SetMapper(vectorGlyphMapper); The output I'm receiving The paraview output Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Visualize-vectors-in-an-unstructured-grid-arrays-tp5734259.html Sent from the VTK - Users mailing list archive at Nabble.com. From ale.nonis at libero.it Tue Oct 6 04:58:49 2015 From: ale.nonis at libero.it (ale.nonis at libero.it) Date: Tue, 6 Oct 2015 10:58:49 +0200 (CEST) Subject: [vtkusers] QPushButton and vtkInteractor Message-ID: <1204704532.1466301444121929084.JavaMail.httpd@webmail-02.iol.local> Hi guys, i have some problem to managing events in qt.I want to connect a QPushButton with an vtkInteractorStyle event like press "m".Someone can help me?Thank you in advicesRegardsAlessandro -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Tue Oct 6 05:31:12 2015 From: sam24666806 at gmail.com (LaChen) Date: Tue, 6 Oct 2015 02:31:12 -0700 (MST) Subject: [vtkusers] Problem of camera motion. Message-ID: <1444123872767-5734264.post@n5.nabble.com> Hi, I encounter a problem about camera controlling. I try to disable camera moving (Rotation,Position) by inheritance class vtkInteractorStyleTrackballCamera and override LeftButtonDown method. I register the class into interactor with method SetInteractorStyle. But it's no use. I want to show XY,YZ,XZ plane by vtkImagePlaneWidget. But I don't know general way about it. Should I use 3D camera to simulate it? Or there is other 2D component of vtk which can handle it. THX. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-of-camera-motion-tp5734264.html Sent from the VTK - Users mailing list archive at Nabble.com. From eric.nodwell at numerics88.com Tue Oct 6 07:53:08 2015 From: eric.nodwell at numerics88.com (Eric Nodwell) Date: Tue, 6 Oct 2015 13:53:08 +0200 Subject: [vtkusers] VTK and Python on OS X El Capitan Message-ID: For VTK 6.3.0 in OS X 10.11 El Capitan, if you are compiling VTK yourself, it is no longer possible to link against the system python. This is due to the new System Integrity Protection. The system python is a protected location in OS 10.11, and SIP is very strict about what can be linked, and how, to restricted programs. Although the build will succeed, this is what happens when you attempt to load VTK in python: $ python Python 2.7.10 (default, Aug 22 2015, 20:33:39) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import vtk Traceback (most recent call last): File "", line 1, in File "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/__init__.py", line 39, in from vtkCommonCore import * File "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCore.py", line 1, in from vtkCommonCorePython import * ImportError: dlopen(/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: libvtkCommonCorePython27D-6.3.1.dylib Referenced from: /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so Reason: unsafe use of relative rpath libvtkCommonCorePython27D-6.3.1.dylib in /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so with restricted binary The easiest solution is to use python from python.org . For those unsure, here are the relevant CMake variables to build VTK against the python.org python (if multiple pythons are installed, CMake tends to find the system python libraries): PYTHON_EXECUTABLE /Library/Frameworks/Python.framework/Versions/2.7/bin/python PYTHON_INCLUDE_DIR /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 PYTHON_LIBRARY /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib Eric From david.gobbi at gmail.com Tue Oct 6 11:21:03 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 6 Oct 2015 09:21:03 -0600 Subject: [vtkusers] Python 3 requires relative or correct absolute imports In-Reply-To: <5612893F.9080809@blaicher.com> References: <56127388.2010306@blaicher.com> <5612893F.9080809@blaicher.com> Message-ID: On Mon, Oct 5, 2015 at 8:29 AM, Matthias Blaicher wrote: > On 10/05/2015 04:17 PM, David Gobbi wrote: > > On Mon, Oct 5, 2015 at 6:56 AM, Matthias Blaicher > > wrote: > > However, this should obviously work without manually defining the > search > > path. I propose to change the line to > > > > > from vtk.vtkCommonCorePython import * > > or > > > from .vtkCommonCorePython import * > > > > > > This assumes that the extension modules are installed in the same > > directory as the pure-python modules, which (for me at least) is > > generally not the case. Often the extension modules are kept in > > a platform-specific directory somewhere else in the path. > > > > Tonight I can look at the PEPs for this. > > > > - David > > > > Where would you put them for a system vtk installation? For both the > python 2 and the python 3 build, by default they are installed into the > site-packages directory. It feels to me that this is a good place to put > them. It's just that the import rules changed for py3k. > > However you are right that both of my proposals would break your > workflow. The only thing which comes to my mind is to separate the > extension into its own (private) package. > I've looked over the guidelines for installing python modules, and it seems that your original proposal was correct, i.e. the extension modules should be placed in the same dir as the python files, which would require either a) a relative import or b) placing the extension modules one directory level up (which is messy). The relative import breaks things for me when I try to use VTK from the build directory (i.e. without doing a make install). I have no immediate solution, but I'll think on this if I find any spare time over the next couple days... - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 6 11:31:43 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 6 Oct 2015 09:31:43 -0600 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: Message-ID: Hi Eric, Thanks for the info. Out of curiosity, what happens when you run programs with VTK's own vtkpython executable? I'm guessing that would work, since it isn't a "restricted binary". About the rpaths, I'm a little surprised they are still in the .so files, because a "make install" should clear away the rpaths unless the files are being installed into a bundle. - David On Tue, Oct 6, 2015 at 5:53 AM, Eric Nodwell wrote: > For VTK 6.3.0 in OS X 10.11 El Capitan, if you are compiling VTK > yourself, it is no longer possible to link against the system python. > This is due to the new System Integrity Protection. The system python > is a protected location in OS 10.11, and SIP is very strict about what > can be linked, and how, to restricted programs. Although the build > will succeed, this is what happens when you attempt to load VTK in > python: > > $ python > > Python 2.7.10 (default, Aug 22 2015, 20:33:39) > [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import vtk > Traceback (most recent call last): > File "", line 1, in > File > "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/__init__.py", > line 39, in > from vtkCommonCore import * > File > "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCore.py", > line 1, in > from vtkCommonCorePython import * > ImportError: > dlopen(/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so, > 2): Library not loaded: libvtkCommonCorePython27D-6.3.1.dylib > Referenced from: > > /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so > Reason: unsafe use of relative rpath > libvtkCommonCorePython27D-6.3.1.dylib in > > /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so > with restricted binary > > The easiest solution is to use python from python.org . For those > unsure, here are the relevant CMake variables to build VTK against the > python.org python (if multiple pythons are installed, CMake tends to > find the system python libraries): > > PYTHON_EXECUTABLE > /Library/Frameworks/Python.framework/Versions/2.7/bin/python > PYTHON_INCLUDE_DIR > /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > PYTHON_LIBRARY > /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib > > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.nodwell at numerics88.com Tue Oct 6 12:01:33 2015 From: eric.nodwell at numerics88.com (Eric Nodwell) Date: Tue, 6 Oct 2015 18:01:33 +0200 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: Message-ID: Hi David, Yes, vtkpython works just fine. Maybe I should get in the habit of using it. :) I think the error message, although certainly related to the new System Integrity Protection, must be misleading. As far as I can tell, there is, as you expected, no RPATH set in vtkCommonCorePython.so (i.e. there is no RPATH in the output of "otool -l vtkCommonCorePython.so".) This is a wild guess, but perhaps the fact that libvtkCommonCorePython27D-6.3.1.dylib is specified as just a file name and not a complete path counts as an illegal relative path to SIP?? Anyway, vtkpython works, and the official python.org works, so there are many solutions. Eric On Tue, Oct 6, 2015 at 5:31 PM, David Gobbi wrote: > Hi Eric, > > Thanks for the info. > > Out of curiosity, what happens when you run programs with VTK's > own vtkpython executable? I'm guessing that would work, since it > isn't a "restricted binary". > > About the rpaths, I'm a little surprised they are still in the .so files, > because a "make install" should clear away the rpaths unless the > files are being installed into a bundle. > > - David > > > On Tue, Oct 6, 2015 at 5:53 AM, Eric Nodwell > wrote: >> >> For VTK 6.3.0 in OS X 10.11 El Capitan, if you are compiling VTK >> yourself, it is no longer possible to link against the system python. >> This is due to the new System Integrity Protection. The system python >> is a protected location in OS 10.11, and SIP is very strict about what >> can be linked, and how, to restricted programs. Although the build >> will succeed, this is what happens when you attempt to load VTK in >> python: >> >> $ python >> >> Python 2.7.10 (default, Aug 22 2015, 20:33:39) >> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import vtk >> Traceback (most recent call last): >> File "", line 1, in >> File >> "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/__init__.py", >> line 39, in >> from vtkCommonCore import * >> File >> "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCore.py", >> line 1, in >> from vtkCommonCorePython import * >> ImportError: >> dlopen(/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so, >> 2): Library not loaded: libvtkCommonCorePython27D-6.3.1.dylib >> Referenced from: >> >> /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so >> Reason: unsafe use of relative rpath >> libvtkCommonCorePython27D-6.3.1.dylib in >> >> /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so >> with restricted binary >> >> The easiest solution is to use python from python.org . For those >> unsure, here are the relevant CMake variables to build VTK against the >> python.org python (if multiple pythons are installed, CMake tends to >> find the system python libraries): >> >> PYTHON_EXECUTABLE >> /Library/Frameworks/Python.framework/Versions/2.7/bin/python >> PYTHON_INCLUDE_DIR >> /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> PYTHON_LIBRARY >> /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib >> >> Eric From chr.kohler at gmail.com Tue Oct 6 12:07:50 2015 From: chr.kohler at gmail.com (Christian Kohler) Date: Tue, 6 Oct 2015 13:07:50 -0300 Subject: [vtkusers] crash when unloading vtk Message-ID: <5613F1D6.1030003@gmail.com> Hello! I currently encounter a problem using the vtk library in our open source project "itom" (https://bitbucket.org/itom/itom/wiki/Home). The problem occurs when unloading a qt-plugin relying on the vtk library. The actual crash occurs in the function vtkCommonInformationKeyManager::ClassFinalize() in the file vtkCommonInformationKeyManager.cxx (Line 76ff) when deleting the entries of the vtkCommonInformationKeyManagerkeys (Line 86) starting from the (in my case sixth) entry in the list named "LABEL" onwards (i.e. also skipping the deleting of this entry pulling to another one after that one). I am using Vtk Version 6.3 from the downloadable zip file, self compiled with MsVS 2013 Express, CMake 3.2.3, qt and pyhton options disabled, all 64bit version. Any help is appreciated. Best regards Christian From ben.boeckel at kitware.com Tue Oct 6 14:06:16 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Oct 2015 14:06:16 -0400 Subject: [vtkusers] Python 3 requires relative or correct absolute imports In-Reply-To: References: <56127388.2010306@blaicher.com> Message-ID: <20151006180616.GA12841@megas.khq.kitware.com> On Mon, Oct 05, 2015 at 08:17:46 -0600, David Gobbi wrote: > This assumes that the extension modules are installed in the same > directory as the pure-python modules, which (for me at least) is > generally not the case. Often the extension modules are kept in > a platform-specific directory somewhere else in the path. > > Tonight I can look at the PEPs for this. All of VTK's modules should go to the archful directory (/usr/lib64 or /usr/lib/$triple). The .py files don't work without the .so files, so they all go to the same directory (e.g., on Fedora, /usr/lib64/python2.7/site-packages/vtk/*). Python 3.3 introduced namespace packages where you can split a module over multiple directories, but this is generally intended for the "find all submodules of foo" use case for plugins where the foo package has a presence on the archless and archful system directories as well as $PYTHONPATH. But this is not the use case for VTK, so dropping the .py files beside the .so files should be the way to go. --Ben From ben.boeckel at kitware.com Tue Oct 6 14:06:41 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Oct 2015 14:06:41 -0400 Subject: [vtkusers] Python 3.5 build failures In-Reply-To: References: <56118C64.3020304@blaicher.com> Message-ID: <20151006180641.GB12841@megas.khq.kitware.com> On Mon, Oct 05, 2015 at 08:24:09 -0600, David Gobbi wrote: > Thanks, Shawn! I just merged the code fixes this morning. All Python builders should be building the module now. --Ben From ben.boeckel at kitware.com Tue Oct 6 14:19:13 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Oct 2015 14:19:13 -0400 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: Message-ID: <20151006181913.GC12841@megas.khq.kitware.com> On Tue, Oct 06, 2015 at 13:53:08 +0200, Eric Nodwell wrote: > For VTK 6.3.0 in OS X 10.11 El Capitan, if you are compiling VTK > yourself, it is no longer possible to link against the system python. > This is due to the new System Integrity Protection. The system python > is a protected location in OS 10.11, and SIP is very strict about what > can be linked, and how, to restricted programs. Although the build > will succeed, this is what happens when you attempt to load VTK in > python: So Apple has crippled their Python (e.g., how do you use your own NumPy with the system Python now if you can't load it?). I guess you could pay $100 a year, but that seems silly just for code I run locally too. But I hear that apparently the standard operating procedure is to just build your own Python anyways for such use cases (or use python.org too). What's funny is that they don't require signed .py files as well since they're just as arbitrary code as any .so modules. --Ben From sturla.molden at gmail.com Tue Oct 6 15:08:04 2015 From: sturla.molden at gmail.com (Sturla Molden) Date: Tue, 6 Oct 2015 19:08:04 +0000 (UTC) Subject: [vtkusers] VTK and Python on OS X El Capitan References: <20151006181913.GC12841@megas.khq.kitware.com> Message-ID: <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Ben Boeckel wrote: > So Apple has crippled their Python (e.g., how do you use your own NumPy > with the system Python now if you can't load it?). The system Python is reserved for the operating system. You shouldn't mess with it or even use it, particularly not install packages into it. To maintain the integrity of te operating system, it is important that only Apple change it through system updates. Apple has not ceipped their Python, they have made sure that users stop modifying a vital component in their operating systems. If you want Python, install your own, e.g. from Python.org, Anaconda or Enthought. Then you can do whatever you want with it. Sturla From matthew.brett at gmail.com Tue Oct 6 15:18:41 2015 From: matthew.brett at gmail.com (Matthew Brett) Date: Tue, 6 Oct 2015 12:18:41 -0700 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: On Tue, Oct 6, 2015 at 12:08 PM, Sturla Molden wrote: > Ben Boeckel wrote: > >> So Apple has crippled their Python (e.g., how do you use your own NumPy >> with the system Python now if you can't load it?). > > The system Python is reserved for the operating system. You shouldn't mess > with it or even use it, particularly not install packages into it. To > maintain the integrity of te operating system, it is important that only > Apple change it through system updates. Apple has not ceipped their Python, > they have made sure that users stop modifying a vital component in their > operating systems. > > If you want Python, install your own, e.g. from Python.org, Anaconda or > Enthought. Then you can do whatever you want with it. Yes, I believe the standard advice is here : https://github.com/MacPython/wiki/wiki/Which-Python Matthew From david.gobbi at gmail.com Tue Oct 6 15:33:01 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 6 Oct 2015 13:33:01 -0600 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: On Tue, Oct 6, 2015 at 1:18 PM, Matthew Brett wrote: > > > Yes, I believe the standard advice is here : > https://github.com/MacPython/wiki/wiki/Which-Python You say "standard advice" and then point to a page you wrote yourself ;) I'm torn between agreeing with the advice and disliking the fact that the system can't just "get along" with us. Before you know it, our workstations will just be iPads with a keyboard, and maybe a little sandbox for writing toy programs. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Tue Oct 6 15:46:09 2015 From: matthew.brett at gmail.com (Matthew Brett) Date: Tue, 6 Oct 2015 12:46:09 -0700 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: On Tue, Oct 6, 2015 at 12:33 PM, David Gobbi wrote: > On Tue, Oct 6, 2015 at 1:18 PM, Matthew Brett > wrote: >> >> >> Yes, I believe the standard advice is here : >> https://github.com/MacPython/wiki/wiki/Which-Python > > > You say "standard advice" and then point to a page you wrote yourself ;) Yes, I did do that, but it's standard advice in the sense that the page was written after consulting about what the standard advice was, on the MacPython mailing list [1]. It's me writing it partly because I do a lot of work on Mac Python installation for scientific packages [2]. > I'm torn between agreeing with the advice and disliking the fact that the > system can't just "get along" with us. Before you know it, our workstations > will just be iPads with a keyboard, and maybe a little sandbox for writing > toy programs. Sorry, I didn't investigate how hard Apple is holding onto control of system Python, but I would be glad of the side-effect that people install a standard Python to work with, that isn't system Python, for the various reasons given. Cheers, Matthew [1] https://www.mail-archive.com/pythonmac-sig at python.org/msg11740.html [2] https://github.com/MacPython From blowekamp at mail.nih.gov Tue Oct 6 15:37:17 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 6 Oct 2015 15:37:17 -0400 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: <75307130-E9B5-4892-8BE8-BDE0E8DFF761@mail.nih.gov> I agree that installing packages into the OSX system Python should not be done and could be prohibited as far as I am concern. But I have had good success using the OSX system Python as the basis for virtual environments. I have only done nominal experimenting with El Capitan and it seems OK for other projects I am working on. If you look at the original error message: Reason: unsafe use of relative rpath libvtkCommonCorePython27D-6.3.1.dylib in /Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so with restricted binary It's interesting that the VTK Python library was loaded from Python but the dependent library was not. I bet there is a way to specify the RPaths so it that would work. When CMake encode the "BUILD_RPATH" are you able to load the dependent libraries? HTH, Brad On Oct 6, 2015, at 3:18 PM, Matthew Brett wrote: > On Tue, Oct 6, 2015 at 12:08 PM, Sturla Molden wrote: >> Ben Boeckel wrote: >> >>> So Apple has crippled their Python (e.g., how do you use your own NumPy >>> with the system Python now if you can't load it?). >> >> The system Python is reserved for the operating system. You shouldn't mess >> with it or even use it, particularly not install packages into it. To >> maintain the integrity of te operating system, it is important that only >> Apple change it through system updates. Apple has not ceipped their Python, >> they have made sure that users stop modifying a vital component in their >> operating systems. >> >> If you want Python, install your own, e.g. from Python.org, Anaconda or >> Enthought. Then you can do whatever you want with it. > > Yes, I believe the standard advice is here : > https://github.com/MacPython/wiki/wiki/Which-Python > > Matthew > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 eric.nodwell at numerics88.com Tue Oct 6 15:50:01 2015 From: eric.nodwell at numerics88.com (Eric Nodwell) Date: Tue, 6 Oct 2015 21:50:01 +0200 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: I don't think Apple has been entirely consistent here. For example, I am 99.999% sure that the operating system never needs to use scipy, but they have included that in the system python for a couple of versions now. Furthermore, they link it against their Accelerate Framework, which is wicked fast - and it is very far from trivial to compile scipy with the Accerelate Framework if you want to do it yourself, so it is tempting to use theirs for sure. I think there is an inherent conflict between "look what we can do" on the one hand and system integrity, stability and security on the other hand. I think the hammer has come down definitively on the side of integrity, stability and security. I don't think it is the wrong decision. We in "application land" can just lump it and figure out how to provide the functionality we need ourselves. :) Eric On Tue, Oct 6, 2015 at 9:18 PM, Matthew Brett wrote: > On Tue, Oct 6, 2015 at 12:08 PM, Sturla Molden wrote: >> Ben Boeckel wrote: >> >>> So Apple has crippled their Python (e.g., how do you use your own NumPy >>> with the system Python now if you can't load it?). >> >> The system Python is reserved for the operating system. You shouldn't mess >> with it or even use it, particularly not install packages into it. To >> maintain the integrity of te operating system, it is important that only >> Apple change it through system updates. Apple has not ceipped their Python, >> they have made sure that users stop modifying a vital component in their >> operating systems. >> >> If you want Python, install your own, e.g. from Python.org, Anaconda or >> Enthought. Then you can do whatever you want with it. > > Yes, I believe the standard advice is here : > https://github.com/MacPython/wiki/wiki/Which-Python > > Matthew > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 matthew.brett at gmail.com Tue Oct 6 15:56:37 2015 From: matthew.brett at gmail.com (Matthew Brett) Date: Tue, 6 Oct 2015 12:56:37 -0700 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: Hi, On Tue, Oct 6, 2015 at 12:50 PM, Eric Nodwell wrote: > I don't think Apple has been entirely consistent here. For example, I > am 99.999% sure that the operating system never needs to use scipy, > but they have included that in the system python for a couple of > versions now. Furthermore, they link it against their Accelerate > Framework, which is wicked fast - and it is very far from trivial to > compile scipy with the Accerelate Framework if you want to do it > yourself, so it is tempting to use theirs for sure. The default numpy and scipy wheels are compiled against Accelerate. I mean that if you have python.org Python or homebrew Python / pip then: pip install numpy scipy should get you binary installations of numpy and scipy linked against Accelerate. There was a bug in Accelerate that we had to work round a while ago, with Sturla's help, but I don't think there were any recent problems with Accelerate linking, that I'm aware of. I'm happy to be corrected though. Best, Matthew From eric.nodwell at numerics88.com Tue Oct 6 16:13:34 2015 From: eric.nodwell at numerics88.com (Eric Nodwell) Date: Tue, 6 Oct 2015 22:13:34 +0200 Subject: [vtkusers] VTK and Python on OS X El Capitan In-Reply-To: References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: Hi Matthew, Oh well, in that case, I'm glad I gave up trying to compile them myself for every new release. My thanks to you and Sturla. Eric On Tue, Oct 6, 2015 at 9:56 PM, Matthew Brett wrote: > Hi, > > On Tue, Oct 6, 2015 at 12:50 PM, Eric Nodwell > wrote: >> I don't think Apple has been entirely consistent here. For example, I >> am 99.999% sure that the operating system never needs to use scipy, >> but they have included that in the system python for a couple of >> versions now. Furthermore, they link it against their Accelerate >> Framework, which is wicked fast - and it is very far from trivial to >> compile scipy with the Accerelate Framework if you want to do it >> yourself, so it is tempting to use theirs for sure. > > The default numpy and scipy wheels are compiled against Accelerate. I > mean that if you have python.org Python or homebrew Python / pip then: > > pip install numpy scipy > > should get you binary installations of numpy and scipy linked against > Accelerate. > > There was a bug in Accelerate that we had to work round a while ago, > with Sturla's help, but I don't think there were any recent problems > with Accelerate linking, that I'm aware of. I'm happy to be corrected > though. > > Best, > > Matthew From baoyun_li123 at yahoo.com Tue Oct 6 16:14:55 2015 From: baoyun_li123 at yahoo.com (baoyun) Date: Tue, 6 Oct 2015 13:14:55 -0700 (MST) Subject: [vtkusers] rendering multivolumer Message-ID: <1444162495456-5734283.post@n5.nabble.com> Hi, I need to render several volumes in one widget. I am wondering whether vtk support muti volume rendering? If not supported now, is this function going to be supported in near future? If I need to inherit vtk class to render multi-volume, can somebody explain how to do it? baoyun -- View this message in context: http://vtk.1045678.n5.nabble.com/rendering-multivolumer-tp5734283.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Tue Oct 6 16:51:20 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 6 Oct 2015 16:51:20 -0400 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: <5611673C.30400@blaicher.com> References: <5611673C.30400@blaicher.com> Message-ID: <20151006205120.GB5404@megas.khq.kitware.com> On Sun, Oct 04, 2015 at 19:51:56 +0200, Matthias Blaicher wrote: > I'd like to start saying that I'm really glad that there is work on a > Python 3 binding. VTK is the last showstopper for me to convert to > Python 3 and I can hardly wait until it's in an official release (6.4?). > > I'm unclear though, how I'm supposed to build a python 2 and python 3 > interface at the same time. Is this even possible right now? Hints on > how to do this would be greatly appreciated! Right now, use two build trees. A single build tree supporting both is not feasible currently. Adding suffixes to Python-dependent modules such as vtkFiltersPython will need to be done so they don't conflict with each other, but other than that, getting a multi-python-version build would require major changes to the module system (and FindPython too) for everything to work properly. --Ben From sturla.molden at gmail.com Tue Oct 6 18:29:45 2015 From: sturla.molden at gmail.com (Sturla Molden) Date: Tue, 6 Oct 2015 22:29:45 +0000 (UTC) Subject: [vtkusers] VTK and Python on OS X El Capitan References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: <1309173434465862290.263630sturla.molden-gmail.com@news.gmane.org> Eric Nodwell wrote: > I don't think Apple has been entirely consistent here. For example, I > am 99.999% sure that the operating system never needs to use scipy, > but they have included that in the system python for a couple of > versions now. Furthermore, they link it against their Accelerate > Framework, which is wicked fast - and it is very far from trivial to > compile scipy with the Accerelate Framework if you want to do it > yourself, Actually it is very trivial. Just run setup.py and it will pick Accelerate by default on OSX. You don't have to specify anything and it will just work. NumPy does the same. If you want to use a different BLAS/LAPACK it quickly becomes more complicated and you must start to specify configuration files for distutils. In void of BLAS information SciPy and NumPy will use a reference implementation on Linux and Windows, but on OSX it just picks Accelerate unless you say otherwise. OSX used to be the most troublesome platform on which to build NumPy and SciPy, but now it is the easiest. Accelerate used to be a bit slow, roughly similar to a generic ATLAS, but from OSX 10.9 (Mavericks) it suddenly became the fastest BLAS on the market (even faster than Intel MKL in my tests). Apple has been quite about this but they really improved the performance. Unfortunaltely they also introduced a bug in the subroutine SGEMV, which we fixed by calling SGEMM in the affected cases, but it was fixed by Apple in Yosemite. The patch is still in NumPy and SciPy, but we will take it away when Mavericks is no longer relevant. Sturla From sturla.molden at gmail.com Tue Oct 6 19:02:09 2015 From: sturla.molden at gmail.com (Sturla Molden) Date: Tue, 6 Oct 2015 23:02:09 +0000 (UTC) Subject: [vtkusers] VTK and Python on OS X El Capitan References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: <1064348553465864914.682198sturla.molden-gmail.com@news.gmane.org> Matthew Brett wrote: > Sorry, I didn't investigate how hard Apple is holding onto control of > system Python, but I would be glad of the side-effect that people > install a standard Python to work with, that isn't system Python, for > the various reasons given. Apple has added a protection layer that allows us to use the system Python as a runtime, but it tells us to f**k off if we try to modify it. The consequence is that most advanced users must install their own Python. Personally I applaud this decision because it maintains the integrity of the operating system. Sturla From sturla.molden at gmail.com Tue Oct 6 19:14:17 2015 From: sturla.molden at gmail.com (Sturla Molden) Date: Tue, 6 Oct 2015 23:14:17 +0000 (UTC) Subject: [vtkusers] VTK and Python on OS X El Capitan References: <20151006181913.GC12841@megas.khq.kitware.com> <650276920465850857.651426sturla.molden-gmail.com@news.gmane.org> Message-ID: <949986221465865442.085519sturla.molden-gmail.com@news.gmane.org> David Gobbi wrote: > You say "standard advice" and then point to a page you wrote yourself ;) > I'm torn between agreeing with the advice and disliking the fact that the > system can't just "get along" with us. Before you know it, our workstations > will just be iPads with a keyboard, and maybe a little sandbox for writing > toy programs. As long as scientistis need programmable computers there will be programmable computers. It might not be a Mac, but there will always be hardware we can program to do what we need. As for iPads, as long as Apple needs us to build apps for iOS and OSX, there will be developer tools available. The system can "get along" with us. We can use the system Python. We cannot modify it. That is because a random user cannot know the consequences of tempering with an operating system component. To ensure the integerity of the computer, a product for which Apple has responsibility and liability, this requires thorough testing by Apple's own engineers. Therefore it now comes with temper protection. There is nothing wrong with this. We can still use the system Python as a runtime and we can still install our own Python interpreter if it is insufficient. Apple has just taken steps to ensure the integrity of the system components they have installed, which is perfectly ok. Sturla From sam24666806 at gmail.com Wed Oct 7 02:58:34 2015 From: sam24666806 at gmail.com (LaChen) Date: Tue, 6 Oct 2015 23:58:34 -0700 (MST) Subject: [vtkusers] How to get opengl texture id from vtkImagePlaneWidget Message-ID: <1444201114301-5734295.post@n5.nabble.com> Hi, I use vtkImagePlaneWidget and set an offscreen renderer as default renderer. The reason I do that is I wan't to get slide image texture id by the codes as follow : vtkTextureObject *texture_obj = vtkOpenGLTexture::SafeDownCast(m_slider_widget[i].GetVTKImagePlaneWidgetPtr()->GetTexture())->GetTextureObject(); texture_id = texture_obj->GetHandle(); But I always get null pointer of vtkTextureObject. I have no idea about this problem. P.S. I try to get the handle after executing default renderer->Render(). -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-opengl-texture-id-from-vtkImagePlaneWidget-tp5734295.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Wed Oct 7 04:00:49 2015 From: sam24666806 at gmail.com (LaChen) Date: Wed, 7 Oct 2015 01:00:49 -0700 (MST) Subject: [vtkusers] How to get opengl texture id from vtkImagePlaneWidget In-Reply-To: <1444201114301-5734295.post@n5.nabble.com> References: <1444201114301-5734295.post@n5.nabble.com> Message-ID: <1444204849343-5734296.post@n5.nabble.com> LaChen wrote > Hi, I use vtkImagePlaneWidget and set an offscreen renderer as default > renderer. > > The reason I do that is I wan't to get slide image texture id by the codes > as follow : > > vtkTextureObject *texture_obj = > vtkOpenGLTexture::SafeDownCast(m_slider_widget[i].GetVTKImagePlaneWidgetPtr()->GetTexture())->GetTextureObject(); > > texture_id = texture_obj->GetHandle(); > > But I always get null pointer of vtkTextureObject. > > I have no idea about this problem. > > P.S. I try to get the handle after executing default renderer->Render(). I find the reason why I get nullptr. I needs to use ImagePanelWidget::InteractorOn(). But I still can't get real slicing of image with index I set. Does someone encounter same situation?? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-opengl-texture-id-from-vtkImagePlaneWidget-tp5734295p5734296.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Wed Oct 7 06:04:37 2015 From: sam24666806 at gmail.com (LaChen) Date: Wed, 7 Oct 2015 03:04:37 -0700 (MST) Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer Message-ID: <1444212277297-5734298.post@n5.nabble.com> Hi, I try to use vtkImagePanelWidget::GetTexture() to get texture of slicing by indicated index (SetSliceIndex). After I get texture, I downcast the texture to OpenGLTexture to get vtkTextureObject. Then I try to the the handle of the texture object. Finally, I write some codes to draw an rectangle and texture by the handle. But it seems not work. Is my way correctly?? If it's not correct, how to show one slice in a plane. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Oct 7 08:54:28 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Oct 2015 08:54:28 -0400 Subject: [vtkusers] gcode2vtk animation example In-Reply-To: References: Message-ID: Hi Shakthi, Sorry for the delay in response. I've been swamped. Did you make any progress on your problem? I'm switching this back to the VTK users list since what you are doing is in VTK. - Cory On Thu, Sep 24, 2015 at 1:26 PM, Shakthi Kannan wrote: > Hi Cory, > > I would like to render lines using a Python callback method, and I am > assuming Paraview does the same as well. I am using the following code > snippet as a template: > > > http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/LongLine > > and the following examples for a callback function: > > http://cmake.org/Wiki/VTK/Examples/Python/Animation > > http://public.kitware.com/pipermail/vtkusers/2010-January/056316.html > > Changing the colour of the line using the callback method after 5s > works fine. But, I am not sure how to add more points and lines to the > existing image. My hacked up code is here: > > https://gist.github.com/shakthimaan/588af4b6d0facdf2cc89 > > How do I incrementally add lines to an existing drawing, and render them? > > Appreciate any help in this regard, > > Thanks! > > SK > > -- > Shakthi Kannan > http://www.shakthimaan.com > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Oct 7 09:01:41 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Oct 2015 09:01:41 -0400 Subject: [vtkusers] Using Python VTK to add more points, lines on callback In-Reply-To: References: Message-ID: Shakthi, Have you made any progress on this? I tried to run your code example, but don't have Paho installed. Maybe you could modify your code to not use multiprocessing and get the Render() function to work serially. This will rule out some unknown interaction with the multiprocessing module. Thanks, Cory On Fri, Sep 25, 2015 at 2:31 PM, Shakthi Kannan wrote: > Hi, > > I am now able to get data from a separate process on to a queue, and > send it to vtkTimerCallback(), but, the image is not rendering. I have > used self.actor.GetProperty().SetColor() and > iren.GetRenderWindow().Render() in the callback. > > How else can I force it to render the image? > > The latest code is available at: > > https://gist.github.com/shakthimaan/d8e4f51f3d074926e244 > > Thanks! > > SK > > On Thu, Sep 24, 2015 at 10:34 PM, Shakthi Kannan > wrote: > > Hi, > > > > I would like to render lines using a Python callback method and VTK. I > > am using the following code snippet as a template: > > > > > http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/LongLine > > > > and the follow examples for a callback function: > > > > http://cmake.org/Wiki/VTK/Examples/Python/Animation > > > > http://public.kitware.com/pipermail/vtkusers/2010-January/056316.html > > > > Changing the colour of the line using the callback method after 5s > > works fine. But, I am not sure how to add more points and lines to the > > existing image. My hacked up code is here: > > > > https://gist.github.com/shakthimaan/588af4b6d0facdf2cc89 > > > > How do I incrementally add lines to an existing drawing, and render them? > > > > Appreciate your help in this regard, > > > > Thanks! > > > > SK > > > > -- > > Shakthi Kannan > > http://www.shakthimaan.com > > > -- > Shakthi Kannan > http://www.shakthimaan.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Oct 7 10:14:44 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Oct 2015 10:14:44 -0400 Subject: [vtkusers] how to convert vtk polydata to dif file format In-Reply-To: <1580488.6Phfrjp2dC@basti-thinkpad-t410> References: <1580488.6Phfrjp2dC@basti-thinkpad-t410> Message-ID: Hi Sebastian, Probably the easiest way to do this is to use VTK readers to read in the VTK and STL files to load the surface data, then write out the DIF file with standard Python ASCII file writing. Here's a sketch you can use to get started: import vtk reader = vtk.vtkPolyDataReader() reader.SetFileName('/path/to/file.vtk') reader.Update() pd = reader.GetOutput() print 'Vertices' for i in xrange(pd.GetNumberOfPoints()): print pd.GetPoint(i) print 'Normals' normals = pd.GetPointData().GetArray("Normals") print '---', pd.GetNumberOfPoints(), normals.GetNumberOfTuples() for i in xrange(normals.GetNumberOfTuples()): print normals.GetValue(3*i), normals.GetValue(3*i + 1), normals.GetValue(3*i + 2) print 'Polygons' for i in xrange(pd.GetNumberOfPolys()): cell = pd.GetCell(i) pointIds = cell.GetPointIds() for j in xrange(pointIds.GetNumberOfIds()): print pointIds.GetId(j) HTH, Cory On Sun, Oct 4, 2015 at 8:13 PM, Sebastian Hilbert wrote: > Hi, > > I am trying to convert a model of the heart which is available as either > stl > or vtk polydata to a new file format called diffusion image format (dif) > > All files are provided below. The main question is. How do I construct the > dif > file when I have only vtk and stl file available ? > > dif is a format used by the medical software Ensite from St. Jude and > looking > at the spec for the dif format it seems related to what vtk can provide. > > It seems to work with vertices , normals and polygons. > > I wonder if anyone has some advice on how to map data obtained from an stl > file or vtk polydata file to data used in the dif format. How do I extract > vertices, normals and polygons from either stl and/or vtk ? > > The target format is like this: > > > > > > 32.4603 6.0825 -40.3249 > 13.9858 7.9016 -41.0501 > 16.6287 7.6514 -40.4356 > 30.7806 7.9503 -41.1414 > > > 0.220882 -0.586701 -0.779098 > -0.082953 -0.169572 -0.982021 > 0.393210 -0.647443 -0.652842 > -0.106461 -0.248735 -0.962703 > > > 3 40 8 > 17 10 13 > 41 13 42 > 4 36 43 > > > > > > > > > Looking at the vtk file the polygons are different from the ones in the xml > (dif) file. Looking at the stl file (ascii) I can see some vertex lines > that > match a line in the vertices section of the xml (dif) file but there are a > lot > more vertex lines in the stl file then there are in the xml (dif file). > > I would prefer to use python if that is an option. > > If anyone wants to have a look here are the correspondig files > > vtk: https://146.0.105.21/owncloud/index.php/s/NZqGwdQQSramk1w > stl: https://146.0.105.21/owncloud/index.php/s/tWv7yKttA15hdoL > dif: https://146.0.105.21/owncloud/index.php/s/3R8oKRxXK2oR5DD > > Any help is appreciated. > > Sebastian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Oct 7 10:31:34 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 7 Oct 2015 10:31:34 -0400 Subject: [vtkusers] crash when unloading vtk In-Reply-To: <5613F1D6.1030003@gmail.com> References: <5613F1D6.1030003@gmail.com> Message-ID: Hi Christian, This sounds like a memory management issue. I wonder if that key is being deleted twice. Is there any kind of memory checker you can run on Windows that might pinpoint the error? Alternatively, could you compile on linux and use valgrind to check for memory errors? Thanks, Cory On Tue, Oct 6, 2015 at 12:07 PM, Christian Kohler wrote: > Hello! > I currently encounter a problem using the vtk library in our open source > project "itom" (https://bitbucket.org/itom/itom/wiki/Home). The problem > occurs when unloading a qt-plugin relying on the vtk library. The actual > crash occurs in the function > vtkCommonInformationKeyManager::ClassFinalize() in the file > vtkCommonInformationKeyManager.cxx (Line 76ff) when deleting the entries of > the vtkCommonInformationKeyManagerkeys (Line 86) starting from the (in my > case sixth) entry in the list named "LABEL" onwards (i.e. also skipping the > deleting of this entry pulling to another one after that one). > I am using Vtk Version 6.3 from the downloadable zip file, self compiled > with MsVS 2013 Express, CMake 3.2.3, qt and pyhton options disabled, all > 64bit version. > Any help is appreciated. > Best regards > Christian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Oct 7 11:33:57 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 7 Oct 2015 09:33:57 -0600 Subject: [vtkusers] Python 3 requires relative or correct absolute imports In-Reply-To: <20151006180616.GA12841@megas.khq.kitware.com> References: <56127388.2010306@blaicher.com> <20151006180616.GA12841@megas.khq.kitware.com> Message-ID: On Tue, Oct 6, 2015 at 12:06 PM, Ben Boeckel wrote: > > All of VTK's modules should go to the archful directory (/usr/lib64 or > /usr/lib/$triple). The .py files don't work without the .so files, so > they all go to the same directory (e.g., on Fedora, > /usr/lib64/python2.7/site-packages/vtk/*). > > Python 3.3 introduced namespace packages where you can split a module > over multiple directories, but this is generally intended for the "find > all submodules of foo" use case for plugins where the foo package has a > presence on the archless and archful system directories as well as > $PYTHONPATH. But this is not the use case for VTK, so dropping the .py > files beside the .so files should be the way to go. > Yes, the best way forward is probably to make it so that, during the build, the Python .so modules go to "${VTK_BUILD_DIR}/Wrapping/Python/vtk/". Currently the build drops them into the "lib" dir, but they're not libraries. We could also make the python "vtk" module more efficient by dropping the useless ".py" files (vtkCommonCore.py et al). These files only exist because, historically (many many years ago), the VTK python extension modules were named differently on Windows as compared to UNIX. It would make more sense for vtk/__init__.py to load the .so files directly. There is also an opportunity to rename the files. Instead of this: vtkCommonCorePython.so for VTK 7 we could change the name to one of these: vtkCommonCore.so or simply CommonCore.so I'm a fan the former, for the sake of backwards compatibility. In any case, once the build location is moved, setting up the relative imports for Py3k builds is trivial. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Oct 7 11:38:12 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 7 Oct 2015 11:38:12 -0400 Subject: [vtkusers] rendering multivolumer In-Reply-To: <1444162495456-5734283.post@n5.nabble.com> References: <1444162495456-5734283.post@n5.nabble.com> Message-ID: Hi baoyun, The multiple volume rendering is something that needs bit more explanation. We do support multiple volume rendering in a single renderer, however, you will need to instantiate multiple mappers for that (or you can combine volumes into one large volume using VTK filters). The caveat would be is that when you have multiple volumes, you will not be able to control how the volumes will affect each other for computation and hence color and opacity will be computed individually. Please let us know if you need more help. Thanks On Tue, Oct 6, 2015 at 4:14 PM, baoyun via vtkusers wrote: > Hi, > > I need to render several volumes in one widget. I am wondering whether vtk > support muti volume rendering? If not supported now, is this function going > to be supported in near future? > > If I need to inherit vtk class to render multi-volume, can somebody explain > how to do it? > > baoyun > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/rendering-multivolumer-tp5734283.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.krotkiewski at gmail.com Wed Oct 7 12:18:35 2015 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Wed, 7 Oct 2015 18:18:35 +0200 Subject: [vtkusers] Problems with vtkPropPicker + OpenGL2 Message-ID: <561545DB.5000209@gmail.com> Hello, I am experiencing problems with vtkPropPicker when using OpenGL2 backend (Java bindings). I have attached a screenshot of an example setup with two surfaces. vtkPropPicker very often returns a wrong prop - red dots on the surfaces mark approximate places, where the reading returned the other surface, not the expeced one. As you see, this happens all over the place, both on the top and bottom surface. Those problems do not occur when using vtkPropPicker with the old OpenGL backend. There is also no such issues when using vtkCellPicker and OpenGL2. Do you know of any problems with Picking + OpenGL2 that could be the reason for such behavior? If not, I would be happy to provide more information to find the cause of this problem Regards, Marcin -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkPropPicker_error.png Type: image/png Size: 191248 bytes Desc: not available URL: From ken.martin at kitware.com Wed Oct 7 13:05:58 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 7 Oct 2015 13:05:58 -0400 Subject: [vtkusers] Problems with vtkPropPicker + OpenGL2 In-Reply-To: <561545DB.5000209@gmail.com> References: <561545DB.5000209@gmail.com> Message-ID: It is currently broken. Should be fixed in the next few weeks I hope - Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of marcin.krotkiewski Sent: Wednesday, October 7, 2015 12:19 PM To: VTK Users Subject: [vtkusers] Problems with vtkPropPicker + OpenGL2 Hello, I am experiencing problems with vtkPropPicker when using OpenGL2 backend (Java bindings). I have attached a screenshot of an example setup with two surfaces. vtkPropPicker very often returns a wrong prop - red dots on the surfaces mark approximate places, where the reading returned the other surface, not the expeced one. As you see, this happens all over the place, both on the top and bottom surface. Those problems do not occur when using vtkPropPicker with the old OpenGL backend. There is also no such issues when using vtkCellPicker and OpenGL2. Do you know of any problems with Picking + OpenGL2 that could be the reason for such behavior? If not, I would be happy to provide more information to find the cause of this problem Regards, Marcin From inglis.dl at gmail.com Wed Oct 7 14:14:08 2015 From: inglis.dl at gmail.com (DL I) Date: Wed, 7 Oct 2015 14:14:08 -0400 Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: <1444212277297-5734298.post@n5.nabble.com> References: <1444212277297-5734298.post@n5.nabble.com> Message-ID: Hi LaChen can you explain why you want to do this (what is the user interface supposed to present) ? Are you trying to map the texture onto some other surface or are you trying to show the sliced image as a 2D image in a renderer ? regards, Dean On Wed, Oct 7, 2015 at 6:04 AM, LaChen wrote: > Hi, I try to use vtkImagePanelWidget::GetTexture() to get texture of > slicing > by indicated index (SetSliceIndex). > > After I get texture, I downcast the texture to OpenGLTexture to get > vtkTextureObject. > > Then I try to the the handle of the texture object. Finally, I write some > codes to draw an rectangle and texture by the handle. But it seems not > work. > > Is my way correctly?? > > If it's not correct, how to show one slice in a plane. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298.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 dave.demarle at kitware.com Wed Oct 7 15:50:23 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 7 Oct 2015 15:50:23 -0400 Subject: [vtkusers] IEEE Supercomputing 2015 - please vote for VTK and ParaView Message-ID: Greetings, If you like VTK and/or ParaView, please vote for them in HPCWire's Reader's choice awards contest. Voting ends on October 9. Details here: http://tci.taborcommunications.com/webmail/21812/250864529/8ab9a210ee024c30ff7664255c625343 thanks! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Wed Oct 7 21:28:36 2015 From: sam24666806 at gmail.com (LaChen) Date: Wed, 7 Oct 2015 18:28:36 -0700 (MST) Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: References: <1444212277297-5734298.post@n5.nabble.com> Message-ID: <1444267716193-5734313.post@n5.nabble.com> DL I wrote > Hi LaChen > > can you explain why you want to do this (what is the user interface > supposed to present) ? > Are you trying to map the texture onto some other surface or are you > trying to show the sliced image as a 2D > image in a renderer ? > > regards, > Dean > > On Wed, Oct 7, 2015 at 6:04 AM, LaChen < > sam24666806@ > > wrote: > >> Hi, I try to use vtkImagePanelWidget::GetTexture() to get texture of >> slicing >> by indicated index (SetSliceIndex). >> >> After I get texture, I downcast the texture to OpenGLTexture to get >> vtkTextureObject. >> >> Then I try to the the handle of the texture object. Finally, I write some >> codes to draw an rectangle and texture by the handle. But it seems not >> work. >> >> Is my way correctly?? >> >> If it's not correct, how to show one slice in a plane. >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298.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 Hi, thank for your reply. The reason I want to do is that I need to show slicing image of three axes(x,y,z) and I can select index which slicing image I want to show. Then I find an good example (QtVTKRenderWindows). I learn vtkImagePanelWidget in the example. So I use QT and create three QVTKWidgets. And I try to binding vtkImagePanelWidget for each. But I encounter some problem. First, I try to blocking all mouse event. I inherit CameraInteractorStyle and block event left button press. But I fail. Second, I set eye position of active camera, It seems no use. So I try to use OpenGL to draw an rectangle and find texture of slicing image from vtkImagePanelWidget. Above-mentioned is the flow I try to handle my problem. Can you share your experience about my problem? I can't understand what component I should use. Is VTKSlidingImage or vtkImagePanelWidget. And I don't know how to set up interactor of offscreen rendering. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298p5734313.html Sent from the VTK - Users mailing list archive at Nabble.com. From zeav1 at hotmail.com Thu Oct 8 09:12:25 2015 From: zeav1 at hotmail.com (Grabriel) Date: Thu, 8 Oct 2015 06:12:25 -0700 (MST) Subject: [vtkusers] VTK+GDCM+JAVA error in CMake In-Reply-To: References: <1426686321646-5730940.post@n5.nabble.com> <1426856667072-5731043.post@n5.nabble.com> <1426861352316-5731049.post@n5.nabble.com> <1426864973085-5731051.post@n5.nabble.com> Message-ID: <1444309945507-5734314.post@n5.nabble.com> Hi, I'm trying to compile the library gdcm, but I'm having this error Error 100 error LNK1104: can not open the 'vtksysJava.lib' C: \ gdcm \ build \ Utilities \ VTK \ LINK vtkgdcmJava I'm using cmake, VTK 6.2.0, and java in Visual Studio 2013. I use static libraries to build this library, although shared use vtk build, and not what is wrong. and hopefully someone can help. thanks, regards -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-GDCM-JAVA-error-in-CMake-tp5729490p5734314.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Oct 8 09:32:20 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Oct 2015 09:32:20 -0400 Subject: [vtkusers] how to convert vtk polydata to dif file format In-Reply-To: <2770614.mftPNjCfnT@basti-thinkpad-t410> References: <1580488.6Phfrjp2dC@basti-thinkpad-t410> <2770614.mftPNjCfnT@basti-thinkpad-t410> Message-ID: Sebastian, I have found that STL files do not have normal information, though I haven't bothered to look up whether the format prevents the inclusion of normals. You can use vtkPolyDataNormals to generate normals [1]. normalsGenerator = vtk.vtkPolyDataNormals() normalsGenerator .SetInputConnection(reader.GetOutputPort()) normalsGenerator .Update() pd = normalsGenerator.GetOutput() ... HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html On Wed, Oct 7, 2015 at 5:16 PM, Sebastian Hilbert wrote: > Hi Cory, > > Thanks for your help. I tried your code and found that my vtk file does not > seem to contain nomal information. I guess I need to find a way to compile > them. > > Does that make sense ? > > Regards, > Sebastian > > Am Mittwoch, 7. Oktober 2015, 10:14:44 schrieben Sie: > > Hi Sebastian, > > > > Probably the easiest way to do this is to use VTK readers to read in the > > VTK and STL files to load the surface data, then write out the DIF file > > with standard Python ASCII file writing. > > > > Here's a sketch you can use to get started: > > > > import vtk > > > > reader = vtk.vtkPolyDataReader() > > reader.SetFileName('/path/to/file.vtk') > > reader.Update() > > > > pd = reader.GetOutput() > > > > print 'Vertices' > > for i in xrange(pd.GetNumberOfPoints()): > > print pd.GetPoint(i) > > > > print 'Normals' > > normals = pd.GetPointData().GetArray("Normals") > > > > print '---', pd.GetNumberOfPoints(), normals.GetNumberOfTuples() > > > > for i in xrange(normals.GetNumberOfTuples()): > > print normals.GetValue(3*i), normals.GetValue(3*i + 1), > > normals.GetValue(3*i + 2) > > > > print 'Polygons' > > for i in xrange(pd.GetNumberOfPolys()): > > cell = pd.GetCell(i) > > pointIds = cell.GetPointIds() > > > > for j in xrange(pointIds.GetNumberOfIds()): > > print pointIds.GetId(j) > > > > HTH, > > Cory > > > > > > On Sun, Oct 4, 2015 at 8:13 PM, Sebastian Hilbert < > sebastian.hilbert at gmx.net > > > wrote: > > > > > > Hi, > > > > > > I am trying to convert a model of the heart which is available as > either > > > stl > > > or vtk polydata to a new file format called diffusion image format > (dif) > > > > > > All files are provided below. The main question is. How do I construct > the > > > dif > > > file when I have only vtk and stl file available ? > > > > > > dif is a format used by the medical software Ensite from St. Jude and > > > looking > > > at the spec for the dif format it seems related to what vtk can > provide. > > > > > > It seems to work with vertices , normals and polygons. > > > > > > I wonder if anyone has some advice on how to map data obtained from an > stl > > > file or vtk polydata file to data used in the dif format. How do I > extract > > > vertices, normals and polygons from either stl and/or vtk ? > > > > > > The target format is like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > 32.4603 6.0825 -40.3249 > > > 13.9858 7.9016 -41.0501 > > > 16.6287 7.6514 -40.4356 > > > 30.7806 7.9503 -41.1414 > > > > > > > > > > > > > > > 0.220882 -0.586701 -0.779098 > > > -0.082953 -0.169572 -0.982021 > > > 0.393210 -0.647443 -0.652842 > > > -0.106461 -0.248735 -0.962703 > > > > > > > > > > > > > > > 3 40 8 > > > 17 10 13 > > > 41 13 42 > > > 4 36 43 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking at the vtk file the polygons are different from the ones in the > > > xml > > > (dif) file. Looking at the stl file (ascii) I can see some vertex lines > > > that > > > match a line in the vertices section of the xml (dif) file but there > are a > > > lot > > > more vertex lines in the stl file then there are in the xml (dif file). > > > > > > I would prefer to use python if that is an option. > > > > > > If anyone wants to have a look here are the correspondig files > > > > > > vtk: https://146.0.105.21/owncloud/index.php/s/NZqGwdQQSramk1w > > > stl: https://146.0.105.21/owncloud/index.php/s/tWv7yKttA15hdoL > > > dif: https://146.0.105.21/owncloud/index.php/s/3R8oKRxXK2oR5DD > > > > > > Any help is appreciated. > > > > > > Sebastian > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Thu Oct 8 09:41:17 2015 From: inglis.dl at gmail.com (DL I) Date: Thu, 8 Oct 2015 09:41:17 -0400 Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: <1444267716193-5734313.post@n5.nabble.com> References: <1444212277297-5734298.post@n5.nabble.com> <1444267716193-5734313.post@n5.nabble.com> Message-ID: I think you are making this too difficult for yourself. If you only want to show 3 ortho planes, one in each render window, I would recommend using vtkImageSlice, set up its mapper with vtkImageSliceMapper and manipulate window/level with the vtkImageSlice's vtkImageProperty object. here is how you might set this up in pseudocode vtkImageReader reader reader SetFileName( my_3D_image_file ) vtkImageSliceMapper mapperX mapperX SetInputData( reader GetOutput() ) mapperX SetOrientationToX() mapperX Update() vtkImageSlice sliceX sliceX SetMapper( mapperX ) vtkRenderer rendererX rendererX AddActor( sliceX ) QVTKWidget widgetX vtkRenderWindow winX = widgetX GetRenderWindow() winX AddRenderer( rendererX ) do the same for Y and Z, setting each mapper to the same reader output. Your Qt interface will need to have frames or some other Qt container for each QVTKWidget. You could put a Qt QSlider for controlling each widget's vtkImageSliceMapper and use slots and signals to update the mapper's SetSliceNumber() method with the value of the slider. - Dean On Wed, Oct 7, 2015 at 9:28 PM, LaChen wrote: > DL I wrote > > Hi LaChen > > > > can you explain why you want to do this (what is the user interface > > supposed to present) ? > > Are you trying to map the texture onto some other surface or are you > > trying to show the sliced image as a 2D > > image in a renderer ? > > > > regards, > > Dean > > > > On Wed, Oct 7, 2015 at 6:04 AM, LaChen < > > > sam24666806@ > > > > wrote: > > > >> Hi, I try to use vtkImagePanelWidget::GetTexture() to get texture of > >> slicing > >> by indicated index (SetSliceIndex). > >> > >> After I get texture, I downcast the texture to OpenGLTexture to get > >> vtkTextureObject. > >> > >> Then I try to the the handle of the texture object. Finally, I write > some > >> codes to draw an rectangle and texture by the handle. But it seems not > >> work. > >> > >> Is my way correctly?? > >> > >> If it's not correct, how to show one slice in a plane. > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298.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 > > Hi, thank for your reply. > > The reason I want to do is that I need to show slicing image of three > axes(x,y,z) and I can select index which slicing image I want to show. Then > I find an good example (QtVTKRenderWindows). I learn vtkImagePanelWidget in > the example. So I use QT and create three QVTKWidgets. And I try to binding > vtkImagePanelWidget for each. But I encounter some problem. First, I try to > blocking all mouse event. > I inherit CameraInteractorStyle and block event left button press. But I > fail. Second, I set eye position of active camera, It seems no use. So I > try > to use OpenGL to draw an rectangle and find texture of slicing image from > vtkImagePanelWidget. > > Above-mentioned is the flow I try to handle my problem. Can you share your > experience about my problem? I can't understand what component I should > use. > Is VTKSlidingImage or vtkImagePanelWidget. > And I don't know how to set up interactor of offscreen rendering. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298p5734313.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 aduqoum at ndigital.com Thu Oct 8 10:17:01 2015 From: aduqoum at ndigital.com (Awn Duqoum) Date: Thu, 8 Oct 2015 14:17:01 +0000 Subject: [vtkusers] QVtkWidget with wt5 and vtk 6 Message-ID: <8362aa8e356248d789e7455f5296cfea@NDICASMB02.ndigital.com> Hello, I am currently developing a graphing software that is to include the QVtkWidget as the central widget and have the menu bar for controls. The issue I am having is when I set the render window to widget all interactors seem to stop working, I am using a chart put inside a sense with an actor holding the scene, I have tried running the normal trackball interactor style to no avail. (It works perfect when I send the render window to a view but now when I send it to the widget) Sample code : //Start of code _qvtk->SetRenderWindow((_graph->Graph(Numbers))->GetRenderer()->GetRenderWindow()); vtkSmartPointer interactor = vtkSmartPointer::New(); vtkSmartPointer win_int = vtkSmartPointer::New(); _qvtk->GetRenderWindow()->GetInteractor()->SetInteractorStyle(interactor); _qvtk->GetRenderWindow()->GetInteractor()->Initialize(); win_int->SetRenderWindow(_qvtk->GetRenderWindow()); win_int->SetEnableRender(true); win_int->Initialize(); _qvtk->update(); setCentralWidget(_qvtk); win_int ->Start(); // end of code Thank you in advance, Awn Duqoum -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Thu Oct 8 11:58:54 2015 From: rickfrank at me.com (Richard Frank) Date: Thu, 08 Oct 2015 11:58:54 -0400 Subject: [vtkusers] VTK 6.3.0 Qt 5.5 VS 2015 Message-ID: <4266D5A8-EDA3-42FE-A3F0-F09CD32C770F@me.com> Hi, If someone has been successful with this combo, can you share your cmake settings for VTK ? I'm trying to buid vtk 6.3 and qt5.5 VS2015 and I get link errors on QVtkWidget2. The library isn't linked in with ${VTK_USE_FILES} or something, because when I put it in by hand the link error goes away, and things work but when cmake rebuilds my solution it wipes out that setting. I was using VTK 6.2 and qt 5.2 successfully Thanks Rick From david.gobbi at gmail.com Thu Oct 8 14:05:07 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 8 Oct 2015 12:05:07 -0600 Subject: [vtkusers] Simultaneously build Python 2&3 interface In-Reply-To: <20151006205120.GB5404@megas.khq.kitware.com> References: <5611673C.30400@blaicher.com> <20151006205120.GB5404@megas.khq.kitware.com> Message-ID: On Tue, Oct 6, 2015 at 2:51 PM, Ben Boeckel wrote: > On Sun, Oct 04, 2015 at 19:51:56 +0200, Matthias Blaicher wrote: > > > > I'm unclear though, how I'm supposed to build a python 2 and python 3 > > interface at the same time. Is this even possible right now? Hints on > > how to do this would be greatly appreciated! > > Right now, use two build trees. A single build tree supporting both is > not feasible currently. Adding suffixes to Python-dependent modules such > as vtkFiltersPython will need to be done so they don't conflict with > each other, but other than that, getting a multi-python-version build > would require major changes to the module system (and FindPython too) > for everything to work properly. > There is a patch here that adds pyversion-specific suffixes to libraries that link to Python: https://gitlab.kitware.com/vtk/vtk/merge_requests/744/diffs It's very far from a complete solution for the multi-python build, but it might satisfy your current needs. There's also a patch in the works for the relative import issue: https://gitlab.kitware.com/vtk/vtk/merge_requests/748 - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Oct 8 14:33:39 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 8 Oct 2015 12:33:39 -0600 Subject: [vtkusers] vtkChartLegend Position in Python Message-ID: I am writing a script to build some line charts in VTK, but I am having difficulty repositioning a vtkChartLegend object. The python script below will create a plot. I would like to reposition the legend to the upper left-hand side of the chart so as to not interfere with the line plot. However, I am not able to make the legend move. I would appreciate any help to get the legend to re-position? I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. #!/usr/bin/env python import vtk # Num. points n = 10 # Create some data x = vtk.vtkFloatArray() y = vtk.vtkFloatArray() x.SetNumberOfTuples(n) x.SetName('x') y.SetNumberOfTuples(n) y.SetName('y') for i in range(10): x.SetValue(i, float(i)) y.SetValue(i, float(2*i)) # Create the table and line table = vtk.vtkTable() table.AddColumn(x) table.AddColumn(y) line = vtk.vtkPlotLine() line.SetInputData(table, 0, 1) # Create chart chart = vtk.vtkChartXY() chart.AddPlot(line) # Create view view = vtk.vtkContextActor() view.GetScene().AddItem(chart) # Renderer renderer = vtk.vtkRenderer() renderer.SetBackground(1,1,1) renderer.AddViewProp(view) # Legend chart.SetShowLegend(True) legend = chart.GetLegend() legend.SetPoint(0, 20) # This doesn't seem to do anything # Window window = vtk.vtkRenderWindow() window.AddRenderer(renderer) # Interactor interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(window) # Render window.Render() renderer.Render() interactor.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 8 14:45:43 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Oct 2015 14:45:43 -0400 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: Hi Andrew, Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), e.g. rect = vtkRectf(0, 20, ?, ?) char.SetLegendPosition(rect) HTH, Cory On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am writing a script to build some line charts in VTK, but I am having > difficulty repositioning a vtkChartLegend object. > > The python script below will create a plot. I would like to reposition the > legend to the upper left-hand side of the chart so as to not interfere with > the line plot. However, I am not able to make the legend move. I would > appreciate any help to get the legend to re-position? > > I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. > > > #!/usr/bin/env python > import vtk > > # Num. points > n = 10 > > # Create some data > x = vtk.vtkFloatArray() > y = vtk.vtkFloatArray() > x.SetNumberOfTuples(n) > x.SetName('x') > y.SetNumberOfTuples(n) > y.SetName('y') > > for i in range(10): > x.SetValue(i, float(i)) > y.SetValue(i, float(2*i)) > > # Create the table and line > table = vtk.vtkTable() > table.AddColumn(x) > table.AddColumn(y) > line = vtk.vtkPlotLine() > line.SetInputData(table, 0, 1) > > # Create chart > chart = vtk.vtkChartXY() > chart.AddPlot(line) > > # Create view > view = vtk.vtkContextActor() > view.GetScene().AddItem(chart) > > # Renderer > renderer = vtk.vtkRenderer() > renderer.SetBackground(1,1,1) > renderer.AddViewProp(view) > > # Legend > chart.SetShowLegend(True) > legend = chart.GetLegend() > legend.SetPoint(0, 20) # This doesn't seem to do anything > > # Window > window = vtk.vtkRenderWindow() > window.AddRenderer(renderer) > > # Interactor > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetRenderWindow(window) > > # Render > window.Render() > renderer.Render() > interactor.Start() > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Oct 8 15:00:41 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 8 Oct 2015 13:00:41 -0600 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: Yes, that function does not exist. On Thu, Oct 8, 2015 at 12:45 PM, Cory Quammen wrote: > Hi Andrew, > > Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), e.g. > > rect = vtkRectf(0, 20, ?, ?) > char.SetLegendPosition(rect) > > HTH, > Cory > > On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> I am writing a script to build some line charts in VTK, but I am having >> difficulty repositioning a vtkChartLegend object. >> >> The python script below will create a plot. I would like to reposition >> the legend to the upper left-hand side of the chart so as to not interfere >> with the line plot. However, I am not able to make the legend move. I would >> appreciate any help to get the legend to re-position? >> >> I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. >> >> >> #!/usr/bin/env python >> import vtk >> >> # Num. points >> n = 10 >> >> # Create some data >> x = vtk.vtkFloatArray() >> y = vtk.vtkFloatArray() >> x.SetNumberOfTuples(n) >> x.SetName('x') >> y.SetNumberOfTuples(n) >> y.SetName('y') >> >> for i in range(10): >> x.SetValue(i, float(i)) >> y.SetValue(i, float(2*i)) >> >> # Create the table and line >> table = vtk.vtkTable() >> table.AddColumn(x) >> table.AddColumn(y) >> line = vtk.vtkPlotLine() >> line.SetInputData(table, 0, 1) >> >> # Create chart >> chart = vtk.vtkChartXY() >> chart.AddPlot(line) >> >> # Create view >> view = vtk.vtkContextActor() >> view.GetScene().AddItem(chart) >> >> # Renderer >> renderer = vtk.vtkRenderer() >> renderer.SetBackground(1,1,1) >> renderer.AddViewProp(view) >> >> # Legend >> chart.SetShowLegend(True) >> legend = chart.GetLegend() >> legend.SetPoint(0, 20) # This doesn't seem to do anything >> >> # Window >> window = vtk.vtkRenderWindow() >> window.AddRenderer(renderer) >> >> # Interactor >> interactor = vtk.vtkRenderWindowInteractor() >> interactor.SetRenderWindow(window) >> >> # Render >> window.Render() >> renderer.Render() >> interactor.Start() >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 8 15:27:09 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Oct 2015 15:27:09 -0400 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: Well shoot, that member function must not be wrapped. Instead, try this legend = chart.GetLegend() legend.SetHorizontalAlignment(vtk.vtkChartLegend.CUSTOM) legend.SetVerticalAlignment(vtk.vtkChartLegend.CUSTOM) legend.SetPoint(0, 20) HTH, Cory On Thu, Oct 8, 2015 at 3:00 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > Yes, that function does not exist. > > On Thu, Oct 8, 2015 at 12:45 PM, Cory Quammen > wrote: > >> Hi Andrew, >> >> Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), e.g. >> >> rect = vtkRectf(0, 20, ?, ?) >> char.SetLegendPosition(rect) >> >> HTH, >> Cory >> >> On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> >>> I am writing a script to build some line charts in VTK, but I am having >>> difficulty repositioning a vtkChartLegend object. >>> >>> The python script below will create a plot. I would like to reposition >>> the legend to the upper left-hand side of the chart so as to not interfere >>> with the line plot. However, I am not able to make the legend move. I would >>> appreciate any help to get the legend to re-position? >>> >>> I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. >>> >>> >>> #!/usr/bin/env python >>> import vtk >>> >>> # Num. points >>> n = 10 >>> >>> # Create some data >>> x = vtk.vtkFloatArray() >>> y = vtk.vtkFloatArray() >>> x.SetNumberOfTuples(n) >>> x.SetName('x') >>> y.SetNumberOfTuples(n) >>> y.SetName('y') >>> >>> for i in range(10): >>> x.SetValue(i, float(i)) >>> y.SetValue(i, float(2*i)) >>> >>> # Create the table and line >>> table = vtk.vtkTable() >>> table.AddColumn(x) >>> table.AddColumn(y) >>> line = vtk.vtkPlotLine() >>> line.SetInputData(table, 0, 1) >>> >>> # Create chart >>> chart = vtk.vtkChartXY() >>> chart.AddPlot(line) >>> >>> # Create view >>> view = vtk.vtkContextActor() >>> view.GetScene().AddItem(chart) >>> >>> # Renderer >>> renderer = vtk.vtkRenderer() >>> renderer.SetBackground(1,1,1) >>> renderer.AddViewProp(view) >>> >>> # Legend >>> chart.SetShowLegend(True) >>> legend = chart.GetLegend() >>> legend.SetPoint(0, 20) # This doesn't seem to do anything >>> >>> # Window >>> window = vtk.vtkRenderWindow() >>> window.AddRenderer(renderer) >>> >>> # Interactor >>> interactor = vtk.vtkRenderWindowInteractor() >>> interactor.SetRenderWindow(window) >>> >>> # Render >>> window.Render() >>> renderer.Render() >>> interactor.Start() >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 >> R&D Engineer >> Kitware, Inc. >> > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From baoyun_li123 at yahoo.com Thu Oct 8 15:48:22 2015 From: baoyun_li123 at yahoo.com (baoyun) Date: Thu, 8 Oct 2015 12:48:22 -0700 (MST) Subject: [vtkusers] rendering multivolumer In-Reply-To: References: <1444162495456-5734283.post@n5.nabble.com> Message-ID: <1444333702915-5734336.post@n5.nabble.com> Hi, Aashish: Just want to make sure I understand you, set all property of vtkVolume as usual including volume data, volume mappper and colorfunction, opacity functin, then do addVolume as below this->Renderer->AddVolume(this->Volume) Thanks Baoyun -- View this message in context: http://vtk.1045678.n5.nabble.com/rendering-multivolumer-tp5734283p5734336.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.slaughter at inl.gov Thu Oct 8 15:58:04 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 8 Oct 2015 13:58:04 -0600 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 1:27 PM, Cory Quammen wrote: > Well shoot, that member function must not be wrapped. > > Instead, try this > > legend = chart.GetLegend() > legend.SetHorizontalAlignment(vtk.vtkChartLegend.CUSTOM) > legend.SetVerticalAlignment(vtk.vtkChartLegend.CUSTOM) > legend.SetPoint(0, 20) > This causes the legend to move to the lower left in the window, SetPoint does nothing. Using the Set(Horizontal/Vertical)Alignment methods move the legend to the various points within the plot window. For example, the following places it where I was hoping to move the legend. legend.SetHorizontalAlignment(vtk.vtkChartLegend.LEFT) legend.SetVerticalAlignment(vtk.vtkChartLegend.TOP) However, this SetPoint method does not seem to change anything. Perhaps I am just not understanding how the bounding box works for the object. I was thinking that SetPoint would locate the corner of the legend box at the specified point and that the Set(Horizontal/Vertical)Alignment methods indicate how this box aligns to the point. The behavior seems to be that the legend has a bounding box equal to the chart axis dimensions and that the alignment methods alter the placement of the legend box within this larger bounding box. > HTH, > Cory > > > On Thu, Oct 8, 2015 at 3:00 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> Yes, that function does not exist. >> >> On Thu, Oct 8, 2015 at 12:45 PM, Cory Quammen >> wrote: >> >>> Hi Andrew, >>> >>> Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), e.g. >>> >>> rect = vtkRectf(0, 20, ?, ?) >>> char.SetLegendPosition(rect) >>> >>> HTH, >>> Cory >>> >>> On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < >>> andrew.slaughter at inl.gov> wrote: >>> >>>> I am writing a script to build some line charts in VTK, but I am having >>>> difficulty repositioning a vtkChartLegend object. >>>> >>>> The python script below will create a plot. I would like to reposition >>>> the legend to the upper left-hand side of the chart so as to not interfere >>>> with the line plot. However, I am not able to make the legend move. I would >>>> appreciate any help to get the legend to re-position? >>>> >>>> I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. >>>> >>>> >>>> #!/usr/bin/env python >>>> import vtk >>>> >>>> # Num. points >>>> n = 10 >>>> >>>> # Create some data >>>> x = vtk.vtkFloatArray() >>>> y = vtk.vtkFloatArray() >>>> x.SetNumberOfTuples(n) >>>> x.SetName('x') >>>> y.SetNumberOfTuples(n) >>>> y.SetName('y') >>>> >>>> for i in range(10): >>>> x.SetValue(i, float(i)) >>>> y.SetValue(i, float(2*i)) >>>> >>>> # Create the table and line >>>> table = vtk.vtkTable() >>>> table.AddColumn(x) >>>> table.AddColumn(y) >>>> line = vtk.vtkPlotLine() >>>> line.SetInputData(table, 0, 1) >>>> >>>> # Create chart >>>> chart = vtk.vtkChartXY() >>>> chart.AddPlot(line) >>>> >>>> # Create view >>>> view = vtk.vtkContextActor() >>>> view.GetScene().AddItem(chart) >>>> >>>> # Renderer >>>> renderer = vtk.vtkRenderer() >>>> renderer.SetBackground(1,1,1) >>>> renderer.AddViewProp(view) >>>> >>>> # Legend >>>> chart.SetShowLegend(True) >>>> legend = chart.GetLegend() >>>> legend.SetPoint(0, 20) # This doesn't seem to do anything >>>> >>>> # Window >>>> window = vtk.vtkRenderWindow() >>>> window.AddRenderer(renderer) >>>> >>>> # Interactor >>>> interactor = vtk.vtkRenderWindowInteractor() >>>> interactor.SetRenderWindow(window) >>>> >>>> # Render >>>> window.Render() >>>> renderer.Render() >>>> interactor.Start() >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 >>> R&D Engineer >>> Kitware, Inc. >>> >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 8 16:21:17 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 8 Oct 2015 16:21:17 -0400 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 3:58 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > > On Thu, Oct 8, 2015 at 1:27 PM, Cory Quammen > wrote: > >> Well shoot, that member function must not be wrapped. >> >> Instead, try this >> >> legend = chart.GetLegend() >> legend.SetHorizontalAlignment(vtk.vtkChartLegend.CUSTOM) >> legend.SetVerticalAlignment(vtk.vtkChartLegend.CUSTOM) >> legend.SetPoint(0, 20) >> > > This causes the legend to move to the lower left in the window, SetPoint > does nothing. > (0, 20) is in the lower left of the window. Try with SetPoint(200, 200), for example. The legend should be in the upper right. > Using the Set(Horizontal/Vertical)Alignment methods move the legend to the > various points within the > plot window. For example, the following places it where I was hoping to > move the legend. > legend.SetHorizontalAlignment(vtk.vtkChartLegend.LEFT) > legend.SetVerticalAlignment(vtk.vtkChartLegend.TOP) > > However, this SetPoint method does not seem to change anything. Perhaps I > am just not understanding how the bounding box works for the object. I was > thinking that SetPoint would locate the corner of the legend box at the > specified point and that the Set(Horizontal/Vertical)Alignment methods > indicate how this box aligns to the point. > > The behavior seems to be that the legend has a bounding box equal to the > chart axis dimensions and that the alignment methods alter the placement of > the legend box within this larger bounding box. > Yes, the alignment refers to placement within the chart, not the alignment of the legend with respect to the position. - Cory > > >> > HTH, >> Cory >> >> >> On Thu, Oct 8, 2015 at 3:00 PM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> >>> Yes, that function does not exist. >>> >>> On Thu, Oct 8, 2015 at 12:45 PM, Cory Quammen >>> wrote: >>> >>>> Hi Andrew, >>>> >>>> Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), >>>> e.g. >>>> >>>> rect = vtkRectf(0, 20, ?, ?) >>>> char.SetLegendPosition(rect) >>>> >>>> HTH, >>>> Cory >>>> >>>> On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < >>>> andrew.slaughter at inl.gov> wrote: >>>> >>>>> I am writing a script to build some line charts in VTK, but I am >>>>> having difficulty repositioning a vtkChartLegend object. >>>>> >>>>> The python script below will create a plot. I would like to reposition >>>>> the legend to the upper left-hand side of the chart so as to not interfere >>>>> with the line plot. However, I am not able to make the legend move. I would >>>>> appreciate any help to get the legend to re-position? >>>>> >>>>> I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. >>>>> >>>>> >>>>> #!/usr/bin/env python >>>>> import vtk >>>>> >>>>> # Num. points >>>>> n = 10 >>>>> >>>>> # Create some data >>>>> x = vtk.vtkFloatArray() >>>>> y = vtk.vtkFloatArray() >>>>> x.SetNumberOfTuples(n) >>>>> x.SetName('x') >>>>> y.SetNumberOfTuples(n) >>>>> y.SetName('y') >>>>> >>>>> for i in range(10): >>>>> x.SetValue(i, float(i)) >>>>> y.SetValue(i, float(2*i)) >>>>> >>>>> # Create the table and line >>>>> table = vtk.vtkTable() >>>>> table.AddColumn(x) >>>>> table.AddColumn(y) >>>>> line = vtk.vtkPlotLine() >>>>> line.SetInputData(table, 0, 1) >>>>> >>>>> # Create chart >>>>> chart = vtk.vtkChartXY() >>>>> chart.AddPlot(line) >>>>> >>>>> # Create view >>>>> view = vtk.vtkContextActor() >>>>> view.GetScene().AddItem(chart) >>>>> >>>>> # Renderer >>>>> renderer = vtk.vtkRenderer() >>>>> renderer.SetBackground(1,1,1) >>>>> renderer.AddViewProp(view) >>>>> >>>>> # Legend >>>>> chart.SetShowLegend(True) >>>>> legend = chart.GetLegend() >>>>> legend.SetPoint(0, 20) # This doesn't seem to do anything >>>>> >>>>> # Window >>>>> window = vtk.vtkRenderWindow() >>>>> window.AddRenderer(renderer) >>>>> >>>>> # Interactor >>>>> interactor = vtk.vtkRenderWindowInteractor() >>>>> interactor.SetRenderWindow(window) >>>>> >>>>> # Render >>>>> window.Render() >>>>> renderer.Render() >>>>> interactor.Start() >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> 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 >>>> R&D Engineer >>>> Kitware, Inc. >>>> >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Oct 8 16:56:43 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 8 Oct 2015 14:56:43 -0600 Subject: [vtkusers] vtkChartLegend Position in Python In-Reply-To: References: Message-ID: That did the trick, I can do the math to make an axis based positioning. Thanks for the help. On Thu, Oct 8, 2015 at 2:21 PM, Cory Quammen wrote: > On Thu, Oct 8, 2015 at 3:58 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> >> On Thu, Oct 8, 2015 at 1:27 PM, Cory Quammen >> wrote: >> >>> Well shoot, that member function must not be wrapped. >>> >>> Instead, try this >>> >>> legend = chart.GetLegend() >>> legend.SetHorizontalAlignment(vtk.vtkChartLegend.CUSTOM) >>> legend.SetVerticalAlignment(vtk.vtkChartLegend.CUSTOM) >>> legend.SetPoint(0, 20) >>> >> >> This causes the legend to move to the lower left in the window, SetPoint >> does nothing. >> > > (0, 20) is in the lower left of the window. Try with SetPoint(200, 200), > for example. The legend should be in the upper right. > > >> Using the Set(Horizontal/Vertical)Alignment methods move the legend to >> the various points within the >> plot window. For example, the following places it where I was hoping to >> move the legend. >> legend.SetHorizontalAlignment(vtk.vtkChartLegend.LEFT) >> legend.SetVerticalAlignment(vtk.vtkChartLegend.TOP) >> >> However, this SetPoint method does not seem to change anything. Perhaps I >> am just not understanding how the bounding box works for the object. I was >> thinking that SetPoint would locate the corner of the legend box at the >> specified point and that the Set(Horizontal/Vertical)Alignment methods >> indicate how this box aligns to the point. >> >> The behavior seems to be that the legend has a bounding box equal to the >> chart axis dimensions and that the alignment methods alter the placement of >> the legend box within this larger bounding box. >> > > Yes, the alignment refers to placement within the chart, not the alignment > of the legend with respect to the position. > > - Cory > > >> >> >>> >> HTH, >>> Cory >>> >>> >>> On Thu, Oct 8, 2015 at 3:00 PM, Slaughter, Andrew E < >>> andrew.slaughter at inl.gov> wrote: >>> >>>> Yes, that function does not exist. >>>> >>>> On Thu, Oct 8, 2015 at 12:45 PM, Cory Quammen >>> > wrote: >>>> >>>>> Hi Andrew, >>>>> >>>>> Have you tried vtkChartXY::SetLegendPosition(const vtkRectf & rect), >>>>> e.g. >>>>> >>>>> rect = vtkRectf(0, 20, ?, ?) >>>>> char.SetLegendPosition(rect) >>>>> >>>>> HTH, >>>>> Cory >>>>> >>>>> On Thu, Oct 8, 2015 at 2:33 PM, Slaughter, Andrew E < >>>>> andrew.slaughter at inl.gov> wrote: >>>>> >>>>>> I am writing a script to build some line charts in VTK, but I am >>>>>> having difficulty repositioning a vtkChartLegend object. >>>>>> >>>>>> The python script below will create a plot. I would like to >>>>>> reposition the legend to the upper left-hand side of the chart so as to not >>>>>> interfere with the line plot. However, I am not able to make the legend >>>>>> move. I would appreciate any help to get the legend to re-position? >>>>>> >>>>>> I am running OSX (Yosemite) with Python 2.7.6 and VTK 6.3. >>>>>> >>>>>> >>>>>> #!/usr/bin/env python >>>>>> import vtk >>>>>> >>>>>> # Num. points >>>>>> n = 10 >>>>>> >>>>>> # Create some data >>>>>> x = vtk.vtkFloatArray() >>>>>> y = vtk.vtkFloatArray() >>>>>> x.SetNumberOfTuples(n) >>>>>> x.SetName('x') >>>>>> y.SetNumberOfTuples(n) >>>>>> y.SetName('y') >>>>>> >>>>>> for i in range(10): >>>>>> x.SetValue(i, float(i)) >>>>>> y.SetValue(i, float(2*i)) >>>>>> >>>>>> # Create the table and line >>>>>> table = vtk.vtkTable() >>>>>> table.AddColumn(x) >>>>>> table.AddColumn(y) >>>>>> line = vtk.vtkPlotLine() >>>>>> line.SetInputData(table, 0, 1) >>>>>> >>>>>> # Create chart >>>>>> chart = vtk.vtkChartXY() >>>>>> chart.AddPlot(line) >>>>>> >>>>>> # Create view >>>>>> view = vtk.vtkContextActor() >>>>>> view.GetScene().AddItem(chart) >>>>>> >>>>>> # Renderer >>>>>> renderer = vtk.vtkRenderer() >>>>>> renderer.SetBackground(1,1,1) >>>>>> renderer.AddViewProp(view) >>>>>> >>>>>> # Legend >>>>>> chart.SetShowLegend(True) >>>>>> legend = chart.GetLegend() >>>>>> legend.SetPoint(0, 20) # This doesn't seem to do anything >>>>>> >>>>>> # Window >>>>>> window = vtk.vtkRenderWindow() >>>>>> window.AddRenderer(renderer) >>>>>> >>>>>> # Interactor >>>>>> interactor = vtk.vtkRenderWindowInteractor() >>>>>> interactor.SetRenderWindow(window) >>>>>> >>>>>> # Render >>>>>> window.Render() >>>>>> renderer.Render() >>>>>> interactor.Start() >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> 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 >>>>> R&D Engineer >>>>> Kitware, Inc. >>>>> >>>> >>>> >>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >>> >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Thu Oct 8 18:24:45 2015 From: rickfrank at me.com (Richard Frank) Date: Thu, 08 Oct 2015 18:24:45 -0400 Subject: [vtkusers] Setup debug and build install? Message-ID: <2225BC80-7911-45E0-8EBC-5CBBC9D472E5@me.com> Hi, I have used VTK built on my own machine for quite a while. Now I'm starting a large project with multiple developers and source control. It seems like the full path issue makes it not possible to have the binaries shared via source control in both debug and release. How do other multiple person teams deal with this? Does everyone need to build VTK on their own machine or is it possible to create a CMake findable INSTALL configuration with both debug and release? Thanks Rick Frank From lihouxing at yeah.net Thu Oct 8 21:32:34 2015 From: lihouxing at yeah.net (lee) Date: Thu, 8 Oct 2015 18:32:34 -0700 (MST) Subject: [vtkusers] create word mesh Message-ID: <1444354354013-5734341.post@n5.nabble.com> Hi all, I notice that some softwares are able to create word mesh on a mesh as shown in the picture below. This is helpful to mark the stl model when we print the model out. So I am wondering whether we have the related class in VTK can help us with it. Any suggestion would be appreciated~ Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/create-word-mesh-tp5734341.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Fri Oct 9 01:11:55 2015 From: sam24666806 at gmail.com (LaChen) Date: Thu, 8 Oct 2015 22:11:55 -0700 (MST) Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: References: <1444212277297-5734298.post@n5.nabble.com> <1444267716193-5734313.post@n5.nabble.com> Message-ID: <1444367515594-5734342.post@n5.nabble.com> Thank you very much. Your advice benefits me a lot. I will try it. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298p5734342.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Fri Oct 9 04:48:29 2015 From: sam24666806 at gmail.com (LaChen) Date: Fri, 9 Oct 2015 01:48:29 -0700 (MST) Subject: [vtkusers] Problem about Blending Two Image Rendering by Offscreen. Message-ID: <1444380509024-5734343.post@n5.nabble.com> Hi, I have a problem of blending two offscreen image together. I want to do multi-volume rendering(Two volume data inputs) but I can't find any component in VTK about this. After of all, this request is so customized that user should write by theirselves. So I reference method of /(Multi-volume) NCI GPU Ray Casting /and try to make it by myself. There are some steps in my idea. <1> Render main volume first by OpenglGPUVolumeMapping in off screen rendering. <2> Render second volume first by OpenglGPUVolumeMapping in off screen rendering. <3> Blend two image together with weight and render to *another component of VTK*. But I don't know which component I can use. I must render the blending result into the one with full widget size(I use QVTKWidget) and I can't move the widget polygon. Or, should I needs get those offscreen buffers and make them to opengl texture for blend them by myself? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-about-Blending-Two-Image-Rendering-by-Offscreen-tp5734343.html Sent from the VTK - Users mailing list archive at Nabble.com. From scarysize at googlemail.com Fri Oct 9 08:02:23 2015 From: scarysize at googlemail.com (Franz Neubert) Date: Fri, 9 Oct 2015 14:02:23 +0200 Subject: [vtkusers] Fwd: Setting up VTK 6.1 in XCode 7.0.1 References: <8C66A1E5-2B32-416E-BC10-E1E6DE146BBF@googlemail.com> Message-ID: Hello, if anyone is interested/has problems setting up VTK 6.1 on OS X (El Capitan) and getting it to work inside XCode 7.0.1 , I wrote a Tutorial (answering my own stackoverflow questions): http://stackoverflow.com/questions/33036019/setting-up-vtk-6-1-in-xcode-7-0-1/33036020#33036020 Greetz -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Oct 9 08:37:27 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 9 Oct 2015 08:37:27 -0400 Subject: [vtkusers] Fwd: Setting up VTK 6.1 in XCode 7.0.1 In-Reply-To: References: <8C66A1E5-2B32-416E-BC10-E1E6DE146BBF@googlemail.com> Message-ID: Thanks Franz! Always good to leave clues for the next person on the path. On Oct 9, 2015 8:02 AM, "Franz Neubert via vtkusers" wrote: > Hello, > > if anyone is interested/has problems setting up VTK 6.1 on OS X (El > Capitan) and getting it to work inside XCode 7.0.1 , I wrote a Tutorial > (answering my own stackoverflow questions): > > > http://stackoverflow.com/questions/33036019/setting-up-vtk-6-1-in-xcode-7-0-1/33036020#33036020 > > > Greetz > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 matimontg at gmail.com Fri Oct 9 10:42:51 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 09 Oct 2015 14:42:51 +0000 Subject: [vtkusers] Volume Rendering Problem in ActiViz 6.2 In-Reply-To: References: Message-ID: Ok, I will answer my own question as I was able to figure out. I had to change this line of code: removepoints.SetInputData(contornos.GetOutput()); To: *removepoints.SetInputConnection(contornos.GetOutputPort());* Regards, Matias. El jue., 24 de sept. de 2015 a la(s) 11:17 p. m., Matias Montroull < matimontg at gmail.com> escribi?: > Hi, > > I was using ActiVIz 5.8 and this code below was working just fine: > Now, I've installed the 6.2 version and the vtkCleanPolyData object is > null for some reason.. > Has anything changed in Volume reconstruction from a Dicom Series from > version to version? > > Thanks, > > vtkDICOMImageReader readerdicom = new vtkDICOMImageReader(); > > readerdicom.SetDirectoryName(path_directorio_imagenes_originales); > double origen_X = -pixelspacing_X * (img[0].Width) / 2; > double origen_Y = -pixelspacing_Y * (img[0].Height) / 2; > readerdicom.SetDataOrigin(origen_X, origen_Y, -Z_max); > readerdicom.Update(); > > //Filtro para dar vuelta la imagen > vtkImageReslice reslice = new vtkImageReslice(); > reslice.SetResliceAxesDirectionCosines(-1, 0, 0, 0, 1, 0, 0, > 0, -1); > reslice.SetInputConnection(readerdicom.GetOutputPort()); > reslice.Update(); > > //Filtro para extraer la piel (por ISOValue) > vtkMarchingCubes skinextractor = vtkMarchingCubes.New(); > skinextractor.SetInputConnection(reslice.GetOutputPort()); > skinextractor.SetValue(1, umbral); > > //Filtro para quedarnos solamente con el contorno (visual) > vtkPolyDataConnectivityFilter contornos = new > vtkPolyDataConnectivityFilter(); > contornos.SetInputConnection(skinextractor.GetOutputPort()); > contornos.SetExtractionModeToLargestRegion(); > contornos.SetColorRegions(1); > > //Filtro para remover los puntos que no son del contorno y > guardarlos en la instancia POIs_3D > vtkCleanPolyData removepoints = new vtkCleanPolyData(); > removepoints.SetInputData(contornos.GetOutput()); > removepoints.Update(); > vtkPoints puntos_contorno = new vtkPoints(); > puntos_contorno = removepoints.GetOutput().GetPoints(); > -- > Matias > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From lchauvin at bwh.harvard.edu Fri Oct 9 17:00:54 2015 From: lchauvin at bwh.harvard.edu (Chauvin, Laurent,Ph.D.) Date: Fri, 9 Oct 2015 21:00:54 +0000 Subject: [vtkusers] vtkMultiThreader question Message-ID: Hello, I?m trying to use a vtkMultiThreader to compute several thing in parallel. However I?m not sure how it works. Here is what I did. I created a single method that calculate some metric pairwise. So I have 2 for loops in this method. What I want to do, is to have one thread per iteration (kind of), so I can calculate all metrics simultaneously. So I created a vtkMultiThreader and set the single method, which contains the loops, and executed it. However when I do that, I can only see one core working. I thought SingleMethod was using multiple thread to run this method. Is it true ? Why then it is not using all my other cores ? Should I put the loops out of the single method then, and spawn a thread for each iteration, with different data as input ? Thank you very much. -Laurent The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Oct 9 17:18:53 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 9 Oct 2015 17:18:53 -0400 Subject: [vtkusers] vtkMultiThreader question In-Reply-To: References: Message-ID: Laurent, Did you look at the tests that come with this class. Do they work? http://www.vtk.org/doc/nightly/html/c2_vtk_t_12.html#c2_vtk_t_vtkMultiThreader Dan On Fri, Oct 9, 2015 at 5:00 PM, Chauvin, Laurent,Ph.D. < lchauvin at bwh.harvard.edu> wrote: > Hello, > > I?m trying to use a vtkMultiThreader to compute several thing in parallel. > However I?m not sure how it works. > > Here is what I did. > I created a single method that calculate some metric pairwise. So I have 2 > for loops in this method. > What I want to do, is to have one thread per iteration (kind of), so I can > calculate all metrics simultaneously. > > So I created a vtkMultiThreader and set the single method, which contains > the loops, and executed it. However when I do that, I can only see one core > working. I thought SingleMethod was using multiple thread to run this > method. Is it true ? Why then it is not using all my other cores ? > > Should I put the loops out of the single method then, and spawn a thread > for each iteration, with different data as input ? > > Thank you very much. > -Laurent > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 lchauvin at bwh.harvard.edu Fri Oct 9 18:22:35 2015 From: lchauvin at bwh.harvard.edu (Chauvin, Laurent,Ph.D.) Date: Fri, 9 Oct 2015 22:22:35 +0000 Subject: [vtkusers] vtkMultiThreader question In-Reply-To: References: Message-ID: Thank you for your answer. I actually looked at it, but I?m still not sure what happen in this example. Is each function run in one separated thread, or each function run in multiple threads ? Here is what I have: myMethod(void* arg) { For loop For loop Computation() } And then I use vtkMultiThreader to execute this method like this: Threader->SetSingleMethod(myMethod,NULL); Threader->SingleMethodExecute() What I was expecting was that thread detect the function could be split in multiple thread (because of the loops) and run each iteration of Computation() in a different thread. But I think I got it wrong. I think I have to do something like that: For Loop For Loop Threader->SetSingleMethod(myMethod,data[i][j]) Threader->SingleMethodExecute() Is it correct ? Thank you. -Laurent From: Dan Lipsa > Date: Friday, October 9, 2015 at 11:18 PM To: "Chauvin, Laurent,Ph.D." > Cc: Franz Neubert via vtkusers > Subject: Re: [vtkusers] vtkMultiThreader question Laurent, Did you look at the tests that come with this class. Do they work? http://www.vtk.org/doc/nightly/html/c2_vtk_t_12.html#c2_vtk_t_vtkMultiThreader Dan On Fri, Oct 9, 2015 at 5:00 PM, Chauvin, Laurent,Ph.D. > wrote: Hello, I?m trying to use a vtkMultiThreader to compute several thing in parallel. However I?m not sure how it works. Here is what I did. I created a single method that calculate some metric pairwise. So I have 2 for loops in this method. What I want to do, is to have one thread per iteration (kind of), so I can calculate all metrics simultaneously. So I created a vtkMultiThreader and set the single method, which contains the loops, and executed it. However when I do that, I can only see one core working. I thought SingleMethod was using multiple thread to run this method. Is it true ? Why then it is not using all my other cores ? Should I put the loops out of the single method then, and spawn a thread for each iteration, with different data as input ? Thank you very much. -Laurent The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 sam24666806 at gmail.com Sat Oct 10 10:41:19 2015 From: sam24666806 at gmail.com (LaChen) Date: Sat, 10 Oct 2015 07:41:19 -0700 (MST) Subject: [vtkusers] How to get color buffer from offscreen rendering? Message-ID: <1444488079685-5734351.post@n5.nabble.com> Hi, I try to render scene by off screen. But I can't get color buffer from the off-screen renderer. My purpose is that I get color buffer from renderer and make it as texture. After I get the texture, I will use it blending with another image. If someone has advice about it, please tell me how to do this. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-color-buffer-from-offscreen-rendering-tp5734351.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Sat Oct 10 11:28:43 2015 From: sam24666806 at gmail.com (LaChen) Date: Sat, 10 Oct 2015 08:28:43 -0700 (MST) Subject: [vtkusers] How to get color buffer from offscreen rendering? In-Reply-To: <1444488079685-5734351.post@n5.nabble.com> References: <1444488079685-5734351.post@n5.nabble.com> Message-ID: <1444490923195-5734352.post@n5.nabble.com> Hi, I try to use vtkWindowToImageFilter. It seems right. But I try to render scene(with a ray-casting volume object ) again, I can't get next frame image. Does I need to delete old vtkWindowToImageFilter and new one for getting data?? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-color-buffer-from-offscreen-rendering-tp5734351p5734352.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Sat Oct 10 11:45:50 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 10 Oct 2015 11:45:50 -0400 Subject: [vtkusers] How to get color buffer from offscreen rendering? In-Reply-To: <1444490923195-5734352.post@n5.nabble.com> References: <1444488079685-5734351.post@n5.nabble.com> <1444490923195-5734352.post@n5.nabble.com> Message-ID: Try doing a Modified() on the window to image filter instance. On Sat, Oct 10, 2015 at 11:28 AM, LaChen wrote: > Hi, I try to use vtkWindowToImageFilter. It seems right. > > But I try to render scene(with a ray-casting volume object ) again, I can't > get next frame image. > > Does I need to delete old vtkWindowToImageFilter and new one for getting > data?? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-color-buffer-from-offscreen-rendering-tp5734351p5734352.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 sam24666806 at gmail.com Sun Oct 11 01:30:24 2015 From: sam24666806 at gmail.com (LaChen) Date: Sat, 10 Oct 2015 22:30:24 -0700 (MST) Subject: [vtkusers] How to get color buffer from offscreen rendering? In-Reply-To: References: <1444488079685-5734351.post@n5.nabble.com> <1444490923195-5734352.post@n5.nabble.com> Message-ID: <1444541424855-5734354.post@n5.nabble.com> Hi, you are right. Thank you very much. I put the texture getting from WinToImgFilter to my mesh on Qt OpenGL widget successfully. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-color-buffer-from-offscreen-rendering-tp5734351p5734354.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Sun Oct 11 12:08:53 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Sun, 11 Oct 2015 12:08:53 -0400 Subject: [vtkusers] vtkMultiThreader question In-Reply-To: References: Message-ID: Laurent, I think a good function to look at is http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Common/Core/Testing/Cxx/TestConditionVariable.cxx When you do SingleMethodExecute, the method you set is run an all processors. Then, by looking at threadId you can execute different parts of the method on different processors. So for your 2 for loops you can set different range indexes to run on different processors - if there are no dependencies between different index computations. This would be the same as spliting a 2D array into chunks and executing a chunk on each processor. However, you'll have to do this explicitly, VTK does not do it automatically. Dan On Fri, Oct 9, 2015 at 6:22 PM, Chauvin, Laurent,Ph.D. < lchauvin at bwh.harvard.edu> wrote: > Thank you for your answer. > > I actually looked at it, but I?m still not sure what happen in this > example. > Is each function run in one separated thread, or each function run in > multiple threads ? > > Here is what I have: > > myMethod(void* arg) > { > For loop > For loop > Computation() > } > > And then I use vtkMultiThreader to execute this method like this: > > Threader->SetSingleMethod(myMethod,NULL); > Threader->SingleMethodExecute() > > What I was expecting was that thread detect the function could be split in > multiple thread (because of the loops) and run each iteration of > Computation() in a different thread. > > But I think I got it wrong. I think I have to do something like that: > > For Loop > For Loop > Threader->SetSingleMethod(myMethod,data[i][j]) > Threader->SingleMethodExecute() > > Is it correct ? > > Thank you. > -Laurent > > From: Dan Lipsa > Date: Friday, October 9, 2015 at 11:18 PM > To: "Chauvin, Laurent,Ph.D." > Cc: Franz Neubert via vtkusers > Subject: Re: [vtkusers] vtkMultiThreader question > > Laurent, > Did you look at the tests that come with this class. Do they work? > > > http://www.vtk.org/doc/nightly/html/c2_vtk_t_12.html#c2_vtk_t_vtkMultiThreader > > Dan > > > On Fri, Oct 9, 2015 at 5:00 PM, Chauvin, Laurent,Ph.D. < > lchauvin at bwh.harvard.edu> wrote: > >> Hello, >> >> I?m trying to use a vtkMultiThreader to compute several thing in parallel. >> However I?m not sure how it works. >> >> Here is what I did. >> I created a single method that calculate some metric pairwise. So I have >> 2 for loops in this method. >> What I want to do, is to have one thread per iteration (kind of), so I >> can calculate all metrics simultaneously. >> >> So I created a vtkMultiThreader and set the single method, which contains >> the loops, and executed it. However when I do that, I can only see one core >> working. I thought SingleMethod was using multiple thread to run this >> method. Is it true ? Why then it is not using all my other cores ? >> >> Should I put the loops out of the single method then, and spawn a thread >> for each iteration, with different data as input ? >> >> Thank you very much. >> -Laurent >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you >> in error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 madaramh at gmail.com Mon Oct 12 03:57:50 2015 From: madaramh at gmail.com (madz) Date: Mon, 12 Oct 2015 00:57:50 -0700 (MST) Subject: [vtkusers] Visualize vectors in an unstructured grid (arrays) In-Reply-To: <1444110840790-5734259.post@n5.nabble.com> References: <1444110840790-5734259.post@n5.nabble.com> Message-ID: <1444636670820-5734359.post@n5.nabble.com> Does anyone know why the arrows seem to originate from a single location? -- View this message in context: http://vtk.1045678.n5.nabble.com/Visualize-vectors-in-an-unstructured-grid-arrays-tp5734259p5734359.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Mon Oct 12 05:43:01 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 12 Oct 2015 02:43:01 -0700 (MST) Subject: [vtkusers] Problem of GPURenderDemo (vtkSmartVolumeMapper) Message-ID: <1444642981398-5734362.post@n5.nabble.com> Hi, I have a problem of vtkSmartVolumeMapper. I try to understand the shader in class vtkOpenGLGPUVolumeRayCastMapper. But I meet an problem of the equation as follow : g_eyePosObj = (in_inverseVolumeMatrix * vec4(in_cameraPos, 1.0)); First, Position in_cameraPos is in world space. Mat in_inverseVolumeMatrix is mean we want to convert representation a point from volume object space to world space. So what is in_inverseVolumeMatrix * in_cameraPos mean?? Secondly, I try to find mesh information. Is it a cube that each face divide to many parts?? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-of-GPURenderDemo-vtkSmartVolumeMapper-tp5734362.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Mon Oct 12 06:18:04 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 12 Oct 2015 03:18:04 -0700 (MST) Subject: [vtkusers] Problem of GPURenderDemo (vtkSmartVolumeMapper) In-Reply-To: <1444642981398-5734362.post@n5.nabble.com> References: <1444642981398-5734362.post@n5.nabble.com> Message-ID: <1444645084196-5734363.post@n5.nabble.com> Hi, Sorry, I think first problem is my fault. But I still don't know the second problem even if I try the draw outline of each polygon. If someone know, please give me some information. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-of-GPURenderDemo-vtkSmartVolumeMapper-tp5734362p5734363.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Mon Oct 12 07:39:13 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 12 Oct 2015 07:39:13 -0400 Subject: [vtkusers] Visualize vectors in an unstructured grid (arrays) In-Reply-To: <1444636670820-5734359.post@n5.nabble.com> References: <1444110840790-5734259.post@n5.nabble.com> <1444636670820-5734359.post@n5.nabble.com> Message-ID: Perhaps the arrows are so large that the input data seems like a single point by comparison. What happens when you turn scaling off? On Oct 12, 2015 3:57 AM, "madz" wrote: > Does anyone know why the arrows seem to originate from a single location? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Visualize-vectors-in-an-unstructured-grid-arrays-tp5734259p5734359.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 lonni.besancon at gmail.com Mon Oct 12 09:14:46 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 12 Oct 2015 06:14:46 -0700 (MST) Subject: [vtkusers] VTK for android Message-ID: <1444655686433-5734365.post@n5.nabble.com> Hello, I've re-built VTK from the last version available on git. My goal is to try and make the example from the repo work on android. However, when I try to ccmake the examples I get the following errors: /CMake Error at /usr/local/lib/cmake/vtk-6.2/vtkModuleAPI.cmake:120 (message): Requested modules not available: vtkRenderingOpenGL2 Call Stack (most recent call first): /usr/local/lib/cmake/vtk-6.2/VTKConfig.cmake:80 (vtk_module_config) NativeVTK/CMakeLists.txt:8 (find_package)/ Yet, when I check my CMakeCache, I have: ///Choose the rendering backend. VTK_RENDERING_BACKEND:STRING=OpenGL2/ Would love to get some help on that matter. Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Mon Oct 12 09:22:30 2015 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 12 Oct 2015 09:22:30 -0400 Subject: [vtkusers] VTK for android In-Reply-To: <1444655686433-5734365.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> Message-ID: Here is what I do and it works well Set my ANDROID_NDK in my environment, I also have android and ant in my path mkdir vtkbin; cd vtkbin cmake-gui ../vtk (assuming your vtk tree is next to your vtkbin tree) manually add an entry for VTK_ANDROID_BUILD bool and check the box configure check the box for build examples configure/generate ninja (or make if you use make) you should have apks built for three examples at this point, they are located in vtkbin/CMakeExternals/Build/vtk-android/Examples/Android/*/bin Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Monday, October 12, 2015 9:15 AM To: vtkusers at vtk.org Subject: [vtkusers] VTK for android Hello, I've re-built VTK from the last version available on git. My goal is to try and make the example from the repo work on android. However, when I try to ccmake the examples I get the following errors: /CMake Error at /usr/local/lib/cmake/vtk-6.2/vtkModuleAPI.cmake:120 (message): Requested modules not available: vtkRenderingOpenGL2 Call Stack (most recent call first): /usr/local/lib/cmake/vtk-6.2/VTKConfig.cmake:80 (vtk_module_config) NativeVTK/CMakeLists.txt:8 (find_package)/ Yet, when I check my CMakeCache, I have: ///Choose the rendering backend. VTK_RENDERING_BACKEND:STRING=OpenGL2/ Would love to get some help on that matter. Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From sujin.philip at kitware.com Mon Oct 12 09:25:34 2015 From: sujin.philip at kitware.com (Sujin Philip) Date: Mon, 12 Oct 2015 09:25:34 -0400 Subject: [vtkusers] vtkMultiThreader question In-Reply-To: References: Message-ID: Hi Laurent, If you are using a recent version of VTK you may want to give vtkSMPTools a try. It is a new, simplified framework for doing parallelism in VTK and it can target TBB or OpenMP as backends. It has support for a "parallel_for" and maybe a simpler way to implement your code. Please refer to this blog: http://www.kitware.com/blog/home/post/915. Let me know if you have any questions about this framework. Thanks Sujin On Sun, Oct 11, 2015 at 12:08 PM, Dan Lipsa wrote: > Laurent, > I think a good function to look at is > > > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Common/Core/Testing/Cxx/TestConditionVariable.cxx > > When you do SingleMethodExecute, the method you set is run an all > processors. > Then, by looking at threadId you can execute different parts of the method > on different processors. > > So for your 2 for loops you can set different range indexes to run on > different processors - if there are no dependencies between different index > computations. > > This would be the same as spliting a 2D array into chunks and executing a > chunk on each processor. > However, you'll have to do this explicitly, VTK does not do it > automatically. > > Dan > > > > > > On Fri, Oct 9, 2015 at 6:22 PM, Chauvin, Laurent,Ph.D. < > lchauvin at bwh.harvard.edu> wrote: > >> Thank you for your answer. >> >> I actually looked at it, but I?m still not sure what happen in this >> example. >> Is each function run in one separated thread, or each function run in >> multiple threads ? >> >> Here is what I have: >> >> myMethod(void* arg) >> { >> For loop >> For loop >> Computation() >> } >> >> And then I use vtkMultiThreader to execute this method like this: >> >> Threader->SetSingleMethod(myMethod,NULL); >> Threader->SingleMethodExecute() >> >> What I was expecting was that thread detect the function could be split >> in multiple thread (because of the loops) and run each iteration of >> Computation() in a different thread. >> >> But I think I got it wrong. I think I have to do something like that: >> >> For Loop >> For Loop >> Threader->SetSingleMethod(myMethod,data[i][j]) >> Threader->SingleMethodExecute() >> >> Is it correct ? >> >> Thank you. >> -Laurent >> >> From: Dan Lipsa >> Date: Friday, October 9, 2015 at 11:18 PM >> To: "Chauvin, Laurent,Ph.D." >> Cc: Franz Neubert via vtkusers >> Subject: Re: [vtkusers] vtkMultiThreader question >> >> Laurent, >> Did you look at the tests that come with this class. Do they work? >> >> >> http://www.vtk.org/doc/nightly/html/c2_vtk_t_12.html#c2_vtk_t_vtkMultiThreader >> >> Dan >> >> >> On Fri, Oct 9, 2015 at 5:00 PM, Chauvin, Laurent,Ph.D. < >> lchauvin at bwh.harvard.edu> wrote: >> >>> Hello, >>> >>> I?m trying to use a vtkMultiThreader to compute several thing in >>> parallel. >>> However I?m not sure how it works. >>> >>> Here is what I did. >>> I created a single method that calculate some metric pairwise. So I have >>> 2 for loops in this method. >>> What I want to do, is to have one thread per iteration (kind of), so I >>> can calculate all metrics simultaneously. >>> >>> So I created a vtkMultiThreader and set the single method, which >>> contains the loops, and executed it. However when I do that, I can only see >>> one core working. I thought SingleMethod was using multiple thread to run >>> this method. Is it true ? Why then it is not using all my other cores ? >>> >>> Should I put the loops out of the single method then, and spawn a thread >>> for each iteration, with different data as input ? >>> >>> Thank you very much. >>> -Laurent >>> >>> The information in this e-mail is intended only for the person to whom >>> it is >>> addressed. If you believe this e-mail was sent to you in error and the >>> e-mail >>> contains patient information, please contact the Partners Compliance >>> HelpLine at >>> http://www.partners.org/complianceline . If the e-mail was sent to you >>> in error >>> but does not contain patient information, please contact the sender and >>> properly >>> dispose of the e-mail. >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 andrew.slaughter at inl.gov Mon Oct 12 10:22:43 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 12 Oct 2015 08:22:43 -0600 Subject: [vtkusers] 1D visualization Message-ID: I am visualizing a 1D part, which is a flow channel. I would like to display this 1D part as a 3D cylinder, is there a filter for doing this sort of transformation in VTK? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Mon Oct 12 10:38:09 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 12 Oct 2015 07:38:09 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1444655686433-5734365.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> Message-ID: <1444660689992-5734370.post@n5.nabble.com> Small Update. Here is what I just tried to do. While building vtk I asked it to also build the examples and it worked like a charm. I've got the JavaVTK working on my tablet just fine (the native one is however not working but that's an other problem ^^). I tried again to ccmake myself the source code for the examples, and it just does not work again for the same reason. Would anyone have any insight on that problem? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734370.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Mon Oct 12 10:50:49 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 12 Oct 2015 07:50:49 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1444660689992-5734370.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <1444660689992-5734370.post@n5.nabble.com> Message-ID: <1444661449207-5734371.post@n5.nabble.com> Other update: I noticed that in fact ccmake was trying to use vtk6.2, so I changed it to vtk 6.3 and now I get the following error: / CMake Error at /usr/local/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:120 (message): Requested modules not available: vtkInteractionStyle vtkRenderingOpenGL2/ when trying to build examples. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734371.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Oct 12 11:11:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 12 Oct 2015 11:11:55 -0400 Subject: [vtkusers] 1D visualization In-Reply-To: References: Message-ID: Filters -> Tube should do this. HTH, Cory On Mon, Oct 12, 2015 at 10:22 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am visualizing a 1D part, which is a flow channel. I would like to > display this 1D part as a 3D cylinder, is there a filter for doing this > sort of transformation in VTK? > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 12 13:07:34 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 12 Oct 2015 13:07:34 -0400 Subject: [vtkusers] how to convert vtk polydata to dif file format In-Reply-To: <5449700.Vsd860MtFQ@basti-thinkpad-t410> References: <1580488.6Phfrjp2dC@basti-thinkpad-t410> <2770614.mftPNjCfnT@basti-thinkpad-t410> <5449700.Vsd860MtFQ@basti-thinkpad-t410> Message-ID: Sebastian, Glad to be of help, Cory On Sat, Oct 10, 2015 at 7:24 PM, Sebastian Hilbert < sebastian.hilbert at gmx.net> wrote: > Hi, > > Thanks for all your help. I finally got it done. > > Sebastian > > Am Donnerstag, 8. Oktober 2015, 09:32:20 schrieben Sie: > > Sebastian, > > > > I have found that STL files do not have normal information, though I > > haven't bothered to look up whether the format prevents the inclusion of > > normals. > > > > You can use vtkPolyDataNormals to generate normals [1]. > > > > normalsGenerator = vtk.vtkPolyDataNormals() > > normalsGenerator .SetInputConnection(reader.GetOutputPort()) > > normalsGenerator .Update() > > > > pd = normalsGenerator.GetOutput() > > ... > > > > HTH, > > Cory > > > > [1] http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html > > > > On Wed, Oct 7, 2015 at 5:16 PM, Sebastian Hilbert < > sebastian.hilbert at gmx.net > > > wrote: > > > > > > Hi Cory, > > > > > > Thanks for your help. I tried your code and found that my vtk file does > > > not > > > seem to contain nomal information. I guess I need to find a way to > compile > > > them. > > > > > > Does that make sense ? > > > > > > Regards, > > > Sebastian > > > > > > Am Mittwoch, 7. Oktober 2015, 10:14:44 schrieben Sie: > > > > Hi Sebastian, > > > > > > > > Probably the easiest way to do this is to use VTK readers to read in > the > > > > VTK and STL files to load the surface data, then write out the DIF > file > > > > with standard Python ASCII file writing. > > > > > > > > Here's a sketch you can use to get started: > > > > > > > > import vtk > > > > > > > > reader = vtk.vtkPolyDataReader() > > > > reader.SetFileName('/path/to/file.vtk') > > > > reader.Update() > > > > > > > > pd = reader.GetOutput() > > > > > > > > print 'Vertices' > > > > > > > > for i in xrange(pd.GetNumberOfPoints()): > > > > print pd.GetPoint(i) > > > > > > > > print 'Normals' > > > > normals = pd.GetPointData().GetArray("Normals") > > > > > > > > print '---', pd.GetNumberOfPoints(), normals.GetNumberOfTuples() > > > > > > > > for i in xrange(normals.GetNumberOfTuples()): > > > > print normals.GetValue(3*i), normals.GetValue(3*i + 1), > > > > > > > > normals.GetValue(3*i + 2) > > > > > > > > print 'Polygons' > > > > > > > > for i in xrange(pd.GetNumberOfPolys()): > > > > cell = pd.GetCell(i) > > > > pointIds = cell.GetPointIds() > > > > > > > > for j in xrange(pointIds.GetNumberOfIds()): > > > > print pointIds.GetId(j) > > > > > > > > HTH, > > > > Cory > > > > > > > > > > > > On Sun, Oct 4, 2015 at 8:13 PM, Sebastian Hilbert < > > > > > > sebastian.hilbert at gmx.net > > > > > > > > wrote: > > > > > > > > > > Hi, > > > > > > > > > > I am trying to convert a model of the heart which is available as > > > > > > either > > > > > > > > stl > > > > > or vtk polydata to a new file format called diffusion image format > > > > > > (dif) > > > > > > > > All files are provided below. The main question is. How do I > construct > > > > > > the > > > > > > > > dif > > > > > file when I have only vtk and stl file available ? > > > > > > > > > > dif is a format used by the medical software Ensite from St. Jude > and > > > > > looking > > > > > at the spec for the dif format it seems related to what vtk can > > > > > > provide. > > > > > > > > It seems to work with vertices , normals and polygons. > > > > > > > > > > I wonder if anyone has some advice on how to map data obtained > from an > > > > > > stl > > > > > > > > file or vtk polydata file to data used in the dif format. How do I > > > > > > extract > > > > > > > > vertices, normals and polygons from either stl and/or vtk ? > > > > > > > > > > The target format is like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 32.4603 6.0825 -40.3249 > > > > > 13.9858 7.9016 -41.0501 > > > > > 16.6287 7.6514 -40.4356 > > > > > 30.7806 7.9503 -41.1414 > > > > > > > > > > > > > > > > > > > > > > > > > 0.220882 -0.586701 -0.779098 > > > > > -0.082953 -0.169572 -0.982021 > > > > > 0.393210 -0.647443 -0.652842 > > > > > -0.106461 -0.248735 -0.962703 > > > > > > > > > > > > > > > > > > > > > > > > > 3 40 8 > > > > > 17 10 13 > > > > > 41 13 42 > > > > > 4 36 43 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking at the vtk file the polygons are different from the ones in > > > > > the > > > > > xml > > > > > (dif) file. Looking at the stl file (ascii) I can see some vertex > > > > > lines > > > > > that > > > > > match a line in the vertices section of the xml (dif) file but > there > > > > > > are a > > > > > > > > lot > > > > > more vertex lines in the stl file then there are in the xml (dif > > > > > file). > > > > > > > > > > I would prefer to use python if that is an option. > > > > > > > > > > If anyone wants to have a look here are the correspondig files > > > > > > > > > > vtk: https://146.0.105.21/owncloud/index.php/s/NZqGwdQQSramk1w > > > > > stl: https://146.0.105.21/owncloud/index.php/s/tWv7yKttA15hdoL > > > > > dif: https://146.0.105.21/owncloud/index.php/s/3R8oKRxXK2oR5DD > > > > > > > > > > Any help is appreciated. > > > > > > > > > > Sebastian > > > > > _______________________________________________ > > > > > Powered by www.kitware.com > > > > > > > > > > Visit other Kitware open-source projects at > > > > > http://www.kitware.com/opensource/opensource.html > > > > > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > > > > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim.gallagher at gatech.edu Mon Oct 12 13:04:15 2015 From: tim.gallagher at gatech.edu (Tim Gallagher) Date: Mon, 12 Oct 2015 13:04:15 -0400 (EDT) Subject: [vtkusers] Allowing repeated vertices in a tree Message-ID: <1648131010.4707702.1444669455064.JavaMail.root@mail.gatech.edu> Hi, I have a structured grid that I made into a vtkMutableDirectedGraph and at various points I convert it into a tree using the vtkBoostBreadthFirstSearchTree. I use the output of that filter to do a search with either the vtkTreeDFSIterator or vtkTreeBFSIterator. Everything is going well until one branch of the tree search ends early. For example, assume that I have 4 nodes that make up a square. These nodes are indexed by their (i,j) locations -- so (0,0) is the lower left corner, (1,0) is the lower right corner, (0,1) the upper left corner and (1,1) the upper right corner. When I build my directed graph, I set the edges: (0,0)->(1,0) (0,0)->(0,1) (1,0)->(1,1) (0,1)->(1,1) Now I want to use my search tree to find the paths from (0,0) to (1,1). The search will correctly report one path: (0,0)->(0,1)->(1,1) but the second path ends one vertex early: (0,0)->(1,0) which I assume is because the tree does not allow a vertex to have multiple connections. Is there a way to allow the (1,1) node to be included in both branches so I can get the complete path? Right now, when IsLeaf() == True and I am not on a node where the path is supposed to end, I manually follow the only remaining out edge in my original graph to find the proper end point. But it would be nice/clearer if the tree search wouldn't report a leaf node early. Thanks, Tim From ken.martin at kitware.com Mon Oct 12 13:49:03 2015 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 12 Oct 2015 13:49:03 -0400 Subject: [vtkusers] VTK for android In-Reply-To: <1444661449207-5734371.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <1444660689992-5734370.post@n5.nabble.com> <1444661449207-5734371.post@n5.nabble.com> Message-ID: <3d267907ac94126f88d3f92eef8e0a65@mail.gmail.com> Ahh, I have not tried using vtk android from an external tree. Currently I just take an example and start editing it. My gut would be to make sure it is finding the vtk-android tree in the Builds directory and you are using the android toolchain etc. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Monday, October 12, 2015 10:51 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK for android Other update: I noticed that in fact ccmake was trying to use vtk6.2, so I changed it to vtk 6.3 and now I get the following error: / CMake Error at /usr/local/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:120 (message): Requested modules not available: vtkInteractionStyle vtkRenderingOpenGL2/ when trying to build examples. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734371.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From saeedbakhshmand at gmail.com Mon Oct 12 15:40:54 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Mon, 12 Oct 2015 15:40:54 -0400 Subject: [vtkusers] Array Calculator to combine two vtk arrays Message-ID: Hello, I have a vtkMRMLModelnode that I want to combine two of its scalar overlays(labels) and generate a new set (union of given scalars). Here is what I do: Labels = Model.GetPolyData().GetPointData() Label1 = Labels.GetArray(1) /* Label1(name:alpha) and Label2(name:betha) are vtkfloatarray with */ Label2 = Labels.GetArray(2) calc = vtkArrayCalculator() calc.AddScalarArrayName('alpha') calc.AddScalarArrayName('betha') calc.SetFunction('betha+alpha') // I am not sure if "+" will concatenate these two arrays?? Would you please correct my code if there is something wrong or missing? Best, SMB -------------- next part -------------- An HTML attachment was scrubbed... URL: From piers.barber at logicmonkey.co.uk Mon Oct 12 18:12:15 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Mon, 12 Oct 2015 23:12:15 +0100 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output Message-ID: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> Hello VTKers I was getting empty STL file output from a program I wrote using the ruled surface filter. So I thought I would take a different approach and create triangle strips. The code does what I would expect, but I still get an empty STL file (which I think would be because there are no polys in the polydata). The ruled surface I can believe would have this problem, but a triangle strip should be OK? My full test example code follows. It creates a triangle strip 2 triangles at a time by starting with 2 points and then successively adding more in pairs. If there is a step that I have missed that is required to convert this to individual triangles for vtxSTLWriter, what would happen to vertex winding order? All comments and observations welcome! Thanks. -=:LogicMonkey:=- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define VERTICES 100 int main(int, char *[]) { vtkSmartPointer points = vtkSmartPointer::New(); points->InsertPoint(0, 0, 0, 0); points->InsertPoint(1, 0, 1, 0); vtkSmartPointer strip = vtkSmartPointer::New(); strip->GetPointIds()->SetNumberOfIds(VERTICES); strip->GetPointIds()->SetId(0,0); strip->GetPointIds()->SetId(1,1); for( int i=1; iInsertPoint(2*i, (double) i, 0, 0); points->InsertPoint(2*i+1, (double) i, 1, 0); strip->GetPointIds()->SetId(2*i,2*i); strip->GetPointIds()->SetId(2*i+1,2*i+1); } vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints(points); vtkSmartPointer cells = vtkSmartPointer::New(); cells->InsertNextCell(strip); polydata->SetStrips(cells); // STL file output vtkSmartPointer stlWriter = vtkSmartPointer::New(); stlWriter->SetFileName("StripEx.stl"); stlWriter->SetInputData(polydata); stlWriter->Write(); // now the usual VTK render and displey pipeline vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(polydata); // data to mapper vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); // mapper to actor actor->GetProperty()->SetColor(0.89, 0.81, 0.34); actor->GetProperty()->SetRepresentationToWireframe(); // Add the actors to the renderer, set the background and size vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer interactor = vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->SetBackground(.3, .4, .5); renderer->ResetCamera(); renderer->GetActiveCamera()->Azimuth(60); renderer->GetActiveCamera()->Elevation(60); renderer->GetActiveCamera()->Dolly(1.2); renderer->ResetCameraClippingRange(); renderWindow->Render(); interactor->Start(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.kirchner at dkfz-heidelberg.de Mon Oct 12 19:50:39 2015 From: t.kirchner at dkfz-heidelberg.de (Kirchner, Thomas) Date: Tue, 13 Oct 2015 01:50:39 +0200 Subject: [vtkusers] Why do my vtkRenderWindows divide up the frame rate? Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C223F0BB@DKFZEX01.ad.dkfz-heidelberg.de> Hello everyone, i am trying to get multiple vtkRenderWindows to render (4 different image streams in my case) simultaneously at 60fps which seems to be the frame rate limit for one single vtkRenderWindow (at least with my screen). It appears to me that multiple render windows in the same application share those 60fps ... e.g. yielding exactly 15fps for 4 windows. If i just start a new application for each window this does not occur (which gives me hope but doesn't help) I can't figure out why this frame rate limit is "shared" and i dont think this behavior is intended. But maybe you guys know how i can avoid this effect? (my simple example, mostly stitched together from other example code is attached) Any help would be greatly appreciated. Thanks in advance Thomas -- Thomas Kirchner German Cancer Research Center (DKFZ) Division Medical and Biological Informatics E131 - Computer-assisted Interventions Im Neuenheimer Feld 280 69120 Heidelberg, Germany Tel.: +49 (0) 6221 / 42-3543 -------------- next part -------------- A non-text attachment was scrubbed... Name: Animation.cxx Type: application/octet-stream Size: 4527 bytes Desc: Animation.cxx URL: From david.gobbi at gmail.com Mon Oct 12 21:09:58 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 12 Oct 2015 19:09:58 -0600 Subject: [vtkusers] Why do my vtkRenderWindows divide up the frame rate? In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C223F0BB@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5A0131C223F0BB@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: Hi Thomas, The default behavior of vtkRenderWindow is to wait for the vblank before swapping the buffers. So with multiple RenderWindows, the result is slow rendering and, even worse, the windows aren't synchronized. You can try the following work-around: For each window, call SwapBuffersOff() before calling Render(). This allows each window to do its rendering without swapping the buffers. Then, call SwapBuffersOn() and Frame() for each window. This will synchronize the buffer swapping. - David On Mon, Oct 12, 2015 at 5:50 PM, Kirchner, Thomas < t.kirchner at dkfz-heidelberg.de> wrote: > Hello everyone, > > i am trying to get multiple vtkRenderWindows to render (4 different > image streams in my case) simultaneously at 60fps which seems to be the > frame rate limit for one single vtkRenderWindow (at least with my > screen). It appears to me that multiple render windows in the same > application share those 60fps ... e.g. yielding exactly 15fps for 4 > windows. > If i just start a new application for each window this does not occur > (which gives me hope but doesn't help) > > I can't figure out why this frame rate limit is "shared" and i dont think > this behavior is intended. But maybe you guys know how i can avoid this > effect? > (my simple example, mostly stitched together from other example code is > attached) > > Any help would be greatly appreciated. > > Thanks in advance > Thomas > > -- > Thomas Kirchner > German Cancer Research Center (DKFZ) > Division Medical and Biological Informatics > E131 - Computer-assisted Interventions > > Im Neuenheimer Feld 280 > 69120 Heidelberg, Germany > Tel.: +49 (0) 6221 / 42-3543 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Oct 13 03:45:45 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 13 Oct 2015 00:45:45 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <3d267907ac94126f88d3f92eef8e0a65@mail.gmail.com> References: <1444655686433-5734365.post@n5.nabble.com> <1444660689992-5734370.post@n5.nabble.com> <1444661449207-5734371.post@n5.nabble.com> <3d267907ac94126f88d3f92eef8e0a65@mail.gmail.com> Message-ID: <1444722345305-5734384.post@n5.nabble.com> Thanks for your answer. So I would like to know what happens if/when you try if you don't mind. Because I'm pretty sure I did everything correctly so far but it just won't work. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734384.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Tue Oct 13 04:14:19 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 13 Oct 2015 01:14:19 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1444722345305-5734384.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <1444660689992-5734370.post@n5.nabble.com> <1444661449207-5734371.post@n5.nabble.com> <3d267907ac94126f88d3f92eef8e0a65@mail.gmail.com> <1444722345305-5734384.post@n5.nabble.com> Message-ID: <1444724059932-5734385.post@n5.nabble.com> Perhaps someone has a better for long-term coding solution. Something compatible with Android Studio would be just perfect even if it involves messing around with gradle a wee-bit. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734385.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Tue Oct 13 07:56:37 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 13 Oct 2015 07:56:37 -0400 Subject: [vtkusers] VTK for android In-Reply-To: <1444724059932-5734385.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <1444660689992-5734370.post@n5.nabble.com> <1444661449207-5734371.post@n5.nabble.com> <3d267907ac94126f88d3f92eef8e0a65@mail.gmail.com> <1444722345305-5734384.post@n5.nabble.com> <1444724059932-5734385.post@n5.nabble.com> Message-ID: <5d33fe82bfbcaa82306a2f500e3a9e04@mail.gmail.com> Thanks! I think our plan was to put up android vtk library binaries that work with Android Studio and iOS XCode at some point, maybe as part of the next formal release. Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Tuesday, October 13, 2015 4:14 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK for android Perhaps someone has a better for long-term coding solution. Something compatible with Android Studio would be just perfect even if it involves messing around with gradle a wee-bit. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734385.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From ben.boeckel at kitware.com Tue Oct 13 09:38:44 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 13 Oct 2015 09:38:44 -0400 Subject: [vtkusers] VTK for android In-Reply-To: <1444655686433-5734365.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> Message-ID: <20151013133844.GA17907@megas.khq.kitware.com> On Mon, Oct 12, 2015 at 06:14:46 -0700, Lonni Besan?on wrote: > Yet, when I check my CMakeCache, I have: > ///Choose the rendering backend. > VTK_RENDERING_BACKEND:STRING=OpenGL2/ There's a trailing slash here. Does removing that help? --Ben From davis.vigneault at gmail.com Tue Oct 13 10:13:58 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Tue, 13 Oct 2015 07:13:58 -0700 (MST) Subject: [vtkusers] QVTKWidget and vtkImagePlaneWidget Message-ID: <1444745638194-5734389.post@n5.nabble.com> All-- I'd like to use a set of ImagePlaneWidgets within a QVTKWidget, but am having some trouble. I tried creating a renderer/window/interactor and adding the window to the QVTKWidget, but that produced a blank white window. Calling Render() on the widget's window produces a second window in the background, which has the planes, but which you can't interact with. When closing the white window, both windows close, and an error is printed to the console--sometimes a Segfault, sometimes an [xcb] Abort error. I've also tried not creating the window, but using the QVTKWidget's default window, but this produces similar results. I've pasted an example below which produces the errors for me--you can change the DEBUG_ATTEMPT to 1, 2, 3, or 4 in order to cycle through. I did find a similar question on the list [1], but with no response. I'm on Ubuntu 15 using the most recent git clone of VTK. Hoping someone can point out my error, or towards an example which might help. Best, and thanks in advance, --Davis [1] http://vtk.1045678.n5.nabble.com/vtkImplicitPlaneWidget2-and-Qt-td5169621.html // Qt #include #include // ITK #include #include // VTK #include #include #include #include #include #include #include #include #include #include #include #include #define DEBUG_ATTEMPT 4 const unsigned int Dimension = 3; typedef short TPixel; typedef itk::Image< TPixel, Dimension > TImage; typedef itk::ImageFileReader< TImage > TImageReader; typedef itk::ImageToVTKImageFilter< TImage > TITK2VTK; int main(int argc, char ** argv) { if (2 != argc) { std::cerr << "Usage: " << argv[0] << " " << std::endl; return EXIT_FAILURE; } const std::string inputFile = argv[1]; QApplication app(argc, argv); QVTKWidget widget; widget.resize(600,600); ////////////////////////////////////// // Renderer/Window/Interactor/Style // ////////////////////////////////////// #if DEBUG_ATTEMPT == 1 || DEBUG_ATTEMPT == 2 vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer window = vtkSmartPointer::New(); window->AddRenderer( renderer ); vtkSmartPointer interactor = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); interactor->SetInteractorStyle( style ); interactor->SetRenderWindow( window ); #elif DEBUG_ATTEMPT == 3 || DEBUG_ATTEMPT == 4 vtkSmartPointer renderer = vtkSmartPointer::New(); widget.GetRenderWindow()->AddRenderer( renderer ); vtkSmartPointer interactor = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); interactor->SetInteractorStyle( style ); interactor->SetRenderWindow( widget.GetRenderWindow() ); #endif ///////////////////// // Read the images // ///////////////////// TImageReader::Pointer imageReader = TImageReader::New(); imageReader->SetFileName( inputFile ); TITK2VTK::Pointer itk2vtk = TITK2VTK::New(); itk2vtk->SetInput( imageReader->GetOutput() ); itk2vtk->Update(); vtkSmartPointer imageData = itk2vtk->GetOutput(); int dims[Dimension]; imageData->GetDimensions(dims); /////////////////////// // Setup image plane // /////////////////////// vtkSmartPointer property = vtkSmartPointer::New(); // Set up the plane widgets vtkSmartPointer planeWidget[Dimension]; for (unsigned int i = 0; i < Dimension; ++i) { planeWidget[i] = vtkSmartPointer< vtkImagePlaneWidget >::New(); planeWidget[i]->SetInteractor( interactor ); planeWidget[i]->RestrictPlaneToVolumeOn(); double color[3] = {0,0,0}; color[i] = 1; planeWidget[i]->GetPlaneProperty()->SetColor(color); planeWidget[i]->SetTexturePlaneProperty( property ); planeWidget[i]->TextureInterpolateOff(); planeWidget[i]->SetResliceInterpolateToLinear(); planeWidget[i]->SetInputData( imageData ); planeWidget[i]->SetPlaneOrientation(i); planeWidget[i]->SetSliceIndex(dims[i]/2); planeWidget[i]->DisplayTextOn(); planeWidget[i]->SetDefaultRenderer( renderer ); planeWidget[i]->SetWindowLevel(1358, -27); planeWidget[i]->On(); planeWidget[i]->InteractionOn(); } ////////////////// // Finish Setup // ////////////////// #if DEBUG_ATTEMPT == 1 // White Window widget.SetRenderWindow( window ); // widget.GetInteractor()->Initialize(); // widget.GetRenderWindow()->Render(); // widget.GetInteractor()->Start(); #elif DEBUG_ATTEMPT == 2 // In addition to the white window, you get a second window with the planes, but which // you can't interact with. Also, you get this error on exiting: // [xcb] Unknown sequence number while appending request // [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called // [xcb] Aborting, sorry about that. // dv-threshold: ../../src/xcb_io.c:161: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed. // Aborted (core dumped) // Sometimes, segmentation fault instead of this message widget.SetRenderWindow( window ); widget.GetRenderWindow()->Render(); #elif DEBUG_ATTEMPT == 3 widget.GetRenderWindow()->AddRenderer( renderer ); #elif DEBUG_ATTEMPT == 4 widget.GetRenderWindow()->AddRenderer( renderer ); widget.GetRenderWindow()->Render(); #endif widget.show(); app.exec(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-vtkImagePlaneWidget-tp5734389.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Tue Oct 13 12:02:23 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 13 Oct 2015 09:02:23 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <20151013133844.GA17907@megas.khq.kitware.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> Message-ID: <1444752143727-5734393.post@n5.nabble.com> Seems like the problem is somewhere else apparently but thanks for the suggestion :). Wondering now whether there's a way to use gradle to build a vtk application ^^. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734393.html Sent from the VTK - Users mailing list archive at Nabble.com. From ich_daniel at habmalnefrage.de Tue Oct 13 13:12:41 2015 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 13 Oct 2015 10:12:41 -0700 (MST) Subject: [vtkusers] How can I hide vtkCaptionActor2D? Message-ID: <1444756361745-5734394.post@n5.nabble.com> Hi there, I have a cube with text on every corner. For this I use vtkCaptionActor2D, so that the text is always visible in the foreground. Now I want to hide the text (or vtkCaptionActor2D) when the corresponding corner can't be seen in the renderer. How can I hide a vtkCaptionActor2D? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-hide-vtkCaptionActor2D-tp5734394.html Sent from the VTK - Users mailing list archive at Nabble.com. From t.kirchner at dkfz-heidelberg.de Tue Oct 13 13:22:55 2015 From: t.kirchner at dkfz-heidelberg.de (Kirchner, Thomas) Date: Tue, 13 Oct 2015 19:22:55 +0200 Subject: [vtkusers] Why do my vtkRenderWindows divide up the frame rate? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5A0131C223F0BB@DKFZEX01.ad.dkfz-heidelberg.de>, Message-ID: <57EE86D11538B44096C712532DBB6C5A0131C223F0BC@DKFZEX01.ad.dkfz-heidelberg.de> Hi David, thank you for taking the time. SwapBuffers changed nothing on the speed (still 60/numberOfRenderWindows fps). Although weirdly this is only the case on my ubuntu system -- on my Macbook this doesnt occur at all (60fps on all 10 renderwindows). Also, if i completely turn off DoubleBuffering it doesnt occur, but i do get the typical image artifacts. - Thomas ________________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Tuesday, October 13, 2015 3:09 AM To: Kirchner, Thomas Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Why do my vtkRenderWindows divide up the frame rate? Hi Thomas, The default behavior of vtkRenderWindow is to wait for the vblank before swapping the buffers. So with multiple RenderWindows, the result is slow rendering and, even worse, the windows aren't synchronized. You can try the following work-around: For each window, call SwapBuffersOff() before calling Render(). This allows each window to do its rendering without swapping the buffers. Then, call SwapBuffersOn() and Frame() for each window. This will synchronize the buffer swapping. - David On Mon, Oct 12, 2015 at 5:50 PM, Kirchner, Thomas > wrote: Hello everyone, i am trying to get multiple vtkRenderWindows to render (4 different image streams in my case) simultaneously at 60fps which seems to be the frame rate limit for one single vtkRenderWindow (at least with my screen). It appears to me that multiple render windows in the same application share those 60fps ... e.g. yielding exactly 15fps for 4 windows. If i just start a new application for each window this does not occur (which gives me hope but doesn't help) I can't figure out why this frame rate limit is "shared" and i dont think this behavior is intended. But maybe you guys know how i can avoid this effect? (my simple example, mostly stitched together from other example code is attached) Any help would be greatly appreciated. Thanks in advance Thomas -- Thomas Kirchner German Cancer Research Center (DKFZ) Division Medical and Biological Informatics E131 - Computer-assisted Interventions Im Neuenheimer Feld 280 69120 Heidelberg, Germany Tel.: +49 (0) 6221 / 42-3543 From david.gobbi at gmail.com Tue Oct 13 13:37:03 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 13 Oct 2015 11:37:03 -0600 Subject: [vtkusers] Why do my vtkRenderWindows divide up the frame rate? In-Reply-To: <57EE86D11538B44096C712532DBB6C5A0131C223F0BC@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5A0131C223F0BB@DKFZEX01.ad.dkfz-heidelberg.de> <57EE86D11538B44096C712532DBB6C5A0131C223F0BC@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: Hi Thomas, You can try playing around with the vsync in your driver settings (for example, if you have an NVidia GPU then run nvidia-settings). - David On Tue, Oct 13, 2015 at 11:22 AM, Kirchner, Thomas < t.kirchner at dkfz-heidelberg.de> wrote: > Hi David, > > thank you for taking the time. > SwapBuffers changed nothing on the speed (still 60/numberOfRenderWindows > fps). Although weirdly this is only the case on my ubuntu system -- on my > Macbook this doesnt occur at all (60fps on all 10 renderwindows). > Also, if i completely turn off DoubleBuffering it doesnt occur, but i do > get the typical image artifacts. > > - Thomas > > ________________________________________ > From: David Gobbi [david.gobbi at gmail.com] > Sent: Tuesday, October 13, 2015 3:09 AM > To: Kirchner, Thomas > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Why do my vtkRenderWindows divide up the frame > rate? > > Hi Thomas, > > The default behavior of vtkRenderWindow is to wait for the vblank before > swapping the buffers. So with multiple RenderWindows, the result is slow > rendering and, even worse, the windows aren't synchronized. You can try > the following work-around: > > For each window, call SwapBuffersOff() before calling Render(). This > allows each window to do its rendering without swapping the buffers. > Then, call SwapBuffersOn() and Frame() for each window. This will > synchronize the buffer swapping. > > - David > > > On Mon, Oct 12, 2015 at 5:50 PM, Kirchner, Thomas < > t.kirchner at dkfz-heidelberg.de> > wrote: > Hello everyone, > > i am trying to get multiple vtkRenderWindows to render (4 different > image streams in my case) simultaneously at 60fps which seems to be the > frame rate limit for one single vtkRenderWindow (at least with my > screen). It appears to me that multiple render windows in the same > application share those 60fps ... e.g. yielding exactly 15fps for 4 > windows. > If i just start a new application for each window this does not occur > (which gives me hope but doesn't help) > > I can't figure out why this frame rate limit is "shared" and i dont think > this behavior is intended. But maybe you guys know how i can avoid this > effect? > (my simple example, mostly stitched together from other example code is > attached) > > Any help would be greatly appreciated. > > Thanks in advance > Thomas > > -- > Thomas Kirchner > German Cancer Research Center (DKFZ) > Division Medical and Biological Informatics > E131 - Computer-assisted Interventions > > Im Neuenheimer Feld 280 > 69120 Heidelberg, Germany > Tel.: +49 (0) 6221 / 42-3543 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Tue Oct 13 18:39:16 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Tue, 13 Oct 2015 16:39:16 -0600 Subject: [vtkusers] vtkTextMapper Disable Resize Message-ID: I am using a vtkTextMapper to display a floating point number, this number is updated with time and varies between integer values and decimal values. When I first create the text, it has an integer value. This seems to set the extent of the text, because at subsequent times the decimal numbers are compressed horizontally to that that text fits within the same extents. I am simply calling vtkTextMapper.SetInput('new text here') at each timestep. Is there a way to update the extents to allow the font-size to remain constant, or set the extents manually at the beginning to be larger than the first text string? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Oct 14 08:18:40 2015 From: david.lonie at kitware.com (David Lonie) Date: Wed, 14 Oct 2015 08:18:40 -0400 Subject: [vtkusers] vtkTextMapper Disable Resize In-Reply-To: References: Message-ID: On Tue, Oct 13, 2015 at 6:39 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am using a vtkTextMapper to display a floating point number, this number > is updated with time and varies between integer values and decimal values. > > When I first create the text, it has an integer value. This seems to set > the extent of the text, because at subsequent times the decimal numbers are > compressed horizontally to that that text fits within the same extents. I > am simply calling vtkTextMapper.SetInput('new text here') at each timestep. > > Is there a way to update the extents to allow the font-size to remain > constant, or set the extents manually at the beginning to be larger than > the first text string? > The vtkTextMapper / vtkActor2D combo should behave as you describe: It should always use the font size to determine the size of the rendered text and set the extents from that. As the input string changes, the extents should change to contain the rendered text at the specified font size. I've tried to reproduce the buggy behavior you mention, but cannot -- the text extents change appropriately as the input changes. Are there any additional options set on the mapper/actor? Can you provide a minimal code example the reproduces this behavior? Also, what version of VTK is this? Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Oct 14 08:30:34 2015 From: david.lonie at kitware.com (David Lonie) Date: Wed, 14 Oct 2015 08:30:34 -0400 Subject: [vtkusers] How can I hide vtkCaptionActor2D? In-Reply-To: <1444756361745-5734394.post@n5.nabble.com> References: <1444756361745-5734394.post@n5.nabble.com> Message-ID: On Tue, Oct 13, 2015 at 1:12 PM, -Daniel- wrote: > Hi there, > > I have a cube with text on every corner. For this I use vtkCaptionActor2D, > so that the text is always visible in the foreground. Now I want to hide > the > text (or vtkCaptionActor2D) when the corresponding corner can't be seen in > the renderer. > > How can I hide a vtkCaptionActor2D? > As far as I'm aware, there is not a built-in way to do this, and it will take some work from the application side. The vtkCaptionActor2D (or any actor for that matter) can be hidden by calling SetVisibility(0) on the actor. The trick is going to be detecting when the point is not visible. The vtkSelectVisiblePoints class does something similar to what you want. In that class's IsPointOccluded method, a point is transformed using the active camera's modelview/projection matrices. The transformed point is tested to see if it falls within a rectangular region (they use some selection bounds, but it could just be the viewport extents in your case), and then it also compares the point to the renderer's depth buffer to see if there's anything in front of it. See https://github.com/Kitware/VTK/blob/master/Rendering/Core/vtkSelectVisiblePoints.cxx#L241 for the implementation. You'll need to do something similar for your usecase, and update the actor's visibility based on whether the point is occluded. Hope this helps, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dejan.zivkovic90 at gmail.com Wed Oct 14 09:12:31 2015 From: dejan.zivkovic90 at gmail.com (Dejan Zivkovic) Date: Wed, 14 Oct 2015 15:12:31 +0200 Subject: [vtkusers] Update VTKWidget and QtProgressBar using QTimer Message-ID: I have some VTKWidget and a QProgressBar in the same QMainWindow. VTKWidget has some scene that can be animated. In QTimer I update both VTKWidget and QProgress bar, on every 33ms. Problem is that QProgressBar won't update its GUI. When I disable updating VTKWidget, QProgressBar updates its GUI. Does someone see the possible problem in this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Oct 14 10:29:15 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 14 Oct 2015 08:29:15 -0600 Subject: [vtkusers] vtkTextMapper Disable Resize In-Reply-To: References: Message-ID: Attached an example that produces the un-wanted behavior on my machine (VTK 6.3, python bindings), perhaps I am just doing something incorrectly. I also attached a few rendered windows that show the problem. Thanks for you quick reply, Andrew On Wed, Oct 14, 2015 at 6:18 AM, David Lonie wrote: > On Tue, Oct 13, 2015 at 6:39 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> I am using a vtkTextMapper to display a floating point number, this >> number is updated with time and varies between integer values and decimal >> values. >> >> When I first create the text, it has an integer value. This seems to set >> the extent of the text, because at subsequent times the decimal numbers are >> compressed horizontally to that that text fits within the same extents. I >> am simply calling vtkTextMapper.SetInput('new text here') at each timestep. >> >> Is there a way to update the extents to allow the font-size to remain >> constant, or set the extents manually at the beginning to be larger than >> the first text string? >> > > The vtkTextMapper / vtkActor2D combo should behave as you describe: It > should always use the font size to determine the size of the rendered text > and set the extents from that. As the input string changes, the extents > should change to contain the rendered text at the specified font size. > > I've tried to reproduce the buggy behavior you mention, but cannot -- the > text extents change appropriately as the input changes. Are there any > additional options set on the mapper/actor? Can you provide a minimal code > example the reproduces this behavior? > > Also, what version of VTK is this? > > Thanks, > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: annotation.py Type: text/x-python-script Size: 1273 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: annotation_0.png Type: image/png Size: 1693 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: annotation_3.png Type: image/png Size: 1733 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: annotation_4.png Type: image/png Size: 1993 bytes Desc: not available URL: From david.lonie at kitware.com Wed Oct 14 10:37:40 2015 From: david.lonie at kitware.com (David Lonie) Date: Wed, 14 Oct 2015 10:37:40 -0400 Subject: [vtkusers] vtkTextMapper Disable Resize In-Reply-To: References: Message-ID: Hi Andrew, I tested this on the latest master and the example is working as expected. I suspect that the patch below is the one that fixes the issue. If you can't patch / update the VTK you're using, it looks like a workaround would be to call mapper.GetTextProperty().Modified() when you update the input string, as that will trigger the coordinates to be recalculated. commit 1cc1ad152dec84306dc4623a3444c8063085cf1c Author: David C. Lonie Date: Tue Oct 6 10:47:59 2015 -0400 Fix MTime bug in vtkTextMapper. See http://www.vtk.org/Bug/view.php?id=15303. Thanks to Luc Habert for the report and patch. diff --git a/Rendering/Core/vtkTextMapper.cxx b/Rendering/Core/vtkTextMapper.cxx index be4a968..9f5b67b 100644 --- a/Rendering/Core/vtkTextMapper.cxx +++ b/Rendering/Core/vtkTextMapper.cxx @@ -485,7 +485,8 @@ void vtkTextMapper::UpdateQuad(vtkActor2D *actor, int dpi) } if (this->CoordsTime < actor->GetMTime() || - this->CoordsTime < this->TextProperty->GetMTime()) + this->CoordsTime < this->TextProperty->GetMTime() || + this->CoordsTime < this->TCoordsTime) { int text_bbox[4]; vtkTextRenderer *tren = vtkTextRenderer::GetInstance(); Cheers, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Oct 14 10:52:14 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 14 Oct 2015 08:52:14 -0600 Subject: [vtkusers] vtkTextMapper Disable Resize In-Reply-To: References: Message-ID: The 'Modified()' call did the trick, I will go with that until the next release. Thanks. On Wed, Oct 14, 2015 at 8:37 AM, David Lonie wrote: > Hi Andrew, > > I tested this on the latest master and the example is working as expected. > I suspect that the patch below is the one that fixes the issue. > > If you can't patch / update the VTK you're using, it looks like a > workaround would be to call > > mapper.GetTextProperty().Modified() > > when you update the input string, as that will trigger the coordinates to > be recalculated. > > commit 1cc1ad152dec84306dc4623a3444c8063085cf1c > Author: David C. Lonie > Date: Tue Oct 6 10:47:59 2015 -0400 > > Fix MTime bug in vtkTextMapper. > > See http://www.vtk.org/Bug/view.php?id=15303. Thanks to > Luc Habert for the report and patch. > > diff --git a/Rendering/Core/vtkTextMapper.cxx > b/Rendering/Core/vtkTextMapper.cxx > index be4a968..9f5b67b 100644 > --- a/Rendering/Core/vtkTextMapper.cxx > +++ b/Rendering/Core/vtkTextMapper.cxx > @@ -485,7 +485,8 @@ void vtkTextMapper::UpdateQuad(vtkActor2D *actor, int > dpi) > } > > if (this->CoordsTime < actor->GetMTime() || > - this->CoordsTime < this->TextProperty->GetMTime()) > + this->CoordsTime < this->TextProperty->GetMTime() || > + this->CoordsTime < this->TCoordsTime) > { > int text_bbox[4]; > vtkTextRenderer *tren = vtkTextRenderer::GetInstance(); > > Cheers, > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Oct 14 13:10:05 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 14 Oct 2015 13:10:05 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> Message-ID: Maybe try inserting a vtkTriangleFilter in front of your STL writer? - Cory On Mon, Oct 12, 2015 at 6:12 PM, wrote: > Hello VTKers > > I was getting empty STL file output from a program I wrote using the ruled > surface filter. So I thought I would take a different approach and create > triangle strips. > > The code does what I would expect, but I still get an empty STL file > (which I think would be because there are no polys in the polydata). > > The ruled surface I can believe would have this problem, but a triangle > strip should be OK? > > My full test example code follows. It creates a triangle strip 2 triangles > at a time by starting with 2 points and then successively adding more in > pairs. > > If there is a step that I have missed that is required to convert this to > individual triangles for vtxSTLWriter, what would happen to vertex winding > order? > > All comments and observations welcome! > > Thanks. > > -=:LogicMonkey:=- > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #define VERTICES 100 > > int main(int, char *[]) { > > vtkSmartPointer > points = vtkSmartPointer::New(); > points->InsertPoint(0, 0, 0, 0); > points->InsertPoint(1, 0, 1, 0); > > vtkSmartPointer > strip = vtkSmartPointer::New(); > strip->GetPointIds()->SetNumberOfIds(VERTICES); > strip->GetPointIds()->SetId(0,0); > strip->GetPointIds()->SetId(1,1); > > for( int i=1; i > points->InsertPoint(2*i, (double) i, 0, 0); > points->InsertPoint(2*i+1, (double) i, 1, 0); > > strip->GetPointIds()->SetId(2*i,2*i); > strip->GetPointIds()->SetId(2*i+1,2*i+1); > } > > vtkSmartPointer > polydata = vtkSmartPointer::New(); > > polydata->SetPoints(points); > > vtkSmartPointer > cells = vtkSmartPointer::New(); > cells->InsertNextCell(strip); > > polydata->SetStrips(cells); > > // STL file output > > vtkSmartPointer > stlWriter = vtkSmartPointer::New(); > stlWriter->SetFileName("StripEx.stl"); > stlWriter->SetInputData(polydata); > stlWriter->Write(); > > // now the usual VTK render and displey pipeline > > vtkSmartPointer > mapper = vtkSmartPointer::New(); > mapper->SetInputData(polydata); // data to mapper > > vtkSmartPointer > actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); // mapper to actor > > actor->GetProperty()->SetColor(0.89, 0.81, 0.34); > actor->GetProperty()->SetRepresentationToWireframe(); > > // Add the actors to the renderer, set the background and size > vtkSmartPointer > renderer = vtkSmartPointer::New(); > > vtkSmartPointer > renderWindow = vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > > vtkSmartPointer > interactor = vtkSmartPointer::New(); > interactor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->SetBackground(.3, .4, .5); > > renderer->ResetCamera(); > renderer->GetActiveCamera()->Azimuth(60); > renderer->GetActiveCamera()->Elevation(60); > renderer->GetActiveCamera()->Dolly(1.2); > renderer->ResetCameraClippingRange(); > > renderWindow->Render(); > interactor->Start(); > > return EXIT_SUCCESS; > > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Oct 14 13:20:58 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 14 Oct 2015 11:20:58 -0600 Subject: [vtkusers] Image Viewer Question Message-ID: I am working on adding a logo to a 3D scene and having trouble controlling placement of the logo image. I have attached a demo code, but it does not work like I would expect. I would like to be able to shrink the logo to 50% its size, rotate it 90 (this worked), and move it closer to the corner of the window. Again thanks for the help on this issue and sorry for hammering the list this week. -Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imageviewer.py Type: text/x-python-script Size: 1149 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: moose.png Type: image/png Size: 102283 bytes Desc: not available URL: From werner at sembach.de Wed Oct 14 17:40:48 2015 From: werner at sembach.de (Werner Sembach) Date: Wed, 14 Oct 2015 23:40:48 +0200 Subject: [vtkusers] Visualize Vector Field Example Wrong? Message-ID: <561ECBE0.9080509@sembach.de> Hello, i want to do exactly this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorField but when you try the example code the 2nd coordinate of the vectors is completly ignored (even the picture on the wiki shows 2 parrallel vectors while in the code the vectors are (10, 10) and (-10, 5). hope someone can help me From piers.barber at logicmonkey.co.uk Wed Oct 14 18:06:15 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Wed, 14 Oct 2015 23:06:15 +0100 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> Message-ID: <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> On 2015-10-14 18:10, Cory Quammen wrote: > Maybe try inserting a vtkTriangleFilter in front of your STL writer? Perfect - many many thanks! It worked on the triangle mesh AND on the ruled surface. Both STL files read into other apps just fine. The ruled surface output is appreciably higher quality even than a very high poly count mesh. For the record... // write out a STL file // run a triangle filter ruled surface to create polys vtkSmartPointer tris = vtkTriangleFilter::New(); tris->SetInputConnection(ruled->GetOutputPort()); vtkSmartPointer stlWriter = vtkSmartPointer::New(); stlWriter->SetFileName("Ruled.stl"); stlWriter->SetInputConnection(tris->GetOutputPort()); stlWriter->Write(); And // write out a STL file // run a triangle filter on the mesh to create polys vtkSmartPointer tris = vtkTriangleFilter::New(); tris->SetInputConnection(ruled->GetOutputPort()); vtkSmartPointer stlWriter = vtkSmartPointer::New(); stlWriter->SetFileName("Mesh.stl"); stlWriter->SetInputConnection(tris->GetOutputPort()); stlWriter->Write(); -- Piers Barber (-=:LogicMonkey:=-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Wed Oct 14 18:21:52 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Wed, 14 Oct 2015 15:21:52 -0700 (MST) Subject: [vtkusers] Mailing list or forum or SO? In-Reply-To: <1435439639504-5732569.post@n5.nabble.com> References: <1434550615008-5732413.post@n5.nabble.com> <1435125905093-5732512.post@n5.nabble.com> <1435439639504-5732569.post@n5.nabble.com> Message-ID: <1444861312396-5734419.post@n5.nabble.com> Just some more insights on this. Stack Overflow is indeed about programming questions and people definitely let you know if you ask a question that is not suitable for SO. However, the number of people reading VTK questions is still kinda small and I guess that as a consequence we could use SO to even ask about non-programming questions without risking reputation loss and stuff. After all it is the readers of the questions that can down vote and all... I've checked the SO posts not so long ago and I'm sure we could use it even more. This will definitely be a way to reward people who spend time helping others with VTK issues. -- View this message in context: http://vtk.1045678.n5.nabble.com/Mailing-list-or-forum-or-SO-tp5732413p5734419.html Sent from the VTK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Wed Oct 14 18:22:58 2015 From: siavashk at ece.ubc.ca (Siavash) Date: Wed, 14 Oct 2015 15:22:58 -0700 Subject: [vtkusers] Mailing list or forum or SO? In-Reply-To: <1444861312396-5734419.post@n5.nabble.com> References: <1434550615008-5732413.post@n5.nabble.com> <1435125905093-5732512.post@n5.nabble.com> <1435439639504-5732569.post@n5.nabble.com> <1444861312396-5734419.post@n5.nabble.com> Message-ID: <561ED5C2.5060802@ece.ubc.ca> Seconded. Siavash On 10/14/2015 3:21 PM, Lonni Besan?on wrote: > Just some more insights on this. > Stack Overflow is indeed about programming questions and people definitely > let you know if you ask a question that is not suitable for SO. > However, the number of people reading VTK questions is still kinda small and > I guess that as a consequence we could use SO to even ask about > non-programming questions without risking reputation loss and stuff. After > all it is the readers of the questions that can down vote and all... > > I've checked the SO posts not so long ago and I'm sure we could use it even > more. This will definitely be a way to reward people who spend time helping > others with VTK issues. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Mailing-list-or-forum-or-SO-tp5732413p5734419.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 > -- Lightpath Imaging Labs Siavash Khallaghi, PhD / Algorithm Developer siavashk at ece.ubc.ca / 778-991-9702 Lightpath Imaging Labs www.ece.ubc.ca/~siavashk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bluejay.png Type: image/png Size: 10884 bytes Desc: not available URL: From MEEHANBT at nv.doe.gov Wed Oct 14 20:30:05 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Thu, 15 Oct 2015 00:30:05 +0000 Subject: [vtkusers] Visualize Vector Field Example Wrong? In-Reply-To: <201510142146.t9ELkQkq026198-t9ELkQkt026198@mta-1.nv.doe.gov> References: <201510142146.t9ELkQkq026198-t9ELkQkt026198@mta-1.nv.doe.gov> Message-ID: I think that you need to have a three-component vector in order to use the vtkGlyph3D filter like it sounds you want to use it. I think that the example you reference may be wrong ? I didn?t read it very carefully though. Here?s a small script you can tinker with: import vtk # Create some source to work from. sphere = vtk.vtkSphereSource() sphere.Update() # Extract the polydata object reference. polydata = sphere.GetOutputDataObject(0) # Create a 2-component vector and a 3-component vector for testing. vector_3 = vtk.vtkFloatArray() vector_3.SetName("Three Components") vector_3.SetNumberOfComponents(3) vector_3.SetNumberOfTuples(polydata.GetNumberOfPoints()) vector_2 = vtk.vtkFloatArray() vector_2.SetName("Two Components") vector_2.SetNumberOfComponents(2) vector_2.SetNumberOfTuples(polydata.GetNumberOfPoints()) for i in range(polydata.GetNumberOfPoints()): x, y, z = polydata.GetPoint(i) vector_2.SetTuple2(i, -y, x) vector_3.SetTuple3(i, -y, x, 0.) # Add the vectors to the polydata object. polydata.GetPointData().AddArray(vector_3) # Correct behavior with 3-component vector. polydata.GetPointData().SetActiveVectors("Three Components") # Incorrect behavior with 2-component vector. # polydata.GetPointData().SetActiveVectors("Two Components") sphere.Update() # Create a glyph filter to see the vectors. arrow = vtk.vtkArrowSource() glyphs = vtk.vtkGlyph3D() glyphs.SetSourceConnection(arrow.GetOutputPort()) glyphs.SetInputConnection(sphere.GetOutputPort()) glyphs.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(glyphs.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) renderer.SetBackground(.1, .2, .6) render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(render_window) render_window.Render() iren.Start() On 10/14/15, 2:40 PM, "vtkusers on behalf of Werner Sembach" wrote: >Hello, >i want to do exactly this: >http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorField >but when you try the example code the 2nd coordinate of the vectors is >completly ignored (even the picture on the wiki shows 2 parrallel >vectors while in the code the vectors are (10, 10) and (-10, 5). >hope someone can help me >_______________________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Please keep messages on-topic and check the VTK FAQ at: >http://www.vtk.org/Wiki/VTK_FAQ > >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 DLRdave at aol.com Wed Oct 14 22:34:25 2015 From: DLRdave at aol.com (David Cole) Date: Wed, 14 Oct 2015 22:34:25 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> Message-ID: I understand it's VTK's style to keep classes as independent of each other as possible, and to make all things optional and easily connectable, so you don't have to run unnecessary filters. But in this case, it's absolutely clear that the STL writer requires polydata with only triangles in it to write out a meaningful STL file. (I've encountered this personally before, and it took quite some effort to figure out that I just had to add a few lines of code to put a triangle filter in, too...) So it begs the question: why is this a mailing list question in 2015? Shouldn't the STL writer detect that its input contains non-triangles, and **automatically** insert a triangle filter to produce correct output? Or, at the very least, spit out an error message saying "here, insert this code before calling Update/Write, and it will work like you want it to" ... ? (Similarly for rendering crappy polydata using the polydata mapper: it requires up-to-date normals to render with proper lighting and shading, and seems like the perfect candidate for **automatically** inserting a polydata normals filter. This might be harder to detect that the normals are not up to date, but sure would have saved my team some time recently...) Would these types of improvements be welcome additions to VTK, or am I missing some case where you would NOT want this type of behavior? ?? David C. On Wednesday, October 14, 2015, wrote: > On 2015-10-14 18:10, Cory Quammen wrote: > > Maybe try inserting a vtkTriangleFilter in front of your STL writer? > > Perfect - many many thanks! > > It worked on the triangle mesh AND on the ruled surface. Both STL files > read into other apps just fine. The ruled surface output is appreciably > higher quality even than a very high poly count mesh. > > For the record... > > // write out a STL file > // run a triangle filter ruled surface to create polys > vtkSmartPointer > tris = vtkTriangleFilter::New(); > tris->SetInputConnection(ruled->GetOutputPort()); > vtkSmartPointer > stlWriter = vtkSmartPointer::New(); > stlWriter->SetFileName("Ruled.stl"); > stlWriter->SetInputConnection(tris->GetOutputPort()); > stlWriter->Write(); > > And > > // write out a STL file > // run a triangle filter on the mesh to create polys > vtkSmartPointer > tris = vtkTriangleFilter::New(); > tris->SetInputConnection(ruled->GetOutputPort()); > > vtkSmartPointer > > stlWriter = vtkSmartPointer::New(); > > stlWriter->SetFileName("Mesh.stl"); > stlWriter->SetInputConnection(tris->GetOutputPort()); > stlWriter->Write(); > > -- > > Piers Barber (-=:LogicMonkey:=-) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Wed Oct 14 22:48:11 2015 From: ysa0829 at gmail.com (Ang) Date: Wed, 14 Oct 2015 19:48:11 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems Message-ID: <1444877291814-5734423.post@n5.nabble.com> Hi all, in vtk 6.0, no matter using vtkImageResliceMapper or vtkImageSliceMapper I got same result like pic2. But in vtk 6.3 they are different result, vtkImageResliceMapper is pic1 and vtkImageSliceMapper is pic2. Could some one help me? Thanks. pic1: pic2: -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423.html Sent from the VTK - Users mailing list archive at Nabble.com. From piers.barber at logicmonkey.co.uk Thu Oct 15 03:49:36 2015 From: piers.barber at logicmonkey.co.uk (piers.barber at logicmonkey.co.uk) Date: Thu, 15 Oct 2015 08:49:36 +0100 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> Message-ID: On 2015-10-15 03:34, David Cole wrote: > So it begs the question: why is this a mailing list question in 2015? If you mean why did I ask, then it's because I couldn't find the answer - which implies that while it's a simple solution, maybe it's not a common problem. I kind of knew what the issue was, but didn't know the fix. I don't think vtkSTLWriter itself needs any change - but I do think that some of the wiki code examples would really benefit from not being quite as lean and mean as the functions they're explaining. It's the sort of thing that could be included in the code example as just a comment. -- Piers Barber (-=:LogicMonkey:=-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Thu Oct 15 07:47:57 2015 From: DLRdave at aol.com (David Cole) Date: Thu, 15 Oct 2015 07:47:57 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> Message-ID: I meant "why did you have to ask," not "why did you ask." Obviously, this is a friendly list, and all questions VTK are welcomed... My point being that it seems like the sort of thing which should either be very well documented, including the sample code, or simply detected/handled automatically. My other question still remains: Would the two specific cases I called out be acceptable for some attempt to handle them automatically, or do we just need better documentation and sample code for STL writer and polydata rendering? Thx, David C. On Thursday, October 15, 2015, wrote: > On 2015-10-15 03:34, David Cole wrote: > > So it begs the question: why is this a mailing list question in 2015? > > If you mean why did I ask, then it's because I couldn't find the answer - > which implies that while it's a simple solution, maybe it's not a common > problem. I kind of knew what the issue was, but didn't know the fix. > > I don't think vtkSTLWriter itself needs any change - but I do think that > some of the wiki code examples would really benefit from not being quite as > lean and mean as the functions they're explaining. It's the sort of thing > that could be included in the code example as just a comment.I > > -- > Piers Barber (-=:LogicMonkey:=-) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Thu Oct 15 08:23:47 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Thu, 15 Oct 2015 05:23:47 -0700 (MST) Subject: [vtkusers] internal radiotherapy kernel Message-ID: <1444911827936-5734426.post@n5.nabble.com> Hi all, Im working on internal radiotherapy and, currently, I calculate my absorbed dose information (DVH etc.) by adding a kernel (vtkImageData) at each treatment point to a large dose grid (vtkImageData) that covers the whole treatment region. Then I pass by vtkImageAccumulate to do the dosimetry. Is this the best way to do it? Because if the majority receives no absorbed dose, it seems wasteful (in terms of memory) to have those voxels at the same resolution as in my kernel, where I have a very steep gradient of absorbed dose. Are there any other approaches? Would it, for example, be possible to store my kernel as a vtkUnstructuredGrid and still pass it by vtkImageAccumulate and get the same results? Thanks for any responses in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/internal-radiotherapy-kernel-tp5734426.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Thu Oct 15 08:25:20 2015 From: daviddoria at gmail.com (David Doria) Date: Thu, 15 Oct 2015 08:25:20 -0400 Subject: [vtkusers] Visualize Vector Field Example Wrong? In-Reply-To: <561ECBE0.9080509@sembach.de> References: <561ECBE0.9080509@sembach.de> Message-ID: On Wed, Oct 14, 2015 at 5:40 PM, Werner Sembach wrote: > > Hello, > i want to do exactly this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorField > but when you try the example code the 2nd coordinate of the vectors is completly ignored (even the picture on the wiki shows 2 parrallel vectors while in the code the vectors are (10, 10) and (-10, 5). > hope someone can help me You are right - something is wrong. As it is, I get this warning: Warning: In /home/doriad/src/VTK-6.2.0/Common/DataModel/vtkDataSetAttributes.cxx, line 1165 vtkPointData (0x23e62e0): Can not set attribute Vectors. Incorrect number of components. on this line: image->GetPointData()->SetActiveVectors("ImageScalars"); The warning is resolved if I change image->AllocateScalars(VTK_FLOAT,2); to image->AllocateScalars(VTK_FLOAT,3); I'm not sure why 2D vectors are not allowed. Something else is wrong as well, though. Once I add pixel[2] = 0.0; to each of the pixels (to prevent referencing unallocated memory), the vectors still don't behave as I'd expect. With them both set to (10,10), they both point (up, right) as expected. If I change pixel (20,20) to (10, 10), it now points (down, right), again as I'd expect. However, when I change it to (-10, -10), it points (up, right) again (where I'd expect (down, left)), and it turns red (where everything previously had been blue. Sorry I don't have an answer, but at least that should help define the problem :) David From jkts33 at yahoo.co.uk Thu Oct 15 08:36:35 2015 From: jkts33 at yahoo.co.uk (dave) Date: Thu, 15 Oct 2015 05:36:35 -0700 (MST) Subject: [vtkusers] Display Fiber Tractography .trk c# Message-ID: <1444912595963-5734428.post@n5.nabble.com> Is there any plan or has any one developed a parser or code in c# to import diffusion toolkit's tractography .trk -- View this message in context: http://vtk.1045678.n5.nabble.com/Display-Fiber-Tractography-trk-c-tp5734428.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Thu Oct 15 09:12:51 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 15 Oct 2015 09:12:51 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> Message-ID: <20151015131251.GA32585@megas.khq.kitware.com> On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: > Shouldn't the STL writer detect that its input contains non-triangles, and > **automatically** insert a triangle filter to produce correct output? Or, > at the very least, spit out an error message saying "here, insert this code > before calling Update/Write, and it will work like you want it to" ... ? Well, it used to drop vertices past the third on the floor (silently), but now it should be erroring out about non-triangles at least: commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d Author: Ben Boeckel Date: Tue Feb 25 17:16:58 2014 -0500 STLWriter: Raise an error for non-triangles The STL format only supports triangles and previously, it just truncated polygons silently. Cause an error to occur when this happens so that users know. Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf The commit is in VTK 6.2.0. > (Similarly for rendering crappy polydata using the polydata mapper: it > requires up-to-date normals to render with proper lighting and shading, and > seems like the perfect candidate for **automatically** inserting a polydata > normals filter. This might be harder to detect that the normals are not up > to date, but sure would have saved my team some time recently...) It should error out like the STL writer for bad input at the least. > Would these types of improvements be welcome additions to VTK, or am I > missing some case where you would NOT want this type of behavior? As long as it lets you know that your data is bad and that (and how) it is being fixed is warned about, I don't see any reason why such an auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or something else is a different question I don't have enough feel too strongly about). --Ben From cory.quammen at kitware.com Thu Oct 15 09:14:18 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 15 Oct 2015 09:14:18 -0400 Subject: [vtkusers] internal radiotherapy kernel In-Reply-To: <1444911827936-5734426.post@n5.nabble.com> References: <1444911827936-5734426.post@n5.nabble.com> Message-ID: Richard, If your kernel is spatially invariant, you may want to look into vtkFastSplatter [1]. Thanks, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkFastSplatter.html#a921b3de4b2b70437aa7273342fedfb74 On Thu, Oct 15, 2015 at 8:23 AM, mbcx9rb9 wrote: > Hi all, > > Im working on internal radiotherapy and, currently, I calculate my absorbed > dose information (DVH etc.) by adding a kernel (vtkImageData) at each > treatment point to a large dose grid (vtkImageData) that covers the whole > treatment region. Then I pass by vtkImageAccumulate to do the dosimetry. > > Is this the best way to do it? Because if the majority receives no absorbed > dose, it seems wasteful (in terms of memory) to have those voxels at the > same resolution as in my kernel, where I have a very steep gradient of > absorbed dose. > > Are there any other approaches? Would it, for example, be possible to store > my kernel as a vtkUnstructuredGrid and still pass it by vtkImageAccumulate > and get the same results? > > Thanks for any responses in advance. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/internal-radiotherapy-kernel-tp5734426.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 15 09:17:34 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 15 Oct 2015 09:17:34 -0400 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: <1444877291814-5734423.post@n5.nabble.com> References: <1444877291814-5734423.post@n5.nabble.com> Message-ID: I'm not sure that I can help you with this specific problem, but if you post a small, self-contained, compilable example that shows this behavior, it will make it much easier for someone to diagnose what caused the change between VTK versions. Thanks, Cory On Wed, Oct 14, 2015 at 10:48 PM, Ang wrote: > Hi all, > > in vtk 6.0, no matter using vtkImageResliceMapper or vtkImageSliceMapper I > got same result like pic2. > > But in vtk 6.3 they are different result, vtkImageResliceMapper is pic1 > and vtkImageSliceMapper is pic2. > > Could some one help me? > > Thanks. > > pic1: > > > pic2: > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 15 09:32:28 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 15 Oct 2015 09:32:28 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <20151015131251.GA32585@megas.khq.kitware.com> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: In the case of the STL writer, I could anticipate a future email to this list along the lines of "my poly data has only quads, but when I write it to an STL file and load it in XYZ viewer it has been turned into triangles. Why is this happening?" Or for the normals calculation, "I'm implementing a cutting-edge new vis algorithm with wacky normals and they are getting overwritten with plain old boring normals. Why is this happening?" I think a warning/error is definitely needed to explain what is going on in the STL writer, and Ben has provided that. That's not as clear for me in the case of autogenerating normals. Should splitting be on? What feature angle? etc. Cory On Thu, Oct 15, 2015 at 9:12 AM, Ben Boeckel wrote: > On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: > > Shouldn't the STL writer detect that its input contains non-triangles, > and > > **automatically** insert a triangle filter to produce correct output? Or, > > at the very least, spit out an error message saying "here, insert this > code > > before calling Update/Write, and it will work like you want it to" ... ? > > Well, it used to drop vertices past the third on the floor (silently), > but now it should be erroring out about non-triangles at least: > > commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d > Author: Ben Boeckel > Date: Tue Feb 25 17:16:58 2014 -0500 > > STLWriter: Raise an error for non-triangles > > The STL format only supports triangles and previously, it just > truncated polygons silently. Cause an error to occur when this > happens so that users know. > > Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf > > The commit is in VTK 6.2.0. > > > (Similarly for rendering crappy polydata using the polydata mapper: it > > requires up-to-date normals to render with proper lighting and shading, > and > > seems like the perfect candidate for **automatically** inserting a > polydata > > normals filter. This might be harder to detect that the normals are not > up > > to date, but sure would have saved my team some time recently...) > > It should error out like the STL writer for bad input at the least. > > > Would these types of improvements be welcome additions to VTK, or am I > > missing some case where you would NOT want this type of behavior? > > As long as it lets you know that your data is bad and that (and how) it > is being fixed is warned about, I don't see any reason why such an > auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or > something else is a different question I don't have enough feel too > strongly about). > > --Ben > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Oct 15 09:45:38 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 15 Oct 2015 09:45:38 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <20151015131251.GA32585@megas.khq.kitware.com> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: I think the writer should handle triangle strips. I'll take a stab at adding that functionality. On Oct 15, 2015 9:13 AM, "Ben Boeckel" wrote: > On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: > > Shouldn't the STL writer detect that its input contains non-triangles, > and > > **automatically** insert a triangle filter to produce correct output? Or, > > at the very least, spit out an error message saying "here, insert this > code > > before calling Update/Write, and it will work like you want it to" ... ? > > Well, it used to drop vertices past the third on the floor (silently), > but now it should be erroring out about non-triangles at least: > > commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d > Author: Ben Boeckel > Date: Tue Feb 25 17:16:58 2014 -0500 > > STLWriter: Raise an error for non-triangles > > The STL format only supports triangles and previously, it just > truncated polygons silently. Cause an error to occur when this > happens so that users know. > > Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf > > The commit is in VTK 6.2.0. > > > (Similarly for rendering crappy polydata using the polydata mapper: it > > requires up-to-date normals to render with proper lighting and shading, > and > > seems like the perfect candidate for **automatically** inserting a > polydata > > normals filter. This might be harder to detect that the normals are not > up > > to date, but sure would have saved my team some time recently...) > > It should error out like the STL writer for bad input at the least. > > > Would these types of improvements be welcome additions to VTK, or am I > > missing some case where you would NOT want this type of behavior? > > As long as it lets you know that your data is bad and that (and how) it > is being fixed is warned about, I don't see any reason why such an > auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or > something else is a different question I don't have enough feel too > strongly about). > > --Ben > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 15 11:52:05 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 15 Oct 2015 11:52:05 -0400 Subject: [vtkusers] internal radiotherapy kernel In-Reply-To: References: <1444911827936-5734426.post@n5.nabble.com> Message-ID: Richard, By spatially invariant, I mean that the 2D kernel function that is accumulated in the dose grid is the same no matter where the treatment point is. Is that the case? Cory On Thu, Oct 15, 2015 at 11:46 AM, Richard Brown wrote: > Cory, > > Thanks for the reply, but the kernel is not spatially invariant, it has a > sharp peak in the centre (like the image in this link: > http://www.jacmp.org/index.php/jacmp/article/viewFile/4371/3082/46375). > > Thanks, > Richard > > On 15 Oct 2015, at 15:14, Cory Quammen wrote: > > Richard, > > If your kernel is spatially invariant, you may want to look into > vtkFastSplatter [1]. > > Thanks, > Cory > > [1] > http://www.vtk.org/doc/nightly/html/classvtkFastSplatter.html#a921b3de4b2b70437aa7273342fedfb74 > > On Thu, Oct 15, 2015 at 8:23 AM, mbcx9rb9 > wrote: > >> Hi all, >> >> Im working on internal radiotherapy and, currently, I calculate my >> absorbed >> dose information (DVH etc.) by adding a kernel (vtkImageData) at each >> treatment point to a large dose grid (vtkImageData) that covers the whole >> treatment region. Then I pass by vtkImageAccumulate to do the dosimetry. >> >> Is this the best way to do it? Because if the majority receives no >> absorbed >> dose, it seems wasteful (in terms of memory) to have those voxels at the >> same resolution as in my kernel, where I have a very steep gradient of >> absorbed dose. >> >> Are there any other approaches? Would it, for example, be possible to >> store >> my kernel as a vtkUnstructuredGrid and still pass it by vtkImageAccumulate >> and get the same results? >> >> Thanks for any responses in advance. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/internal-radiotherapy-kernel-tp5734426.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 > R&D Engineer > Kitware, Inc. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dejan.zivkovic90 at gmail.com Thu Oct 15 12:04:38 2015 From: dejan.zivkovic90 at gmail.com (Dejan Zivkovic) Date: Thu, 15 Oct 2015 18:04:38 +0200 Subject: [vtkusers] Rendering with long interval Message-ID: I have (in a huge application) a vtk scene that is updated with Qt timer every 30ms (some updates and GetRenderWindowI)->Render()). This animation worked so far, and now it shows only black screen. One thing that changed is that the application does much more processing in the main thread, so these Qt update-render call is called not so often (delay is a few seconds). Is that the possible reason for just showing black screen? If the Render() method is called rarely, does the animations shows? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Oct 15 13:17:42 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 15 Oct 2015 13:17:42 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: I looked at the STLWriter code: 1) It reports an error if a polygon is not a triangle. 2) It reports nothing if there are triangle strips. At a minimum I think it should handle triangle strips. No need to run triangle filter, I'll decompose the strips on the fly. Working on a patch and a unit test. Bill On Thu, Oct 15, 2015 at 9:45 AM, Bill Lorensen wrote: > I think the writer should handle triangle strips. I'll take a stab at adding > that functionality. > > On Oct 15, 2015 9:13 AM, "Ben Boeckel" wrote: >> >> On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: >> > Shouldn't the STL writer detect that its input contains non-triangles, >> > and >> > **automatically** insert a triangle filter to produce correct output? >> > Or, >> > at the very least, spit out an error message saying "here, insert this >> > code >> > before calling Update/Write, and it will work like you want it to" ... ? >> >> Well, it used to drop vertices past the third on the floor (silently), >> but now it should be erroring out about non-triangles at least: >> >> commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d >> Author: Ben Boeckel >> Date: Tue Feb 25 17:16:58 2014 -0500 >> >> STLWriter: Raise an error for non-triangles >> >> The STL format only supports triangles and previously, it just >> truncated polygons silently. Cause an error to occur when this >> happens so that users know. >> >> Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf >> >> The commit is in VTK 6.2.0. >> >> > (Similarly for rendering crappy polydata using the polydata mapper: it >> > requires up-to-date normals to render with proper lighting and shading, >> > and >> > seems like the perfect candidate for **automatically** inserting a >> > polydata >> > normals filter. This might be harder to detect that the normals are not >> > up >> > to date, but sure would have saved my team some time recently...) >> >> It should error out like the STL writer for bad input at the least. >> >> > Would these types of improvements be welcome additions to VTK, or am I >> > missing some case where you would NOT want this type of behavior? >> >> As long as it lets you know that your data is bad and that (and how) it >> is being fixed is warned about, I don't see any reason why such an >> auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or >> something else is a different question I don't have enough feel too >> strongly about). >> >> --Ben >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From dzenanz at gmail.com Thu Oct 15 14:30:45 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 15 Oct 2015 14:30:45 -0400 Subject: [vtkusers] [ITK-users] How to connect ITK 4.x and VTK 6.x using Python? In-Reply-To: <1444887360102.82973@sphic.org.cn> References: <1444887360102.82973@sphic.org.cn> Message-ID: Hi Shen, There is a solution to ITK-VTK connection, itk::ImageToVTKImageFilter . Here are couple of examples in C++: http://www.itk.org/Wiki/VTK/ExamplesBoneYard/Cxx/VolumeRendering/itkVtkImageConvert http://www.itk.org/Wiki/ITK/Examples/WishList/IO/itkVtkImageConvertDICOM HTH On Thu, Oct 15, 2015 at 1:35 AM, ??? wrote: > ?Hi all, > > > Is there a solution to connect ITK 4.x and VTK 6.x using Python? It would > be greatly appreciated if someone could provide me an example. Thanks in > advanced. > > > Regards, > > > Zhuangming Shen > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Thu Oct 15 15:31:05 2015 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Thu, 15 Oct 2015 12:31:05 -0700 (MST) Subject: [vtkusers] How can I hide vtkCaptionActor2D? In-Reply-To: References: <1444756361745-5734394.post@n5.nabble.com> Message-ID: <1444937465693-5734441.post@n5.nabble.com> Thanks for the hint with the vtkSelectVisiblePoints class. This is very helpful! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-hide-vtkCaptionActor2D-tp5734394p5734441.html Sent from the VTK - Users mailing list archive at Nabble.com. From guillegiraldo at gmail.com Thu Oct 15 15:47:12 2015 From: guillegiraldo at gmail.com (Guillermo Giraldo) Date: Thu, 15 Oct 2015 19:47:12 +0000 Subject: [vtkusers] Set Scalar Component Message-ID: Hi to all, I am reading a vtk data file, containing finite element results. As such, it contains an unstructured grid and several scalars, defined for example as: SCALARS Nodal_stress float 6 LOOKUP_TABLE default 0.2075E+02 0.3887E+00 0.0000E+00 -0.2607E+00 0.0000E+00 0.0000E+00 ..... I am able to read the data file, get the number and names of scalars and vectors and display a colormap plot from any of the scalars using a pipeline with the following classes: 1- vtkDataSetReader 2- vtkDataSetMapper 3- vtkActor I select the scalar to display with the method vtkDataSetReader.SetScalarsName(), but this way I can only display the first component of the scalar (from the six in the example). My question is, how can I select any other component than the first from the scalars data? -- Por favor confirmar recepci?n. Atte. Guillermo E. Giraldo Fernandez Cel. 301 628 6730 Colombia - Suram?rica -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Thu Oct 15 16:13:17 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Thu, 15 Oct 2015 16:13:17 -0400 Subject: [vtkusers] Reference counting in 6.3 Message-ID: <562008DD.9050908@rhpcs.mcmaster.ca> Hello, I find, in debug mode, that the ReferenceCount of a vtkImageEllipsoidSource object becomes 2 right after being initiated (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could this happen? My second question is --- when you make a connection A->SetInputConnection(B->GetOutputPort()); Whose reference count will be increased by 1, A or B? I think B's reference count should be increased because it is used by A. But what I find is just the opposite. My third question is about setting up more than 1 connection for a filter. Taking vtkImageMathematics as an example, I do vtkImageMathematics* A = vtkImageMathematics::New(); A->SetInputConnection(0, B1->GetOutputPort(); A->SetInputConnection(0, B2->GetOutputPort(); I find that the reference count of A gets increased by the first SetInputConnection() call only. Can someone explain how reference counting works in VTK? Thanks. Best, Weiguang From ysa0829 at gmail.com Thu Oct 15 22:21:51 2015 From: ysa0829 at gmail.com (Ang) Date: Thu, 15 Oct 2015 19:21:51 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> Message-ID: <1444962111662-5734444.post@n5.nabble.com> Hi Cory, Below is my example . In vtk 6.0, click right mouse down and move mouse the image position is still in the center, but do the same thing in vtk 6.3, the image position will be changed when you click down and move. Please have a check, thanks for your assistance. ////////////////////////////////////////////////////////////////////////////////////////////// vtkRenderWindow *renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New(); vtkRenderer *renderer = vtkRenderer::New(); vtkInteractorStyleImage *styleImage = vtkInteractorStyleImage::New(); styleImage->SetInteractionModeToImageSlicing(); interactor->SetInteractorStyle(styleImage); renWin->SetInteractor(interactor); renWin->AddRenderer(renderer); renderer->SetBackground(1, 0, 0); vtkImageResliceMapper *resliceMapper = vtkImageResliceMapper::New(); vtkImageSlice *imageSlice = vtkImageSlice::New(); vtkImageData *img = vtkImageData::New(); img->SetDimensions(50, 50, 50); img->AllocateScalars(VTK_UNSIGNED_CHAR, 1); img->SetSpacing(1, 1, 1); for (int z = 0; z < img->GetDimensions()[2]; z++) { for (int x = 0; x < img->GetDimensions()[0]; x++) { for (int y = 0; y < img->GetDimensions()[1]; y++) { unsigned char *pixel = static_cast(img->GetScalarPointer(x, y, z)); int c0 = img->GetDimensions()[0] / 2; int c1 = img->GetDimensions()[1] / 2; int c2 = img->GetDimensions()[2] / 2; double pointX = (x - c0)*(x - c0); double pointY = (y - c1)*(y - c1); double pointZ = (z - c2)*(z - c2); if (pointX + pointY + pointZ < 15 * 15) { *pixel = 255; } else { *pixel = 0; } } } } imageSlice->SetMapper(resliceMapper); resliceMapper->SetInputData(img); //set reslice plane to sagittal resliceMapper->GetSlicePlane()->SetNormal(1, 0, 0); resliceMapper->GetSlicePlane()->SetOrigin(25, 0, 0); // set plane to middle //set camera to sagittal orientation renderer->GetActiveCamera()->SetFocalPoint(0, 25, 25); renderer->GetActiveCamera()->SetPosition(200, 25, 25); renderer->GetActiveCamera()->SetViewUp(0, 0, 1); renderer->GetActiveCamera()->SetParallelScale(75); renderer->GetActiveCamera()->ParallelProjectionOn(); renderer->AddActor(imageSlice); renWin->Render(); interactor->Start(); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734444.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Fri Oct 16 03:10:06 2015 From: richard.j.brown at live.co.uk (Richard Brown) Date: Fri, 16 Oct 2015 09:10:06 +0200 Subject: [vtkusers] internal radiotherapy kernel In-Reply-To: References: <1444911827936-5734426.post@n5.nabble.com> Message-ID: Cory, Yes, that is an assumption we?re going with (but it is a 3D kernel function). I?ll take a look at vtkFastSplatter then. Cheers, Richard > On 15 Oct 2015, at 17:52, Cory Quammen wrote: > > Richard, > > By spatially invariant, I mean that the 2D kernel function that is accumulated in the dose grid is the same no matter where the treatment point is. Is that the case? > > Cory > > On Thu, Oct 15, 2015 at 11:46 AM, Richard Brown > wrote: > Cory, > > Thanks for the reply, but the kernel is not spatially invariant, it has a sharp peak in the centre (like the image in this link: http://www.jacmp.org/index.php/jacmp/article/viewFile/4371/3082/46375 ). > > Thanks, > Richard > >> On 15 Oct 2015, at 15:14, Cory Quammen > wrote: >> >> Richard, >> >> If your kernel is spatially invariant, you may want to look into vtkFastSplatter [1]. >> >> Thanks, >> Cory >> >> [1] http://www.vtk.org/doc/nightly/html/classvtkFastSplatter.html#a921b3de4b2b70437aa7273342fedfb74 >> >> On Thu, Oct 15, 2015 at 8:23 AM, mbcx9rb9 > wrote: >> Hi all, >> >> Im working on internal radiotherapy and, currently, I calculate my absorbed >> dose information (DVH etc.) by adding a kernel (vtkImageData) at each >> treatment point to a large dose grid (vtkImageData) that covers the whole >> treatment region. Then I pass by vtkImageAccumulate to do the dosimetry. >> >> Is this the best way to do it? Because if the majority receives no absorbed >> dose, it seems wasteful (in terms of memory) to have those voxels at the >> same resolution as in my kernel, where I have a very steep gradient of >> absorbed dose. >> >> Are there any other approaches? Would it, for example, be possible to store >> my kernel as a vtkUnstructuredGrid and still pass it by vtkImageAccumulate >> and get the same results? >> >> Thanks for any responses in advance. >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/internal-radiotherapy-kernel-tp5734426.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 >> R&D Engineer >> Kitware, Inc. > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Fri Oct 16 07:09:22 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Fri, 16 Oct 2015 13:09:22 +0200 Subject: [vtkusers] effect of StopWhenEndReached in vtkDijkstraGraphGeodesicPath and edge-weights Message-ID: <5620DAE2.2000804@mh-hannover.de> Dear mailing list members, I'm wondering about the StopWhenEndReached switch of vtkDijkstraGraphGeodesicPath. As much as I understand from looking at its code it seems to me that with StopWhenEndReachedOff() the shortest paths to all vertices are computed but TraceShortestPath only outputs the one from startv to endv and disregards all other computed paths no matter what StopWhenEndReached is set to. Is that correct/intended? Is the filter using the previously calculated heap (with StopWhenEndReachedOff()) if startv stays the same but endv is changed to get another shortest path? Is my understanding correct that the filter by default uses the Euclidean distance between points as weights (Distance2BetweenPoints in CalculateStaticEdgeCost) and not the number of nodes? Would I need to modify vtkDijkstraGraphGeodesicPath itself to use other edge/line weights, i.e. all constant? Any help or hints are very much appreciated Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From bill.lorensen at gmail.com Fri Oct 16 13:51:44 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 16 Oct 2015 13:51:44 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: I just submitted a merge request to add triangle strips to the writer. https://gitlab.kitware.com/vtk/vtk/merge_requests/777 Dave C., I did not see your name as a reviewer on the gitlab site. Bill On Thu, Oct 15, 2015 at 1:17 PM, Bill Lorensen wrote: > I looked at the STLWriter code: > > 1) It reports an error if a polygon is not a triangle. > 2) It reports nothing if there are triangle strips. > > At a minimum I think it should handle triangle strips. No need to run > triangle filter, I'll decompose the strips on the fly. > > Working on a patch and a unit test. > > Bill > > On Thu, Oct 15, 2015 at 9:45 AM, Bill Lorensen wrote: >> I think the writer should handle triangle strips. I'll take a stab at adding >> that functionality. >> >> On Oct 15, 2015 9:13 AM, "Ben Boeckel" wrote: >>> >>> On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: >>> > Shouldn't the STL writer detect that its input contains non-triangles, >>> > and >>> > **automatically** insert a triangle filter to produce correct output? >>> > Or, >>> > at the very least, spit out an error message saying "here, insert this >>> > code >>> > before calling Update/Write, and it will work like you want it to" ... ? >>> >>> Well, it used to drop vertices past the third on the floor (silently), >>> but now it should be erroring out about non-triangles at least: >>> >>> commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d >>> Author: Ben Boeckel >>> Date: Tue Feb 25 17:16:58 2014 -0500 >>> >>> STLWriter: Raise an error for non-triangles >>> >>> The STL format only supports triangles and previously, it just >>> truncated polygons silently. Cause an error to occur when this >>> happens so that users know. >>> >>> Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf >>> >>> The commit is in VTK 6.2.0. >>> >>> > (Similarly for rendering crappy polydata using the polydata mapper: it >>> > requires up-to-date normals to render with proper lighting and shading, >>> > and >>> > seems like the perfect candidate for **automatically** inserting a >>> > polydata >>> > normals filter. This might be harder to detect that the normals are not >>> > up >>> > to date, but sure would have saved my team some time recently...) >>> >>> It should error out like the STL writer for bad input at the least. >>> >>> > Would these types of improvements be welcome additions to VTK, or am I >>> > missing some case where you would NOT want this type of behavior? >>> >>> As long as it lets you know that your data is bad and that (and how) it >>> is being fixed is warned about, I don't see any reason why such an >>> auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or >>> something else is a different question I don't have enough feel too >>> strongly about). >>> >>> --Ben >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From aashish.chaudhary at kitware.com Fri Oct 16 14:52:30 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 16 Oct 2015 14:52:30 -0400 Subject: [vtkusers] Problem of GPURenderDemo (vtkSmartVolumeMapper) In-Reply-To: <1444645084196-5734363.post@n5.nabble.com> References: <1444642981398-5734362.post@n5.nabble.com> <1444645084196-5734363.post@n5.nabble.com> Message-ID: Dear Lachen, Sorry, somehow I didn't see this email earlier, You can use vtkOutlineFilter to draw the outlines of a volume. Some of the volume rendering tests are doing it so if you don't find it, let me know. Yes it is a cube which is sub-divided because of performance reasoning (specifically on Windows system). Please let me know if you have some more questions. Thanks for using OpenGL2 version. Thanks, On Mon, Oct 12, 2015 at 6:18 AM, LaChen wrote: > Hi, > > Sorry, I think first problem is my fault. > > But I still don't know the second problem even if I try the draw outline of > each polygon. > > If someone know, please give me some information. > > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Problem-of-GPURenderDemo-vtkSmartVolumeMapper-tp5734362p5734363.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmcd at usgs.gov Fri Oct 16 20:42:48 2015 From: rmcd at usgs.gov (McDonald, Richard) Date: Fri, 16 Oct 2015 18:42:48 -0600 Subject: [vtkusers] Error using vtk.numpy_interface.algorithms - volume Message-ID: Hello, I've got a short VTK python code that I'm using the test the vtk.numpy_interface.algorithms. It follows from an example in a paper Cory Quammen wrote for 14th Python in Science Conference ("Scientific Data Analysis and Visualization with Python, VTK, and Paraview"). I've got a numerical simulation of flow in a river saved as a vtk file. It's a 3D solution and I'd really like to get the volume of all the cells in the grid. I've tried the following example using the vtk-6.2.0-cp27-none-win_amd64.whl distribution from the Christoph Gohlke website and I've also tried it using the VTK 6.3 standalone version of python. The error is the same (AttributeError: VTKObject) that occurs in the internal_algorithms.py", line 90, in _cell_quality ds.CopyStructure(dataset.VTKObject). The code is below and the terminal output follows. Any help would be greatly appreciated. Also, any other suggestions for calculating the volume of cells in an VTKStructuredGrid would also be appreciated. Thanks, Rich import vtk import vtk.numpy_interface.algorithms as algs from vtk.numpy_interface import dataset_adapter as dsa import numpy as np import vtk.util.numpy_support as nps file_name3Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_3D_ASCII1.vtk' file_name2Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_2D_ASCII1.vtk' vtkSGrid3D = vtk.vtkStructuredGrid() reader3D = vtk.vtkStructuredGridReader() reader3D.SetFileName(file_name3Da) reader3D.SetOutput(vtkSGrid3D) reader3D.Update() # Needed because of GetScalarRange output3D = reader3D.GetOutput() #use vtk.numpy interface #ds = dsa.WrapDataObject(reader3D.GetOutput()) ds = reader3D.GetOutput() pd = ds.GetPointData() Velocity = pd.GetArray("Velocity (magnitude)") np_Velocity = nps.vtk_to_numpy(Velocity) min_v = np.min(np_Velocity) max_v = np.max(np_Velocity) print min_v, max_v cell_volumes = algs.volume(ds) print cell_volumes Terminal output: "C:\VTK 6.3.0\bin\python.exe" "C:/Python Projects/Arcrom/TestVTKNumpy.py" Traceback (most recent call last): File "C:/Python Projects/Arcrom/TestVTKNumpy.py", line 29, in cell_volumes = algs.volume(ds) 0.0 1.64687 File "C:\Python27\Lib\site-packages\vtk\numpy_interface\algorithms.py", line 130, in new_dsfunc2 return dsfunc(ds) File "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", line 484, in volume return _cell_quality(dataset, "volume") File "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", line 90, in _cell_quality ds.CopyStructure(dataset.VTKObject) AttributeError: VTKObject -- Richard McDonald Hydrologist U.S. Geological Survey Geomorphology and Sediment Transport Laboratory 4620 Technology Drive, Golden, CO 80403 rmcd at usgs.gov 303-278-7952 -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sat Oct 17 11:39:34 2015 From: DLRdave at aol.com (David Cole) Date: Sat, 17 Oct 2015 11:39:34 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: Thanks Bill! I'm dlrdave on the gitlab site. Looks like Ben added me as a reviewer. D On Friday, October 16, 2015, Bill Lorensen wrote: > I just submitted a merge request to add triangle strips to the writer. > https://gitlab.kitware.com/vtk/vtk/merge_requests/777 > > Dave C., I did not see your name as a reviewer on the gitlab site. > > Bill > > On Thu, Oct 15, 2015 at 1:17 PM, Bill Lorensen > wrote: > > I looked at the STLWriter code: > > > > 1) It reports an error if a polygon is not a triangle. > > 2) It reports nothing if there are triangle strips. > > > > At a minimum I think it should handle triangle strips. No need to run > > triangle filter, I'll decompose the strips on the fly. > > > > Working on a patch and a unit test. > > > > Bill > > > > On Thu, Oct 15, 2015 at 9:45 AM, Bill Lorensen > wrote: > >> I think the writer should handle triangle strips. I'll take a stab at > adding > >> that functionality. > >> > >> On Oct 15, 2015 9:13 AM, "Ben Boeckel" > wrote: > >>> > >>> On Wed, Oct 14, 2015 at 22:34:25 -0400, David Cole via vtkusers wrote: > >>> > Shouldn't the STL writer detect that its input contains > non-triangles, > >>> > and > >>> > **automatically** insert a triangle filter to produce correct output? > >>> > Or, > >>> > at the very least, spit out an error message saying "here, insert > this > >>> > code > >>> > before calling Update/Write, and it will work like you want it to" > ... ? > >>> > >>> Well, it used to drop vertices past the third on the floor (silently), > >>> but now it should be erroring out about non-triangles at least: > >>> > >>> commit 9a00db82900bd15442cc471143c4e5dd1ac09a2d > >>> Author: Ben Boeckel > > >>> Date: Tue Feb 25 17:16:58 2014 -0500 > >>> > >>> STLWriter: Raise an error for non-triangles > >>> > >>> The STL format only supports triangles and previously, it just > >>> truncated polygons silently. Cause an error to occur when this > >>> happens so that users know. > >>> > >>> Change-Id: I9c2f96d887074943130a8442d6796cb0c2ce1bbf > >>> > >>> The commit is in VTK 6.2.0. > >>> > >>> > (Similarly for rendering crappy polydata using the polydata mapper: > it > >>> > requires up-to-date normals to render with proper lighting and > shading, > >>> > and > >>> > seems like the perfect candidate for **automatically** inserting a > >>> > polydata > >>> > normals filter. This might be harder to detect that the normals are > not > >>> > up > >>> > to date, but sure would have saved my team some time recently...) > >>> > >>> It should error out like the STL writer for bad input at the least. > >>> > >>> > Would these types of improvements be welcome additions to VTK, or am > I > >>> > missing some case where you would NOT want this type of behavior? > >>> > >>> As long as it lets you know that your data is bad and that (and how) it > >>> is being fixed is warned about, I don't see any reason why such an > >>> auto-fixer filter couldn't exist (whether it is named vtkSTLWriter or > >>> something else is a different question I don't have enough feel too > >>> strongly about). > >>> > >>> --Ben > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner at sembach.de Sat Oct 17 17:48:11 2015 From: werner at sembach.de (Werner Sembach) Date: Sat, 17 Oct 2015 23:48:11 +0200 Subject: [vtkusers] Visualize Vector Field Example Wrong? In-Reply-To: References: <561ECBE0.9080509@sembach.de> Message-ID: <5622C21B.7070307@sembach.de> yes i can reproduce the error and now i'm even more confused (-10,5) behaves like (10,-5) Am 15.10.2015 um 14:25 schrieb David Doria: > On Wed, Oct 14, 2015 at 5:40 PM, Werner Sembach wrote: >> Hello, >> i want to do exactly this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorField >> but when you try the example code the 2nd coordinate of the vectors is completly ignored (even the picture on the wiki shows 2 parrallel vectors while in the code the vectors are (10, 10) and (-10, 5). >> hope someone can help me > You are right - something is wrong. As it is, I get this warning: > > Warning: In /home/doriad/src/VTK-6.2.0/Common/DataModel/vtkDataSetAttributes.cxx, > line 1165 > vtkPointData (0x23e62e0): Can not set attribute Vectors. Incorrect > number of components. > > on this line: > > image->GetPointData()->SetActiveVectors("ImageScalars"); > > The warning is resolved if I change > > image->AllocateScalars(VTK_FLOAT,2); > > to > > image->AllocateScalars(VTK_FLOAT,3); > > I'm not sure why 2D vectors are not allowed. > > Something else is wrong as well, though. Once I add pixel[2] = 0.0; to > each of the pixels (to prevent referencing unallocated memory), the > vectors still don't behave as I'd expect. With them both set to > (10,10), they both point (up, right) as expected. If I change pixel > (20,20) to (10, 10), it now points (down, right), again as I'd expect. > However, when I change it to (-10, -10), it points (up, right) again > (where I'd expect (down, left)), and it turns red (where everything > previously had been blue. > > Sorry I don't have an answer, but at least that should help define the > problem :) > > David From kostadus at yahoo.com Sun Oct 18 07:42:25 2015 From: kostadus at yahoo.com (kostadus) Date: Sun, 18 Oct 2015 04:42:25 -0700 (MST) Subject: [vtkusers] Pass class object to VTK class Message-ID: <1445168545393-5734456.post@n5.nabble.com> Dear VTK users, my question is rather general since I am new to VTK and using library tools for programming. Currently in my script I am loading a mhd image using a class I wrote and I want to apply on this image some funtions of VTK. My question is how i can pass the data of my loaded object to a vtk image class object? I hope I could get some help. Thank you very much, Konstantinos. -- View this message in context: http://vtk.1045678.n5.nabble.com/Pass-class-object-to-VTK-class-tp5734456.html Sent from the VTK - Users mailing list archive at Nabble.com. From julian-chia at imre.a-star.edu.sg Sun Oct 18 19:41:55 2015 From: julian-chia at imre.a-star.edu.sg (Julian CHIA Yan Hon (IMRE)) Date: Mon, 19 Oct 2015 07:41:55 +0800 Subject: [vtkusers] Pls unsubscribe me. Message-ID: <1C90F823E23FD744BF3C4183132321F36B21DBCBBE@S3-EXCHMB03.shared-svc.local> 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 or the sender. Institute of Materials Research and Engineering - http://www.imre.a-star.edu.sg -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 19 09:33:34 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 19 Oct 2015 09:33:34 -0400 Subject: [vtkusers] Pass class object to VTK class In-Reply-To: <1445168545393-5734456.post@n5.nabble.com> References: <1445168545393-5734456.post@n5.nabble.com> Message-ID: See vtkImageImport [1]. You may also consider reading the MHD file directly with vtkMetaImageReader [2]. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkImageImport.html [2] http://www.vtk.org/doc/nightly/html/classvtkMetaImageReader.html On Sun, Oct 18, 2015 at 7:42 AM, kostadus via vtkusers wrote: > Dear VTK users, > my question is rather general since I am new to VTK and using library tools > for programming. Currently in my script I am loading a mhd image using a > class I wrote and I want to apply on this image some funtions of VTK. My > question is how i can pass the data of my loaded object to a vtk image > class > object? I hope I could get some help. > > Thank you very much, > Konstantinos. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Pass-class-object-to-VTK-class-tp5734456.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 19 10:38:42 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 19 Oct 2015 10:38:42 -0400 Subject: [vtkusers] Error using vtk.numpy_interface.algorithms - volume In-Reply-To: References: Message-ID: Hi Richard, It looks like you need to wrap your VTK data object, i.e., cell_volumes = algs.volume(dsa.WrapDataObject(ds)) This wraps the VTK object in an object that can be passed into the functions in the numpy_interface.algorithms module. It looks like you had this in the code, but commented it out. Did wrapping the VTK object not work? Thanks, Cory On Fri, Oct 16, 2015 at 8:42 PM, McDonald, Richard wrote: > Hello, > I've got a short VTK python code that I'm using the test the > vtk.numpy_interface.algorithms. It follows from an example in a paper Cory > Quammen wrote for 14th Python in Science Conference ("Scientific Data > Analysis and Visualization with Python, VTK, and Paraview"). I've got a > numerical simulation of flow in a river saved as a vtk file. It's a 3D > solution and I'd really like to get the volume of all the cells in the > grid. I've tried the following example using the > vtk-6.2.0-cp27-none-win_amd64.whl distribution from the Christoph Gohlke > website and I've also tried it using the VTK 6.3 standalone version of > python. The error is the same (AttributeError: VTKObject) that occurs in > the internal_algorithms.py", line 90, in _cell_quality > ds.CopyStructure(dataset.VTKObject). The code is below and the > terminal output follows. > > Any help would be greatly appreciated. Also, any other suggestions for > calculating the volume of cells in an VTKStructuredGrid would also be > appreciated. > > Thanks, > > Rich > > import vtk > import vtk.numpy_interface.algorithms as algs > from vtk.numpy_interface import dataset_adapter as dsa > import numpy as np > import vtk.util.numpy_support as nps > > file_name3Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_3D_ASCII1.vtk' > file_name2Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_2D_ASCII1.vtk' > vtkSGrid3D = vtk.vtkStructuredGrid() > reader3D = vtk.vtkStructuredGridReader() > reader3D.SetFileName(file_name3Da) > reader3D.SetOutput(vtkSGrid3D) > reader3D.Update() # Needed because of GetScalarRange > output3D = reader3D.GetOutput() > > #use vtk.numpy interface > #ds = dsa.WrapDataObject(reader3D.GetOutput()) > > ds = reader3D.GetOutput() > pd = ds.GetPointData() > Velocity = pd.GetArray("Velocity (magnitude)") > np_Velocity = nps.vtk_to_numpy(Velocity) > min_v = np.min(np_Velocity) > max_v = np.max(np_Velocity) > > print min_v, max_v > > cell_volumes = algs.volume(ds) > print cell_volumes > > Terminal output: > > "C:\VTK 6.3.0\bin\python.exe" "C:/Python Projects/Arcrom/TestVTKNumpy.py" > Traceback (most recent call last): > File "C:/Python Projects/Arcrom/TestVTKNumpy.py", line 29, in > cell_volumes = algs.volume(ds) > 0.0 1.64687 > File "C:\Python27\Lib\site-packages\vtk\numpy_interface\algorithms.py", > line 130, in new_dsfunc2 > return dsfunc(ds) > File > "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", > line 484, in volume > return _cell_quality(dataset, "volume") > File > "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", > line 90, in _cell_quality > ds.CopyStructure(dataset.VTKObject) > AttributeError: VTKObject > > -- > Richard McDonald > Hydrologist > U.S. Geological Survey > Geomorphology and Sediment Transport Laboratory > 4620 Technology Drive, Golden, CO 80403 > rmcd at usgs.gov > 303-278-7952 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 19 10:57:12 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 19 Oct 2015 08:57:12 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: <1444962111662-5734444.post@n5.nabble.com> References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> Message-ID: Hi Ang, I tried your code with the VTK master branch and I didn't see any problem. When I clicked on the image and moved the mouse, the image did not jump to a new position. I can try this again with VTK 6.3, but probably not today. You expect the image to stay centered in the window, correct? - David On Thu, Oct 15, 2015 at 8:21 PM, Ang wrote: > Hi Cory, > > Below is my example . > > In vtk 6.0, click right mouse down and move mouse the image position is > still in the center, > > but do the same thing in vtk 6.3, the image position will be changed when > you click down and move. > > Please have a check, thanks for your assistance. > > > ////////////////////////////////////////////////////////////////////////////////////////////// > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > vtkRenderWindowInteractor *interactor = > vtkRenderWindowInteractor::New(); > vtkRenderer *renderer = vtkRenderer::New(); > vtkInteractorStyleImage *styleImage = > vtkInteractorStyleImage::New(); > styleImage->SetInteractionModeToImageSlicing(); > interactor->SetInteractorStyle(styleImage); > renWin->SetInteractor(interactor); > renWin->AddRenderer(renderer); > renderer->SetBackground(1, 0, 0); > > > vtkImageResliceMapper *resliceMapper = > vtkImageResliceMapper::New(); > vtkImageSlice *imageSlice = vtkImageSlice::New(); > vtkImageData *img = vtkImageData::New(); > img->SetDimensions(50, 50, 50); > img->AllocateScalars(VTK_UNSIGNED_CHAR, 1); > img->SetSpacing(1, 1, 1); > > for (int z = 0; z < img->GetDimensions()[2]; z++) > { > for (int x = 0; x < img->GetDimensions()[0]; x++) > { > for (int y = 0; y < img->GetDimensions()[1]; y++) > { > unsigned char *pixel = static_cast char*>(img->GetScalarPointer(x, y, z)); > > int c0 = img->GetDimensions()[0] / 2; > int c1 = img->GetDimensions()[1] / 2; > int c2 = img->GetDimensions()[2] / 2; > double pointX = (x - c0)*(x - c0); > double pointY = (y - c1)*(y - c1); > double pointZ = (z - c2)*(z - c2); > if (pointX + pointY + pointZ < 15 * 15) > { > *pixel = 255; > } > else > { > *pixel = 0; > } > } > } > } > > > > imageSlice->SetMapper(resliceMapper); > resliceMapper->SetInputData(img); > //set reslice plane to sagittal > resliceMapper->GetSlicePlane()->SetNormal(1, 0, 0); > resliceMapper->GetSlicePlane()->SetOrigin(25, 0, 0); // set plane > to middle > > //set camera to sagittal orientation > renderer->GetActiveCamera()->SetFocalPoint(0, 25, 25); > renderer->GetActiveCamera()->SetPosition(200, 25, 25); > renderer->GetActiveCamera()->SetViewUp(0, 0, 1); > renderer->GetActiveCamera()->SetParallelScale(75); > renderer->GetActiveCamera()->ParallelProjectionOn(); > > renderer->AddActor(imageSlice); > > renWin->Render(); > interactor->Start(); > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Mon Oct 19 12:23:05 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 19 Oct 2015 10:23:05 -0600 Subject: [vtkusers] Time Data in Exodus files Message-ID: How do you extract the times (not timesteps) from ExodusIIReader? I am using VTK6.3 python bindings. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transient.e Type: application/octet-stream Size: 56572 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: exodus_time.py Type: text/x-python-script Size: 249 bytes Desc: not available URL: From david.thompson at kitware.com Mon Oct 19 12:39:13 2015 From: david.thompson at kitware.com (David Thompson) Date: Mon, 19 Oct 2015 12:39:13 -0400 Subject: [vtkusers] Time Data in Exodus files In-Reply-To: References: Message-ID: > How do you extract the times (not timesteps) from ExodusIIReader? I am using VTK6.3 python bindings. The reader's output information will have the vtkStreamingDemandDrivenPipeline::TIME_STEPS() key set to a vector of double values that are the time steps. You can ask the reader for its executive, obtain the output information from it, and get the value of the TIME_STEPS key from that. It will only be valid after UpdateInformation() has been called on the reader. David From andrew.slaughter at inl.gov Mon Oct 19 13:54:50 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 19 Oct 2015 11:54:50 -0600 Subject: [vtkusers] Time Data in Exodus files In-Reply-To: References: Message-ID: Thanks that helped me figure it out, and I would of never found this on my own. Here is what I needed to do. info = reader.GetExecutive().GetOutputInformation().GetInformationObject(0) key = vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS() # info.Get(key) produces an error, not sure why. n = info.Length(key) times = [0]*n for i in range(n): times[i] = info.Get(key, i) print times On Mon, Oct 19, 2015 at 10:39 AM, David Thompson wrote: > > How do you extract the times (not timesteps) from ExodusIIReader? I am > using VTK6.3 python bindings. > > The reader's output information will have the > vtkStreamingDemandDrivenPipeline::TIME_STEPS() key set to a vector of > double values that are the time steps. You can ask the reader for its > executive, obtain the output information from it, and get the value of the > TIME_STEPS key from that. It will only be valid after UpdateInformation() > has been called on the reader. > > David -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmcd at usgs.gov Mon Oct 19 18:15:23 2015 From: rmcd at usgs.gov (McDonald, Richard) Date: Mon, 19 Oct 2015 16:15:23 -0600 Subject: [vtkusers] Error using vtk.numpy_interface.algorithms - volume In-Reply-To: References: Message-ID: Thanks Cory, My fault - I skimmed your article too quickly and didn't understand that the wrapping provided access to the numpy_interface.algorithms module. I appreciate the response. The following works: #use vtk.numpy interface ds = dsa.WrapDataObject(reader3D.GetOutput()) #ds = reader3D.GetOutput() pd = ds.GetPointData() Velocity = pd.GetArray("Velocity (magnitude)") np_Velocity = nps.vtk_to_numpy(Velocity) min_v = np.min(np_Velocity) max_v = np.max(np_Velocity) print min_v, max_v cell_volumes = algs.volume(ds) print cell_volumes On Mon, Oct 19, 2015 at 8:38 AM, Cory Quammen wrote: > Hi Richard, > > It looks like you need to wrap your VTK data object, i.e., > > cell_volumes = algs.volume(dsa.WrapDataObject(ds)) > > This wraps the VTK object in an object that can be passed into the > functions in the numpy_interface.algorithms module. > > It looks like you had this in the code, but commented it out. Did wrapping > the VTK object not work? > > Thanks, > Cory > > > On Fri, Oct 16, 2015 at 8:42 PM, McDonald, Richard wrote: > >> Hello, >> I've got a short VTK python code that I'm using the test the >> vtk.numpy_interface.algorithms. It follows from an example in a paper Cory >> Quammen wrote for 14th Python in Science Conference ("Scientific Data >> Analysis and Visualization with Python, VTK, and Paraview"). I've got a >> numerical simulation of flow in a river saved as a vtk file. It's a 3D >> solution and I'd really like to get the volume of all the cells in the >> grid. I've tried the following example using the >> vtk-6.2.0-cp27-none-win_amd64.whl distribution from the Christoph Gohlke >> website and I've also tried it using the VTK 6.3 standalone version of >> python. The error is the same (AttributeError: VTKObject) that occurs in >> the internal_algorithms.py", line 90, in _cell_quality >> ds.CopyStructure(dataset.VTKObject). The code is below and the >> terminal output follows. >> >> Any help would be greatly appreciated. Also, any other suggestions for >> calculating the volume of cells in an VTKStructuredGrid would also be >> appreciated. >> >> Thanks, >> >> Rich >> >> import vtk >> import vtk.numpy_interface.algorithms as algs >> from vtk.numpy_interface import dataset_adapter as dsa >> import numpy as np >> import vtk.util.numpy_support as nps >> >> file_name3Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_3D_ASCII1.vtk' >> file_name2Da = r'E:\RMCD_KOOTENAI_DRIVE_BACKUP\Arcrom\PartTrack\Result_VTK_2D_ASCII1.vtk' >> vtkSGrid3D = vtk.vtkStructuredGrid() >> reader3D = vtk.vtkStructuredGridReader() >> reader3D.SetFileName(file_name3Da) >> reader3D.SetOutput(vtkSGrid3D) >> reader3D.Update() # Needed because of GetScalarRange >> output3D = reader3D.GetOutput() >> >> #use vtk.numpy interface >> #ds = dsa.WrapDataObject(reader3D.GetOutput()) >> >> ds = reader3D.GetOutput() >> pd = ds.GetPointData() >> Velocity = pd.GetArray("Velocity (magnitude)") >> np_Velocity = nps.vtk_to_numpy(Velocity) >> min_v = np.min(np_Velocity) >> max_v = np.max(np_Velocity) >> >> print min_v, max_v >> >> cell_volumes = algs.volume(ds) >> print cell_volumes >> >> Terminal output: >> >> "C:\VTK 6.3.0\bin\python.exe" "C:/Python Projects/Arcrom/TestVTKNumpy.py" >> Traceback (most recent call last): >> File "C:/Python Projects/Arcrom/TestVTKNumpy.py", line 29, in >> cell_volumes = algs.volume(ds) >> 0.0 1.64687 >> File "C:\Python27\Lib\site-packages\vtk\numpy_interface\algorithms.py", >> line 130, in new_dsfunc2 >> return dsfunc(ds) >> File >> "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", >> line 484, in volume >> return _cell_quality(dataset, "volume") >> File >> "C:\Python27\Lib\site-packages\vtk\numpy_interface\internal_algorithms.py", >> line 90, in _cell_quality >> ds.CopyStructure(dataset.VTKObject) >> AttributeError: VTKObject >> >> -- >> Richard McDonald >> Hydrologist >> U.S. Geological Survey >> Geomorphology and Sediment Transport Laboratory >> 4620 Technology Drive, Golden, CO 80403 >> rmcd at usgs.gov >> 303-278-7952 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > R&D Engineer > Kitware, Inc. > -- Richard McDonald Hydrologist U.S. Geological Survey Geomorphology and Sediment Transport Laboratory 4620 Technology Drive, Golden, CO 80403 rmcd at usgs.gov 303-278-7952 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Mon Oct 19 19:55:26 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 19 Oct 2015 17:55:26 -0600 Subject: [vtkusers] Image Viewer Question In-Reply-To: References: Message-ID: I was able to figure out how to position the images using the camera settings, but I am still having one problem. I attached a script and image that demonstrate my problem When I adjust the camera to position the image within the window, the image does not appear until I interact with the window by zooming or something similar. How do I update the render window after setting up the camera, so when window.Render() is called the image appears. There are few discussions on the mailing list, but they involve Qt widget, which I am not using. I am using VTK6.3 with python. Thanks, Andrew On Wed, Oct 14, 2015 at 11:20 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am working on adding a logo to a 3D scene and having trouble controlling > placement of the logo image. > > I have attached a demo code, but it does not work like I would expect. I > would like to be able to shrink the logo to 50% its size, rotate it 90 > (this worked), and move it closer to the corner of the window. > > Again thanks for the help on this issue and sorry for hammering the list > this week. > > -Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imageviewer.py Type: text/x-python-script Size: 1788 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: moose.png Type: image/png Size: 102283 bytes Desc: not available URL: From Orlando.RIVERA at mtu.de Tue Oct 20 03:16:30 2015 From: Orlando.RIVERA at mtu.de (RIVERA ROLDAN, Jorge Orlando) Date: Tue, 20 Oct 2015 07:16:30 +0000 Subject: [vtkusers] Release Memory , correct? Message-ID: Dear Forums Members, I have a question regarding releasing Memory. I have a vtkCompositeDataSet or a vtkMultiBlockDataSet up to 2 Levels. Level3 is a Structured or Unstructured grid, like : --vtkMB (root ) -----vtkMB ---------vtkStructured ---------vtkUnstructured -----vtkMB and I want to release memory without destroying my tree structure I get through my tree (simplified code ) for( i=0 ; i< root->GetNumberOfBlocks() ; ++i ) { vtkSmartPointer level2Pointer=vtkMultiBlockDataSet::SafeDownCast(Root->GetBlock(i)); for(k=0; k< level2Pointer->GetNumberOfBlocks(); k++) { If( load(cnt) ) { vtkSmartPointer gridPointer=ReadGridFromFile(?..) level2Pointer->SetBlock(k, gridPointer): } else { vtkSmartPointer gridPointer=vtkDataSet::SafeDownCast(level2Pointer->GetBlock(k)); gridPointer->ReleaseData(); vtkSmartPointer emptyGrid; level2Pointer->SetBlock(k, emptyGrid): } cnt++; } //for k } //for i As you can see I get the Un/Structured grid pointed with the gridPointer . I try to release the Memory an in its place I set an empty grid All works really nice, when I want to render a grid, I load it in first IF , otherwise, in else will be supposedly released . When I see it with top or mem inspector the memory is actually increasing. So I assume I am doing something wrong in the else part: vtkSmartPointer gridPointer=vtkDataSet::SafeDownCast(level2Pointer->GetBlock(k)); gridPointer->ReleaseData(); vtkSmartPointer emptyGrid; level2Pointer->SetBlock(k, emptyGrid): Any help will be appreciated Thanks !! -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyoegg Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Oct 20 08:17:58 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 20 Oct 2015 05:17:58 -0700 (MST) Subject: [vtkusers] VTK Inheritance error Message-ID: <1445343478312-5734477.post@n5.nabble.com> Hello, I'm currently trying to customize the c++ android native example so as to be able to change the behaviour of what happens when interacting with 2 (or 3) fingers when using the tablet. From what I've understood with the VTK Pipeline I should therefore modify the behaviour of the vtkAndroidRenderWindowInteractor (correct me if I'm wrong though). So, since there was no official answer concerning SO and coding issues with VTK (see post Here ), I will post the link to the SO post which is just there . Feel free to answer on SO to get the reputation rewarding though. Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Inheritance-error-tp5734477.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Tue Oct 20 08:22:07 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 20 Oct 2015 08:22:07 -0400 Subject: [vtkusers] VTK Inheritance error In-Reply-To: <1445343478312-5734477.post@n5.nabble.com> References: <1445343478312-5734477.post@n5.nabble.com> Message-ID: <3084c2e7e79354322c6fc96e788be719@mail.gmail.com> You want to look at vtkInteractorStyleMultitouchCamera The RenderWindowInteractor is OS specific and gets the events, but the InteractorStyle (which is not OS specific) defines what happens upon those events. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Tuesday, October 20, 2015 8:18 AM To: vtkusers at vtk.org Subject: [vtkusers] VTK Inheritance error Hello, I'm currently trying to customize the c++ android native example so as to be able to change the behaviour of what happens when interacting with 2 (or 3) fingers when using the tablet. From what I've understood with the VTK Pipeline I should therefore modify the behaviour of the vtkAndroidRenderWindowInteractor (correct me if I'm wrong though). So, since there was no official answer concerning SO and coding issues with VTK (see post Here ), I will post the link to the SO post which is just there . Feel free to answer on SO to get the reputation rewarding though. Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Inheritance-error-tp5734477.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From lonni.besancon at gmail.com Tue Oct 20 08:30:00 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 20 Oct 2015 05:30:00 -0700 (MST) Subject: [vtkusers] VTK Inheritance error In-Reply-To: <3084c2e7e79354322c6fc96e788be719@mail.gmail.com> References: <1445343478312-5734477.post@n5.nabble.com> <3084c2e7e79354322c6fc96e788be719@mail.gmail.com> Message-ID: <1445344200996-5734479.post@n5.nabble.com> Alright thanks. So if I want to redefine what happens when a touch event is done I should then inherit from vtkInteractorStyle right? Still would you know why I get this inheritance error? It kinda bugs me. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Inheritance-error-tp5734477p5734479.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Tue Oct 20 10:35:07 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 20 Oct 2015 07:35:07 -0700 (MST) Subject: [vtkusers] Release Memory , correct? In-Reply-To: References: Message-ID: <1445351707152-5734481.post@n5.nabble.com> Hello, Don't know the solution of your problem but maybe you should post it on StackOverflow as it helps a lot when dealing with code-reading. And some members from here are also present on SO so they may as well answer you there. You're facing an interesting problem anyway and I would like to get the answer too as I may stumble upon it too in the future. -- View this message in context: http://vtk.1045678.n5.nabble.com/Release-Memory-correct-tp5734474p5734481.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.chen at gmail.com Tue Oct 20 11:25:01 2015 From: elvis.chen at gmail.com (Elvis Chen) Date: Tue, 20 Oct 2015 11:25:01 -0400 Subject: [vtkusers] changing cursor representation within qvtk? Message-ID: hi all, I am trying to change the mouse cursor representation. According to the documentation, it can be done with vtkRenderWindow. I have an application that uses qt and thus vtk rendering is done through a qvtk widget. I issued the following command: qvtk->GetRenderWindow()->SetCurrentCursor( VTK_CURSOR_CROSSHAIR ); qvtk->GetRenderWindow()->Render(); and yet nothing changes. The representation for the mouse remains the same. Am I calling the function correctly? Any help is very much appreciated, -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Tue Oct 20 15:41:33 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Tue, 20 Oct 2015 13:41:33 -0600 Subject: [vtkusers] Image Viewer Question In-Reply-To: References: Message-ID: I was able to get the image to show up by adding "renderer.ResetCameraClippingRange()" after I am done messing with the camera. On Mon, Oct 19, 2015 at 5:55 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I was able to figure out how to position the images using the camera > settings, but I am still having one problem. I attached a script and image > that demonstrate my problem > > When I adjust the camera to position the image within the window, the > image does not appear until I interact with the window by zooming or > something similar. How do I update the render window after setting up the > camera, so when window.Render() is called the image appears. > > There are few discussions on the mailing list, but they involve Qt widget, > which I am not using. I am using VTK6.3 with python. > > Thanks, > Andrew > > On Wed, Oct 14, 2015 at 11:20 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> I am working on adding a logo to a 3D scene and having trouble >> controlling placement of the logo image. >> >> I have attached a demo code, but it does not work like I would expect. I >> would like to be able to shrink the logo to 50% its size, rotate it 90 >> (this worked), and move it closer to the corner of the window. >> >> Again thanks for the help on this issue and sorry for hammering the list >> this week. >> >> -Andrew >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kmorel at sandia.gov Tue Oct 20 18:42:41 2015 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Tue, 20 Oct 2015 22:42:41 +0000 Subject: [vtkusers] Building VTK without OpenGL Message-ID: I am trying to build VTK 6.3.0 on a system without OpenGL. I don't need any of the rendering components on this system, so this should not be a problem. However, even when I set VTK_Group_Rendering to OFF I get an error that CMake cannot find OpenGL on the system (because it is not there). I tried to get around this problem by setting VTK_RENDERING_BACKEND to None, but that gives me a different error. CMake tells me that there is no such module vtkRenderingNone needed by vtkGUISupportQt (another module I don't care about and don't need compiled). I think I have all the rendering and GUI modules turned off. The error appears to be during a check of the dependency of all modules regardless of whether they are used. How can I get the VTK build to completely ignore all rendering? -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmorel at sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://kennethmoreland.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Oct 20 19:29:24 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 20 Oct 2015 19:29:24 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: BUILD_TESTING is off too? David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Oct 20, 2015 at 6:42 PM, Moreland, Kenneth wrote: > I am trying to build VTK 6.3.0 on a system without OpenGL. I don't need > any of the rendering components on this system, so this should not be a > problem. However, even when I set VTK_Group_Rendering to OFF I get an error > that CMake cannot find OpenGL on the system (because it is not there). > > I tried to get around this problem by setting VTK_RENDERING_BACKEND to > None, but that gives me a different error. CMake tells me that there is no > such module vtkRenderingNone needed by vtkGUISupportQt (another module I > don't care about and don't need compiled). I think I have all the rendering > and GUI modules turned off. The error appears to be during a check of the > dependency of all modules regardless of whether they are used. > > How can I get the VTK build to completely ignore all rendering? > > -Ken > > **** Kenneth Moreland > *** Sandia National Laboratories > *********** > *** *** *** email: kmorel at sandia.gov > ** *** ** phone: (505) 844-8919 > *** web: http://kennethmoreland.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 kmorel at sandia.gov Tue Oct 20 19:38:41 2015 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Tue, 20 Oct 2015 23:38:41 +0000 Subject: [vtkusers] Building VTK without OpenGL Message-ID: Yup. For reference I attached my CMakeCache.txt. -Ken From: David E DeMarle > Date: Tuesday, October 20, 2015 at 5:29 PM To: Kenneth Moreland > Cc: "vtkusers at vtk.org" > Subject: [EXTERNAL] Re: [vtkusers] Building VTK without OpenGL BUILD_TESTING is off too? David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Oct 20, 2015 at 6:42 PM, Moreland, Kenneth > wrote: I am trying to build VTK 6.3.0 on a system without OpenGL. I don't need any of the rendering components on this system, so this should not be a problem. However, even when I set VTK_Group_Rendering to OFF I get an error that CMake cannot find OpenGL on the system (because it is not there). I tried to get around this problem by setting VTK_RENDERING_BACKEND to None, but that gives me a different error. CMake tells me that there is no such module vtkRenderingNone needed by vtkGUISupportQt (another module I don't care about and don't need compiled). I think I have all the rendering and GUI modules turned off. The error appears to be during a check of the dependency of all modules regardless of whether they are used. How can I get the VTK build to completely ignore all rendering? -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmorel at sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://kennethmoreland.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: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CMakeCache.txt URL: From ben.boeckel at kitware.com Tue Oct 20 21:01:08 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 20 Oct 2015 21:01:08 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: <20151021010108.GA13632@bronto-burt.dev.benboeckel.net> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: > Yup. For reference I attached my CMakeCache.txt. How about the output of CMake when you configure which contains the list of enabled modules? Is there a backtrace for where OpenGL is trying to be found from printed? --Ben From ysa0829 at gmail.com Tue Oct 20 22:42:18 2015 From: ysa0829 at gmail.com (Ang) Date: Tue, 20 Oct 2015 19:42:18 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> Message-ID: <1445395338132-5734491.post@n5.nabble.com> Hi David, Yes, I expect the image to stay centered in the window. My vtk version is master branch too. In order to express clearly ,I record a video to show you . https://drive.google.com/file/d/0BzYl0SJUtXsKckI3SUZSelQzR00/view?usp=sharing Thanks for your response. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734491.html Sent from the VTK - Users mailing list archive at Nabble.com. From Orlando.RIVERA at mtu.de Wed Oct 21 04:29:41 2015 From: Orlando.RIVERA at mtu.de (RIVERA ROLDAN, Jorge Orlando) Date: Wed, 21 Oct 2015 08:29:41 +0000 Subject: [vtkusers] vtkDataObjectTreeIterator getting level Message-ID: Hi I have a MultiBlockDataSet and I am using a vtkDataObjectTreeIerator to go through the tree Getting the index is not a problem with GetCurrentFlatIndex , is there a straight way to get the level? I could iterate to obtain the level, but in that case using the for in ( A) will be of less use, I think --VTKMBDS idx=0 level=0 -----VTKMBDS idx=1 level=1 ----------VTKMBDS idx=2 level=2 ------------- grid idx=3 level=3 ------------- grid idx=3 level=3 -----VTKMBDS idx=4 level=2 ... (A) for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem()) { idx= iter->GetCurrentFlatIndex(); level=? } Thanks -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyoegg Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. From richard.j.brown at live.co.uk Wed Oct 21 05:22:53 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 21 Oct 2015 02:22:53 -0700 (MST) Subject: [vtkusers] simple vtkLookupTable question Message-ID: <1445419373692-5734493.post@n5.nabble.com> I imagine this is a very simple question, but I haven't found the answer already in the group. I have greyscale data that I want to apply a lookup table to. Currently, my lowest value is red and my highest is blue, but I would like something that looks more like the 'fire' lookup table in imageJ. In essence, I think I want my lowest value to be black and my highest to be a red/white. Can anyone give me any pointers? Thanks in advance, Richard Brown -- View this message in context: http://vtk.1045678.n5.nabble.com/simple-vtkLookupTable-question-tp5734493.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Oct 21 08:38:30 2015 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 21 Oct 2015 14:38:30 +0200 Subject: [vtkusers] internal radiotherapy kernel In-Reply-To: References: <1444911827936-5734426.post@n5.nabble.com> Message-ID: Cory, Still trying to get my head around vtkFastSplatter. Do you have any other examples other than the example in Imgaging->Core->Testing->Cxx->FastSplatter.cxx ? Regards, Richard > On 16 Oct 2015, at 09:10, Richard Brown wrote: > > Cory, > > Yes, that is an assumption we?re going with (but it is a 3D kernel function). I?ll take a look at vtkFastSplatter then. > > Cheers, > Richard > >> On 15 Oct 2015, at 17:52, Cory Quammen > wrote: >> >> Richard, >> >> By spatially invariant, I mean that the 2D kernel function that is accumulated in the dose grid is the same no matter where the treatment point is. Is that the case? >> >> Cory >> >> On Thu, Oct 15, 2015 at 11:46 AM, Richard Brown > wrote: >> Cory, >> >> Thanks for the reply, but the kernel is not spatially invariant, it has a sharp peak in the centre (like the image in this link: http://www.jacmp.org/index.php/jacmp/article/viewFile/4371/3082/46375 ). >> >> Thanks, >> Richard >> >>> On 15 Oct 2015, at 15:14, Cory Quammen > wrote: >>> >>> Richard, >>> >>> If your kernel is spatially invariant, you may want to look into vtkFastSplatter [1]. >>> >>> Thanks, >>> Cory >>> >>> [1] http://www.vtk.org/doc/nightly/html/classvtkFastSplatter.html#a921b3de4b2b70437aa7273342fedfb74 >>> >>> On Thu, Oct 15, 2015 at 8:23 AM, mbcx9rb9 > wrote: >>> Hi all, >>> >>> Im working on internal radiotherapy and, currently, I calculate my absorbed >>> dose information (DVH etc.) by adding a kernel (vtkImageData) at each >>> treatment point to a large dose grid (vtkImageData) that covers the whole >>> treatment region. Then I pass by vtkImageAccumulate to do the dosimetry. >>> >>> Is this the best way to do it? Because if the majority receives no absorbed >>> dose, it seems wasteful (in terms of memory) to have those voxels at the >>> same resolution as in my kernel, where I have a very steep gradient of >>> absorbed dose. >>> >>> Are there any other approaches? Would it, for example, be possible to store >>> my kernel as a vtkUnstructuredGrid and still pass it by vtkImageAccumulate >>> and get the same results? >>> >>> Thanks for any responses in advance. >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/internal-radiotherapy-kernel-tp5734426.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 >>> R&D Engineer >>> Kitware, Inc. >> >> >> >> >> -- >> Cory Quammen >> 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 wumengda at gmail.com Wed Oct 21 11:52:57 2015 From: wumengda at gmail.com (Mengda Wu) Date: Wed, 21 Oct 2015 11:52:57 -0400 Subject: [vtkusers] Error in writing a subclass of vtkImageAlgorithm Message-ID: Hello all, I am trying to write a subclass of vtkImageAlgorithm to generate a 2D image based on a reslice of a 3D image. When I execute it, it was fine with vtk 6.1 but it has some problems with vtk 6.2. I don't know what has changed. I think it might be related to RequestInformation. The errors are: ERROR: In D:\Library\VTK\VTK-6.2.0\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkStreamingDemandDrivenPipeline (0000000010C8E3F0): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(00000000111F6860) is 0 40 0 201 0 0, which is outside the whole extent 0 40 0 40 0 0. ERROR: In D:\Library\VTK\VTK-6.2.0\Common\ExecutionModel\vtkTrivialProducer.cxx, line 279 vtkTrivialProducer (00000000111F6860): This data object does not contain the requested extent. Here is my code: ImageCurvedReformat::ImageCurvedReformat( ) { this->SegmentId = -1; this->TwistIndex = 0; this->RadialSpacing = 0.5; this->RadialExtent = 20; this->UpdateImage = 1; this->SetNumberOfInputPorts( 2 ); this->SetNumberOfOutputPorts( 6 ); // by default process active point scalars this->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); } ImageCurvedReformat::~ImageCurvedReformat( ) { } void ImageCurvedReformat::SetUpdateImage(int update) { if(this->UpdateImage != update) this->UpdateImage = update; //Don't set the modiflied flag on purpose } vtkImageData* ImageCurvedReformat::GetOutput() { return vtkImageData::SafeDownCast(this->GetOutput(0)); } vtkDataObject* ImageCurvedReformat::GetOutput(int port) { return this->GetOutputDataObject(port); } int ImageCurvedReformat::ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) { if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_NOT_GENERATED())) { if(!this->UpdateImage) { vtkInformation* outImageInfo = outputVector->GetInformationObject(0); outImageInfo->Set(vtkDemandDrivenPipeline::DATA_NOT_GENERATED(), 1); vtkInformation* outImagePolyInfo = outputVector->GetInformationObject(5); outImagePolyInfo->Set(vtkDemandDrivenPipeline::DATA_NOT_GENERATED(), 1); } } // generate the data if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA())) { return this->RequestData(request, inputVector, outputVector); } // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { return this->RequestInformation(request, inputVector, outputVector); } // propagate update extent /* if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT())) { return this->RequestUpdateExtent(request, inputVector, outputVector); } */ return this->Superclass::ProcessRequest(request, inputVector, outputVector); } //--------------------------------------------------------------------------- int ImageCurvedReformat::FillInputPortInformation(int port, vtkInformation *info) { if( port == 0 ) info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); else if( port == 1 ) info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData"); return 1; } //---------------------------------------------------------------------------- int ImageCurvedReformat::FillOutputPortInformation( int port, vtkInformation* info) { if( port == 0 ) info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkImageData"); else if ( port < 6 ) info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkPolyData"); return 1; } int ImageCurvedReformat::RequestInformation ( vtkInformation * request, vtkInformationVector** inputVector, vtkInformationVector *outputVector) { vtkInformation *inCenterlineInfo = inputVector[1]->GetInformationObject(0); vtkInformation *outImageInfo = outputVector->GetInformationObject(0); vtkPolyData *inputCenterline = vtkPolyData::SafeDownCast(inCenterlineInfo->Get(vtkDataObject::DATA_OBJECT())); if( SegmentId >= 0 && SegmentId < inputCenterline->GetNumberOfCells() ) { vtkIdType npts=0, *pts=NULL; int RadialSize = 2*this->RadialExtent+1; inputCenterline->BuildCells(); inputCenterline->GetCellPoints(SegmentId, npts, pts); int outWholeExt[6] = {0, RadialSize-1, 0, npts-1, 0, 0}; outImageInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),outWholeExt,6); } else { int outWholeExt[6] = {0, 0, 0, 0, 0, 0}; outImageInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),outWholeExt,6); } double outOrigin[3] = {0.0, 0.0, 0.0}; outImageInfo->Set(vtkDataObject::ORIGIN(), outOrigin, 3); return Superclass::RequestInformation(request, inputVector, outputVector); } int ImageCurvedReformat::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { //Do some work to do image reformat. } Can you help? Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Wed Oct 21 11:58:07 2015 From: david.thompson at kitware.com (David Thompson) Date: Wed, 21 Oct 2015 11:58:07 -0400 Subject: [vtkusers] Time Data in Exodus files In-Reply-To: References: Message-ID: <609AB7CB-4C1C-497B-9648-EE37D633B687@kitware.com> Hi Andrew, > ... Here is what I needed to do. > > info = reader.GetExecutive().GetOutputInformation().GetInformationObject(0) > key = vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS() > > # info.Get(key) produces an error, not sure why. This is because the Python wrappers don't deal well with default parameter values (you need to pass values for all arguments, even if the C++ version provides a default value). David > n = info.Length(key) > times = [0]*n > for i in range(n): > times[i] = info.Get(key, i) > print times You can use a list comprehension to make it easier: times = [info.Get(key,i) for i in range(info.Length(key))] HTH, David From sean at rogue-research.com Wed Oct 21 12:13:13 2015 From: sean at rogue-research.com (Sean McBride) Date: Wed, 21 Oct 2015 11:13:13 -0500 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> Message-ID: <20151021161313.1685649885@mail.rogue-research.com> On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said: >I looked at the STLWriter code: > >1) It reports an error if a polygon is not a triangle. >2) It reports nothing if there are triangle strips. > >At a minimum I think it should handle triangle strips. No need to run >triangle filter, I'll decompose the strips on the fly. Does this cause any inconsistency wrt other similar writers? For example, I just looked at our exporter code and it basically does: - create vtkTriangleFilter - switch on file type (ply, stl, vtk) - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter I imagine others have similar code. I admittedly didn't check, but it would be nice if I could remove this vtkTriangleFilter for all cases, and not need it for some but not others... 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 jim at jslengineeringsoftware.com Wed Oct 21 12:34:16 2015 From: jim at jslengineeringsoftware.com (James Labiak) Date: Wed, 21 Oct 2015 12:34:16 -0400 Subject: [vtkusers] Java wrapper, multidimensional arrays Message-ID: <5627BE88.4020801@jslengineeringsoftware.com> Hello All, vtkDenseArray is missing from the Java wrapper. What is the best way to handle n-dim arrays with Java wrapper? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Wed Oct 21 12:35:26 2015 From: sean at rogue-research.com (Sean McBride) Date: Wed, 21 Oct 2015 11:35:26 -0500 Subject: [vtkusers] New to VTK (OpenGL2 Line Stipple) In-Reply-To: <39d1b1f01635d6ea8329749dc58f3148@mail.gmail.com> References: <24e9cc4652cd24f479eb005c52c6e4ed@mail.gmail.com> <20150929185255.1504306027@mail.rogue-research.com> <39d1b1f01635d6ea8329749dc58f3148@mail.gmail.com> Message-ID: <20151021163526.882440519@mail.rogue-research.com> Ken, I created the following issue in the bug tracker: I assigned it to you (BTW, mantis shows your name twice in the popup of possible assignees, it does not do this for other people). Thanks, Sean On Wed, 30 Sep 2015 06:58:28 -0400, Ken Martin said: >Please do create an issue. Thanks! - Ken > >Ken Martin PhD >Chairman & CFO >Kitware Inc. >28 Corporate Drive >Clifton Park NY 12065 >ken.martin at kitware.com >919 869-8871 (w) > > >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. > > >-----Original Message----- >From: Sean McBride [mailto:sean at rogue-research.com] >Sent: Tuesday, September 29, 2015 2:53 PM >To: Ken Martin; Seun Odutola; vtkusers at vtk.org >Subject: Re: [vtkusers] New to VTK (OpenGL2 Line Stipple) > >On Mon, 14 Sep 2015 15:03:33 -0400, Ken Martin said: > >>Unfortunately LineStipple was removed in OpenGL version 3.1 about six >>years ago (along with LineWidth sort of) and there is no replacement in >>OpenGL. It has never been in OpenGL ES for Android/iOS to my knowledge. >>Currently in VTK it is not supported on the OpenGL2 backend. At some >>point we could try to add it back in fully or partially with our own >>implementation just not sure how high of a priority it is relative to >everything else. > >Ken, > >Thanks for the reply. FWIW, for us, it's high priority because it's >something we use. :) Not sure if we are an outlier there. :) > >Shall we create an issue in the bug tracker? > >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 Wed Oct 21 12:47:10 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Oct 2015 12:47:10 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <20151021161313.1685649885@mail.rogue-research.com> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> <20151021161313.1685649885@mail.rogue-research.com> Message-ID: I believe that PLY and VTK can handle non-triangles. On Wed, Oct 21, 2015 at 12:13 PM, Sean McBride wrote: > On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said: > >>I looked at the STLWriter code: >> >>1) It reports an error if a polygon is not a triangle. >>2) It reports nothing if there are triangle strips. >> >>At a minimum I think it should handle triangle strips. No need to run >>triangle filter, I'll decompose the strips on the fly. > > Does this cause any inconsistency wrt other similar writers? For example, I just looked at our exporter code and it basically does: > > - create vtkTriangleFilter > - switch on file type (ply, stl, vtk) > - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter > > I imagine others have similar code. I admittedly didn't check, but it would be nice if I could remove this vtkTriangleFilter for all cases, and not need it for some but not others... > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Oct 21 14:58:24 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Oct 2015 14:58:24 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: <20151021010108.GA13632@bronto-burt.dev.benboeckel.net> References: <20151021010108.GA13632@bronto-burt.dev.benboeckel.net> Message-ID: Ken, Module_vtkIOExport:BOOL=ON is the culprit it uses rendering. Do you need it in your app. vtk_module(vtkIOExport GROUPS Rendering DEPENDS vtkCommonCore vtkRenderingAnnotation vtkRenderingContext2D vtkRenderingCore vtkRenderingFreeType ${opengl_depends} vtkRenderingLabel vtkRendering${VTK_RENDERING_BACKEND} vtkImagingCore On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel wrote: > On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >> Yup. For reference I attached my CMakeCache.txt. > > How about the output of CMake when you configure which contains the list > of enabled modules? > > Is there a backtrace for where OpenGL is trying to be found from > printed? > > --Ben > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From dan.lipsa at kitware.com Wed Oct 21 15:11:00 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 21 Oct 2015 15:11:00 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: <562008DD.9050908@rhpcs.mcmaster.ca> References: <562008DD.9050908@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, Take a look at http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers This might clarify some of your questions. You have to remember that the reference count is stored in the objects themselves unlike the c++ shared_ptr where the reference count is stored in the shared pointer object. For the first question: do you assign the object to a vtk smart pointer? That would explain why the reference count is 2. For the rest of the questions: when you set up the pipeline there are other objects involved besides the filter themselves, so it is harder to understand of the reference count. Also you can set VTK_DEBUG_LEAKS when you build VTK if you are concerned about leaks. Dan On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan wrote: > Hello, > > I find, in debug mode, that the ReferenceCount of a > vtkImageEllipsoidSource object becomes 2 right after being initiated > (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could > this happen? > > My second question is --- when you make a connection > A->SetInputConnection(B->GetOutputPort()); Whose reference count will be > increased by 1, A or B? I think B's reference count should be increased > because it is used by A. But what I find is just the opposite. > > My third question is about setting up more than 1 connection for a filter. > Taking vtkImageMathematics as an example, I do > vtkImageMathematics* A = vtkImageMathematics::New(); > A->SetInputConnection(0, B1->GetOutputPort(); > A->SetInputConnection(0, B2->GetOutputPort(); > > I find that the reference count of A gets increased by the first > SetInputConnection() call only. > > Can someone explain how reference counting works in VTK? Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 kmorel at sandia.gov Wed Oct 21 15:24:06 2015 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Wed, 21 Oct 2015 19:24:06 +0000 Subject: [vtkusers] Building VTK without OpenGL Message-ID: I do not, but turning that module off does not help. I try turning that module off and I get the exact same error as before: CMake Error at CMake/vtkModuleTop.cmake:53 (message): No such module "vtkRenderingNone" needed by "vtkGUISupportQt" Call Stack (most recent call first): CMake/vtkModuleTop.cmake:69 (vtk_module_check) CMake/vtkModuleTop.cmake:69 (vtk_module_check) CMake/vtkModuleTop.cmake:76 (vtk_module_check) CMakeLists.txt:532 (include) Attached is my updated CMakeCache.txt. -Ken On 10/21/15, 12:58 PM, "Bill Lorensen" wrote: >Ken, >Module_vtkIOExport:BOOL=ON > >is the culprit it uses rendering. Do you need it in your app. >vtk_module(vtkIOExport > GROUPS > Rendering > DEPENDS > vtkCommonCore > vtkRenderingAnnotation > vtkRenderingContext2D > vtkRenderingCore > vtkRenderingFreeType > ${opengl_depends} > vtkRenderingLabel > vtkRendering${VTK_RENDERING_BACKEND} > vtkImagingCore > > >On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel >wrote: >> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >>> Yup. For reference I attached my CMakeCache.txt. >> >> How about the output of CMake when you configure which contains the list >> of enabled modules? >> >> Is there a backtrace for where OpenGL is trying to be found from >> printed? >> >> --Ben >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >>http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >>http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > >-- >Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CMakeCache.txt URL: From bill.lorensen at gmail.com Wed Oct 21 15:49:10 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Oct 2015 15:49:10 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: Change the opengl backend to OpenGL2 On Wed, Oct 21, 2015 at 3:24 PM, Moreland, Kenneth wrote: > I do not, but turning that module off does not help. I try turning that > module off and I get the exact same error as before: > > > CMake Error at CMake/vtkModuleTop.cmake:53 (message): > No such module "vtkRenderingNone" needed by "vtkGUISupportQt" > Call Stack (most recent call first): > CMake/vtkModuleTop.cmake:69 (vtk_module_check) > CMake/vtkModuleTop.cmake:69 (vtk_module_check) > CMake/vtkModuleTop.cmake:76 (vtk_module_check) > CMakeLists.txt:532 (include) > > Attached is my updated CMakeCache.txt. > > > -Ken > > On 10/21/15, 12:58 PM, "Bill Lorensen" wrote: > >>Ken, >>Module_vtkIOExport:BOOL=ON >> >>is the culprit it uses rendering. Do you need it in your app. >>vtk_module(vtkIOExport >> GROUPS >> Rendering >> DEPENDS >> vtkCommonCore >> vtkRenderingAnnotation >> vtkRenderingContext2D >> vtkRenderingCore >> vtkRenderingFreeType >> ${opengl_depends} >> vtkRenderingLabel >> vtkRendering${VTK_RENDERING_BACKEND} >> vtkImagingCore >> >> >>On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel >>wrote: >>> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >>>> Yup. For reference I attached my CMakeCache.txt. >>> >>> How about the output of CMake when you configure which contains the list >>> of enabled modules? >>> >>> Is there a backtrace for where OpenGL is trying to be found from >>> printed? >>> >>> --Ben >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>>http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>>http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >>-- >>Unpaid intern in BillsBasement at noware dot com > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Oct 21 15:51:12 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 21 Oct 2015 13:51:12 -0600 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: I was about to say the same thing. You have to set VTK_RENDERING_BACKEND to a valid value, or else you're likely to see side-effects that aren't directly related to the issue you're trying to solve. - David On Wed, Oct 21, 2015 at 1:49 PM, Bill Lorensen wrote: > Change the opengl backend to OpenGL2 > > > On Wed, Oct 21, 2015 at 3:24 PM, Moreland, Kenneth > wrote: > > I do not, but turning that module off does not help. I try turning that > > module off and I get the exact same error as before: > > > > > > CMake Error at CMake/vtkModuleTop.cmake:53 (message): > > No such module "vtkRenderingNone" needed by "vtkGUISupportQt" > > Call Stack (most recent call first): > > CMake/vtkModuleTop.cmake:69 (vtk_module_check) > > CMake/vtkModuleTop.cmake:69 (vtk_module_check) > > CMake/vtkModuleTop.cmake:76 (vtk_module_check) > > CMakeLists.txt:532 (include) > > > > Attached is my updated CMakeCache.txt. > > > > > > -Ken > > > > On 10/21/15, 12:58 PM, "Bill Lorensen" wrote: > > > >>Ken, > >>Module_vtkIOExport:BOOL=ON > >> > >>is the culprit it uses rendering. Do you need it in your app. > >>vtk_module(vtkIOExport > >> GROUPS > >> Rendering > >> DEPENDS > >> vtkCommonCore > >> vtkRenderingAnnotation > >> vtkRenderingContext2D > >> vtkRenderingCore > >> vtkRenderingFreeType > >> ${opengl_depends} > >> vtkRenderingLabel > >> vtkRendering${VTK_RENDERING_BACKEND} > >> vtkImagingCore > >> > >> > >>On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel > >>wrote: > >>> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: > >>>> Yup. For reference I attached my CMakeCache.txt. > >>> > >>> How about the output of CMake when you configure which contains the > list > >>> of enabled modules? > >>> > >>> Is there a backtrace for where OpenGL is trying to be found from > >>> printed? > >>> > >>> --Ben > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>>http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>>http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > >> > >> > >> > >>-- > >>Unpaid intern in BillsBasement at noware dot com > > > > > > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Oct 21 16:04:04 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Oct 2015 16:04:04 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: Ken, also make sure you start with a clean build. I think the variable might be cached. On Wed, Oct 21, 2015 at 3:51 PM, David Gobbi wrote: > I was about to say the same thing. You have to set VTK_RENDERING_BACKEND to > a valid value, or else you're likely to see side-effects that aren't > directly related to the issue you're trying to solve. > > - David > > > On Wed, Oct 21, 2015 at 1:49 PM, Bill Lorensen > wrote: >> >> Change the opengl backend to OpenGL2 >> >> >> On Wed, Oct 21, 2015 at 3:24 PM, Moreland, Kenneth >> wrote: >> > I do not, but turning that module off does not help. I try turning that >> > module off and I get the exact same error as before: >> > >> > >> > CMake Error at CMake/vtkModuleTop.cmake:53 (message): >> > No such module "vtkRenderingNone" needed by "vtkGUISupportQt" >> > Call Stack (most recent call first): >> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >> > CMake/vtkModuleTop.cmake:76 (vtk_module_check) >> > CMakeLists.txt:532 (include) >> > >> > Attached is my updated CMakeCache.txt. >> > >> > >> > -Ken >> > >> > On 10/21/15, 12:58 PM, "Bill Lorensen" wrote: >> > >> >>Ken, >> >>Module_vtkIOExport:BOOL=ON >> >> >> >>is the culprit it uses rendering. Do you need it in your app. >> >>vtk_module(vtkIOExport >> >> GROUPS >> >> Rendering >> >> DEPENDS >> >> vtkCommonCore >> >> vtkRenderingAnnotation >> >> vtkRenderingContext2D >> >> vtkRenderingCore >> >> vtkRenderingFreeType >> >> ${opengl_depends} >> >> vtkRenderingLabel >> >> vtkRendering${VTK_RENDERING_BACKEND} >> >> vtkImagingCore >> >> >> >> >> >>On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel >> >>wrote: >> >>> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >> >>>> Yup. For reference I attached my CMakeCache.txt. >> >>> >> >>> How about the output of CMake when you configure which contains the >> >>> list >> >>> of enabled modules? >> >>> >> >>> Is there a backtrace for where OpenGL is trying to be found from >> >>> printed? >> >>> >> >>> --Ben >> >>> _______________________________________________ >> >>> Powered by www.kitware.com >> >>> >> >>> Visit other Kitware open-source projects at >> >>>http://www.kitware.com/opensource/opensource.html >> >>> >> >>> Please keep messages on-topic and check the VTK FAQ at: >> >>>http://www.vtk.org/Wiki/VTK_FAQ >> >>> >> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >>> >> >>> Follow this link to subscribe/unsubscribe: >> >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> >> >>-- >> >>Unpaid intern in BillsBasement at noware dot com >> > >> >> >> >> -- >> 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 > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Oct 21 16:04:29 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Oct 2015 16:04:29 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: These are my settings: -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DVTK_BUILD_ALL_MODULES_FOR_\ TESTS:BOOL=OFF -DVTK_Group_Rendering:BOOL=OFF -DVTK_Group_StandAlone:BOOL=OFF -\ DModule_vtkCommonCore:BOOL=ON -DModule_vtkCommonDataModel:BOOL=ON On Wed, Oct 21, 2015 at 4:04 PM, Bill Lorensen wrote: > Ken, > > also make sure you start with a clean build. I think the variable > might be cached. > > > On Wed, Oct 21, 2015 at 3:51 PM, David Gobbi wrote: >> I was about to say the same thing. You have to set VTK_RENDERING_BACKEND to >> a valid value, or else you're likely to see side-effects that aren't >> directly related to the issue you're trying to solve. >> >> - David >> >> >> On Wed, Oct 21, 2015 at 1:49 PM, Bill Lorensen >> wrote: >>> >>> Change the opengl backend to OpenGL2 >>> >>> >>> On Wed, Oct 21, 2015 at 3:24 PM, Moreland, Kenneth >>> wrote: >>> > I do not, but turning that module off does not help. I try turning that >>> > module off and I get the exact same error as before: >>> > >>> > >>> > CMake Error at CMake/vtkModuleTop.cmake:53 (message): >>> > No such module "vtkRenderingNone" needed by "vtkGUISupportQt" >>> > Call Stack (most recent call first): >>> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >>> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >>> > CMake/vtkModuleTop.cmake:76 (vtk_module_check) >>> > CMakeLists.txt:532 (include) >>> > >>> > Attached is my updated CMakeCache.txt. >>> > >>> > >>> > -Ken >>> > >>> > On 10/21/15, 12:58 PM, "Bill Lorensen" wrote: >>> > >>> >>Ken, >>> >>Module_vtkIOExport:BOOL=ON >>> >> >>> >>is the culprit it uses rendering. Do you need it in your app. >>> >>vtk_module(vtkIOExport >>> >> GROUPS >>> >> Rendering >>> >> DEPENDS >>> >> vtkCommonCore >>> >> vtkRenderingAnnotation >>> >> vtkRenderingContext2D >>> >> vtkRenderingCore >>> >> vtkRenderingFreeType >>> >> ${opengl_depends} >>> >> vtkRenderingLabel >>> >> vtkRendering${VTK_RENDERING_BACKEND} >>> >> vtkImagingCore >>> >> >>> >> >>> >>On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel >>> >>wrote: >>> >>> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >>> >>>> Yup. For reference I attached my CMakeCache.txt. >>> >>> >>> >>> How about the output of CMake when you configure which contains the >>> >>> list >>> >>> of enabled modules? >>> >>> >>> >>> Is there a backtrace for where OpenGL is trying to be found from >>> >>> printed? >>> >>> >>> >>> --Ben >>> >>> _______________________________________________ >>> >>> Powered by www.kitware.com >>> >>> >>> >>> Visit other Kitware open-source projects at >>> >>>http://www.kitware.com/opensource/opensource.html >>> >>> >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> >>>http://www.vtk.org/Wiki/VTK_FAQ >>> >>> >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >>> >> >>> >> >>> >>-- >>> >>Unpaid intern in BillsBasement at noware dot com >>> > >>> >>> >>> >>> -- >>> 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 >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From utkarsh.ayachit at kitware.com Wed Oct 21 16:10:14 2015 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 21 Oct 2015 16:10:14 -0400 Subject: [vtkusers] vtkDataObjectTreeIterator getting level In-Reply-To: References: Message-ID: Not directly. You can make the iterator not traverse subtree (using TraverseSubTreeOff) and then do a breadth-first traversal yourself through recursive calls and keeping track of the depth. Utkarsh On Wed, Oct 21, 2015 at 4:29 AM, RIVERA ROLDAN, Jorge Orlando wrote: > Hi > > I have a MultiBlockDataSet and I am using a vtkDataObjectTreeIerator to go through the tree > Getting the index is not a problem with GetCurrentFlatIndex , is there a straight way to get the level? > I could iterate to obtain the level, but in that case using the for in ( A) will be of less use, I think > > --VTKMBDS idx=0 level=0 > -----VTKMBDS idx=1 level=1 > ----------VTKMBDS idx=2 level=2 > ------------- grid idx=3 level=3 > ------------- grid idx=3 level=3 > -----VTKMBDS idx=4 level=2 ... > > (A) > for (iter->InitTraversal(); > !iter->IsDoneWithTraversal(); > iter->GoToNextItem()) { > idx= iter->GetCurrentFlatIndex(); > level=? > } > > Thanks > -- > MTU Aero Engines AG > Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyoegg > Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt > Sitz der Gesellschaft/Registered Office: Muenchen > Handelsregister/Commercial Register: Muenchen HRB 157206 > > Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. > Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese > E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. > > This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. > If you are not the intended recipient, please advise the sender and delete this message and its attachments. > Any unauthorised storing, copying or distribution is prohibited. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From kmorel at sandia.gov Wed Oct 21 17:03:21 2015 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Wed, 21 Oct 2015 21:03:21 +0000 Subject: [vtkusers] Building VTK without OpenGL Message-ID: Thanks for everyone's help. I got this working now. As Bill and David suggested, I had to change VTK_RENDERING_BACKGROUND to OpenGL or OpenGL2. However, I don't understand why None is even provided as an option if it is not supported. Anyway, doing that caused an error about not finding OpenGL (because there is none on my system). The solution is to first turn off all VTK_Group_* options and configure again. At this point you get an error about all modules being off, but when using the GUI this step is necessary because the majority of the Module_* options do not show up until this point. Once I've done that I can flip on the appropriate modules. That said, I expect Bill's suggestion of running CMake with command line arguments setting the Module variables on should work just fine. Of course, that would mean I would know the right variables beforehand, which I don't. I just muddle along with the GUI because I is not a sophistimacated user. -Ken On 10/21/15, 2:04 PM, "Bill Lorensen" wrote: >These are my settings: >-DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF >-DVTK_BUILD_ALL_MODULES_FOR_\ >TESTS:BOOL=OFF -DVTK_Group_Rendering:BOOL=OFF >-DVTK_Group_StandAlone:BOOL=OFF -\ >DModule_vtkCommonCore:BOOL=ON -DModule_vtkCommonDataModel:BOOL=ON > > >On Wed, Oct 21, 2015 at 4:04 PM, Bill Lorensen >wrote: >> Ken, >> >> also make sure you start with a clean build. I think the variable >> might be cached. >> >> >> On Wed, Oct 21, 2015 at 3:51 PM, David Gobbi >>wrote: >>> I was about to say the same thing. You have to set >>>VTK_RENDERING_BACKEND to >>> a valid value, or else you're likely to see side-effects that aren't >>> directly related to the issue you're trying to solve. >>> >>> - David >>> >>> >>> On Wed, Oct 21, 2015 at 1:49 PM, Bill Lorensen >>> >>> wrote: >>>> >>>> Change the opengl backend to OpenGL2 >>>> >>>> >>>> On Wed, Oct 21, 2015 at 3:24 PM, Moreland, Kenneth >>>> wrote: >>>> > I do not, but turning that module off does not help. I try turning >>>>that >>>> > module off and I get the exact same error as before: >>>> > >>>> > >>>> > CMake Error at CMake/vtkModuleTop.cmake:53 (message): >>>> > No such module "vtkRenderingNone" needed by "vtkGUISupportQt" >>>> > Call Stack (most recent call first): >>>> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >>>> > CMake/vtkModuleTop.cmake:69 (vtk_module_check) >>>> > CMake/vtkModuleTop.cmake:76 (vtk_module_check) >>>> > CMakeLists.txt:532 (include) >>>> > >>>> > Attached is my updated CMakeCache.txt. >>>> > >>>> > >>>> > -Ken >>>> > >>>> > On 10/21/15, 12:58 PM, "Bill Lorensen" >>>>wrote: >>>> > >>>> >>Ken, >>>> >>Module_vtkIOExport:BOOL=ON >>>> >> >>>> >>is the culprit it uses rendering. Do you need it in your app. >>>> >>vtk_module(vtkIOExport >>>> >> GROUPS >>>> >> Rendering >>>> >> DEPENDS >>>> >> vtkCommonCore >>>> >> vtkRenderingAnnotation >>>> >> vtkRenderingContext2D >>>> >> vtkRenderingCore >>>> >> vtkRenderingFreeType >>>> >> ${opengl_depends} >>>> >> vtkRenderingLabel >>>> >> vtkRendering${VTK_RENDERING_BACKEND} >>>> >> vtkImagingCore >>>> >> >>>> >> >>>> >>On Tue, Oct 20, 2015 at 9:01 PM, Ben Boeckel >>>> >>>> >>wrote: >>>> >>> On Tue, Oct 20, 2015 at 23:38:41 +0000, Moreland, Kenneth wrote: >>>> >>>> Yup. For reference I attached my CMakeCache.txt. >>>> >>> >>>> >>> How about the output of CMake when you configure which contains >>>>the >>>> >>> list >>>> >>> of enabled modules? >>>> >>> >>>> >>> Is there a backtrace for where OpenGL is trying to be found from >>>> >>> printed? >>>> >>> >>>> >>> --Ben >>>> >>> _______________________________________________ >>>> >>> Powered by www.kitware.com >>>> >>> >>>> >>> Visit other Kitware open-source projects at >>>> >>>http://www.kitware.com/opensource/opensource.html >>>> >>> >>>> >>> Please keep messages on-topic and check the VTK FAQ at: >>>> >>>http://www.vtk.org/Wiki/VTK_FAQ >>>> >>> >>>> >>> Search the list archives at: >>>>http://markmail.org/search/?q=vtkusers >>>> >>> >>>> >>> Follow this link to subscribe/unsubscribe: >>>> >>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >> >>>> >> >>>> >> >>>> >>-- >>>> >>Unpaid intern in BillsBasement at noware dot com >>>> > >>>> >>>> >>>> >>>> -- >>>> 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 >>> >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > >-- >Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Oct 21 22:21:11 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 21 Oct 2015 20:21:11 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: <1445395338132-5734491.post@n5.nabble.com> References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> Message-ID: Hi Ang, I compiled and ran your code on Windows 7, on Linux, and OS X with VTK 6.3 and VTK master. But I cannot reproduce what you show in the video, the image never jumps around. Is there anything peculiar about your system? Do you have access to another computer than you can compile and run your code on? - David On Tue, Oct 20, 2015 at 8:42 PM, Ang wrote: > Hi David, > > Yes, I expect the image to stay centered in the window. > > My vtk version is master branch too. > > In order to express clearly ,I record a video to show you . > > > https://drive.google.com/file/d/0BzYl0SJUtXsKckI3SUZSelQzR00/view?usp=sharing > < > https://drive.google.com/file/d/0BzYl0SJUtXsKckI3SUZSelQzR00/view?usp=sharing > > > > > Thanks for your response. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734491.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 ysa0829 at gmail.com Wed Oct 21 22:53:54 2015 From: ysa0829 at gmail.com (Ang) Date: Wed, 21 Oct 2015 19:53:54 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> Message-ID: <1445482434841-5734517.post@n5.nabble.com> Hi David, I try to run my code on three computers with vtk master branch that using OPENGL2(picture is my cmake setting): 1. OS: Win 7 64bit CPU:Intel Core i7-2600K @3.40GHz RAM:32 GB Display Card: Nvidia GeForce GTX 460 2. OS: Win 7 64bit CPU:Intel Core i7-3610QM @2.3GHz RAM:16 GB Display Card: Nvidia GeForce GT 650M 3. OS: Win 7 64bit CPU:Intel Core i7-2670QM @2.20GHz RAM:16 GB Display Card: Nvidia GeForce GT 540M All of them are same result. is it possible that opengl2 causes the result? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734517.html Sent from the VTK - Users mailing list archive at Nabble.com. From Orlando.RIVERA at mtu.de Thu Oct 22 05:50:03 2015 From: Orlando.RIVERA at mtu.de (RIVERA ROLDAN, Jorge Orlando) Date: Thu, 22 Oct 2015 09:50:03 +0000 Subject: [vtkusers] Release Memory , correct? In-Reply-To: References: Message-ID: One Update I have tried too: gridPointer->GetActualMemorySize() // After gridPointer->ReleaseData(); gridPointer->Squeeze(); gridPointer->GetActualMemorySize() // Before ,and I have omitted adding an emptyGrid /* vtkSmartPointer emptyGrid; level2Pointer->SetBlock(k, emptyGrid):*/ MemorySize After seems to be consistent with my data and MemorySize Before prints 0 (Zero) but top indicates memory is increasing every time I read the Grids again and again (see: if (load (cnt) ? ) in my inner for loop ) How come? maybe it is my DownCasting vtkSmartPointer since they point to an StructuredGrid, which does not re-implement squeeze or ReleaseData (inherited from vtkDataSet ) Von: RIVERA ROLDAN, Jorge Orlando Gesendet: Tuesday, 20. October 2015 09:17 An: vtkusers at vtk.org Betreff: Release Memory , correct? Dear Forums Members, I have a question regarding releasing Memory. I have a vtkCompositeDataSet or a vtkMultiBlockDataSet up to 2 Levels. Level3 is a Structured or Unstructured grid, like : --vtkMB (root ) -----vtkMB ---------vtkStructured ---------vtkUnstructured -----vtkMB and I want to release memory without destroying my tree structure I get through my tree (simplified code ) for( i=0 ; i< root->GetNumberOfBlocks() ; ++i ) { vtkSmartPointer level2Pointer=vtkMultiBlockDataSet::SafeDownCast(Root->GetBlock(i)); for(k=0; k< level2Pointer->GetNumberOfBlocks(); k++) { If( load(cnt) ) { vtkSmartPointer gridPointer=ReadGridFromFile(?..) level2Pointer->SetBlock(k, gridPointer): } else { vtkSmartPointer gridPointer=vtkDataSet::SafeDownCast(level2Pointer->GetBlock(k)); gridPointer->ReleaseData(); vtkSmartPointer emptyGrid; level2Pointer->SetBlock(k, emptyGrid): } cnt++; } //for k } //for i As you can see I get the Un/Structured grid pointed with the gridPointer . I try to release the Memory an in its place I set an empty grid All works really nice, when I want to render a grid, I load it in first IF , otherwise, in else will be supposedly released . When I see it with top or mem inspector the memory is actually increasing. So I assume I am doing something wrong in the else part: vtkSmartPointer gridPointer=vtkDataSet::SafeDownCast(level2Pointer->GetBlock(k)); gridPointer->ReleaseData(); vtkSmartPointer emptyGrid; level2Pointer->SetBlock(k, emptyGrid): Any help will be appreciated Thanks !! -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyoegg Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Oct 22 08:19:11 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 22 Oct 2015 06:19:11 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> Message-ID: Hi Ang, If the issue is a bug in the OpenGL2 backend for vtkImageResliceMapper, then we'll use your example code to track down and fix the bug. There probably isn't anything that you can do in your code, if you need to use this class. After I reproduce the bug on my system, I might be able to give an estimate on how long the bug fix will take. - David On Thu, Oct 22, 2015 at 12:18 AM, Ang wrote: > Hi David, > > You are right. I rebuild VTK with OpenGL back end,and it works well. > > So if I want to use OpenGL2 back end, what should I do in my code? > > Any suggestion ? > > Thanks for your time and effort. > > > > 2015-10-22 11:15 GMT+08:00 David Gobbi : > >> On Wed, Oct 21, 2015 at 8:53 PM, Ang wrote: >> >>> Hi David, >>> >>> is it possible that opengl2 causes the result? >>> >> >> It's possible, I did all my tests with the OpenGL back end. >> Can you build VTK with the OpenGL back end to see if it >> changes the result? >> >> I can try the OpenGL2 backend tomorrow (but only on OS X, >> my Windows machine isn't capable). >> >> - David >> >> > > > > -- > *Ang* > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Thu Oct 22 11:05:31 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 22 Oct 2015 11:05:31 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: On Wed, Oct 21, 2015 at 5:03 PM, Moreland, Kenneth wrote: > Thanks for everyone's help. I got this working now. > > As Bill and David suggested, I had to change VTK_RENDERING_BACKGROUND to > OpenGL or OpenGL2. However, I don't understand why None is even provided > as an option if it is not supported. This did work when I added it, but I guess the dashboard that tested it was lost, and it was broken at some point. I agree with you that it should be removed (or fixed, and tested). > > Anyway, doing that caused an error about not finding OpenGL (because there > is none on my system). The solution is to first turn off all VTK_Group_* > options and configure again. At this point you get an error about all > modules being off, but when using the GUI this step is necessary because > the majority of the Module_* options do not show up until this point. Once > I've done that I can flip on the appropriate modules. > > That said, I expect Bill's suggestion of running CMake with command line > arguments setting the Module variables on should work just fine. Of > course, that would mean I would know the right variables beforehand, which > I don't. I just muddle along with the GUI because I is not a > sophistimacated user. > We should make this simpler, and ensure we have a dashboard taking this simple path to ensure it continues to work in the future. Marcus From rl at quantcomp.com Thu Oct 22 13:32:52 2015 From: rl at quantcomp.com (Ronald Levine) Date: Thu, 22 Oct 2015 10:32:52 -0700 (MST) Subject: [vtkusers] Set vertex normals ? Message-ID: <1445535172487-5734525.post@n5.nabble.com> I have a large quad mesh (easily decomposed into a set of triangle strips) whose positions AND vertex normals (point normals) are mathematically generated. I want to render the surface with Gouraud shading using my supplied vertex normals. I do not want the system to estimate the point normals from the triangle geometry. Working in Python, where it's easy to experiment, I don't see any way to do that. Neither does reading the C++ documentation provide any clues. Thanks for any helpful comments. RL -- View this message in context: http://vtk.1045678.n5.nabble.com/Set-vertex-normals-tp5734525.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Thu Oct 22 14:17:12 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 22 Oct 2015 14:17:12 -0400 Subject: [vtkusers] Set vertex normals ? In-Reply-To: <1445535172487-5734525.post@n5.nabble.com> References: <1445535172487-5734525.post@n5.nabble.com> Message-ID: vtkPolyData->GetPointData()->SetNormals(your 3component wide x numcells tuple long array) should do the trick. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 22, 2015 at 1:32 PM, Ronald Levine wrote: > I have a large quad mesh (easily decomposed into a set of triangle strips) > whose positions AND vertex normals (point normals) are mathematically > generated. I want to render the surface with Gouraud shading using my > supplied vertex normals. I do not want the system to estimate the point > normals from the triangle geometry. > > Working in Python, where it's easy to experiment, I don't see any way to do > that. Neither does reading the C++ documentation provide any clues. > > Thanks for any helpful comments. > > RL > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Set-vertex-normals-tp5734525.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 ben.boeckel at kitware.com Thu Oct 22 14:29:38 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 22 Oct 2015 14:29:38 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: References: Message-ID: <20151022182938.GA29507@megas.khq.kitware.com> On Thu, Oct 22, 2015 at 11:05:31 -0400, Marcus D. Hanwell wrote: > This did work when I added it, but I guess the dashboard that tested > it was lost, and it was broken at some point. I agree with you that it > should be removed (or fixed, and tested). Is a dashboard which just builds with the None backend sufficient? Are there any tests that would still run that are meaningful in only None mode (looking for a way to save buildbot time here :) ). If anyone makes an MR where a None backend works, I'll add a builder for it. --Ben From stefan.hoehme at gmail.com Thu Oct 22 14:48:16 2015 From: stefan.hoehme at gmail.com (=?iso-8859-1?Q?Stefan_H=F6hme?=) Date: Thu, 22 Oct 2015 20:48:16 +0200 Subject: [vtkusers] Same problem: Removal of graph vertices causes error: Could not find edge in source edge list. Message-ID: <002601d10cfa$36f099b0$a4d1cd10$@gmail.com> Dear all, I have the same problem as described by Adrian below. Coming from VTK 5.10 to 6.3, I encounter the exact same issue with vtkGraph. Your help would be much appreciated! Best, Stefan -------- Betreff: [vtkusers] Removal of graph vertices causes error: Could not find edge in source edge list. Datum: Fri, 18 Sep 2015 17:23:27 +0200 Von: Adrian Friebel An: VTK Users Hi everyone, I recently moved on from VTK 5.8 / 5.10 to the 6.3 build and apparently the vtkGraph behaves now a bit unexpected. In the minimal example below I load an undirected graph (points & pedigreeIDs attached to vertices, spatially neighbouring vertices are connected), collect all pedIDs and then try to remove one vertex after the other, using their pedIDs. That worked perfectly fine in 5.8. And it works fine for the first couple hundred vertices, but occasionally some throw the following message: ERROR: In /path/to/ VTK-6.3.0/Common/DataModel/vtkGraphInternals.cxx, line 53 vtkGraphInternals (0x7ffc54080080): Could not find edge in source edge list. In another test I tried to manually remove all edges of a vertex before removing the vertex itself, which didn't help either in the above cases: The number of edges of the graph was correctly decremented by the number of egdes the vertex had. But despite the vertices that threw above error message apparently had still some of the edges they previously had. Is there a new update-call that is mandatory after removal of vertices/edges, or is it a bug? Any idea where it is coming from? I tried 6.2 with the same result. I am a bit lost here, help is much appreciated, Adrian. vtkSmartPointer g = vtkMutableUndirectedGraph::New(); vtkSmartPointer graphReader = vtkSmartPointer::New(); graphReader->SetFileName("/path/to/ graph.txt"); graphReader->Update(); graphReader->GetOutput()->ToUndirectedGraph(g); std::cout << "graph has " << g->GetVertexData()->GetNumberOfArrays() << " vertex arrays and " << g->GetEdgeData()->GetNumberOfArrays() << " edge arrays" << std::endl; vtkSmartPointer pedigreeIdArray = vtkUnsignedLongArray::SafeDownCast(g->GetVertexData()->GetPedigreeIds()); vtkSmartPointer it = vtkSmartPointer::New(); g->GetVertices(it); std::set vertsToDelete; while (it->HasNext()) { vtkIdType v = it->Next(); vertsToDelete.insert(pedigreeIdArray->GetValue(v)); } for(std::set::iterator it= vertsToDelete.begin(); it!= vertsToDelete.end(); ++it) { g->RemoveVertex(g->FindVertex(*it)); g->Modified(); std::cout << "num verts = " << g->GetNumberOfVertices() << " and num pedIDEntries = " << g->GetVertexData()->GetPedigreeIds()->GetNumberOfTuples() << std::endl; for(int i=0; iGetVertexData()->GetNumberOfArrays(); i++) g->GetVertexData()->GetArray(i)->DataChanged(); g->Squeeze(); } vtkSmartPointer graphWriter = vtkSmartPointer::New(); graphWriter->SetFileName("/scratch/friebel/TestData/graphVTKError/ graph_collapsed.txt"); graphWriter->SetInputData(g); graphWriter->Update(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Oct 22 18:24:25 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 22 Oct 2015 16:24:25 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> Message-ID: Hi Ang, I was able to reproduce the bug by using the OpenGL2 backend, and I have an idea about where the code has to be fixed. Luckily, there is something that you can do while you wait for the fix: add this to your code after you create the vtkImageResliceMapper: resliceMapper->AutoAdjustImageQualityOff(); That should work as a temporary work-around. - David On Thu, Oct 22, 2015 at 6:19 AM, David Gobbi wrote: > Hi Ang, > > If the issue is a bug in the OpenGL2 backend for vtkImageResliceMapper, > then we'll use your example code to track down and fix the bug. There > probably isn't anything that you can do in your code, if you need to use > this class. After I reproduce the bug on my system, I might be able to > give an estimate on how long the bug fix will take. > > - David > > On Thu, Oct 22, 2015 at 12:18 AM, Ang wrote: > >> Hi David, >> >> You are right. I rebuild VTK with OpenGL back end,and it works well. >> >> So if I want to use OpenGL2 back end, what should I do in my code? >> >> Any suggestion ? >> >> Thanks for your time and effort. >> >> >> >> 2015-10-22 11:15 GMT+08:00 David Gobbi : >> >>> On Wed, Oct 21, 2015 at 8:53 PM, Ang wrote: >>> >>>> Hi David, >>>> >>>> is it possible that opengl2 causes the result? >>>> >>> >>> It's possible, I did all my tests with the OpenGL back end. >>> Can you build VTK with the OpenGL back end to see if it >>> changes the result? >>> >>> I can try the OpenGL2 backend tomorrow (but only on OS X, >>> my Windows machine isn't capable). >>> >>> - David >>> >>> >> >> >> >> -- >> *Ang* >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Thu Oct 22 21:37:38 2015 From: ysa0829 at gmail.com (Ang) Date: Thu, 22 Oct 2015 18:37:38 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> Message-ID: <1445564258629-5734531.post@n5.nabble.com> Hi David, I will try it. Thanks for your assistance! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734531.html Sent from the VTK - Users mailing list archive at Nabble.com. From ysa0829 at gmail.com Thu Oct 22 22:48:13 2015 From: ysa0829 at gmail.com (Ang) Date: Thu, 22 Oct 2015 19:48:13 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> Message-ID: <1445568493925-5734532.post@n5.nabble.com> Hi David, There is another issue. Below is my example code. When I use move wheel to change slice plane, the image jumps a new position. /////////////////////////////////////////////////////////////////////////////////////////////////////// class MouseInteractorStyle : public vtkInteractorStyleImage { public: vtkTypeMacro(MouseInteractorStyle, vtkInteractorStyleImage); static MouseInteractorStyle *New(); vtkImageData *currentImgPtr; vtkImageSlice *currentImgSlicePtr; int sliceIndex = 0; double spacing[3]; void setCurrentImageSlice(vtkImageSlice*slice) { currentImgSlicePtr = slice; } void setCurrentImageData(vtkImageData *img) { currentImgPtr = img; currentImgPtr->GetSpacing(spacing); } virtual void OnMouseWheelBackward() { if (sliceIndex <= currentImgPtr->GetExtent()[1]) sliceIndex++; double planeOrigin[3], planePt1[3], planePt2[3]; planeOrigin[0] = currentImgPtr->GetBounds()[0] + sliceIndex * spacing[0]; planeOrigin[1] = currentImgPtr->GetBounds()[2]; planeOrigin[2] = currentImgPtr->GetBounds()[4]; planePt1[0] = planeOrigin[0]; planePt1[1] = planeOrigin[1] + currentImgPtr->GetBounds()[3]; planePt1[2] = planeOrigin[2]; planePt2[0] = planeOrigin[0]; planePt2[1] = planeOrigin[1]; planePt2[2] = planeOrigin[2] + currentImgPtr->GetBounds()[5]; vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetOrigin(planeOrigin); planeSource->SetPoint1(planePt1); planeSource->SetPoint2(planePt2); planeSource->Update(); reinterpret_cast(currentImgSlicePtr->GetMapper())->GetSlicePlane()->SetOrigin(planeSource->GetOrigin()); reinterpret_cast(currentImgSlicePtr->GetMapper())->GetSlicePlane()->SetNormal(planeSource->GetNormal()); this->GetInteractor()->Render(); } virtual void OnMouseWheelForward() { if (sliceIndex >=1) sliceIndex--; double planeOrigin[3], planePt1[3], planePt2[3]; planeOrigin[0] = currentImgPtr->GetBounds()[0] + sliceIndex * spacing[0]; planeOrigin[1] = currentImgPtr->GetBounds()[2]; planeOrigin[2] = currentImgPtr->GetBounds()[4]; planePt1[0] = planeOrigin[0]; planePt1[1] = planeOrigin[1] + currentImgPtr->GetBounds()[3]; planePt1[2] = planeOrigin[2]; planePt2[0] = planeOrigin[0]; planePt2[1] = planeOrigin[1]; planePt2[2] = planeOrigin[2] + currentImgPtr->GetBounds()[5]; vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetOrigin(planeOrigin); planeSource->SetPoint1(planePt1); planeSource->SetPoint2(planePt2); planeSource->Update(); reinterpret_cast(currentImgSlicePtr->GetMapper())->GetSlicePlane()->SetOrigin(planeSource->GetOrigin()); reinterpret_cast(currentImgSlicePtr->GetMapper())->GetSlicePlane()->SetNormal(planeSource->GetNormal()); this->GetInteractor()->Render(); } }; vtkStandardNewMacro(MouseInteractorStyle); int main(int argc, char *argv[]) { MouseInteractorStyle *ff = MouseInteractorStyle::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New(); vtkRenderer *renderer = vtkRenderer::New(); MouseInteractorStyle *styleImage = MouseInteractorStyle::New(); styleImage->SetInteractionModeToImage2D(); interactor->SetInteractorStyle(styleImage); renWin->SetInteractor(interactor); renWin->AddRenderer(renderer); renderer->SetBackground(1, 0, 0); vtkImageResliceMapper *resliceMapper = vtkImageResliceMapper::New(); vtkImageSlice *imageSlice = vtkImageSlice::New(); vtkImageData *img = vtkImageData::New(); img->SetDimensions(50, 50, 50); img->AllocateScalars(VTK_UNSIGNED_CHAR, 1); img->SetSpacing(1, 1, 1); for (int z = 0; z < img->GetDimensions()[2]; z++) { for (int x = 0; x < img->GetDimensions()[0]; x++) { for (int y = 0; y < img->GetDimensions()[1]; y++) { unsigned char *pixel = static_cast(img->GetScalarPointer(x, y, z)); int c0 = img->GetDimensions()[0] / 2; int c1 = img->GetDimensions()[1] / 2; int c2 = img->GetDimensions()[2] / 2; double pointX = (x - c0)*(x - c0); double pointY = (y - c1)*(y - c1); double pointZ = (z - c2)*(z - c2); if (pointX + pointY + pointZ < 15 * 15) { *pixel = 255; } else { *pixel = 0; } } } } resliceMapper->AutoAdjustImageQualityOff(); imageSlice->SetMapper(resliceMapper); resliceMapper->SetInputData(img); //set reslice plane to sagittal resliceMapper->GetSlicePlane()->SetNormal(1, 0, 0); resliceMapper->GetSlicePlane()->SetOrigin(25, 0, 0); // set plane to middle //set camera to sagittal orientation renderer->GetActiveCamera()->SetFocalPoint(0, 25, 25); renderer->GetActiveCamera()->SetPosition(700, 25, 25); renderer->GetActiveCamera()->SetViewUp(0, 0, 1); renderer->GetActiveCamera()->SetParallelScale(75); renderer->GetActiveCamera()->ParallelProjectionOn(); styleImage->setCurrentImageData(img); styleImage->setCurrentImageSlice(imageSlice); renderer->AddActor(imageSlice); renWin->Render(); interactor->Start(); return 0; } ///////////////////////////////////////////////////////////////////////////////////////////////////////// -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734532.html Sent from the VTK - Users mailing list archive at Nabble.com. From tdinar at gmail.com Thu Oct 22 22:52:03 2015 From: tdinar at gmail.com (tariq) Date: Thu, 22 Oct 2015 19:52:03 -0700 (MST) Subject: [vtkusers] Image Blob as polydata. Message-ID: <1445568723336-5734533.post@n5.nabble.com> hi, I have a black and white image, that has one black connected region. Is there a way to extract the black connected region and have it as polydata? I want to visualize this region as polydata and work with its geometry without the image data. I am kind of not experienced with VTK and this might be a simple question. Thanks. T. -- View this message in context: http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533.html Sent from the VTK - Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Fri Oct 23 02:46:22 2015 From: itkhelpacc at gmail.com (vishal k) Date: Fri, 23 Oct 2015 12:16:22 +0530 Subject: [vtkusers] Error with Buildng GPURenderDemo Message-ID: hey, Im getting error when Im trying to build the C:\VTK\Source\Examples\VolumeRendering\Cxx & FixedPointVolumeRayCastMapper.cxx... the error is something like this:- 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------ 1> Checking Build System 1> CMake does not need to re-run because D:/ITK_VTK_EX/My_VTK_Ex/vol_render/bin/CMakeFiles/generate.stamp is up-to-date. 2>------ Rebuild All started: Project: FixedPointVolumeRayCastMapperCT, Configuration: Debug x64 ------ 3>------ Rebuild All started: Project: GPURenderDemo, Configuration: Debug x64 ------ 2> Building Custom Rule D:/ITK_VTK_EX/My_VTK_Ex/vol_render/CMakeLists.txt 3> Building Custom Rule D:/ITK_VTK_EX/My_VTK_Ex/vol_render/CMakeLists.txt 2> CMake does not need to re-run because D:\ITK_VTK_EX\My_VTK_Ex\vol_render\bin\CMakeFiles\generate.stamp is up-to-date. 3> CMake does not need to re-run because D:\ITK_VTK_EX\My_VTK_Ex\vol_render\bin\CMakeFiles\generate.stamp is up-to-date. 2> FixedPointVolumeRayCastMapperCT.cxx 3> GPURenderDemo.cxx 3>D:\ITK_VTK_EX\My_VTK_Ex\vol_render\GPURenderDemo.cxx(33): fatal error C1083: Cannot open include file: 'vtkSmartVolumeMapper.h': No such file or directory 2>D:\ITK_VTK_EX\My_VTK_Ex\vol_render\FixedPointVolumeRayCastMapperCT.cxx(112): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h(357) : see declaration of 'sprintf' 2>D:\ITK_VTK_EX\My_VTK_Ex\vol_render\FixedPointVolumeRayCastMapperCT.cxx(119): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h(357) : see declaration of 'sprintf' 2>D:\ITK_VTK_EX\My_VTK_Ex\vol_render\FixedPointVolumeRayCastMapperCT.cxx(126): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h(357) : see declaration of 'sprintf' 2> FixedPointVolumeRayCastMapperCT.vcxproj -> D:\ITK_VTK_EX\My_VTK_Ex\vol_render\bin\Debug\FixedPointVolumeRayCastMapperCT.exe 4>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------ 4> Building Custom Rule D:/ITK_VTK_EX/My_VTK_Ex/vol_render/CMakeLists.txt 4> CMake does not need to re-run because D:\ITK_VTK_EX\My_VTK_Ex\vol_render\bin\CMakeFiles\generate.stamp is up-to-date. ========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ========== I using VTK 6.2.0... please help me out? regards Vishal -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Fri Oct 23 10:58:35 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 23 Oct 2015 07:58:35 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1444752143727-5734393.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> Message-ID: <1445612315711-5734538.post@n5.nabble.com> This error is still not solved on my part and I got an email yesterday from an other VTK user with the same issue so I thought I should give this post a small "up". You can also check the post I have made on SO for an easier-to-read version (http://stackoverflow.com/questions/33099009/vtk-for-android-missing-2-modules) Really hope there is a way to solve this issue as I seem to run out of ideas now. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734538.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Oct 23 11:40:01 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 23 Oct 2015 11:40:01 -0400 Subject: [vtkusers] Image Blob as polydata. In-Reply-To: <1445568723336-5734533.post@n5.nabble.com> References: <1445568723336-5734533.post@n5.nabble.com> Message-ID: Tariq, One possibility would be this pipeline: -> vtkThreshold -> vtkDataSetSurfaceFilter Another could be -> vtkThreshold -> vtkDiscreteMarchingCubes Hope that helps, Cory On Thu, Oct 22, 2015 at 10:52 PM, tariq wrote: > hi, > > > I have a black and white image, that has one black connected region. Is > there a way to extract the black connected region and have it as polydata? > I want to visualize this region as polydata and work with its geometry > without the image data. > > I am kind of not experienced with VTK and this might be a simple question. > > Thanks. > T. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Oct 23 11:48:15 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 23 Oct 2015 11:48:15 -0400 Subject: [vtkusers] [vtk-developers] Call to Render on WM_PAINT in vtkWin32RenderWindowInteractor In-Reply-To: References: Message-ID: <5b7a1fe530dc0794b1e9e0d163cd0de0@mail.gmail.com> No clue why it has a paint, but if everything passes with it removed then I think it would be a good fix - Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf Of *Xabi Riobe *Sent:* Friday, October 2, 2015 8:43 AM *To:* VTK Users; VTK Developers *Subject:* [vtk-developers] Call to Render on WM_PAINT in vtkWin32RenderWindowInteractor Hi, Does someone know why in vtkWin32RenderWindowInteractor::vtkHandleMessage2 there is the Render() call on WM_PAINT: case WM_PAINT: me->Render(); return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); break; since CallWindowProc will lead to vtkWin32OpenGLRenderWindow::MessageProc that performs the rendering on WM_PAINT So we have a double rendering that can be slow... For example, resize a render window and you can see this happening. Thanks for any info about that -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Oct 23 12:52:56 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 23 Oct 2015 12:52:56 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: <20151022182938.GA29507@megas.khq.kitware.com> References: <20151022182938.GA29507@megas.khq.kitware.com> Message-ID: <6fd7c37301a9bb08c3fe3c0889e91055@mail.gmail.com> I'll take a stab at the topic - Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ben Boeckel Sent: Thursday, October 22, 2015 2:30 PM To: Marcus D. Hanwell Cc: David Gobbi; vtkusers at vtk.org; Moreland, Kenneth Subject: Re: [vtkusers] Building VTK without OpenGL On Thu, Oct 22, 2015 at 11:05:31 -0400, Marcus D. Hanwell wrote: > This did work when I added it, but I guess the dashboard that tested > it was lost, and it was broken at some point. I agree with you that it > should be removed (or fixed, and tested). Is a dashboard which just builds with the None backend sufficient? Are there any tests that would still run that are meaningful in only None mode (looking for a way to save buildbot time here :) ). If anyone makes an MR where a None backend works, I'll add a builder for it. --Ben _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From guanw at rhpcs.mcmaster.ca Fri Oct 23 16:24:38 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Fri, 23 Oct 2015 16:24:38 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: References: <562008DD.9050908@rhpcs.mcmaster.ca> Message-ID: <562A9786.8030003@rhpcs.mcmaster.ca> Hi Dan, Thank you very much for the reply. I still use the old way (vtkABC *v= vtkABC::New()) rather than using VTK smart pointer. The reference counting mechanism of VTK must have changed although I don't know when (which version) that happened. The reference count of a VTK object used to be 1 right after its creation. But now it is not always the case. I find source objects (like vtkCubeSource, vtkImageEllipsoidSource, etc) have reference count = 2 right after being created while filter object have reference count = 1. I haven't checked every class to see if there is an exception to the above finding. Here is a three-line code section together with running results: vtkCubeSource* cube = vtkCubeSource::New(); // ReferenceCount of cube = 2 vtkShrinkPolyData* shrink = vtkShrinkPolyData::New(); // ReferenceCount of cube = 2, ReferenceCount of shrink= 1 shrink->SetInputConnection(cube->GetOutputPort()); // ReferenceCount of cube = 2, ReferenceCount of shrink= 2 It can not be explained by the old VTK reference counting mechanism. Best, Weiguang On 21/10/2015 3:11 PM, Dan Lipsa wrote: > Hi Weiguang, > Take a look at > http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers > This might clarify some of your questions. You have to remember that > the reference count is stored in the objects themselves unlike the c++ > shared_ptr where the reference count is stored in the shared pointer > object. > > For the first question: do you assign the object to a vtk smart > pointer? That would explain why the reference count is 2. > For the rest of the questions: when you set up the pipeline there are > other objects involved besides the filter themselves, so it is harder > to understand of the reference count. > > Also you can set VTK_DEBUG_LEAKS when you build VTK if you are > concerned about leaks. > > Dan > > > On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan > > wrote: > > Hello, > > I find, in debug mode, that the ReferenceCount of a > vtkImageEllipsoidSource object becomes 2 right after being > initiated (vtkImageEllipsoidSourc::New()). It should be 1 not 2, > right? How could this happen? > > My second question is --- when you make a connection > A->SetInputConnection(B->GetOutputPort()); Whose reference count > will be increased by 1, A or B? I think B's reference count should > be increased because it is used by A. But what I find is just the > opposite. > > My third question is about setting up more than 1 connection for a > filter. Taking vtkImageMathematics as an example, I do > vtkImageMathematics* A = vtkImageMathematics::New(); > A->SetInputConnection(0, B1->GetOutputPort(); > A->SetInputConnection(0, B2->GetOutputPort(); > > I find that the reference count of A gets increased by the first > SetInputConnection() call only. > > Can someone explain how reference counting works in VTK? Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 DLRdave at aol.com Fri Oct 23 17:07:42 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 23 Oct 2015 17:07:42 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: <562A9786.8030003@rhpcs.mcmaster.ca> References: <562008DD.9050908@rhpcs.mcmaster.ca> <562A9786.8030003@rhpcs.mcmaster.ca> Message-ID: There is nothing that guarantees the reference count of an object derived from vtkObject will be any certain value immediately after construction. It totally depends on what happens to the object during its constructor. It might set up a whole network of other objects, and then give references to itself to some of them. Some of them might increase the reference count of the object, some of them might not. If you call Register, the reference count goes up. If you call Unregister, it goes down. If it goes down far enough, the object's destructor is called and the memory is released. The mechanism itself has not changed significantly lately (that I know of...), but individual objects may have changed their behavior with respect to "what's the reference count immediately after construction" or " what's the count after a single or repeated calls to SetInputConnection..." You should not rely on the reference count value for anything other than automatic cleanup when no more references exist. HTH, David C. On Fri, Oct 23, 2015 at 4:24 PM, Weiguang guan wrote: > Hi Dan, > > Thank you very much for the reply. > > I still use the old way (vtkABC *v= vtkABC::New()) rather than using VTK > smart pointer. The reference counting mechanism of VTK must have changed > although I don't know when (which version) that happened. > > The reference count of a VTK object used to be 1 right after its creation. > But now it is not always the case. I find source objects (like > vtkCubeSource, vtkImageEllipsoidSource, etc) have reference count = 2 right > after being created while filter object have reference count = 1. I haven't > checked every class to see if there is an exception to the above finding. > > Here is a three-line code section together with running results: > vtkCubeSource* cube = vtkCubeSource::New(); // > ReferenceCount of cube = 2 > vtkShrinkPolyData* shrink = vtkShrinkPolyData::New(); // ReferenceCount > of cube = 2, ReferenceCount of shrink= 1 > shrink->SetInputConnection(cube->GetOutputPort()); // ReferenceCount > of cube = 2, ReferenceCount of shrink= 2 > It can not be explained by the old VTK reference counting mechanism. > > Best, > Weiguang > > On 21/10/2015 3:11 PM, Dan Lipsa wrote: > > Hi Weiguang, > Take a look at > http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers > This might clarify some of your questions. You have to remember that the > reference count is stored in the objects themselves unlike the c++ > shared_ptr where the reference count is stored in the shared pointer object. > > For the first question: do you assign the object to a vtk smart pointer? > That would explain why the reference count is 2. > For the rest of the questions: when you set up the pipeline there are other > objects involved besides the filter themselves, so it is harder to > understand of the reference count. > > Also you can set VTK_DEBUG_LEAKS when you build VTK if you are concerned > about leaks. > > Dan > > > On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan > wrote: >> >> Hello, >> >> I find, in debug mode, that the ReferenceCount of a >> vtkImageEllipsoidSource object becomes 2 right after being initiated >> (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could this >> happen? >> >> My second question is --- when you make a connection >> A->SetInputConnection(B->GetOutputPort()); Whose reference count will be >> increased by 1, A or B? I think B's reference count should be increased >> because it is used by A. But what I find is just the opposite. >> >> My third question is about setting up more than 1 connection for a filter. >> Taking vtkImageMathematics as an example, I do >> vtkImageMathematics* A = vtkImageMathematics::New(); >> A->SetInputConnection(0, B1->GetOutputPort(); >> A->SetInputConnection(0, B2->GetOutputPort(); >> >> I find that the reference count of A gets increased by the first >> SetInputConnection() call only. >> >> Can someone explain how reference counting works in VTK? Thanks. >> >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 tdinar at gmail.com Fri Oct 23 21:09:44 2015 From: tdinar at gmail.com (tariq) Date: Fri, 23 Oct 2015 18:09:44 -0700 (MST) Subject: [vtkusers] Image Blob as polydata. In-Reply-To: References: <1445568723336-5734533.post@n5.nabble.com> Message-ID: <1445648984545-5734545.post@n5.nabble.com> hi Cory, this is the code I wrote jpgRead->SetFileName(y.c_str()); jpgRead->Update(); imageData = jpgRead->GetOutput(); imageThreshold->SetInputData(imageData); unsigned char lower = 250; unsigned char upper = 255; imageThreshold->ThresholdBetween(lower, upper); imageThreshold->ReplaceInOn(); imageThreshold->SetInValue(255); imageThreshold->Update(); dataSurface->DataSetExecute(imageThreshold->GetOutput(), pData); pMapper->SetInputData(pData); outputtActor->SetMapper(pMapper); outputtActor->GetProperty()->SetRepresentationToWireframe(); inputActor->SetInputData(imageData); rendering input on the left and output on the right (wireframe). All the cells (black or white are propagated to the output). how can I get hold of the black cells only? I would settle for that, instead of the boundary of the black cells region. I appreciate the help. Thanks. T. -- View this message in context: http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533p5734545.html Sent from the VTK - Users mailing list archive at Nabble.com. From rl at quantcomp.com Sat Oct 24 02:32:56 2015 From: rl at quantcomp.com (Ronald Levine) Date: Fri, 23 Oct 2015 23:32:56 -0700 (MST) Subject: [vtkusers] Set vertex normals ? In-Reply-To: References: <1445535172487-5734525.post@n5.nabble.com> Message-ID: <1445668376931-5734546.post@n5.nabble.com> Thanks, David, but that doesn't do the entire trick for me. I'll paste below a simplified version of my code, using a triangle strip of just 4 points in place of my very large data set of numerous triangle strips. Note that this produces a black triangle strip, no matter how you interactively rotate it. However, if you comment out the line pointData.SetNormals(normals) then you get a nice flat shaded rendering, two-sided, using the default head light. Or, if you restore that line and change the actor to SetInterpolationFlat(), again you get nice flat shading. This as run on Windows 7, Python 2.7.10 Thanks if you can tell me what's missing in the code. Ronald from vtk import * points = vtkPoints() normals = vtkFloatArray() normals.SetNumberOfComponents(3) normals.SetNumberOfTuples(4) points.InsertNextPoint( (0.,1.,0.)) points.InsertNextPoint( (0.,0.,0.)) points.InsertNextPoint( (1.,1.,0.)) points.InsertNextPoint( (1.,0.,0.)) normals.InsertNextTuple3(0.,0.,1.) normals.InsertNextTuple3(0.,0.,1.) normals.InsertNextTuple3(0.,0.,1.) normals.InsertNextTuple3(0.,0.,1.) cells = vtkCellArray() ts = vtkTriangleStrip() ts.GetPointIds().SetNumberOfIds(4) ts.GetPointIds().SetId(0,0) ts.GetPointIds().SetId(1,1) ts.GetPointIds().SetId(2,2) ts.GetPointIds().SetId(3,3) cells.InsertNextCell(ts) polydata = vtkPolyData() polydata.SetPoints(points) polydata.SetStrips(cells) pointData = polydata.GetPointData() pointData.SetNormals(normals) tsmapper = vtkDataSetMapper() tsmapper.SetInputData(polydata) tsactor = vtkActor() tsactor.SetMapper(tsmapper) tsactor.GetProperty().SetDiffuseColor(.3,.7,1) tsactor.GetProperty().SetInterpolationToGouraud() ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(600, 600) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(.1, .2, .4) ren.AddActor(tsactor) ren.ResetCamera() ren.GetActiveCamera().Dolly(-8) # Render the scene and start interaction. iren.Initialize() renWin.Render() iren.Start() -- View this message in context: http://vtk.1045678.n5.nabble.com/Set-vertex-normals-tp5734525p5734546.html Sent from the VTK - Users mailing list archive at Nabble.com. From jimmigoo at gmail.com Sun Oct 25 17:28:24 2015 From: jimmigoo at gmail.com (jimmigoo) Date: Sun, 25 Oct 2015 14:28:24 -0700 (MST) Subject: [vtkusers] How to see Unicode characters on vtkActor2D (stack overflow runtime error) Message-ID: <1445808504876-5734547.post@n5.nabble.com> Hi everybody! I'm trying to see Unicode characters (depending on selected True Type Font loaded file) on VTK, in details I would like to see these symbols on a vtkActor2D. I wrote the following code, using the vtkUnicodeString::from_utf8 function, entering as input parameter, a std::string containing a UTF8 coded string. Unfortunately, this code fails at run time, as in the attached images (Rendering\FreeType\vtkFreeTypeUtilities.cxx is unable to create font, and Rendering\FreeTypeOpenGL\vtkOpenGLFreeTypeTextMapper.cxx returns Render - no font). I tried using both #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL) #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL) and #include VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingFreeType); VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL); VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); So.. I need your help.. how should I do to let this code work and show the proper Unicode characters? I'm looking for your kind reply. Best Regards, jimmigoo --------------------------------------------------------------- vtkPoints* l_pPoints; vtkUnicodeStringArray* l_pStringData; vtkIntArray* l_pSizes; vtkPointSource* l_pPointSource; vtkPointSetToLabelHierarchy* l_pPointSetToLabelHierarchy; vtkLabelPlacementMapper* l_pLabelPlacementMapper; std::string fontFile("DejaVuSans.ttf"); l_strFileName = "????"; l_strTest = l_strFileName.ToUTF8(); l_pPoints = vtkPoints::New(); l_pPoints->Allocate(1); l_pPoints->InsertPoint(0, 0.0, 0.0, 0.0); l_pStringData = vtkUnicodeStringArray::New(); l_pStringData->SetName("labels"); l_pStringData->InsertNextValue(vtkUnicodeString::from_utf8(l_strTest)); std::string l_strFontFile("DejaVuSans.ttf"); l_pSizes = vtkIntArray::New(); l_pSizes->SetNumberOfValues(1); l_pSizes->SetName("sizes"); l_pSizes->SetValue(0, 0); l_pPointSource = vtkPointSource::New(); l_pPointSource->SetNumberOfPoints(1); l_pPointSource->Update(); l_pPointSource->GetOutput()->SetPoints(l_pPoints); l_pPointSource->GetOutput()->GetPointData()->AddArray(l_pStringData); l_pPointSource->GetOutput()->GetPointData()->AddArray(l_pSizes); l_pPointSource->Update(); vtkTextProperty* l_pTextProperty = vtkTextProperty::New(); l_pTextProperty->SetFontFamily(VTK_FONT_FILE); l_pTextProperty->SetFontFile(l_strFontFile.c_str()); l_pTextProperty->SetFontSize(24); l_pTextProperty->BoldOn(); l_pPointSetToLabelHierarchy = vtkPointSetToLabelHierarchy::New(); l_pPointSetToLabelHierarchy->SetInputConnection(l_pPointSource->GetOutputPort()); l_pPointSetToLabelHierarchy->SetTextProperty(l_pTextProperty); l_pPointSetToLabelHierarchy->SetLabelArrayName("labels"); l_pPointSetToLabelHierarchy->SetPriorityArrayName("sizes"); l_pPointSetToLabelHierarchy->Update(); l_pLabelPlacementMapper = vtkLabelPlacementMapper::New(); l_pLabelPlacementMapper->SetInputConnection(l_pPointSetToLabelHierarchy->GetOutputPort()); l_pLabelPlacementMapper->UseUnicodeStringsOn(); l_pLabelPlacementMapper->Update(); vtkActor2D* l_pActor = vtkActor2D::New(); l_pActor->SetMapper(l_pLabelPlacementMapper); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); iren->SetRenderWindow(renWin); renWin->Delete(); vtkRenderer *renderer = vtkRenderer::New(); renWin->AddRenderer(renderer); renderer->Delete(); renderer->SetBackground(0.0,0.0,0.0); renderer->SetAmbient(1.0,1.0,1.0); renWin->SetSize(300,300); renderer->AddActor(l_pActor); renWin->Render(); renderer->ResetCamera(); renWin->Render(); iren->Start(); ------ -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-see-Unicode-characters-on-vtkActor2D-stack-overflow-runtime-error-tp5734547.html Sent from the VTK - Users mailing list archive at Nabble.com. From xabivtk at gmail.com Mon Oct 26 06:47:33 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 26 Oct 2015 11:47:33 +0100 Subject: [vtkusers] [vtk-developers] Call to Render on WM_PAINT in vtkWin32RenderWindowInteractor In-Reply-To: <5b7a1fe530dc0794b1e9e0d163cd0de0@mail.gmail.com> References: <5b7a1fe530dc0794b1e9e0d163cd0de0@mail.gmail.com> Message-ID: Ok, then i will push a patch in GitLab. however, in vtkRenderWindowInteractor::Render() there is a call to this->InvokeEvent(vtkCommand::RenderEvent, NULL); do you think I have to move it to vtkWin32RenderWindowInteractor::vtkHandleMessage2 where the extra render was called? otherwise there is just the StartEvent and EndEvent of vtkRenderWindow::Render Also, is it considered as a fix, to put it in the 6.3 branch? 2015-10-23 17:48 GMT+02:00 Ken Martin : > No clue why it has a paint, but if everything passes with it removed then > I think it would be a good fix - Ken > > > > Ken Martin PhD > > Chairman & CFO > > Kitware Inc. > > 28 Corporate Drive > > Clifton Park NY 12065 > > ken.martin at kitware.com > > 919 869-8871 (w) > > > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf > Of *Xabi Riobe > *Sent:* Friday, October 2, 2015 8:43 AM > *To:* VTK Users; VTK Developers > *Subject:* [vtk-developers] Call to Render on WM_PAINT in > vtkWin32RenderWindowInteractor > > > > Hi, > > > > Does someone know why in vtkWin32RenderWindowInteractor::vtkHandleMessage2 > there is the Render() call on WM_PAINT: > > > > case WM_PAINT: > > me->Render(); > > return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); > > break; > > > > since CallWindowProc will lead to vtkWin32OpenGLRenderWindow::MessageProc > that performs the rendering on WM_PAINT > > > > So we have a double rendering that can be slow... > > > > For example, resize a render window and you can see this happening. > > > > Thanks for any info about that > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 26 09:16:29 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 26 Oct 2015 09:16:29 -0400 Subject: [vtkusers] Image Blob as polydata. In-Reply-To: <1445648984545-5734545.post@n5.nabble.com> References: <1445568723336-5734533.post@n5.nabble.com> <1445648984545-5734545.post@n5.nabble.com> Message-ID: Hi Tariq, It would be easier to diagnose with a full code listing that includes the class instantiation so we know what classes you are using. As it is, I can guess that you are using vtkImageThreshold instead of vtkThreshold. vtkImageThreshold will not clip away the cells you don't want - you need to use vtkThreshold to do that. vtkImageThreshold will produce a vtkImageData output where the voxel values may change, but it won't clip away any data. On a side note, I recommend that you do the following to set up your pipeline: vtkJPEGReader* jpgRead = vtkJPEGReader::New(); jpgRead->SetFileName(y.c_str()); vtkThresholdFilter* thresholder = vtkThresholdFilter::New(); threshold->SetInputConnection(jpgRead->GetOutputPort()); vtkDataSetSurfaceFilter* dataSurface = vtkDataSetSurfaceFilter::New(); dataSurface->SetInputConnection(threshold->GetOutputPort()); vtkPolyDataMapper* pMapper = vtkPolyDataMapper::New(); pMapper->SetInputConnection(dataSurface->GetOutputPort()); ... Note that you do not need to explicitly update each filter - the pipeline will figure out when each filter needs to be updated. Thanks, Cory On Fri, Oct 23, 2015 at 9:09 PM, tariq wrote: > hi Cory, > this is the code I wrote > jpgRead->SetFileName(y.c_str()); > jpgRead->Update(); > imageData = jpgRead->GetOutput(); > imageThreshold->SetInputData(imageData); > unsigned char lower = 250; > unsigned char upper = 255; > imageThreshold->ThresholdBetween(lower, upper); > imageThreshold->ReplaceInOn(); > imageThreshold->SetInValue(255); > imageThreshold->Update(); > dataSurface->DataSetExecute(imageThreshold->GetOutput(), pData); > pMapper->SetInputData(pData); > outputtActor->SetMapper(pMapper); > outputtActor->GetProperty()->SetRepresentationToWireframe(); > inputActor->SetInputData(imageData); > > rendering input on the left and output on the right (wireframe). All the > cells (black or white are propagated to the output). how can I get hold of > the black cells only? I would settle for that, instead of the boundary of > the black cells region. > I appreciate the help. > < > http://vtk.1045678.n5.nabble.com/file/n5734545/Screen_Shot_2015-10-23_at_6.png > > > Thanks. > T. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533p5734545.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner at sembach.de Mon Oct 26 09:25:40 2015 From: werner at sembach.de (Werner Sembach) Date: Mon, 26 Oct 2015 14:25:40 +0100 Subject: [vtkusers] Replacing Image Data Message-ID: <562E29D4.50906@sembach.de> I have a main object with a ImageData pointer which is also doing all the rendering stuff. At some point i want to replace the vtk image data from wihting a method of another class. So i have a setter method in my main class that gets a new image Data pointer that should replace the old one. But it dosn't work, rendering give me a blackscreen and when i want tocall functions of the new image data i get a segfault. (Pseudo)Code: vtkImageData* image; main{ image = vtkImageData::New(); //writing some example output in image //create Mapper, Actor and Render Window //connect all stuf together callTheOtherClassToDoSomeMath(); } //called from the other class after individual computation steps are finished updateImage(vtkImageData* newImage) { image=newImage; //from here on functions like image->GetNumberOfScalars() give segfault image->Modifyed(); renderWindow->Render(); } From guanw at rhpcs.mcmaster.ca Mon Oct 26 10:31:33 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Mon, 26 Oct 2015 10:31:33 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: References: <562008DD.9050908@rhpcs.mcmaster.ca> <562A9786.8030003@rhpcs.mcmaster.ca> Message-ID: <562E3945.2030206@rhpcs.mcmaster.ca> Hi David, Thank you very much for helping me understand reference counting in VTK. Most of my questions are answered except this one: A->SetInputConnection(B->GetOutputPort()); Why A's reference count is incremented after the above statement, not B's? I think B is used by A, so that B's reference count should be incremented. Am I right? Best, Weiguang On 23/10/2015 5:07 PM, David Cole wrote: > There is nothing that guarantees the reference count of an object > derived from vtkObject will be any certain value immediately after > construction. > > It totally depends on what happens to the object during its > constructor. It might set up a whole network of other objects, and > then give references to itself to some of them. Some of them might > increase the reference count of the object, some of them might not. > > If you call Register, the reference count goes up. If you call > Unregister, it goes down. If it goes down far enough, the object's > destructor is called and the memory is released. > > The mechanism itself has not changed significantly lately (that I know > of...), but individual objects may have changed their behavior with > respect to "what's the reference count immediately after construction" > or " what's the count after a single or repeated calls to > SetInputConnection..." > > You should not rely on the reference count value for anything other > than automatic cleanup when no more references exist. > > > HTH, > David C. > > > > On Fri, Oct 23, 2015 at 4:24 PM, Weiguang guan wrote: >> Hi Dan, >> >> Thank you very much for the reply. >> >> I still use the old way (vtkABC *v= vtkABC::New()) rather than using VTK >> smart pointer. The reference counting mechanism of VTK must have changed >> although I don't know when (which version) that happened. >> >> The reference count of a VTK object used to be 1 right after its creation. >> But now it is not always the case. I find source objects (like >> vtkCubeSource, vtkImageEllipsoidSource, etc) have reference count = 2 right >> after being created while filter object have reference count = 1. I haven't >> checked every class to see if there is an exception to the above finding. >> >> Here is a three-line code section together with running results: >> vtkCubeSource* cube = vtkCubeSource::New(); // >> ReferenceCount of cube = 2 >> vtkShrinkPolyData* shrink = vtkShrinkPolyData::New(); // ReferenceCount >> of cube = 2, ReferenceCount of shrink= 1 >> shrink->SetInputConnection(cube->GetOutputPort()); // ReferenceCount >> of cube = 2, ReferenceCount of shrink= 2 >> It can not be explained by the old VTK reference counting mechanism. >> >> Best, >> Weiguang >> >> On 21/10/2015 3:11 PM, Dan Lipsa wrote: >> >> Hi Weiguang, >> Take a look at >> http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers >> This might clarify some of your questions. You have to remember that the >> reference count is stored in the objects themselves unlike the c++ >> shared_ptr where the reference count is stored in the shared pointer object. >> >> For the first question: do you assign the object to a vtk smart pointer? >> That would explain why the reference count is 2. >> For the rest of the questions: when you set up the pipeline there are other >> objects involved besides the filter themselves, so it is harder to >> understand of the reference count. >> >> Also you can set VTK_DEBUG_LEAKS when you build VTK if you are concerned >> about leaks. >> >> Dan >> >> >> On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan >> wrote: >>> Hello, >>> >>> I find, in debug mode, that the ReferenceCount of a >>> vtkImageEllipsoidSource object becomes 2 right after being initiated >>> (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could this >>> happen? >>> >>> My second question is --- when you make a connection >>> A->SetInputConnection(B->GetOutputPort()); Whose reference count will be >>> increased by 1, A or B? I think B's reference count should be increased >>> because it is used by A. But what I find is just the opposite. >>> >>> My third question is about setting up more than 1 connection for a filter. >>> Taking vtkImageMathematics as an example, I do >>> vtkImageMathematics* A = vtkImageMathematics::New(); >>> A->SetInputConnection(0, B1->GetOutputPort(); >>> A->SetInputConnection(0, B2->GetOutputPort(); >>> >>> I find that the reference count of A gets increased by the first >>> SetInputConnection() call only. >>> >>> Can someone explain how reference counting works in VTK? Thanks. >>> >>> Best, >>> Weiguang >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 DLRdave at aol.com Mon Oct 26 11:36:50 2015 From: DLRdave at aol.com (David Cole) Date: Mon, 26 Oct 2015 11:36:50 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: <562E3945.2030206@rhpcs.mcmaster.ca> References: <562008DD.9050908@rhpcs.mcmaster.ca> <562A9786.8030003@rhpcs.mcmaster.ca> <562E3945.2030206@rhpcs.mcmaster.ca> Message-ID: It depends on what A and B are, and what happens when you connect them ... With this line of code: A->SetInputConnection(B->GetOutputPort()); I would expect that the object returned by B's GetOutputPort method is the one whose ref count is increased. (But it also may not be, depending on what connections already exist prior to the call...) Neither, or one only, or both ref counts may go up depending on whether they are already ref-counted by other objects in the pipeline. In general, you cannot depend on the ref-counts changing when you connect or disconnect objects. You can count on this: if something needs to be kept alive by something else, it will either already have an existing ref count on it, or increase the ref count to keep it alive. If something is being detached or disconnected, it may or may not see its ref count decremented. It's totally context dependent: you have to dig in and learn about all the objects involved and understand all their interconnections to figure out what's going on. Hope this helps, David C. On Mon, Oct 26, 2015 at 10:31 AM, Weiguang guan wrote: > Hi David, > > Thank you very much for helping me understand reference counting in VTK. > Most of my questions are answered except this one: > > A->SetInputConnection(B->GetOutputPort()); > > Why A's reference count is incremented after the above statement, not B's? I > think B is used by A, so that B's reference count should be incremented. Am > I right? > > Best, > Weiguang > > On 23/10/2015 5:07 PM, David Cole wrote: >> >> There is nothing that guarantees the reference count of an object >> derived from vtkObject will be any certain value immediately after >> construction. >> >> It totally depends on what happens to the object during its >> constructor. It might set up a whole network of other objects, and >> then give references to itself to some of them. Some of them might >> increase the reference count of the object, some of them might not. >> >> If you call Register, the reference count goes up. If you call >> Unregister, it goes down. If it goes down far enough, the object's >> destructor is called and the memory is released. >> >> The mechanism itself has not changed significantly lately (that I know >> of...), but individual objects may have changed their behavior with >> respect to "what's the reference count immediately after construction" >> or " what's the count after a single or repeated calls to >> SetInputConnection..." >> >> You should not rely on the reference count value for anything other >> than automatic cleanup when no more references exist. >> >> >> HTH, >> David C. >> >> >> >> On Fri, Oct 23, 2015 at 4:24 PM, Weiguang guan >> wrote: >>> >>> Hi Dan, >>> >>> Thank you very much for the reply. >>> >>> I still use the old way (vtkABC *v= vtkABC::New()) rather than using VTK >>> smart pointer. The reference counting mechanism of VTK must have changed >>> although I don't know when (which version) that happened. >>> >>> The reference count of a VTK object used to be 1 right after its >>> creation. >>> But now it is not always the case. I find source objects (like >>> vtkCubeSource, vtkImageEllipsoidSource, etc) have reference count = 2 >>> right >>> after being created while filter object have reference count = 1. I >>> haven't >>> checked every class to see if there is an exception to the above finding. >>> >>> Here is a three-line code section together with running results: >>> vtkCubeSource* cube = vtkCubeSource::New(); // >>> ReferenceCount of cube = 2 >>> vtkShrinkPolyData* shrink = vtkShrinkPolyData::New(); // >>> ReferenceCount >>> of cube = 2, ReferenceCount of shrink= 1 >>> shrink->SetInputConnection(cube->GetOutputPort()); // >>> ReferenceCount >>> of cube = 2, ReferenceCount of shrink= 2 >>> It can not be explained by the old VTK reference counting mechanism. >>> >>> Best, >>> Weiguang >>> >>> On 21/10/2015 3:11 PM, Dan Lipsa wrote: >>> >>> Hi Weiguang, >>> Take a look at >>> http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers >>> This might clarify some of your questions. You have to remember that the >>> reference count is stored in the objects themselves unlike the c++ >>> shared_ptr where the reference count is stored in the shared pointer >>> object. >>> >>> For the first question: do you assign the object to a vtk smart pointer? >>> That would explain why the reference count is 2. >>> For the rest of the questions: when you set up the pipeline there are >>> other >>> objects involved besides the filter themselves, so it is harder to >>> understand of the reference count. >>> >>> Also you can set VTK_DEBUG_LEAKS when you build VTK if you are concerned >>> about leaks. >>> >>> Dan >>> >>> >>> On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan >>> wrote: >>>> >>>> Hello, >>>> >>>> I find, in debug mode, that the ReferenceCount of a >>>> vtkImageEllipsoidSource object becomes 2 right after being initiated >>>> (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could >>>> this >>>> happen? >>>> >>>> My second question is --- when you make a connection >>>> A->SetInputConnection(B->GetOutputPort()); Whose reference count will be >>>> increased by 1, A or B? I think B's reference count should be increased >>>> because it is used by A. But what I find is just the opposite. >>>> >>>> My third question is about setting up more than 1 connection for a >>>> filter. >>>> Taking vtkImageMathematics as an example, I do >>>> vtkImageMathematics* A = vtkImageMathematics::New(); >>>> A->SetInputConnection(0, B1->GetOutputPort(); >>>> A->SetInputConnection(0, B2->GetOutputPort(); >>>> >>>> I find that the reference count of A gets increased by the first >>>> SetInputConnection() call only. >>>> >>>> Can someone explain how reference counting works in VTK? Thanks. >>>> >>>> Best, >>>> Weiguang >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 lonni.besancon at gmail.com Mon Oct 26 12:42:25 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 26 Oct 2015 09:42:25 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1445612315711-5734538.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> <1445612315711-5734538.post@n5.nabble.com> Message-ID: <1445877745725-5734567.post@n5.nabble.com> Hello all, I can see that the topic is getting a lot of attention and unfortunately I have not been able to solve the issue yet. Has anyone else faced it and/or solved it ? Have a nice day -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734567.html Sent from the VTK - Users mailing list archive at Nabble.com. From henry.blanco at cbiomed.cu Mon Oct 26 11:48:58 2015 From: henry.blanco at cbiomed.cu (Henry Blanco) Date: Mon, 26 Oct 2015 11:48:58 -0400 Subject: [vtkusers] problems running a vtk java bindings example Message-ID: <1445874538.28640.16.camel@cohiba> Hello guys, I have set up and compiled VTK through cmake on a 64-bits Ubuntu 14.04, just to get VTK Java bindings, but I have failed to run a simple "Cone.java" example. Specifically, when I try to execute the statement: System.loadLibrary("vtkCommonJava"); The compiler throws the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1088) at Cone.(Cone.java:17) -------------------------------------- To specify what my problem is, please, read these comments: 1- The VTK compilation process produced the following .jar files (both placed at /usr/local/ directory): vtk-6.1.jar vtk-6.1-natives-Linux-x86_64.jar 2- The library files "vtkCommonJava.o" is not among those produced by the compilation process. 3- The most similar library file to "vtkCommonJava" that I have found is "libvtkCommonCoreJava.o", packed into the jar file "vtk-6.1-natives-Linux-x86_64.jar". I have included this file into the "Java Build Path" of my Eclipse IDE, as well as the jar file "vtk-6.1.jar", but still the program fails to run. I will appreciate any suggestions on what is missing here to run the java example. Thanks in advance. Henry From sebastien.jourdain at kitware.com Mon Oct 26 13:09:37 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 26 Oct 2015 11:09:37 -0600 Subject: [vtkusers] problems running a vtk java bindings example In-Reply-To: <1445874538.28640.16.camel@cohiba> References: <1445874538.28640.16.camel@cohiba> Message-ID: Hi Henry, As you noticed, you will need to unzip the vtk-6.1-natives-Linux-x86_64.jar file into a directory and add that directory path to your LD_LIBRARY_PATH environment variable. Then the rest, should follow. Seb On Mon, Oct 26, 2015 at 9:48 AM, Henry Blanco wrote: > Hello guys, I have set up and compiled VTK through cmake on a 64-bits > Ubuntu 14.04, just to get VTK Java bindings, but I have failed to run a > simple "Cone.java" example. Specifically, when I try to execute the > statement: > > System.loadLibrary("vtkCommonJava"); > > The compiler throws the following error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > vtkCommonJava in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) > at java.lang.Runtime.loadLibrary0(Runtime.java:849) > at java.lang.System.loadLibrary(System.java:1088) > at Cone.(Cone.java:17) > > -------------------------------------- > To specify what my problem is, please, read these comments: > > 1- The VTK compilation process produced the following .jar files (both > placed at /usr/local/ directory): > vtk-6.1.jar > vtk-6.1-natives-Linux-x86_64.jar > > 2- The library files "vtkCommonJava.o" is not among those produced by > the compilation process. > 3- The most similar library file to "vtkCommonJava" that I have found is > "libvtkCommonCoreJava.o", packed into the jar file > "vtk-6.1-natives-Linux-x86_64.jar". I have included this file into the > "Java Build Path" of my Eclipse IDE, as well as the jar file > "vtk-6.1.jar", but still the program fails to run. > > I will appreciate any suggestions on what is missing here to run the > java example. Thanks in advance. > > Henry > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 guanw at rhpcs.mcmaster.ca Mon Oct 26 13:13:46 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Mon, 26 Oct 2015 13:13:46 -0400 Subject: [vtkusers] Reference counting in 6.3 In-Reply-To: References: <562008DD.9050908@rhpcs.mcmaster.ca> <562A9786.8030003@rhpcs.mcmaster.ca> <562E3945.2030206@rhpcs.mcmaster.ca> Message-ID: <562E5F4A.2060801@rhpcs.mcmaster.ca> Thanks for the insight, David. I'm less worried from now on when seeing reference counting doesn't work the way I thought it should. Best, Weiguang On 26/10/2015 11:36 AM, David Cole wrote: > It depends on what A and B are, and what happens when you connect them ... > > With this line of code: > > A->SetInputConnection(B->GetOutputPort()); > > I would expect that the object returned by B's GetOutputPort method is > the one whose ref count is increased. (But it also may not be, > depending on what connections already exist prior to the call...) > > Neither, or one only, or both ref counts may go up depending on > whether they are already ref-counted by other objects in the pipeline. > In general, you cannot depend on the ref-counts changing when you > connect or disconnect objects. > > You can count on this: if something needs to be kept alive by > something else, it will either already have an existing ref count on > it, or increase the ref count to keep it alive. > > If something is being detached or disconnected, it may or may not see > its ref count decremented. It's totally context dependent: you have to > dig in and learn about all the objects involved and understand all > their interconnections to figure out what's going on. > > > Hope this helps, > David C. > > > > On Mon, Oct 26, 2015 at 10:31 AM, Weiguang guan wrote: >> Hi David, >> >> Thank you very much for helping me understand reference counting in VTK. >> Most of my questions are answered except this one: >> >> A->SetInputConnection(B->GetOutputPort()); >> >> Why A's reference count is incremented after the above statement, not B's? I >> think B is used by A, so that B's reference count should be incremented. Am >> I right? >> >> Best, >> Weiguang >> >> On 23/10/2015 5:07 PM, David Cole wrote: >>> There is nothing that guarantees the reference count of an object >>> derived from vtkObject will be any certain value immediately after >>> construction. >>> >>> It totally depends on what happens to the object during its >>> constructor. It might set up a whole network of other objects, and >>> then give references to itself to some of them. Some of them might >>> increase the reference count of the object, some of them might not. >>> >>> If you call Register, the reference count goes up. If you call >>> Unregister, it goes down. If it goes down far enough, the object's >>> destructor is called and the memory is released. >>> >>> The mechanism itself has not changed significantly lately (that I know >>> of...), but individual objects may have changed their behavior with >>> respect to "what's the reference count immediately after construction" >>> or " what's the count after a single or repeated calls to >>> SetInputConnection..." >>> >>> You should not rely on the reference count value for anything other >>> than automatic cleanup when no more references exist. >>> >>> >>> HTH, >>> David C. >>> >>> >>> >>> On Fri, Oct 23, 2015 at 4:24 PM, Weiguang guan >>> wrote: >>>> Hi Dan, >>>> >>>> Thank you very much for the reply. >>>> >>>> I still use the old way (vtkABC *v= vtkABC::New()) rather than using VTK >>>> smart pointer. The reference counting mechanism of VTK must have changed >>>> although I don't know when (which version) that happened. >>>> >>>> The reference count of a VTK object used to be 1 right after its >>>> creation. >>>> But now it is not always the case. I find source objects (like >>>> vtkCubeSource, vtkImageEllipsoidSource, etc) have reference count = 2 >>>> right >>>> after being created while filter object have reference count = 1. I >>>> haven't >>>> checked every class to see if there is an exception to the above finding. >>>> >>>> Here is a three-line code section together with running results: >>>> vtkCubeSource* cube = vtkCubeSource::New(); // >>>> ReferenceCount of cube = 2 >>>> vtkShrinkPolyData* shrink = vtkShrinkPolyData::New(); // >>>> ReferenceCount >>>> of cube = 2, ReferenceCount of shrink= 1 >>>> shrink->SetInputConnection(cube->GetOutputPort()); // >>>> ReferenceCount >>>> of cube = 2, ReferenceCount of shrink= 2 >>>> It can not be explained by the old VTK reference counting mechanism. >>>> >>>> Best, >>>> Weiguang >>>> >>>> On 21/10/2015 3:11 PM, Dan Lipsa wrote: >>>> >>>> Hi Weiguang, >>>> Take a look at >>>> http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers >>>> This might clarify some of your questions. You have to remember that the >>>> reference count is stored in the objects themselves unlike the c++ >>>> shared_ptr where the reference count is stored in the shared pointer >>>> object. >>>> >>>> For the first question: do you assign the object to a vtk smart pointer? >>>> That would explain why the reference count is 2. >>>> For the rest of the questions: when you set up the pipeline there are >>>> other >>>> objects involved besides the filter themselves, so it is harder to >>>> understand of the reference count. >>>> >>>> Also you can set VTK_DEBUG_LEAKS when you build VTK if you are concerned >>>> about leaks. >>>> >>>> Dan >>>> >>>> >>>> On Thu, Oct 15, 2015 at 4:13 PM, Weiguang guan >>>> wrote: >>>>> Hello, >>>>> >>>>> I find, in debug mode, that the ReferenceCount of a >>>>> vtkImageEllipsoidSource object becomes 2 right after being initiated >>>>> (vtkImageEllipsoidSourc::New()). It should be 1 not 2, right? How could >>>>> this >>>>> happen? >>>>> >>>>> My second question is --- when you make a connection >>>>> A->SetInputConnection(B->GetOutputPort()); Whose reference count will be >>>>> increased by 1, A or B? I think B's reference count should be increased >>>>> because it is used by A. But what I find is just the opposite. >>>>> >>>>> My third question is about setting up more than 1 connection for a >>>>> filter. >>>>> Taking vtkImageMathematics as an example, I do >>>>> vtkImageMathematics* A = vtkImageMathematics::New(); >>>>> A->SetInputConnection(0, B1->GetOutputPort(); >>>>> A->SetInputConnection(0, B2->GetOutputPort(); >>>>> >>>>> I find that the reference count of A gets increased by the first >>>>> SetInputConnection() call only. >>>>> >>>>> Can someone explain how reference counting works in VTK? Thanks. >>>>> >>>>> Best, >>>>> Weiguang >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> 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 Gerrick.Bivins at halliburton.com Mon Oct 26 13:38:33 2015 From: Gerrick.Bivins at halliburton.com (Gerrick Bivins) Date: Mon, 26 Oct 2015 17:38:33 +0000 Subject: [vtkusers] [EXTERNAL] problems running a vtk java bindings example In-Reply-To: <1445874538.28640.16.camel@cohiba> References: <1445874538.28640.16.camel@cohiba> Message-ID: Hi Henry, It looks like you are trying to reference the jar that has the natives in them. Last time I tried,unless you have some special handling code to extract the natives for your platform from that vtk-6.1-natives-Linux-x86_64.jar, I don't think you'll not be able to load the native dll's/so's at runtime. Vtk just isn't setup to do that for us. Currently, to run with java you need to extract those dll's/so's to some directory and then set your PATH/LD_LIBRARY_PATH etc to point to the directory and then run. I think you can also set some command line arg that will tell vtkNativeLibraries where to load them from. Gerrick -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Henry Blanco Sent: Monday, October 26, 2015 10:49 AM To: vtkusers at vtk.org Subject: [EXTERNAL] [vtkusers] problems running a vtk java bindings example Hello guys, I have set up and compiled VTK through cmake on a 64-bits Ubuntu 14.04, just to get VTK Java bindings, but I have failed to run a simple "Cone.java" example. Specifically, when I try to execute the statement: System.loadLibrary("vtkCommonJava"); The compiler throws the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1088) at Cone.(Cone.java:17) -------------------------------------- To specify what my problem is, please, read these comments: 1- The VTK compilation process produced the following .jar files (both placed at /usr/local/ directory): vtk-6.1.jar vtk-6.1-natives-Linux-x86_64.jar 2- The library files "vtkCommonJava.o" is not among those produced by the compilation process. 3- The most similar library file to "vtkCommonJava" that I have found is "libvtkCommonCoreJava.o", packed into the jar file "vtk-6.1-natives-Linux-x86_64.jar". I have included this file into the "Java Build Path" of my Eclipse IDE, as well as the jar file "vtk-6.1.jar", but still the program fails to run. I will appreciate any suggestions on what is missing here to run the java example. Thanks in advance. Henry _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 jose.de.paula at live.com Mon Oct 26 13:46:33 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Mon, 26 Oct 2015 10:46:33 -0700 (MST) Subject: [vtkusers] How ensure the size of an obj vtkImagereSlice? Message-ID: <1445881593217-5734576.post@n5.nabble.com> Hello users, I have a vtkImagereSlice representing a panoramic (with vtkImageResliceMapper-> SetSlabThickness (max_x) active). At the moment I do object measures with one ruler that implemented (basically the distance of two points transformed into MM). To fit the vtkImagereSlice within my panel (I use c ++ cli), I I moved the camera doing the calculation to focus on SetParallelScale. As you can see, the image is the size of the User Monitor (very large), and when I save with vtkRenderLargeImage have to put my surrender to size the image. How do I figure out the original size of vtkImagereSlice? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-ensure-the-size-of-an-obj-vtkImagereSlice-tp5734576.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Mon Oct 26 13:47:56 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 26 Oct 2015 18:47:56 +0100 Subject: [vtkusers] [vtk-users] OpenGL2 - GPU Volume Rendering performance Message-ID: Hi All, We are trying to make the switch to the new OpenGL2 backend for our application, and although the switch was easy (thanks for not breaking the API ;) ), we can see a significant slowdown on the GPU volume rendering part, especially during interaction. Typically we dropped from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same code around. This slow down can be seen in ParaView, if you compare the latest 4.4 OpenGL2 build with the classic 4.4 build while volume rendering a big enough volume (512^3) The blog post here http://www.kitware.com/blog/home/post/976 claims that the new GPU volume rendering implementation should be faster than the old one, is there some more detailed explanation somewhere ? Are there some important parameters that can make the difference ? Thanks, Simon PS : The polygonal rendering seems a lot faster with the new backend ! -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Oct 26 13:50:26 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 26 Oct 2015 11:50:26 -0600 Subject: [vtkusers] [EXTERNAL] problems running a vtk java bindings example In-Reply-To: References: <1445874538.28640.16.camel@cohiba> Message-ID: Hi Gerrick, You right VTK is not able to load the native dll/so at runtime from the native.jar. But that's definitely the goal, with also the publication to the maven repo of those native bundles. This way (when we get to it, or if the community help), vtk could just be declared as a maven dependency without having to worry about building it. On the other hand the command line/option you are talking about is -Djava.library.path=/some/dir, but I'm not sure it will work either. It seems you really need to get your environment variable properly setup. (Window: PATH, Linux: LD_LIBRARY_PATH, osx: DYLD_LIBRARY_PATH) Seb On Mon, Oct 26, 2015 at 11:38 AM, Gerrick Bivins < Gerrick.Bivins at halliburton.com> wrote: > Hi Henry, > It looks like you are trying to reference the jar that has the natives in > them. > Last time I tried,unless you have some special handling code to extract > the natives for your platform from that vtk-6.1-natives-Linux-x86_64.jar, > I don't think you'll not be able to load the native dll's/so's at runtime. > Vtk just isn't setup to do that for us. > > Currently, to run with java you need to extract those dll's/so's to some > directory > and then set your PATH/LD_LIBRARY_PATH etc to point to the directory and > then run. > I think you can also set some command line arg that will tell > vtkNativeLibraries > where to load them from. > Gerrick > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Henry Blanco > Sent: Monday, October 26, 2015 10:49 AM > To: vtkusers at vtk.org > Subject: [EXTERNAL] [vtkusers] problems running a vtk java bindings example > > Hello guys, I have set up and compiled VTK through cmake on a 64-bits > Ubuntu 14.04, just to get VTK Java bindings, but I have failed to run a > simple "Cone.java" example. Specifically, when I try to execute the > statement: > > System.loadLibrary("vtkCommonJava"); > > The compiler throws the following error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > vtkCommonJava in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) > at java.lang.Runtime.loadLibrary0(Runtime.java:849) > at java.lang.System.loadLibrary(System.java:1088) > at Cone.(Cone.java:17) > > -------------------------------------- > To specify what my problem is, please, read these comments: > > 1- The VTK compilation process produced the following .jar files (both > placed at /usr/local/ directory): > vtk-6.1.jar > vtk-6.1-natives-Linux-x86_64.jar > > 2- The library files "vtkCommonJava.o" is not among those produced by the > compilation process. > 3- The most similar library file to "vtkCommonJava" that I have found is > "libvtkCommonCoreJava.o", packed into the jar file > "vtk-6.1-natives-Linux-x86_64.jar". I have included this file into the > "Java Build Path" of my Eclipse IDE, as well as the jar file "vtk-6.1.jar", > but still the program fails to run. > > I will appreciate any suggestions on what is missing here to run the java > example. Thanks in advance. > > Henry > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 aashish.chaudhary at kitware.com Mon Oct 26 13:53:48 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 26 Oct 2015 13:53:48 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Simon, What kind of dataset you are using? Depending on the data type you might be using the GPU one or the unstructured renderer. The performance we measured is related to the GPU ray cast mapper and will apply only to the vtkImageData inputs. Also, helpful would be is if you can tell if the new mapper is bringing low resolution when you interact with the volume (and whether or not it happens with old mapper). Thanks, On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT wrote: > Hi All, > > We are trying to make the switch to the new OpenGL2 backend for our > application, and although the switch was easy (thanks for not breaking the > API ;) ), we can see a significant slowdown on the GPU volume rendering > part, especially during interaction. Typically we dropped from 15/20 fps to > 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same > code around. > > This slow down can be seen in ParaView, if you compare the latest 4.4 > OpenGL2 build with the classic 4.4 build while volume rendering a big > enough volume (512^3) > > The blog post here > http://www.kitware.com/blog/home/post/976 > claims that the new GPU volume rendering implementation should be faster > than the old one, is there some more detailed explanation somewhere ? Are > there some important parameters that can make the difference ? > > Thanks, > > Simon > > PS : The polygonal rendering seems a lot faster with the new backend ! > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > 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 > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Oct 26 13:57:22 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 26 Oct 2015 13:57:22 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Also, Do you have shading enabled? We fixed a bug with shading that was causing the slow performance a while back. I don't remember if that was included in 4.4 or not ( I can check ). - Aashish On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Simon, > > What kind of dataset you are using? Depending on the data type you might > be using > the GPU one or the unstructured renderer. The performance we measured is > related to the GPU ray cast mapper > and will apply only to the vtkImageData inputs. > > Also, helpful would be is if you can tell if the new mapper is bringing > low resolution when you interact with the volume (and whether or not it > happens with old mapper). > > Thanks, > > > On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT > wrote: > >> Hi All, >> >> We are trying to make the switch to the new OpenGL2 backend for our >> application, and although the switch was easy (thanks for not breaking the >> API ;) ), we can see a significant slowdown on the GPU volume rendering >> part, especially during interaction. Typically we dropped from 15/20 fps to >> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >> code around. >> >> This slow down can be seen in ParaView, if you compare the latest 4.4 >> OpenGL2 build with the classic 4.4 build while volume rendering a big >> enough volume (512^3) >> >> The blog post here >> http://www.kitware.com/blog/home/post/976 >> claims that the new GPU volume rendering implementation should be faster >> than the old one, is there some more detailed explanation somewhere ? Are >> there some important parameters that can make the difference ? >> >> Thanks, >> >> Simon >> >> PS : The polygonal rendering seems a lot faster with the new backend ! >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> 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 >> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Mon Oct 26 14:13:03 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 26 Oct 2015 19:13:03 +0100 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hello Aashish, Thanks for the quick answer We are using a vtkImageData, 512x512x591 with short element (you can find the dataset here : https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I think it's all about GPU volume raycast mapper. The new mapper does bring low resolution, but when compared to the old one, it seems less "low resolution" during interaction than the old one Shading is enabled, gradient opacity disabled Don't know if you need a minimal example, but I believe the GPURenderDemo used with this dataset is enough to highlight the slow down. Thanks Simon 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary : > Also, > > Do you have shading enabled? We fixed a bug with shading that was causing > the slow performance a while back. I don't remember if that was included in > 4.4 or not ( I can check ). > > - Aashish > > On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Simon, >> >> What kind of dataset you are using? Depending on the data type you might >> be using >> the GPU one or the unstructured renderer. The performance we measured is >> related to the GPU ray cast mapper >> and will apply only to the vtkImageData inputs. >> >> Also, helpful would be is if you can tell if the new mapper is bringing >> low resolution when you interact with the volume (and whether or not it >> happens with old mapper). >> >> Thanks, >> >> >> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT > > wrote: >> >>> Hi All, >>> >>> We are trying to make the switch to the new OpenGL2 backend for our >>> application, and although the switch was easy (thanks for not breaking the >>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>> part, especially during interaction. Typically we dropped from 15/20 fps to >>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>> code around. >>> >>> This slow down can be seen in ParaView, if you compare the latest 4.4 >>> OpenGL2 build with the classic 4.4 build while volume rendering a big >>> enough volume (512^3) >>> >>> The blog post here >>> http://www.kitware.com/blog/home/post/976 >>> claims that the new GPU volume rendering implementation should be faster >>> than the old one, is there some more detailed explanation somewhere ? Are >>> there some important parameters that can make the difference ? >>> >>> Thanks, >>> >>> Simon >>> >>> PS : The polygonal rendering seems a lot faster with the new backend ! >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Oct 26 14:45:16 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 26 Oct 2015 14:45:16 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT wrote: > Hello Aashish, > > Thanks for the quick answer > We are using a vtkImageData, 512x512x591 with short element (you can find > the dataset here : https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). > So I think it's all about GPU volume raycast mapper. > The new mapper does bring low resolution, but when compared to the old > one, it seems less "low resolution" during interaction than the old one > Right, so that's why its not a exact comparison. What happens is that depending on what is interactive, (you can set the desired update rate in VTK, not exposed in ParaView I believe), it will do interactive but with higher resolution (smaller sample distance). If they both have the same sample distance, then the new mapper should out perform the old one, however, there is another thing we need to consider here which is shading. > Shading is enabled, gradient opacity disabled > Can you disable the shading and see if now they both (opengl1 and 2) equally better? We already pushed a fix for it but not sure if that you have in your build. > > Don't know if you need a minimal example, but I believe the GPURenderDemo > used with this dataset is enough to highlight the slow down. > Yes, I will use this dataset. Thanks. > > Thanks > Simon > > > 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Also, >> >> Do you have shading enabled? We fixed a bug with shading that was causing >> the slow performance a while back. I don't remember if that was included in >> 4.4 or not ( I can check ). >> >> - Aashish >> >> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Simon, >>> >>> What kind of dataset you are using? Depending on the data type you might >>> be using >>> the GPU one or the unstructured renderer. The performance we measured is >>> related to the GPU ray cast mapper >>> and will apply only to the vtkImageData inputs. >>> >>> Also, helpful would be is if you can tell if the new mapper is bringing >>> low resolution when you interact with the volume (and whether or not it >>> happens with old mapper). >>> >>> Thanks, >>> >>> >>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hi All, >>>> >>>> We are trying to make the switch to the new OpenGL2 backend for our >>>> application, and although the switch was easy (thanks for not breaking the >>>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>>> part, especially during interaction. Typically we dropped from 15/20 fps to >>>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>>> code around. >>>> >>>> This slow down can be seen in ParaView, if you compare the latest 4.4 >>>> OpenGL2 build with the classic 4.4 build while volume rendering a big >>>> enough volume (512^3) >>>> >>>> The blog post here >>>> http://www.kitware.com/blog/home/post/976 >>>> claims that the new GPU volume rendering implementation should be >>>> faster than the old one, is there some more detailed explanation somewhere >>>> ? Are there some important parameters that can make the difference ? >>>> >>>> Thanks, >>>> >>>> Simon >>>> >>>> PS : The polygonal rendering seems a lot faster with the new backend ! >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Oct 26 15:12:11 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 26 Oct 2015 15:12:11 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Simon, I used your dataset on paraview master as of today on my Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 FPS with shading on with 1920x1080 resolution. Are you on the proper 4.4 or using RC1/RC2? I checked the shading performance fix was in 4.4 but not in RC's. I don't have access to Windows box right away but I will try there too. NOTE: You might get multiple emails because of the attachment size issue. Sorry about that. Thanks, On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > > > On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT > wrote: > >> Hello Aashish, >> >> Thanks for the quick answer >> We are using a vtkImageData, 512x512x591 with short element (you can find >> the dataset here : https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). >> So I think it's all about GPU volume raycast mapper. >> The new mapper does bring low resolution, but when compared to the old >> one, it seems less "low resolution" during interaction than the old one >> > > Right, so that's why its not a exact comparison. What happens is that > depending on what is interactive, (you can set the desired update rate in > VTK, not exposed in ParaView I believe), it will do interactive but with > higher resolution (smaller sample distance). If they both have the same > sample distance, then the new mapper should out perform the old one, > however, there is another thing we need to consider here which is shading. > > >> Shading is enabled, gradient opacity disabled >> > > Can you disable the shading and see if now they both (opengl1 and 2) > equally better? We already pushed a fix for it but not sure if that you > have in your build. > >> >> Don't know if you need a minimal example, but I believe the GPURenderDemo >> used with this dataset is enough to highlight the slow down. >> > > Yes, I will use this dataset. Thanks. > >> >> Thanks >> Simon >> >> >> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Also, >>> >>> Do you have shading enabled? We fixed a bug with shading that was >>> causing the slow performance a while back. I don't remember if that was >>> included in 4.4 or not ( I can check ). >>> >>> - Aashish >>> >>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Simon, >>>> >>>> What kind of dataset you are using? Depending on the data type you >>>> might be using >>>> the GPU one or the unstructured renderer. The performance we measured >>>> is related to the GPU ray cast mapper >>>> and will apply only to the vtkImageData inputs. >>>> >>>> Also, helpful would be is if you can tell if the new mapper is bringing >>>> low resolution when you interact with the volume (and whether or not it >>>> happens with old mapper). >>>> >>>> Thanks, >>>> >>>> >>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hi All, >>>>> >>>>> We are trying to make the switch to the new OpenGL2 backend for our >>>>> application, and although the switch was easy (thanks for not breaking the >>>>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>>>> part, especially during interaction. Typically we dropped from 15/20 fps to >>>>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>>>> code around. >>>>> >>>>> This slow down can be seen in ParaView, if you compare the latest 4.4 >>>>> OpenGL2 build with the classic 4.4 build while volume rendering a big >>>>> enough volume (512^3) >>>>> >>>>> The blog post here >>>>> http://www.kitware.com/blog/home/post/976 >>>>> claims that the new GPU volume rendering implementation should be >>>>> faster than the old one, is there some more detailed explanation somewhere >>>>> ? Are there some important parameters that can make the difference ? >>>>> >>>>> Thanks, >>>>> >>>>> Simon >>>>> >>>>> PS : The polygonal rendering seems a lot faster with the new backend ! >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: volume.png Type: image/png Size: 167601 bytes Desc: not available URL: From rax20037 at gmail.com Mon Oct 26 16:16:25 2015 From: rax20037 at gmail.com (Raul Huertas) Date: Mon, 26 Oct 2015 15:16:25 -0500 Subject: [vtkusers] Compiling OpenGL2 on mac os x Message-ID: <82A70742-0561-4CF6-ABBA-8A59AED79C15@gmail.com> Hello Everyone! I downloaded the source release of 6.3 and I had some issues in Mac OS X. I'm using Makefile generators. First I compiled it with the default settings and i had no issues. Then I proceed to activate the Opengl2 engine, and I had some erros in the linking step. It was like this: Undefined symbols: vtkFrameBufferObject::methodX, referenced, from ... vtkFrameBufferObject::methodY, referenced, from ... Checking the CMakeLists.txt in "Rendering/OpenGL2" I found this: if (NOT DEFINED OPENGL_ES_VERSION) set(Module_SRCS ${Module_SRCS} vtkDataTransferHelper.cxx vtkFrameBufferObject2.cxx vtkPixelBufferObject.cxx vtkRenderbuffer.cxx ) else() if (${OPENGL_ES_VERSION} MATCHES 3.0) set(Module_SRCS ${Module_SRCS} vtkFrameBufferObject.cxx vtkFrameBufferObject2.cxx vtkRenderbuffer.cxx ) endif() endif() So I changed OPENGL_ES_VERSION to 3.0 (always in the CMake GUI) and I had the following errors: Undefined symbols: vtkPixelBufferObject::methodZ, referenced, from ... vtkPixelBufferObject::methodW, referenced, from ... Since I'm very interested in using the opengl2 engine(specifically the new features on vtkOpenGLPolyDataMapper described here) I modified the CmakeLists.txt file to this: if (NOT DEFINED OPENGL_ES_VERSION) set(Module_SRCS ${Module_SRCS} vtkDataTransferHelper.cxx vtkFrameBufferObject2.cxx vtkPixelBufferObject.cxx vtkRenderbuffer.cxx ) else() if (${OPENGL_ES_VERSION} MATCHES 3.0) message( STATUS "OpenGL3 ACTIVATED!!!!!!!!") set(Module_SRCS ${Module_SRCS} vtkFrameBufferObject.cxx vtkFrameBufferObject2.cxx vtkPixelBufferObject.cxx vtkRenderbuffer.cxx ) endif() endif() And now it compiles perfectly and I already built an example in QtCreator. So, is this something to be fixed? will my programs crash? will I have conflict problems with your reflection system? Best regards! -- Piensa en el ambiente, antes de imprimir este e-mail piensa bien si es necesario hacerlo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Oct 26 16:53:01 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Oct 2015 16:53:01 -0400 Subject: [vtkusers] Compiling OpenGL2 on mac os x In-Reply-To: <82A70742-0561-4CF6-ABBA-8A59AED79C15@gmail.com> References: <82A70742-0561-4CF6-ABBA-8A59AED79C15@gmail.com> Message-ID: <20151026205301.GA28981@megas.khq.kitware.com> On Mon, Oct 26, 2015 at 15:16:25 -0500, Raul Huertas wrote: > else() > if (${OPENGL_ES_VERSION} MATCHES 3.0) > message( STATUS "OpenGL3 ACTIVATED!!!!!!!!") > set(Module_SRCS ${Module_SRCS} > vtkFrameBufferObject.cxx > vtkFrameBufferObject2.cxx > vtkPixelBufferObject.cxx > vtkRenderbuffer.cxx > ) On master, this seems to be: if (${OPENGL_ES_VERSION} MATCHES 3.0) set(Module_SRCS ${Module_SRCS} vtkFrameBufferObject2.cxx vtkPixelBufferObject.cxx vtkRenderbuffer.cxx ) endif() I think this is something which makes sense to backport. Ken? > And now it compiles perfectly and I already built an example in > QtCreator. So, is this something to be fixed? will my programs crash? > will I have conflict problems with your reflection system? The commit message mentions warnings. --Ben From david.gobbi at gmail.com Mon Oct 26 19:35:11 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Oct 2015 17:35:11 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: <1445568493925-5734532.post@n5.nabble.com> References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> <1445568493925-5734532.post@n5.nabble.com> Message-ID: Hi Ang, I think that I've identified the cause of the bug, and have posted a possible fix here: https://gitlab.kitware.com/vtk/vtk/commit/c5ed3a21 Could you fix OpenGL2/vtkOpenGLImageSliceMapper.cxx as shown above, recompile VTK, and check to see if it fixes your issue? I've done some tests here with the TestProg.cxx that you provided. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Mon Oct 26 21:56:37 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 26 Oct 2015 18:56:37 -0700 (MST) Subject: [vtkusers] Problem of VTK QVTKWidget and QOpenGLWidget Message-ID: <1445910997025-5734598.post@n5.nabble.com> Hi, I try to use Qt Designer to put a widget(promote to QVTKWidget) and a QOpenglWidget at same window. But my program crashed. My Qt Version is 5.5. Does someone encounter same problem with me?? -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-of-VTK-QVTKWidget-and-QOpenGLWidget-tp5734598.html Sent from the VTK - Users mailing list archive at Nabble.com. From pete.lee at qq.com Mon Oct 26 22:33:49 2015 From: pete.lee at qq.com (peterlee) Date: Mon, 26 Oct 2015 19:33:49 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1445877745725-5734567.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> <1445612315711-5734538.post@n5.nabble.com> <1445877745725-5734567.post@n5.nabble.com> Message-ID: <1445913229439-5734600.post@n5.nabble.com> Hi, I met same problem with Lonni, Requested modules not available: vtkInteractionStyle vtkRenderingOpenGL2 Is anybody can help solve it? Thanks in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734600.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Oct 26 22:55:53 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Oct 2015 20:55:53 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444877291814-5734423.post@n5.nabble.com> <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> <1445568493925-5734532.post@n5.nabble.com> Message-ID: On Mon, Oct 26, 2015 at 5:35 PM, David Gobbi wrote: > Hi Ang, > > I think that I've identified the cause of the bug, and have posted a > possible fix here: https://gitlab.kitware.com/vtk/vtk/commit/c5ed3a21 > > Could you fix OpenGL2/vtkOpenGLImageSliceMapper.cxx as shown > above, recompile VTK, and check to see if it fixes your issue? I've > done some tests here with the TestProg.cxx that you provided. > Hmm, actually I found a better fix, in vtkImageResliceMapper.cxx itself: https://gitlab.kitware.com/vtk/vtk/commit/db6ba7d2 If you could try this one, instead of the one that I linked in my previous email, it's probably the one that's going to go into VTK. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Tue Oct 27 00:59:22 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 26 Oct 2015 21:59:22 -0700 (MST) Subject: [vtkusers] Qt5.5 OpenGLWidget and QVtkWidget2 Message-ID: <1445921962055-5734605.post@n5.nabble.com> Hi, I try to use VTK and Qt together. But I got some troubles about QVTKWidget2. I need to put a widget promoted to class QVTKWidget2 and a custom QOpenGLWidget in same QMainWindow. But my program will crash if those components are in same window. How should I do for intergrading two widgets in same window? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Qt5-5-OpenGLWidget-and-QVtkWidget2-tp5734605.html Sent from the VTK - Users mailing list archive at Nabble.com. From leonid_dulman at yahoo.co.uk Tue Oct 27 01:12:36 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Tue, 27 Oct 2015 05:12:36 +0000 Subject: [vtkusers] Problem of VTK QVTKWidget and QOpenGLWidget In-Reply-To: <1445910997025-5734598.post@n5.nabble.com> Message-ID: <1445922756.21381.YahooMailBasic@web173103.mail.ir2.yahoo.com> I have many new problems with VTK 6.3 and Qt 5.5.0 and it seems to me, Qt 5.4.0 is more stable. Qt 5.5.0 is first future Qt 6.0.0 release and I think, that Qt 5.6.0 will be better. -------------------------------------------- On Tue, 10/27/15, LaChen wrote: Subject: [vtkusers] Problem of VTK QVTKWidget and QOpenGLWidget To: vtkusers at vtk.org Received: Tuesday, October 27, 2015, 4:56 AM Hi, I try to use Qt Designer to put a widget(promote to QVTKWidget) and a QOpenglWidget at same window. But my program crashed. My Qt Version is 5.5. Does someone encounter same problem with me?? -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-of-VTK-QVTKWidget-and-QOpenGLWidget-tp5734598.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From ysa0829 at gmail.com Tue Oct 27 02:05:54 2015 From: ysa0829 at gmail.com (Ang) Date: Mon, 26 Oct 2015 23:05:54 -0700 (MST) Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: References: <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> <1445568493925-5734532.post@n5.nabble.com> Message-ID: <1445925954304-5734607.post@n5.nabble.com> Hi David, I have tested already. This issue is fixed by using two methods that you provided in previous mail. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResliceMapper-problems-tp5734423p5734607.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Tue Oct 27 02:17:01 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 26 Oct 2015 23:17:01 -0700 (MST) Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: References: <1444212277297-5734298.post@n5.nabble.com> <1444267716193-5734313.post@n5.nabble.com> Message-ID: <1445926621438-5734608.post@n5.nabble.com> Hi, I had tried your advice. It's work fine. But I have another question. How can I lock the motion of the slice panel when mouse moving on this one? I needs to create two slices from different volume data. Can I implement it with VTK components?? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298p5734608.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Tue Oct 27 02:47:33 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 26 Oct 2015 23:47:33 -0700 (MST) Subject: [vtkusers] vtkImagePanelWidget Offscreen Renderer In-Reply-To: <1445926621438-5734608.post@n5.nabble.com> References: <1444212277297-5734298.post@n5.nabble.com> <1444267716193-5734313.post@n5.nabble.com> <1445926621438-5734608.post@n5.nabble.com> Message-ID: <1445928453769-5734609.post@n5.nabble.com> Sorry, I find the method to handle my problem. I write a class inherit vtkInteractorStyleTrackballCamera. I name the one as vtkInteractorStyleFreezeCamera. And I override all function about mouse motion. Those function are empty. Then, the camera is froze. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImagePanelWidget-Offscreen-Renderer-tp5734298p5734609.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Tue Oct 27 05:51:52 2015 From: sam24666806 at gmail.com (LaChen) Date: Tue, 27 Oct 2015 02:51:52 -0700 (MST) Subject: [vtkusers] Problem of VTK QVTKWidget and QOpenGLWidget In-Reply-To: <1445922756.21381.YahooMailBasic@web173103.mail.ir2.yahoo.com> References: <1445922756.21381.YahooMailBasic@web173103.mail.ir2.yahoo.com> Message-ID: <1445939512497-5734610.post@n5.nabble.com> Can you offer me which opengl version you use?? I use opengl, not openGL2. (I select it when building at CMake-GUI.) -- View this message in context: http://vtk.1045678.n5.nabble.com/Re-Problem-of-VTK-QVTKWidget-and-QOpenGLWidget-tp5734606p5734610.html Sent from the VTK - Users mailing list archive at Nabble.com. From jimmigoo at gmail.com Tue Oct 27 06:13:24 2015 From: jimmigoo at gmail.com (jimmigoo) Date: Tue, 27 Oct 2015 03:13:24 -0700 (MST) Subject: [vtkusers] Use UTF8 into vtkCornerAnnotation Message-ID: <1445940804808-5734611.post@n5.nabble.com> Hi everybody! I would like to set UTF8 coded strings to vtkCornerAnnotation. Investigating inside VTK class, I realized that on vtkCornerAnnotation class, there are 4 vtkActor2D and 4 vtkTextMapper. Derivating vtkCornerAnnotation class, I correctly set VTK_FONT_FILE family and DejaVuSans.ttf font file to the 4 vtkTextMappers. Anyway, when I call TextMapper[i]->SetInput(text) from vtkCornerAnnotation::TextReplace(vtkImageActor *ia, vtkImageMapToWindowLevelColors *wl), the UTF8 string I set from outside, is not handled and I see strange characters (the UTF8 coding) on VTK scenario. My question is: how I can see correctly symbols on vtkCornerAnnotation? Do I have to build my own VTK class, or does already exist a (new) class allowing to insert strings with special symbols? I'm looking for your reply. Kind Regards, jimmigoo -- View this message in context: http://vtk.1045678.n5.nabble.com/Use-UTF8-into-vtkCornerAnnotation-tp5734611.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Oct 27 08:08:34 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 27 Oct 2015 06:08:34 -0600 Subject: [vtkusers] vtkImageResliceMapper problems In-Reply-To: <1445925954304-5734607.post@n5.nabble.com> References: <1444962111662-5734444.post@n5.nabble.com> <1445395338132-5734491.post@n5.nabble.com> <1445482434841-5734517.post@n5.nabble.com> <1445568493925-5734532.post@n5.nabble.com> <1445925954304-5734607.post@n5.nabble.com> Message-ID: Hi Ang, Thanks for testing (and for reporting the problem). I'll merge the fix into VTK. - David On Tue, Oct 27, 2015 at 12:05 AM, Ang wrote: > Hi David, > > I have tested already. > > This issue is fixed by using two methods that you provided in previous > mail. > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Oct 27 08:14:52 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 27 Oct 2015 08:14:52 -0400 Subject: [vtkusers] Compiling OpenGL2 on mac os x In-Reply-To: <82A70742-0561-4CF6-ABBA-8A59AED79C15@gmail.com> References: <82A70742-0561-4CF6-ABBA-8A59AED79C15@gmail.com> Message-ID: <828aa81310f7bc7ecacdcd4619833146@mail.gmail.com> ?changed OPENGL_ES_VERSION to 3.0? If you are building for iOS/Android then that is fine, although I?m pretty sure ES 3.0 is broken in that version of VTK so you would be better off using VTK master as it now has dashboards for iOS/android ES2/ES3 so we know it is at least building etc. It sounds though like you are building for OSX. If you are building for OSX, then you should not turn on OPENGL_ES_VERSION as for OSX you are better off using the full OpenGL 3.2. If you accidentally turned on ES then you just need to delete the entry from the cache and rebuild and it should work. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Raul Huertas *Sent:* Monday, October 26, 2015 4:16 PM *To:* vtkusers at vtk.org *Subject:* [vtkusers] Compiling OpenGL2 on mac os x Hello Everyone! I downloaded the source release of 6.3 and I had some issues in Mac OS X. I'm using Makefile generators. First I compiled it with the default settings and i had no issues. Then I proceed to activate the Opengl2 engine, and I had some erros in the linking step. It was like this: Undefined symbols: *vtkFrameBufferObject*::methodX, referenced, from ... *vtkFrameBufferObject*::methodY, referenced, from ... Checking the CMakeLists.txt in "Rendering/OpenGL2" I found this: if (NOT DEFINED OPENGL_ES_VERSION) set(Module_SRCS ${Module_SRCS} vtkDataTransferHelper.cxx vtkFrameBufferObject2.cxx *vtkPixelBufferObject.cxx* vtkRenderbuffer.cxx ) else() if (${OPENGL_ES_VERSION} MATCHES 3.0) set(Module_SRCS ${Module_SRCS} *vtkFrameBufferObject.cxx* vtkFrameBufferObject2.cxx vtkRenderbuffer.cxx ) endif() endif() So I changed OPENGL_ES_VERSION to 3.0 (always in the CMake GUI) and I had the following errors: Undefined symbols: *vtkPixelBufferObject*::methodZ, referenced, from ... *vtkPixelBufferObject*::methodW, referenced, from ... Since I'm very interested in using the opengl2 engine(specifically the new features on vtkOpenGLPolyDataMapper described here ) I modified the CmakeLists.txt file to this: if (NOT DEFINED OPENGL_ES_VERSION) set(Module_SRCS ${Module_SRCS} vtkDataTransferHelper.cxx vtkFrameBufferObject2.cxx *vtkPixelBufferObject.cxx* vtkRenderbuffer.cxx ) else() if (${OPENGL_ES_VERSION} MATCHES 3.0) message( STATUS "OpenGL3 ACTIVATED!!!!!!!!") set(Module_SRCS ${Module_SRCS} *vtkFrameBufferObject.cxx* vtkFrameBufferObject2.cxx * vtkPixelBufferObject.cxx* vtkRenderbuffer.cxx ) endif() endif() And now it compiles perfectly and I already built an example in QtCreator. So, is this something to be fixed? will my programs crash? will I have conflict problems with your reflection system? Best regards! -- Piensa en el ambiente, antes de imprimir este e-mail piensa bien si es necesario hacerlo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From LDarlow at csir.co.za Tue Oct 27 08:59:16 2015 From: LDarlow at csir.co.za (Luke Darlow) Date: Tue, 27 Oct 2015 14:59:16 +0200 Subject: [vtkusers] Changing the range of a vtkPlotSurface does not cause a change to propagate to the vtkContextView Message-ID: <562F91440200004D00152019@pta-imo.csir.co.za> Good day, I am plotting a surface from a series of points. I am also plotting a 'slice' as another surface. This slice is limited by its X and Y range to cut the initial surface at a specific place. I have attached a screenshot of this circumstance. I am populating the following variables: vtkSmartPointer zoneView;// The view to hold the surfaces vtkSmartPointer zoneChart;// The chart that holds the two surface plots vtkSmartPointer pointerPlot;// The "slice" plot vtkSmartPointer pointerSurface;// The table representing the "slice" plot I am using qT and linking the contextView with a QVTWidget in the following way: ui.surfacePlotQVTKWidget = new QVTKWidget(ui.zoneDetectionTab); ui.surfacePlotQVTKWidget->setObjectName(QStringLiteral("surfacePlotQVTKWidget")); ui.surfacePlotQVTKWidget->setGeometry(QRect(90, 50, 512, 512)); zoneView->SetRenderWindow(ui.surfacePlotQVTKWidget->GetRenderWindow()); Where ui is the parent widget from qT. I would like to move the "slice" plot when I move a slider. I have achieved this with the following code: int depth = octVolume.at(0).height() / octVolume.at(0).width() * resolution; // Set up the surface plot for showing where we are in the scan for (float i = 0; i < resolution; ++i) { for (float j = 0; j < resolution; ++j) { if ((int)i == bscanIndex / displayedVolumeSparsityFactor & (int)j % 2) // Set the "slice" plot up so that it occupies the whole space. Limit its range later to make it appear as though it is a slice. { pointerSurface->SetValue(i, j, depth); } else { pointerSurface->SetValue(i, j, 0); } } } //Set the range to only show necessary stuffs pointerPlot->SetXRange(0, resolution); pointerPlot->SetYRange(bscanIndex / displayedVolumeSparsityFactor - 1, bscanIndex / displayedVolumeSparsityFactor + 1); pointerPlot->SetInputData(pointerSurface); zoneView->Render(); This works fine. HOWEVER, the line: pointerPlot->SetInputData(pointerSurface); is very slow as it has to add the data to the plot. I would prefer to simply change the YRange of this plot at this stage, but that change does NOT propogate to the chart and thus the view. I have tried updating the plot, chart, and view, and rendering the view. Nothing causes this change to propogate UNLESS I set the input data. Is there a way around the necessity to reset the input data every time I wish to change the range displayed? Thank you for your assistance, Kind regards, Luke. -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Oct 27 09:10:22 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 27 Oct 2015 09:10:22 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Dear Simon, Checking again. Wondering if you can provide some more detail on the binary you are using and whether or not without shading the rendering performance comparable to older version. Thanks, On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Simon, > > I used your dataset on paraview master as of today on my Linux box running > Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 FPS with > shading on with 1920x1080 resolution. > > Are you on the proper 4.4 or using RC1/RC2? I checked the shading > performance fix was in 4.4 but not in RC's. I don't have access to Windows > box right away but I will try there too. > > NOTE: You might get multiple emails because of the attachment size issue. > Sorry about that. > > Thanks, > > On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> >> >> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT > > wrote: >> >>> Hello Aashish, >>> >>> Thanks for the quick answer >>> We are using a vtkImageData, 512x512x591 with short element (you can >>> find the dataset here : >>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I think it's >>> all about GPU volume raycast mapper. >>> The new mapper does bring low resolution, but when compared to the old >>> one, it seems less "low resolution" during interaction than the old one >>> >> >> Right, so that's why its not a exact comparison. What happens is that >> depending on what is interactive, (you can set the desired update rate in >> VTK, not exposed in ParaView I believe), it will do interactive but with >> higher resolution (smaller sample distance). If they both have the same >> sample distance, then the new mapper should out perform the old one, >> however, there is another thing we need to consider here which is shading. >> >> >>> Shading is enabled, gradient opacity disabled >>> >> >> Can you disable the shading and see if now they both (opengl1 and 2) >> equally better? We already pushed a fix for it but not sure if that you >> have in your build. >> >>> >>> Don't know if you need a minimal example, but I believe the >>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>> >> >> Yes, I will use this dataset. Thanks. >> >>> >>> Thanks >>> Simon >>> >>> >>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Also, >>>> >>>> Do you have shading enabled? We fixed a bug with shading that was >>>> causing the slow performance a while back. I don't remember if that was >>>> included in 4.4 or not ( I can check ). >>>> >>>> - Aashish >>>> >>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> Simon, >>>>> >>>>> What kind of dataset you are using? Depending on the data type you >>>>> might be using >>>>> the GPU one or the unstructured renderer. The performance we measured >>>>> is related to the GPU ray cast mapper >>>>> and will apply only to the vtkImageData inputs. >>>>> >>>>> Also, helpful would be is if you can tell if the new mapper is >>>>> bringing low resolution when you interact with the volume (and whether or >>>>> not it happens with old mapper). >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> We are trying to make the switch to the new OpenGL2 backend for our >>>>>> application, and although the switch was easy (thanks for not breaking the >>>>>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>>>>> part, especially during interaction. Typically we dropped from 15/20 fps to >>>>>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>>>>> code around. >>>>>> >>>>>> This slow down can be seen in ParaView, if you compare the latest 4.4 >>>>>> OpenGL2 build with the classic 4.4 build while volume rendering a big >>>>>> enough volume (512^3) >>>>>> >>>>>> The blog post here >>>>>> http://www.kitware.com/blog/home/post/976 >>>>>> claims that the new GPU volume rendering implementation should be >>>>>> faster than the old one, is there some more detailed explanation somewhere >>>>>> ? Are there some important parameters that can make the difference ? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Simon >>>>>> >>>>>> PS : The polygonal rendering seems a lot faster with the new backend ! >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From LDarlow at csir.co.za Tue Oct 27 08:48:26 2015 From: LDarlow at csir.co.za (Luke Darlow) Date: Tue, 27 Oct 2015 14:48:26 +0200 Subject: [vtkusers] Release Build/Install failing with regard to linking in visual studio Message-ID: <562F8EBA0200004D00151FE4@pta-imo.csir.co.za> Good day, I have been using VTK in conjunction with qT in visual studio. I really enjoy its capability and it is very useful to me. However, when trying to build in release configuration visual studio gives linking issues. I am using VTK 6.1.0 and gT 5.5. I have built the debug and release versions of VTK using CMAKE and visual studio. The builds were both successful. I have also built the "install" project on both accounts into two separate locations (Debug and Release). I have linked the two different versions of my application (in visual studio 2013) to the respective installed libraries (i.e., C:\VTK\release\lib for the release config, and C:\VTK\debug\lib for the debug config) and included the necessary libraries as "input" to the linker. I have also copied the correct dlls into the folder where the .exes of the application are. I did this first with the debug version in order to get it to work, and more recently with the release version, without winning. I know that these dlls are different configs because they are different sizes. I did this copying on account of not wanting to set an environment variable because the dlls have the same name in each case. The project compiles fine, but does not link in Release config. Everything works fine in Debug mode. Can you help me please? Luke. -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Tue Oct 27 09:24:25 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 27 Oct 2015 06:24:25 -0700 (MST) Subject: [vtkusers] How ensure the size of an obj vtkImagereSlice? In-Reply-To: <1445881593217-5734576.post@n5.nabble.com> References: <1445881593217-5734576.post@n5.nabble.com> Message-ID: <1445952265444-5734618.post@n5.nabble.com> I could do!If someone needs done as follows.this->SuspendLayout(); // save old values of size int dimensaoNova[2], dimensaoAntiga[2]; dimensaoAntiga[0] = plPanoramica->Size.Width; dimensaoAntiga[1] = plPanoramica->Size.Height; // to capture the values of the current monitor DPI float dpiX, dpiY; Graphics^ graphics = this->CreateGraphics(); dpiX = graphics->DpiX; dpiY = graphics->DpiY; delete graphics; // the value in MM for X double mmX = abs(GetImageSlice()->GetXRange()[1]); // the value in MM to Y double mmY = abs(GetImageSlice()->GetYRange()[1] * GetConnectorItkVtk()->GetOutput()->GetSpacing()[1]); //MM * dpi / polegada dimensaoNova[0] = (mmX * dpiX) / 25.4; dimensaoNova[1] = (mmY * dpiY) / 25.4; // changes the renderWindow to the new value, remembering that my camera this has focused on the image using ParallelProjectionOn GetRenderWindow()->SetSize(dimensaoNova); // Convert a renderWindow to an image vtkSmartPointer renderLarge = vtkSmartPointer::New(); renderLarge->SetInput(GetRenderer2D()); renderLarge->SetMagnification(1); renderLarge->Update(); // write the image vtkSmartPointer< vtkBMPWriter>jw = vtkSmartPointer::New(); jw->SetInputData(renderLarge->GetOutput()); jw->SetFileName("d:/panoramica.bmp"); jw->Write(); // returns the size values for renderwindow GetRenderWindow()->SetSize(dimensaoAntiga); this->ResumeLayout(); -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkusers-How-ensure-the-size-of-an-obj-vtkImagereSlice-tp5734576p5734618.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Tue Oct 27 09:43:05 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 27 Oct 2015 14:43:05 +0100 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hello Aashish, Sorry for the late answer, I was busy this morning. Thanks for testing with the DataSet. I agree the performance is still quite good with the new backend, and I also get something like 15/20 fps on windows on an HD screen. But when compared to the old one, and in some condition (when zoomed especially), it looks really slower to me The two tested version are : - ParaView 4.4.0 64 bits final version for the old backend - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia Quadro K420 To highlight the difference, here is what I do : - Launch both version on the same computer at the same time - Load the above dataset on each - Select volume rendering - Adjust the transfer function data range to [100-750] (the default "Cool to Warm" is fine) - Set the view direction to +Y - Adjust the Y of the camera position to -300 And start interacting ... Dunno if there is an easy way to print out the Frame Rate in Paraview, but the new version seems really twice slower in these conditions... We can see it does not scale in the same way, the old backend seems more aggressive on the image sample reduction, hence the interactivity is better. Shading enable or not does not change much I'm aware of the DesiredUpdateRate thing, we use to play with this with the old backend to fine tune the interactivity, although what's really inside was never clear to me I hope that there is enough information for you to reproduce this, do not hesitate to ask for some more information. Thanks a lot for your help Simon 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary : > Dear Simon, > > Checking again. Wondering if you can provide some more detail on the > binary you are using and whether or not without shading the rendering > performance comparable to older version. > > Thanks, > > > On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Simon, >> >> I used your dataset on paraview master as of today on my Linux box >> running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 FPS >> with shading on with 1920x1080 resolution. >> >> Are you on the proper 4.4 or using RC1/RC2? I checked the shading >> performance fix was in 4.4 but not in RC's. I don't have access to Windows >> box right away but I will try there too. >> >> NOTE: You might get multiple emails because of the attachment size issue. >> Sorry about that. >> >> Thanks, >> >> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> >>> >>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello Aashish, >>>> >>>> Thanks for the quick answer >>>> We are using a vtkImageData, 512x512x591 with short element (you can >>>> find the dataset here : >>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I think it's >>>> all about GPU volume raycast mapper. >>>> The new mapper does bring low resolution, but when compared to the old >>>> one, it seems less "low resolution" during interaction than the old one >>>> >>> >>> Right, so that's why its not a exact comparison. What happens is that >>> depending on what is interactive, (you can set the desired update rate in >>> VTK, not exposed in ParaView I believe), it will do interactive but with >>> higher resolution (smaller sample distance). If they both have the same >>> sample distance, then the new mapper should out perform the old one, >>> however, there is another thing we need to consider here which is shading. >>> >>> >>>> Shading is enabled, gradient opacity disabled >>>> >>> >>> Can you disable the shading and see if now they both (opengl1 and 2) >>> equally better? We already pushed a fix for it but not sure if that you >>> have in your build. >>> >>>> >>>> Don't know if you need a minimal example, but I believe the >>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>> >>> >>> Yes, I will use this dataset. Thanks. >>> >>>> >>>> Thanks >>>> Simon >>>> >>>> >>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Also, >>>>> >>>>> Do you have shading enabled? We fixed a bug with shading that was >>>>> causing the slow performance a while back. I don't remember if that was >>>>> included in 4.4 or not ( I can check ). >>>>> >>>>> - Aashish >>>>> >>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> Simon, >>>>>> >>>>>> What kind of dataset you are using? Depending on the data type you >>>>>> might be using >>>>>> the GPU one or the unstructured renderer. The performance we measured >>>>>> is related to the GPU ray cast mapper >>>>>> and will apply only to the vtkImageData inputs. >>>>>> >>>>>> Also, helpful would be is if you can tell if the new mapper is >>>>>> bringing low resolution when you interact with the volume (and whether or >>>>>> not it happens with old mapper). >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> We are trying to make the switch to the new OpenGL2 backend for our >>>>>>> application, and although the switch was easy (thanks for not breaking the >>>>>>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>>>>>> part, especially during interaction. Typically we dropped from 15/20 fps to >>>>>>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>>>>>> code around. >>>>>>> >>>>>>> This slow down can be seen in ParaView, if you compare the latest >>>>>>> 4.4 OpenGL2 build with the classic 4.4 build while volume rendering a big >>>>>>> enough volume (512^3) >>>>>>> >>>>>>> The blog post here >>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>> claims that the new GPU volume rendering implementation should be >>>>>>> faster than the old one, is there some more detailed explanation somewhere >>>>>>> ? Are there some important parameters that can make the difference ? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Simon >>>>>>> >>>>>>> PS : The polygonal rendering seems a lot faster with the new backend >>>>>>> ! >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Oct 27 09:48:45 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 27 Oct 2015 09:48:45 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hi Simon, This is helpful but just missing few more bits: 1) Did you try without the shading and see how the performance compares? 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one from (ParaView download page or did you built yourself?) Also, so on your system the old mapper is running 30FPS and the new one at 15-20 FPS as per your summary. Thanks, - Aashish On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT wrote: > Hello Aashish, > > Sorry for the late answer, I was busy this morning. > Thanks for testing with the DataSet. > I agree the performance is still quite good with the new backend, and I > also get something like 15/20 fps on windows on an HD screen. But when > compared to the old one, and in some condition (when zoomed especially), it > looks really slower to me > The two tested version are : > - ParaView 4.4.0 64 bits final version for the old backend > - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. > on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia Quadro K420 > > To highlight the difference, here is what I do : > - Launch both version on the same computer at the same time > - Load the above dataset on each > - Select volume rendering > - Adjust the transfer function data range to [100-750] (the default "Cool > to Warm" is fine) > - Set the view direction to +Y > - Adjust the Y of the camera position to -300 > > And start interacting ... > Dunno if there is an easy way to print out the Frame Rate in Paraview, but > the new version seems really twice slower in these conditions... We can see > it does not scale in the same way, the old backend seems more aggressive on > the image sample reduction, hence the interactivity is better. > Shading enable or not does not change much > > I'm aware of the DesiredUpdateRate thing, we use to play with this with > the old backend to fine tune the interactivity, although what's really > inside was never clear to me > > I hope that there is enough information for you to reproduce this, do not > hesitate to ask for some more information. > > Thanks a lot for your help > Simon > > > 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Dear Simon, >> >> Checking again. Wondering if you can provide some more detail on the >> binary you are using and whether or not without shading the rendering >> performance comparable to older version. >> >> Thanks, >> >> >> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Simon, >>> >>> I used your dataset on paraview master as of today on my Linux box >>> running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 FPS >>> with shading on with 1920x1080 resolution. >>> >>> Are you on the proper 4.4 or using RC1/RC2? I checked the shading >>> performance fix was in 4.4 but not in RC's. I don't have access to Windows >>> box right away but I will try there too. >>> >>> NOTE: You might get multiple emails because of the attachment size >>> issue. Sorry about that. >>> >>> Thanks, >>> >>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> >>>> >>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello Aashish, >>>>> >>>>> Thanks for the quick answer >>>>> We are using a vtkImageData, 512x512x591 with short element (you can >>>>> find the dataset here : >>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I think >>>>> it's all about GPU volume raycast mapper. >>>>> The new mapper does bring low resolution, but when compared to the old >>>>> one, it seems less "low resolution" during interaction than the old one >>>>> >>>> >>>> Right, so that's why its not a exact comparison. What happens is that >>>> depending on what is interactive, (you can set the desired update rate in >>>> VTK, not exposed in ParaView I believe), it will do interactive but with >>>> higher resolution (smaller sample distance). If they both have the same >>>> sample distance, then the new mapper should out perform the old one, >>>> however, there is another thing we need to consider here which is shading. >>>> >>>> >>>>> Shading is enabled, gradient opacity disabled >>>>> >>>> >>>> Can you disable the shading and see if now they both (opengl1 and 2) >>>> equally better? We already pushed a fix for it but not sure if that you >>>> have in your build. >>>> >>>>> >>>>> Don't know if you need a minimal example, but I believe the >>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>> >>>> >>>> Yes, I will use this dataset. Thanks. >>>> >>>>> >>>>> Thanks >>>>> Simon >>>>> >>>>> >>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> Also, >>>>>> >>>>>> Do you have shading enabled? We fixed a bug with shading that was >>>>>> causing the slow performance a while back. I don't remember if that was >>>>>> included in 4.4 or not ( I can check ). >>>>>> >>>>>> - Aashish >>>>>> >>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>> >>>>>>> Simon, >>>>>>> >>>>>>> What kind of dataset you are using? Depending on the data type you >>>>>>> might be using >>>>>>> the GPU one or the unstructured renderer. The performance we >>>>>>> measured is related to the GPU ray cast mapper >>>>>>> and will apply only to the vtkImageData inputs. >>>>>>> >>>>>>> Also, helpful would be is if you can tell if the new mapper is >>>>>>> bringing low resolution when you interact with the volume (and whether or >>>>>>> not it happens with old mapper). >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> >>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Hi All, >>>>>>>> >>>>>>>> We are trying to make the switch to the new OpenGL2 backend for our >>>>>>>> application, and although the switch was easy (thanks for not breaking the >>>>>>>> API ;) ), we can see a significant slowdown on the GPU volume rendering >>>>>>>> part, especially during interaction. Typically we dropped from 15/20 fps to >>>>>>>> 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with the same >>>>>>>> code around. >>>>>>>> >>>>>>>> This slow down can be seen in ParaView, if you compare the latest >>>>>>>> 4.4 OpenGL2 build with the classic 4.4 build while volume rendering a big >>>>>>>> enough volume (512^3) >>>>>>>> >>>>>>>> The blog post here >>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>> claims that the new GPU volume rendering implementation should be >>>>>>>> faster than the old one, is there some more detailed explanation somewhere >>>>>>>> ? Are there some important parameters that can make the difference ? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Simon >>>>>>>> >>>>>>>> PS : The polygonal rendering seems a lot faster with the new >>>>>>>> backend ! >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Oct 27 09:51:54 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 27 Oct 2015 06:51:54 -0700 (MST) Subject: [vtkusers] Instantiation of an InteractorStyle subclass Message-ID: <1445953914080-5734624.post@n5.nabble.com> Hello everyone, While simply trying to re-write one of the classes used in an example code of VTK , I decided to subclass vtkInteractorStyle in order to re-create a class very similar to vtkInteractorStyleTrackballCamera. Therefore I decide to copy/paste the implementation of vtkInteractorStyleTrackballCamera. However, I noticed in this code that the New() method is not implemented in the .cxx file yet the example seems to work just fine. But when I try to re-create it with my own version of the trackballcamera I get a Linking error on the new method of my own subclass. I therefore have two questions: How come the implementation of the New() method is not in the .cxx file? How come when I try to do the exact same thing (just copying/pasting and changing names) it does not work? I am at a loss about these two 'issues'. Hope you can help me figure them out. If you'd rather answer on StackOverflow I created a post there so you can get rep for your answer. Thanks in advance, -- View this message in context: http://vtk.1045678.n5.nabble.com/Instantiation-of-an-InteractorStyle-subclass-tp5734624.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Oct 27 09:55:12 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 27 Oct 2015 09:55:12 -0400 Subject: [vtkusers] Instantiation of an InteractorStyle subclass In-Reply-To: <1445953914080-5734624.post@n5.nabble.com> References: <1445953914080-5734624.post@n5.nabble.com> Message-ID: Lonni, You probably are missing the vtkStandardNewMacro() in the .cxx file. This defines the New() member function in a vast majority of VTK classes. HTH, Cory On Tue, Oct 27, 2015 at 9:51 AM, Lonni Besan?on wrote: > Hello everyone, > > While simply trying to re-write one of the classes used in an example code > of VTK , I decided to subclass vtkInteractorStyle in order to re-create a > class very similar to vtkInteractorStyleTrackballCamera. Therefore I decide > to copy/paste the implementation of vtkInteractorStyleTrackballCamera. > > However, I noticed in this code that the New() method is not implemented in > the .cxx file yet the example seems to work just fine. But when I try to > re-create it with my own version of the trackballcamera I get a Linking > error on the new method of my own subclass. > > I therefore have two questions: > > How come the implementation of the New() method is not in the .cxx file? > How come when I try to do the exact same thing (just copying/pasting and > changing names) it does not work? > I am at a loss about these two 'issues'. Hope you can help me figure them > out. > > If you'd rather answer on StackOverflow I created a post there > < > http://stackoverflow.com/questions/33369693/new-implementation-with-vtk-and-subclass > > > so you can get rep for your answer. > > Thanks in advance, > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Instantiation-of-an-InteractorStyle-subclass-tp5734624.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Oct 27 10:25:15 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 27 Oct 2015 07:25:15 -0700 (MST) Subject: [vtkusers] Instantiation of an InteractorStyle subclass In-Reply-To: References: <1445953914080-5734624.post@n5.nabble.com> Message-ID: <1445955915397-5734626.post@n5.nabble.com> Thanks for the reply but that was not the problem since I thought about adding it in the first place. See my edit on SO for more details (code). -- View this message in context: http://vtk.1045678.n5.nabble.com/Instantiation-of-an-InteractorStyle-subclass-tp5734624p5734626.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Oct 27 11:15:41 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 27 Oct 2015 11:15:41 -0400 Subject: [vtkusers] simple vtkLookupTable question In-Reply-To: <1445419373692-5734493.post@n5.nabble.com> References: <1445419373692-5734493.post@n5.nabble.com> Message-ID: Richard, It's actually a little bit involved. Here's Python code to generate ParaView's Black-Body Radiation color map, which I think is similar to ImageJ's 'hot' lookup table. import vtk cmap = vtk.vtkDiscretizableColorTransferFunction() cmap.SetColorSpaceToRGB() cmap.AddRGBPoint(0.0, 0.0, 0.0, 0.0) # black cmap.AddRGBPoint(0.4, 1.0, 0.9, 0.0) # reddish cmap.AddRGBPoint(0.8, 0.9, 0.9, 0.0) # yellow cmap.AddRGBPoint(1.0, 1.0, 1.0, 1.0) # white scalarValues = vtk.vtkFloatArray() scalarValues.SetNumberOfComponents(1) scalarValues.SetNumberOfTuples(256) for i in xrange(256): scalarValues.SetTupleValue(i, [i / 255.0]) table = cmap.MapScalars(scalarValues, 0, -1) for i in xrange(table.GetNumberOfTuples()): print table.GetTuple(i) Note that this defines a colormap for scalar values in the range [0, 1]. You can rescale the first arguments to AddRGBPoints() above for a different scalar range. Hope that helps, Cory On Wed, Oct 21, 2015 at 5:22 AM, mbcx9rb9 wrote: > I imagine this is a very simple question, but I haven't found the answer > already in the group. > > I have greyscale data that I want to apply a lookup table to. Currently, my > lowest value is red and my highest is blue, but I would like something that > looks more like the 'fire' lookup table in imageJ. > > In essence, I think I want my lowest value to be black and my highest to be > a red/white. Can anyone give me any pointers? > > Thanks in advance, > Richard Brown > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/simple-vtkLookupTable-question-tp5734493.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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Tue Oct 27 12:17:42 2015 From: richard.j.brown at live.co.uk (Richard Brown) Date: Tue, 27 Oct 2015 17:17:42 +0100 Subject: [vtkusers] simple vtkLookupTable question In-Reply-To: References: <1445419373692-5734493.post@n5.nabble.com> Message-ID: Cory, Thanks for the help. Found a long-winded way a few days ago, which would work for any colour lookup table that exists in imageJ. In case this helps anyone in the future, here?s what I did: In ImageJ, Image -> LookupTables -> Fire Image -> Color -> Show LUT -> List The list is of the form: index, R, G, B where RGB are 0 to 255. vtkLookupTable expects RGB between 0 and 1 so divide by 255 in the code With a little bit of copy and paste jiggerypokery for the SetTableValue(index,R,G,B), the vtkLookupTable then looks as follows: vtkSmartPointer l_p_fireLookupTable = vtkSmartPointer::New(); if (a_cutoffLimit == -1) l_p_fireLookupTable->SetRange(a_low, a_high); else l_p_fireLookupTable->SetRange(a_low, a_cutoffLimit); l_p_fireLookupTable->SetNumberOfColors(256); l_p_fireLookupTable->SetTableValue(0, 0./255., 0./255., 0./255.); l_p_fireLookupTable->SetTableValue(1, 0./255., 0./255., 7./255.); l_p_fireLookupTable->SetTableValue(2, 0./255., 0./255., 15./255.); l_p_fireLookupTable->SetTableValue(3, 0./255., 0./255., 22./255.); ... l_p_fireLookupTable->SetTableValue(253, 255./255., 255./255., 255./255.); l_p_fireLookupTable->SetTableValue(254, 255./255., 255./255., 255./255.); l_p_fireLookupTable->SetTableValue(255, 255./255., 255./255., 255./255.); l_p_fireLookupTable->Build(); Richard > On 27 Oct 2015, at 16:15, Cory Quammen wrote: > > Richard, > > It's actually a little bit involved. > > Here's Python code to generate ParaView's Black-Body Radiation color map, which I think is similar to ImageJ's 'hot' lookup table. > > import vtk > > cmap = vtk.vtkDiscretizableColorTransferFunction() > cmap.SetColorSpaceToRGB() > cmap.AddRGBPoint(0.0, 0.0, 0.0, 0.0) # black > cmap.AddRGBPoint(0.4, 1.0, 0.9, 0.0) # reddish > cmap.AddRGBPoint(0.8, 0.9, 0.9, 0.0) # yellow > cmap.AddRGBPoint(1.0, 1.0, 1.0, 1.0) # white > > scalarValues = vtk.vtkFloatArray() > scalarValues.SetNumberOfComponents(1) > scalarValues.SetNumberOfTuples(256) > for i in xrange(256): > scalarValues.SetTupleValue(i, [i / 255.0]) > > table = cmap.MapScalars(scalarValues, 0, -1) > > for i in xrange(table.GetNumberOfTuples()): > print table.GetTuple(i) > > Note that this defines a colormap for scalar values in the range [0, 1]. You can rescale the first arguments to AddRGBPoints() above for a different scalar range. > > Hope that helps, > Cory > > On Wed, Oct 21, 2015 at 5:22 AM, mbcx9rb9 > wrote: > I imagine this is a very simple question, but I haven't found the answer > already in the group. > > I have greyscale data that I want to apply a lookup table to. Currently, my > lowest value is red and my highest is blue, but I would like something that > looks more like the 'fire' lookup table in imageJ. > > In essence, I think I want my lowest value to be black and my highest to be > a red/white. Can anyone give me any pointers? > > Thanks in advance, > Richard Brown > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/simple-vtkLookupTable-question-tp5734493.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 > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Oct 27 12:22:37 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 27 Oct 2015 09:22:37 -0700 (MST) Subject: [vtkusers] Instantiation of an InteractorStyle subclass In-Reply-To: <1445955915397-5734626.post@n5.nabble.com> References: <1445953914080-5734624.post@n5.nabble.com> <1445955915397-5734626.post@n5.nabble.com> Message-ID: <1445962957899-5734631.post@n5.nabble.com> The problem is solved on Stack Overflow here Thank you all -- View this message in context: http://vtk.1045678.n5.nabble.com/Instantiation-of-an-InteractorStyle-subclass-tp5734624p5734631.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Oct 27 12:31:51 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 27 Oct 2015 12:31:51 -0400 Subject: [vtkusers] simple vtkLookupTable question In-Reply-To: References: <1445419373692-5734493.post@n5.nabble.com> Message-ID: That works too :-) On Tue, Oct 27, 2015 at 12:17 PM, Richard Brown wrote: > Cory, > > Thanks for the help. > > Found a long-winded way a few days ago, which would work for any colour > lookup table that exists in imageJ. > > In case this helps anyone in the future, here?s what I did: > > In ImageJ, > Image -> LookupTables -> Fire > Image -> Color -> Show LUT -> List > > The list is of the form: > index, R, G, B > where RGB are 0 to 255. vtkLookupTable expects RGB between 0 and 1 so > divide by 255 in the code > > With a little bit of copy and paste jiggerypokery for the > SetTableValue(index,R,G,B), the vtkLookupTable then looks as follows: > > vtkSmartPointer l_p_fireLookupTable = vtkSmartPointer::New(); > > > if (a_cutoffLimit == -1) l_p_fireLookupTable->SetRange(a_low, a_high); > > else l_p_fireLookupTable->SetRange(a_low, a_cutoffLimit); > > > l_p_fireLookupTable->SetNumberOfColors(256); > > > l_p_fireLookupTable->SetTableValue(0, 0./255., 0./255., 0./255.); > > l_p_fireLookupTable->SetTableValue(1, 0./255., 0./255., 7./255.); > > l_p_fireLookupTable->SetTableValue(2, 0./255., 0./255., 15./255.); > > l_p_fireLookupTable->SetTableValue(3, 0./255., 0./255., 22./255.); > > ... > > l_p_fireLookupTable->SetTableValue(253, 255./255., 255./255., 255./255.); > > l_p_fireLookupTable->SetTableValue(254, 255./255., 255./255., 255./255.); > > l_p_fireLookupTable->SetTableValue(255, 255./255., 255./255., 255./255.); > > > l_p_fireLookupTable->Build(); > > > Richard > > On 27 Oct 2015, at 16:15, Cory Quammen wrote: > > Richard, > > It's actually a little bit involved. > > Here's Python code to generate ParaView's Black-Body Radiation color map, > which I think is similar to ImageJ's 'hot' lookup table. > > import vtk > > cmap = vtk.vtkDiscretizableColorTransferFunction() > cmap.SetColorSpaceToRGB() > cmap.AddRGBPoint(0.0, 0.0, 0.0, 0.0) # black > cmap.AddRGBPoint(0.4, 1.0, 0.9, 0.0) # reddish > cmap.AddRGBPoint(0.8, 0.9, 0.9, 0.0) # yellow > cmap.AddRGBPoint(1.0, 1.0, 1.0, 1.0) # white > > scalarValues = vtk.vtkFloatArray() > scalarValues.SetNumberOfComponents(1) > scalarValues.SetNumberOfTuples(256) > for i in xrange(256): > scalarValues.SetTupleValue(i, [i / 255.0]) > > table = cmap.MapScalars(scalarValues, 0, -1) > > for i in xrange(table.GetNumberOfTuples()): > print table.GetTuple(i) > > Note that this defines a colormap for scalar values in the range [0, 1]. > You can rescale the first arguments to AddRGBPoints() above for a different > scalar range. > > Hope that helps, > Cory > > On Wed, Oct 21, 2015 at 5:22 AM, mbcx9rb9 > wrote: > >> I imagine this is a very simple question, but I haven't found the answer >> already in the group. >> >> I have greyscale data that I want to apply a lookup table to. Currently, >> my >> lowest value is red and my highest is blue, but I would like something >> that >> looks more like the 'fire' lookup table in imageJ. >> >> In essence, I think I want my lowest value to be black and my highest to >> be >> a red/white. Can anyone give me any pointers? >> >> Thanks in advance, >> Richard Brown >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/simple-vtkLookupTable-question-tp5734493.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 > R&D Engineer > Kitware, Inc. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Tue Oct 27 12:17:42 2015 From: richard.j.brown at live.co.uk (Richard Brown) Date: Tue, 27 Oct 2015 17:17:42 +0100 Subject: [vtkusers] simple vtkLookupTable question In-Reply-To: References: <1445419373692-5734493.post@n5.nabble.com> Message-ID: Cory, Thanks for the help. Found a long-winded way a few days ago, which would work for any colour lookup table that exists in imageJ. In case this helps anyone in the future, here?s what I did: In ImageJ, Image -> LookupTables -> Fire Image -> Color -> Show LUT -> List The list is of the form: index, R, G, B where RGB are 0 to 255. vtkLookupTable expects RGB between 0 and 1 so divide by 255 in the code With a little bit of copy and paste jiggerypokery for the SetTableValue(index,R,G,B), the vtkLookupTable then looks as follows: vtkSmartPointer l_p_fireLookupTable = vtkSmartPointer::New(); if (a_cutoffLimit == -1) l_p_fireLookupTable->SetRange(a_low, a_high); else l_p_fireLookupTable->SetRange(a_low, a_cutoffLimit); l_p_fireLookupTable->SetNumberOfColors(256); l_p_fireLookupTable->SetTableValue(0, 0./255., 0./255., 0./255.); l_p_fireLookupTable->SetTableValue(1, 0./255., 0./255., 7./255.); l_p_fireLookupTable->SetTableValue(2, 0./255., 0./255., 15./255.); l_p_fireLookupTable->SetTableValue(3, 0./255., 0./255., 22./255.); ... l_p_fireLookupTable->SetTableValue(253, 255./255., 255./255., 255./255.); l_p_fireLookupTable->SetTableValue(254, 255./255., 255./255., 255./255.); l_p_fireLookupTable->SetTableValue(255, 255./255., 255./255., 255./255.); l_p_fireLookupTable->Build(); Richard > On 27 Oct 2015, at 16:15, Cory Quammen wrote: > > Richard, > > It's actually a little bit involved. > > Here's Python code to generate ParaView's Black-Body Radiation color map, which I think is similar to ImageJ's 'hot' lookup table. > > import vtk > > cmap = vtk.vtkDiscretizableColorTransferFunction() > cmap.SetColorSpaceToRGB() > cmap.AddRGBPoint(0.0, 0.0, 0.0, 0.0) # black > cmap.AddRGBPoint(0.4, 1.0, 0.9, 0.0) # reddish > cmap.AddRGBPoint(0.8, 0.9, 0.9, 0.0) # yellow > cmap.AddRGBPoint(1.0, 1.0, 1.0, 1.0) # white > > scalarValues = vtk.vtkFloatArray() > scalarValues.SetNumberOfComponents(1) > scalarValues.SetNumberOfTuples(256) > for i in xrange(256): > scalarValues.SetTupleValue(i, [i / 255.0]) > > table = cmap.MapScalars(scalarValues, 0, -1) > > for i in xrange(table.GetNumberOfTuples()): > print table.GetTuple(i) > > Note that this defines a colormap for scalar values in the range [0, 1]. You can rescale the first arguments to AddRGBPoints() above for a different scalar range. > > Hope that helps, > Cory > > On Wed, Oct 21, 2015 at 5:22 AM, mbcx9rb9 > wrote: > I imagine this is a very simple question, but I haven't found the answer > already in the group. > > I have greyscale data that I want to apply a lookup table to. Currently, my > lowest value is red and my highest is blue, but I would like something that > looks more like the 'fire' lookup table in imageJ. > > In essence, I think I want my lowest value to be black and my highest to be > a red/white. Can anyone give me any pointers? > > Thanks in advance, > Richard Brown > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/simple-vtkLookupTable-question-tp5734493.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 > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Tue Oct 27 13:52:11 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 27 Oct 2015 18:52:11 +0100 Subject: [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget Message-ID: Hello All, Following our migration to the brand new OpenGL2 backend, the ButtonWidget seem's broken, the button display's a gray texture instead of an image with the new backend. This is visible in all our tested platform (Windows or OSX box) The following VTK wiki example reproduce the problem : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget OpenGL1 backend result : http://picpaste.com/pics/OGL1_1.1445968197.png OpenGL2 backend result : http://picpaste.com/pics/OGL2_1.1445968221.png Is it a known issue ? Any clue ? In our application we try to load a png image, but it always show a gray/white rectangle instead Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Tue Oct 27 16:08:52 2015 From: jim at jslengineeringsoftware.com (James Labiak) Date: Tue, 27 Oct 2015 16:08:52 -0400 Subject: [vtkusers] renderWindowInteractor.CreateRepeatingTimer(10) Message-ID: <562FD9D4.50104@jslengineeringsoftware.com> Hello All, My animation using Java, vtk 6.1, and repeating timer is not respecting the timer duration. Whether I set it to 10 milliseconds or 10,000, the animation rate is about 1 frame/sec. The relevant code follows. I have taken steps to make sure that there appear to be no memory leaks during the animation. RAM stays constant. (However, a stop button which uses the stopAction() method followed by an application close is not completely cleaning up the vtk objects yet, as found through debug_leaks.) Any suggestions on the repeating timer duration issue would be appreciated. Thanks, Jim ......some other code, then: this.renderWindowInteractor.Initialize(); this.renderWindowInteractor.AddObserver("TimerEvent", this, "myCallBack"); timerID = this.renderWindowInteractor.CreateRepeatingTimer(10000); System.out.println("timerID = 0" + timerID); this.renderWindowInteractor.Start(); public void myCallBack() { if (visualizationLoop < 150) { visualizationBegin(); } if (visualizationLoop == 150) { this.renderWindowInteractor.DestroyTimer(timerID); stopAction(); } private void stopAction() { this.renderWindowInteractor.DestroyTimer(timerID); this.renderWindowPanel.GetRenderer().RemoveAllViewProps(); // Proceed with vtk object cleanup, then start GC: vtkReferenceInformation info = vtkObject.JAVA_OBJECT_MANAGER.gc(true); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Tue Oct 27 19:21:55 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Tue, 27 Oct 2015 16:21:55 -0700 (MST) Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj Message-ID: <1445988115077-5734639.post@n5.nabble.com> When I try to build the project with included headers and libs in the VS 2010 following error occurs. Does anyone know which lib i forgot to add into project ? I`ve tried adding directX d3d9.lib also but nothing happens. Error 1 error LNK2001: unresolved external symbol _CLSID_WbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Error 2 error LNK2001: unresolved external symbol _IID_IWbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Thanks Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639.html Sent from the VTK - Users mailing list archive at Nabble.com. From g.bogle at auckland.ac.nz Tue Oct 27 19:24:09 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 27 Oct 2015 23:24:09 +0000 Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj In-Reply-To: <1445988115077-5734639.post@n5.nabble.com> References: <1445988115077-5734639.post@n5.nabble.com> Message-ID: The usual advice applies: use cmake to create the VS project file. ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of zarko.milosevic [zarko at kg.ac.rs] Sent: Wednesday, 28 October 2015 12:21 p.m. To: vtkusers at vtk.org Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj When I try to build the project with included headers and libs in the VS 2010 following error occurs. Does anyone know which lib i forgot to add into project ? I`ve tried adding directX d3d9.lib also but nothing happens. Error 1 error LNK2001: unresolved external symbol _CLSID_WbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Error 2 error LNK2001: unresolved external symbol _IID_IWbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Thanks Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From zarko at kg.ac.rs Tue Oct 27 19:34:01 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Tue, 27 Oct 2015 16:34:01 -0700 (MST) Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj In-Reply-To: References: <1445988115077-5734639.post@n5.nabble.com> Message-ID: That does not fits my needs. It is huge project and it has been working with previous version but stoped working after. Sent from my Samsung device -------- Original message -------- From: "Gib Bogle [via VTK]" Date: 28/10/2015 00:24 (GMT+01:00) To: "zarko.milosevic" Subject: Re: Linker error vtkDirectXGPUInfoList.obj The usual advice applies: use cmake to create the VS project file. ________________________________________ From: vtkusers [[hidden email]] on behalf of zarko.milosevic [[hidden email]] Sent: Wednesday, 28 October 2015 12:21 p.m. To: [hidden email] Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj When I try to build the project with included headers and libs in the VS 2010 following error occurs. Does anyone know which lib i forgot to add into project ? I`ve tried adding directX d3d9.lib also but nothing happens. Error ? 1 ? ? ? error LNK2001: unresolved external symbol _CLSID_WbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Error ? 2 ? ? ? error LNK2001: unresolved external symbol _IID_IWbemLocator E:\BioIRC\VTKTESTLIB\VTKTESTLIB\vtkRendering.lib(vtkDirectXGPUInfoList.obj) Thanks Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639.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 If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639p5734640.html To unsubscribe from Linker error vtkDirectXGPUInfoList.obj, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639p5734641.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Tue Oct 27 21:44:12 2015 From: sam24666806 at gmail.com (LaChen) Date: Tue, 27 Oct 2015 18:44:12 -0700 (MST) Subject: [vtkusers] Problem of VTK QVTKWidget and QOpenGLWidget In-Reply-To: <1445922756.21381.YahooMailBasic@web173103.mail.ir2.yahoo.com> References: <1445922756.21381.YahooMailBasic@web173103.mail.ir2.yahoo.com> Message-ID: <1445996652619-5734642.post@n5.nabble.com> Hi, I find a solution to solve this problem. The method is creating new class same logic with QVTKWidget2. But the new class is inheriting QOpenGLWidget. I already tried it with Qt5.5 version. And it work fine. This is the link about the solultion. http://stackoverflow.com/questions/26944831/using-qvtkwidget-and-qopenglwidget-in-the-same-ui -- View this message in context: http://vtk.1045678.n5.nabble.com/Re-Problem-of-VTK-QVTKWidget-and-QOpenGLWidget-tp5734606p5734642.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Wed Oct 28 05:37:58 2015 From: sam24666806 at gmail.com (LaChen) Date: Wed, 28 Oct 2015 02:37:58 -0700 (MST) Subject: [vtkusers] Some problem volume of slicing Message-ID: <1446025078566-5734643.post@n5.nabble.com> Hi all, If I needs to slice two volumes and overlay those slices together in the target window, which component should I used? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Some-problem-volume-of-slicing-tp5734643.html Sent from the VTK - Users mailing list archive at Nabble.com. From yangmin_hust at 126.com Wed Oct 28 06:00:33 2015 From: yangmin_hust at 126.com (minyang) Date: Wed, 28 Oct 2015 03:00:33 -0700 (MST) Subject: [vtkusers] Problem with two polydata clip Message-ID: <1446026433303-5734644.post@n5.nabble.com> This is VTK 5.10.1. Requirement: User pick several points on the screen, create a closed polygon, then cut the below mesh(polydata) with this polygon. Implement: Extrude the polygon, triangulate it and clip mesh Core Codes: vtkSmartPointer polyData = vtkSmartPointer::New(); polyData->SetPoints(polyLinePoints); polyData->SetPolys(polygons); vtkSmartPointer extrude = vtkSmartPointer::New(); extrude->SetInput(polyData); extrude->SetExtrusionTypeToNormalExtrusion(); extrude->CappingOn(); extrude->SetVector(0, 0, -1 ); extrude->SetScaleFactor (50); extrude->Update(); vtkSmartPointer tria = vtkSmartPointer::New(); tria->SetInputConnection(extrude->GetOutputPort()); tria->Update(); vtkSmartPointer norm = vtkSmartPointer::New(); norm->SetInput(tria->GetOutput()); vtkSmartPointer implicit_data = vtkSmartPointer::New(); implicit_data->SetInput(norm->GetOutput()); vtkSmartPointer clipper = vtkSmartPointer::New(); clipper->SetInput(inputMeshPolyData); clipper->SetClipFunction(implicit_data); clipper->GenerateClippedOutputOn(); clipper->InsideOutOn(); clipper->Update(); poly_data_copy = vtkPolyData::New(); poly_data_copy->DeepCopy(clipper->GetOutput()/*cutter->GetOutput()*/); vtkSmartPointer mapper_cut = vtkSmartPointer::New(); mapper_cut->SetInput(poly_data_copy); vtkSmartPointer actor_copy = vtkSmartPointer::New(); actor_copy->SetMapper(mapper_cut); actor_copy->VisibilityOn(); renderer->AddActor(actor_copy); renderWindow->Render(); Problem: In red circle, there are additional meshes clipped near the acute angle. These section should not be clipped. Any expert know what wrong of my codes? or is there any limition of VTK in handle two polygon clip? Thanks in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-two-polydata-clip-tp5734644.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Wed Oct 28 09:08:20 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 28 Oct 2015 09:08:20 -0400 Subject: [vtkusers] VTK for android In-Reply-To: <1445913229439-5734600.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> <1445612315711-5734538.post@n5.nabble.com> <1445877745725-5734567.post@n5.nabble.com> <1445913229439-5734600.post@n5.nabble.com> Message-ID: I think Casey is planning on a blog post showing how you can use VTK from within an Android Studio project. He is just busy right now so it may be a week or so before he gets it out. In the mean time you could put your example into VTK and it should build there like the existing examples if you are stuck. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of peterlee Sent: Monday, October 26, 2015 10:34 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK for android Hi, I met same problem with Lonni, Requested modules not available: vtkInteractionStyle vtkRenderingOpenGL2 Is anybody can help solve it? Thanks in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734600.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From kavyabellur.4 at gmail.com Wed Oct 28 10:30:14 2015 From: kavyabellur.4 at gmail.com (Kavya Bellur Padmesh) Date: Wed, 28 Oct 2015 08:30:14 -0600 Subject: [vtkusers] VTK + OpenHaptics interface In-Reply-To: <55E94B27.2010105@ec-nantes.fr> References: <899A343B-8E2D-4466-92CA-8F6AF4723D2C@ec-nantes.fr> <55E94B27.2010105@ec-nantes.fr> Message-ID: Hello Felipe, I am trying to implement device thread to interact with main thread with timer event. I am not able to retrieve force information back to device thread. Could you please share code snippet or pseudo code? Regards, Kavya On Fri, Sep 4, 2015 at 1:41 AM, Felipe Bordeu wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Kavya, > > Please reply to the list so anyone can contribute. > > I use only the vtk and the openHaptics libs. I wrote a simple pipeline and > use a TimerEvent to pull the data from the device at regular intervals. I > have two different threads to deal with the visual feedback and the force > feedback (the visual threads is to slow for the force feedback). So I don't > use the run time loop of the openHaptics libs. I usethe openHaptics libs > only to pull/push the position/force state of the device. > > Hope this is more clear. > Felipe > > > Le 03/09/2015 18:34, Kavya Jain a ?crit : > > Hello Felipe, > > > > Thank you for sharing it. Could you please provide me some details on > whether you have used any additional libraries to achieve this or partial > modification of openHaptics\VTK code? > > > > Regards, > > Kavya > > > > On Thu, Sep 3, 2015 at 10:23 AM, Felipe Bordeu Weldt < > felipe.bordeu at ec-nantes.fr > > wrote: > > > > Hi Kavla, > > > > I worked on this (here is a video > https://www.youtube.com/watch?v=Wq1lgHpxb9k). > > I use only vtk and OpenHaptics toolkit for this particular > application. But also I have other interfaces (wiimote/alsa midicontroler) > you can watch my videos on youtube. > > > > Felipe > > > > > > Le 3 sept. 2015 ? 18:11, Kavya Jain > a ?crit : > > > >> Hi Everyone, > >> > >> I am working on interfacing Phantom Omni device with VTK using > OpenHaptics toolkit. > >> If anyone working on similar topic, could you please share some > info on whether any additional library used? > >> > >> Regards, > >> Kavya > >> _______________________________________________ > >> Powered by www.kitware.com > > >> > >> Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > >> > >> 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 > > > > > > > - -- > Felipe Bordeu Weldt > Ing?nieur de Recherche > - ------------------------------------- > T?l. : 33 (0)2 40 37 16 57 > Fax. : 33 (0)2 40 74 74 06 > Felipe.Bordeu at ec-nantes.fr > Institut GeM - UMR CNRS 6183 > ?cole Centrale Nantes > 1 Rue de La No?, 44321 Nantes, FRANCE > - ------------------------------------- > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.22 (GNU/Linux) > > iQEcBAEBAgAGBQJV6UsnAAoJEE/fMfNgU9/DoOYIAImEDxBP+ZRNpMe7m2k4+6zQ > ObeZ14Mws0gLT+68JGrUAMYNJ4rm5W7tQBNmmxbEak0nw+txhUvlWt3BOkN5qgP3 > g82SutWQXcYbpD4I2IQOA4RMLHNi9P5zVPw8J4oiGOKnIsZ7hSgxP6ZotMCaoihr > NCgahtoNhch01+US5gA8GL0StDGAN7ySpOJO4ACsbouTcoyHVr9D7yBFK5qnQUsf > /imK6wev2m6QCYqUKQj9QIW4/RpXdUZd2b963RMQn4dgMVmYYeHg6DlpstKmY7Xt > X76Zj8Z5W8F58OGj99VdYqQNVoMrFVlVEcYU7ZMKMPY28PDzzIQqrU0ildFB95c= > =Z91E > -----END PGP SIGNATURE----- > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Oct 28 10:35:20 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 28 Oct 2015 10:35:20 -0400 Subject: [vtkusers] VTK + OpenHaptics interface In-Reply-To: References: Message-ID: Hi Kavya, You might also be interested in David Borland's vtkInteractionDevice software. I haven't used it in a few years, but it is a nice way to interface VTK with a Phantom Omni by way of VRPN. https://github.com/davidborland/vtkInteractionDevice Cory On Thu, Sep 3, 2015 at 12:11 PM, Kavya Jain wrote: > Hi Everyone, > > I am working on interfacing Phantom Omni device with VTK using OpenHaptics > toolkit. > If anyone working on similar topic, could you please share some info on > whether any additional library used? > > Regards, > Kavya > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Wed Oct 28 10:47:02 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 28 Oct 2015 07:47:02 -0700 (MST) Subject: [vtkusers] VTK 5.10 significantly slower Message-ID: <1446043622022-5734649.post@n5.nabble.com> After replacing VTK ver 5.8.0 with version 5.10 i have experienced significant drop in performance in application that i have built with ver 5.8.0. Did anyone experience same thing ? I have built VTK with CMAKE with default settings and injected the build binaries and headers from folder generated by invoking building the "INSTALL" project. Thanks Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-5-10-significantly-slower-tp5734649.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Wed Oct 28 10:51:13 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 28 Oct 2015 15:51:13 +0100 Subject: [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget In-Reply-To: References: Message-ID: Hello, I've created a bug report here : http://www.vtk.org/Bug/view.php?id=15812 Have a good day, Simon 2015-10-27 18:52 GMT+01:00 Simon ESNEAULT : > Hello All, > > Following our migration to the brand new OpenGL2 backend, the ButtonWidget > seem's broken, the button display's a gray texture instead of an image with > the new backend. This is visible in all our tested platform (Windows or OSX > box) > > The following VTK wiki example reproduce the problem : > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget > > OpenGL1 backend result : > http://picpaste.com/pics/OGL1_1.1445968197.png > > OpenGL2 backend result : > http://picpaste.com/pics/OGL2_1.1445968221.png > > Is it a known issue ? Any clue ? In our application we try to load a png > image, but it always show a gray/white rectangle instead > > Thanks > Simon > > > > > > > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Oct 28 10:52:16 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 28 Oct 2015 08:52:16 -0600 Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: <1446043622022-5734649.post@n5.nabble.com> References: <1446043622022-5734649.post@n5.nabble.com> Message-ID: Hi Zarko, If you're building on Linux or OS X, then make sure that your CMAKE_BUILD_TYPE is set to Release. I haven't heard of any general slowdowns between 5.8 and 5.10. - David On Wed, Oct 28, 2015 at 8:47 AM, zarko.milosevic wrote: > After replacing VTK ver 5.8.0 with version 5.10 i have experienced > significant drop in performance in application that i have built with ver > 5.8.0. > > Did anyone experience same thing ? > > I have built VTK with CMAKE with default settings and injected the build > binaries and headers from folder generated by invoking building the > "INSTALL" project. > > Thanks > Zarko > -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner at sembach.de Wed Oct 28 11:03:06 2015 From: werner at sembach.de (Werner Sembach) Date: Wed, 28 Oct 2015 16:03:06 +0100 Subject: [vtkusers] No vectors in input data after ShallowCopy Message-ID: <5630E3AA.9050700@sembach.de> So i have a function that gehts a vtkImageData* and should replace another, already displayed, vtkImageData* void MainWindow::updateImage(vtkSmartPointer newImage) { image->ShallowCopy(newImage); image->Modified(); qvtkWidget->GetRenderWindow()->Render(); } however when i try to run this i get the error "vtkHedgeHog (0xa3fc80): No vectors in input data" if i use a standart assignment (image = newImage) the display doesn't change at all initial image is created here (image is a instance variable): void MainWindow::initializeImage() { unsigned int dim = 20; image->SetDimensions(dim, dim, 1); image->SetSpacing(1.0, 1.0, 1.0); image->SetOrigin(0.0, 0.0, 0.0); image->AllocateScalars(VTK_DOUBLE,3); for(unsigned int x = 0; x < dim; x++) { for(unsigned int y = 0; y < dim; y++) { double* pixel = static_cast(image->GetScalarPointer(x,y,0)); pixel[0] = -1; pixel[1] = 1; pixel[2] = 0.0; } } image->GetPointData()->SetActiveVectors("ImageScalars"); image->Modified(); } the new image is generated here: void MainWindow::on_actionTest_Update_triggered() { vtkSmartPointer newImage = vtkSmartPointer::New(); unsigned int dim = 30; newImage->SetDimensions(dim, dim, 1); newImage->SetSpacing(1.0, 1.0, 1.0); newImage->SetOrigin(0.0, 0.0, 0.0); newImage->AllocateScalars(VTK_DOUBLE,3); for(unsigned int x = 0; x < dim; x++) { for(unsigned int y = 0; y < dim; y++) { double* pixel = static_cast(newImage->GetScalarPointer(x,y,0)); pixel[0] = 1; pixel[1] = 0.0; pixel[2] = 0.0; } } newImage->GetPointData()->SetActiveVectors("imageScalars"); newImage->Modified(); updateImage(newImage); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Wed Oct 28 11:18:56 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 28 Oct 2015 08:18:56 -0700 (MST) Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: References: <1446043622022-5734649.post@n5.nabble.com> Message-ID: <1446045536648-5734654.post@n5.nabble.com> I`m using it on windows 7. Most operations that i have been using with previous version now working quite slower with debug and release binaries. Most trivial functionalities (rotation, zooming, translation) are now slower. Is there some specific settings that i should take into consideration ? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-5-10-significantly-slower-tp5734649p5734654.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Oct 28 11:29:56 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 28 Oct 2015 11:29:56 -0400 Subject: [vtkusers] No vectors in input data after ShallowCopy In-Reply-To: <5630E3AA.9050700@sembach.de> References: <5630E3AA.9050700@sembach.de> Message-ID: Hi Werner, Consider this line. newImage->GetPointData()->SetActiveVectors("imageScalars"); Where is an array named "imageScalars"? I don't see that anywhere in the code, so whatever active vectors there might be in the image are being unset by the call above. After you allocate the scalars, you can give them a name with something like newImage->GetPointData()->GetArray(0)->SetName("imageScalars"); Or you can skip naming the array and set the active vectors with newImage->GetPointData()->SetVectors(newImage->GetPointData()->GetArray(0)); HTH, Cory On Wed, Oct 28, 2015 at 11:03 AM, Werner Sembach wrote: > So i have a function that gehts a vtkImageData* > and should replace another, already displayed, vtkImageData* > > void MainWindow::updateImage(vtkSmartPointer newImage) { > image->ShallowCopy(newImage); > image->Modified(); > > qvtkWidget->GetRenderWindow()->Render(); > } > > however when i try to run this i get the error "vtkHedgeHog (0xa3fc80): No > vectors in input data" > > if i use a standart assignment (image = newImage) the display doesn't > change at all > > > > initial image is created here (image is a instance variable): > > void MainWindow::initializeImage() > { > unsigned int dim = 20; > > image->SetDimensions(dim, dim, 1); > image->SetSpacing(1.0, 1.0, 1.0); > image->SetOrigin(0.0, 0.0, 0.0); > > image->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(image->GetScalarPointer(x,y,0)); > pixel[0] = -1; > pixel[1] = 1; > pixel[2] = 0.0; > } > } > image->GetPointData()->SetActiveVectors("ImageScalars"); > image->Modified(); > } > > the new image is generated here: > > void MainWindow::on_actionTest_Update_triggered() > { > vtkSmartPointer newImage = > vtkSmartPointer::New(); > unsigned int dim = 30; > > newImage->SetDimensions(dim, dim, 1); > newImage->SetSpacing(1.0, 1.0, 1.0); > newImage->SetOrigin(0.0, 0.0, 0.0); > > newImage->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(newImage->GetScalarPointer(x,y,0)); > pixel[0] = 1; > pixel[1] = 0.0; > pixel[2] = 0.0; > } > } > newImage->GetPointData()->SetActiveVectors("imageScalars"); > newImage->Modified(); > updateImage(newImage); > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Wed Oct 28 11:39:27 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 28 Oct 2015 08:39:27 -0700 (MST) Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: <1446045536648-5734654.post@n5.nabble.com> References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> Message-ID: <1446046767501-5734659.post@n5.nabble.com> On thing i forgot to mention. Machine on which i`ve bult the vtk was with OS windows server 2008 R2. Can that affect ? Thanks Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-5-10-significantly-slower-tp5734649p5734659.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Oct 28 11:42:47 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 28 Oct 2015 09:42:47 -0600 Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: <1446045536648-5734654.post@n5.nabble.com> References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> Message-ID: On Wed, Oct 28, 2015 at 9:18 AM, zarko.milosevic wrote: > I`m using it on windows 7. Most operations that i have been using with > previous version now working quite slower with debug and release binaries. > Most trivial functionalities (rotation, zooming, translation) are now > slower. > > Is there some specific settings that i should take into consideration ? > Give some details about what kind of rendering you are doing. Volume rendering? Polygon rendering? Approximately how many different actors do you have in your scene? How large is your data? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From henry.blanco at cbiomed.cu Wed Oct 28 11:41:22 2015 From: henry.blanco at cbiomed.cu (Henry Blanco) Date: Wed, 28 Oct 2015 11:41:22 -0400 Subject: [vtkusers] problems running a vtk java bindings example In-Reply-To: References: <1445874538.28640.16.camel@cohiba> Message-ID: <1446046882.28640.65.camel@cohiba> Hello Sebastien, thanks for your reply. Well, I have done what you suggested, but still the program does not find the proper native library, in this case: "libvtkCommonCoreJava.so". This library is placed at "/usr/local/natives-Linux-x86_64", and it is also packed into the jar file "vtk-6.1-natives-Linux-x86_64.jar". The environment variable $LD_LIBRARY_PATH is set to point to that directory (as you suggested). Moreover, I have specify those dependencies in my Eclipse IDE as well. You can check all these evidences attached to this email as small screenshots. This is the piece of code that is generating the link error. The linker stops when processing the statement: System.loadLibrary("libvtkCommonCoreJava"); -------------------- import vtk.*; public class Cone { // In the static constructor we load in the native code. // The libraries must be in your path to work. static { // System.loadLibrary("vtkCommonJava"); // System.loadLibrary("vtkFilteringJava"); // System.loadLibrary("vtkIOJava"); // System.loadLibrary("vtkImagingJava"); // System.loadLibrary("vtkGraphicsJava"); // System.loadLibrary("vtkRenderingJava"); System.loadLibrary("libvtkCommonCoreJava"); System.loadLibrary("libvtkFiltersCoreJava"); System.loadLibrary("libvtkIOCoreJava"); System.loadLibrary("libvtkImagingCoreJava"); System.loadLibrary("libvtkRenderingCoreJava"); } ... }// End of the class: Cone Failing to run such a simple example of this library it's a bit frustrating for me. I'm looking forward to overcome this issue just to start learning this attractive visualization library. Thanks in advance. Henry -------------------- On lun, 2015-10-26 at 11:09 -0600, Sebastien Jourdain wrote: > Hi Henry, > > > As you noticed, you will need to unzip > the vtk-6.1-natives-Linux-x86_64.jar file into a directory and add > that directory path to your LD_LIBRARY_PATH environment variable. Then > the rest, should follow. > > > Seb > > On Mon, Oct 26, 2015 at 9:48 AM, Henry Blanco > wrote: > Hello guys, I have set up and compiled VTK through cmake on a > 64-bits > Ubuntu 14.04, just to get VTK Java bindings, but I have failed > to run a > simple "Cone.java" example. Specifically, when I try to > execute the > statement: > > System.loadLibrary("vtkCommonJava"); > > The compiler throws the following error: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > vtkCommonJava in java.library.path > at > java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) > at java.lang.Runtime.loadLibrary0(Runtime.java:849) > at java.lang.System.loadLibrary(System.java:1088) > at Cone.(Cone.java:17) > > -------------------------------------- > To specify what my problem is, please, read these comments: > > 1- The VTK compilation process produced the following .jar > files (both > placed at /usr/local/ directory): > vtk-6.1.jar > vtk-6.1-natives-Linux-x86_64.jar > > 2- The library files "vtkCommonJava.o" is not among those > produced by > the compilation process. > 3- The most similar library file to "vtkCommonJava" that I > have found is > "libvtkCommonCoreJava.o", packed into the jar file > "vtk-6.1-natives-Linux-x86_64.jar". I have included this file > into the > "Java Build Path" of my Eclipse IDE, as well as the jar file > "vtk-6.1.jar", but still the program fails to run. > > I will appreciate any suggestions on what is missing here to > run the > java example. Thanks in advance. > > Henry > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -------------- A non-text attachment was scrubbed... Name: evidences.zip Type: application/zip Size: 88203 bytes Desc: not available URL: From david.gobbi at gmail.com Wed Oct 28 11:45:08 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 28 Oct 2015 09:45:08 -0600 Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: <1446046767501-5734659.post@n5.nabble.com> References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> <1446046767501-5734659.post@n5.nabble.com> Message-ID: On Wed, Oct 28, 2015 at 9:39 AM, zarko.milosevic wrote: > On thing i forgot to mention. Machine on which i`ve bult the vtk was with > OS > windows server 2008 R2. > Can that affect ? > This shouldn't have an effect. But it's easy to check: build VTK 5.8 on the same system for comparison. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Wed Oct 28 11:57:46 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 28 Oct 2015 16:57:46 +0100 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hello Aashish Did you get a chance to try to load the dataset on Windows ? Can I do anything to help you investigate ? Should I feel a bug, that may act as a reminder ? Have a nice day Simon 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary : > Thanks Simon. This is really strange since we are not seeing it on Mac and > Linux (but both has dedicated cards). > > I will look into it soon. > > - aashish > > On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT > wrote: > >> Ok, thank you very much fort digging into this. >> I've done some test and I believe I can see a similar slowdown happening >> on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 graphics. >> Good luck in the investigation, I you need more details, do not hesitate >> to ask >> Simon >> >> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Ah, thanks. I will get back to you on this since on Linux I don't any >>> issue so it has to be Windows specific thing. >>> >>> - Aashish >>> >>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> I tried with that one from yesterday and today's version >>>> (4.4.0-209-gc399648) >>>> >>>> Thanks, >>>> Simon >>>> >>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Thanks. >>>>> >>>>> And when did you download this version? ParaView-latest-Qt4-OpenGL2- >>>>> Windows-64bit.exe >>>>> >>>>> Thanks, >>>>> Aashish >>>>> >>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Yes, I tried with and without the shading. Without shading enabled, >>>>>> the new Opengl2 is also slower when zoomed in (in the described condition). >>>>>> With shading enabled, the difference in speed between the two version seems >>>>>> even bigger. >>>>>> I got the version from the nightly build download section of paraview >>>>>> website (it is still available). And I've just tried with that one labeled >>>>>> "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same results. >>>>>> >>>>>> About the FPS, it is difficult to give an exact number, because it >>>>>> depends of the condition (zoomed or not etc...) but yes, this is the idea. >>>>>> In our software, I've exposed the frame rate using this example : >>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>> And the frame rate is around 15/20 for the first backend, and around >>>>>> 6/8 for the new backend, on the same dataset (the one provided for >>>>>> example), with the same mapper parameters >>>>>> >>>>>> Thanks >>>>>> Simon >>>>>> >>>>>> >>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Hi Simon, >>>>>>> >>>>>>> This is helpful but just missing few more bits: >>>>>>> >>>>>>> 1) Did you try without the shading and see how the performance >>>>>>> compares? >>>>>>> >>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one from >>>>>>> (ParaView download page or did you built yourself?) >>>>>>> >>>>>>> Also, so on your system the old mapper is running 30FPS and the new >>>>>>> one at 15-20 FPS as per your summary. >>>>>>> >>>>>>> Thanks, >>>>>>> - Aashish >>>>>>> >>>>>>> >>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Hello Aashish, >>>>>>>> >>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>> Thanks for testing with the DataSet. >>>>>>>> I agree the performance is still quite good with the new backend, >>>>>>>> and I also get something like 15/20 fps on windows on an HD screen. But >>>>>>>> when compared to the old one, and in some condition (when zoomed >>>>>>>> especially), it looks really slower to me >>>>>>>> The two tested version are : >>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia Quadro >>>>>>>> K420 >>>>>>>> >>>>>>>> To highlight the difference, here is what I do : >>>>>>>> - Launch both version on the same computer at the same time >>>>>>>> - Load the above dataset on each >>>>>>>> - Select volume rendering >>>>>>>> - Adjust the transfer function data range to [100-750] (the default >>>>>>>> "Cool to Warm" is fine) >>>>>>>> - Set the view direction to +Y >>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>> >>>>>>>> And start interacting ... >>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>> interactivity is better. >>>>>>>> Shading enable or not does not change much >>>>>>>> >>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with this >>>>>>>> with the old backend to fine tune the interactivity, although what's really >>>>>>>> inside was never clear to me >>>>>>>> >>>>>>>> I hope that there is enough information for you to reproduce this, >>>>>>>> do not hesitate to ask for some more information. >>>>>>>> >>>>>>>> Thanks a lot for your help >>>>>>>> Simon >>>>>>>> >>>>>>>> >>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Dear Simon, >>>>>>>>> >>>>>>>>> Checking again. Wondering if you can provide some more detail on >>>>>>>>> the binary you are using and whether or not without shading the rendering >>>>>>>>> performance comparable to older version. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>> >>>>>>>>>> Simon, >>>>>>>>>> >>>>>>>>>> I used your dataset on paraview master as of today on my Linux >>>>>>>>>> box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 >>>>>>>>>> FPS with shading on with 1920x1080 resolution. >>>>>>>>>> >>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the shading >>>>>>>>>> performance fix was in 4.4 but not in RC's. I don't have access to Windows >>>>>>>>>> box right away but I will try there too. >>>>>>>>>> >>>>>>>>>> NOTE: You might get multiple emails because of the attachment >>>>>>>>>> size issue. Sorry about that. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>> >>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short element >>>>>>>>>>>> (you can find the dataset here : >>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I >>>>>>>>>>>> think it's all about GPU volume raycast mapper. >>>>>>>>>>>> The new mapper does bring low resolution, but when compared to >>>>>>>>>>>> the old one, it seems less "low resolution" during interaction than the old >>>>>>>>>>>> one >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Right, so that's why its not a exact comparison. What happens is >>>>>>>>>>> that depending on what is interactive, (you can set the desired update rate >>>>>>>>>>> in VTK, not exposed in ParaView I believe), it will do interactive but >>>>>>>>>>> with higher resolution (smaller sample distance). If they both have the >>>>>>>>>>> same sample distance, then the new mapper should out perform the old one, >>>>>>>>>>> however, there is another thing we need to consider here which is shading. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Can you disable the shading and see if now they both (opengl1 >>>>>>>>>>> and 2) equally better? We already pushed a fix for it but not sure if that >>>>>>>>>>> you have in your build. >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Don't know if you need a minimal example, but I believe the >>>>>>>>>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Also, >>>>>>>>>>>>> >>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading that >>>>>>>>>>>>> was causing the slow performance a while back. I don't remember if that was >>>>>>>>>>>>> included in 4.4 or not ( I can check ). >>>>>>>>>>>>> >>>>>>>>>>>>> - Aashish >>>>>>>>>>>>> >>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>> >>>>>>>>>>>>>> What kind of dataset you are using? Depending on the data >>>>>>>>>>>>>> type you might be using >>>>>>>>>>>>>> the GPU one or the unstructured renderer. The performance we >>>>>>>>>>>>>> measured is related to the GPU ray cast mapper >>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new mapper >>>>>>>>>>>>>> is bringing low resolution when you interact with the volume (and whether >>>>>>>>>>>>>> or not it happens with old mapper). >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 backend >>>>>>>>>>>>>>> for our application, and although the switch was easy (thanks for not >>>>>>>>>>>>>>> breaking the API ;) ), we can see a significant slowdown on the GPU volume >>>>>>>>>>>>>>> rendering part, especially during interaction. Typically we dropped from >>>>>>>>>>>>>>> 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with >>>>>>>>>>>>>>> the same code around. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare the >>>>>>>>>>>>>>> latest 4.4 OpenGL2 build with the classic 4.4 build while volume rendering >>>>>>>>>>>>>>> a big enough volume (512^3) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with the new >>>>>>>>>>>>>>> backend ! >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> 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 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Oct 28 11:59:37 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 28 Oct 2015 11:59:37 -0400 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hi Simon, I am just finishing up a ParaView5 related parallel volume rendering bug (pushing a branch today to VTK). This is next on my list. - Aashish On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT wrote: > Hello Aashish > > Did you get a chance to try to load the dataset on Windows ? > Can I do anything to help you investigate ? Should I feel a bug, that may > act as a reminder ? > Have a nice day > Simon > > > 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Thanks Simon. This is really strange since we are not seeing it on Mac >> and Linux (but both has dedicated cards). >> >> I will look into it soon. >> >> - aashish >> >> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT > > wrote: >> >>> Ok, thank you very much fort digging into this. >>> I've done some test and I believe I can see a similar slowdown happening >>> on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 graphics. >>> Good luck in the investigation, I you need more details, do not hesitate >>> to ask >>> Simon >>> >>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Ah, thanks. I will get back to you on this since on Linux I don't any >>>> issue so it has to be Windows specific thing. >>>> >>>> - Aashish >>>> >>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> I tried with that one from yesterday and today's version >>>>> (4.4.0-209-gc399648) >>>>> >>>>> Thanks, >>>>> Simon >>>>> >>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> Thanks. >>>>>> >>>>>> And when did you download this version? ParaView-latest-Qt4-OpenGL2- >>>>>> Windows-64bit.exe >>>>>> >>>>>> Thanks, >>>>>> Aashish >>>>>> >>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Yes, I tried with and without the shading. Without shading enabled, >>>>>>> the new Opengl2 is also slower when zoomed in (in the described condition). >>>>>>> With shading enabled, the difference in speed between the two version seems >>>>>>> even bigger. >>>>>>> I got the version from the nightly build download section of >>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>> results. >>>>>>> >>>>>>> About the FPS, it is difficult to give an exact number, because it >>>>>>> depends of the condition (zoomed or not etc...) but yes, this is the idea. >>>>>>> In our software, I've exposed the frame rate using this example : >>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>> And the frame rate is around 15/20 for the first backend, and around >>>>>>> 6/8 for the new backend, on the same dataset (the one provided for >>>>>>> example), with the same mapper parameters >>>>>>> >>>>>>> Thanks >>>>>>> Simon >>>>>>> >>>>>>> >>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Hi Simon, >>>>>>>> >>>>>>>> This is helpful but just missing few more bits: >>>>>>>> >>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>> compares? >>>>>>>> >>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one from >>>>>>>> (ParaView download page or did you built yourself?) >>>>>>>> >>>>>>>> Also, so on your system the old mapper is running 30FPS and the new >>>>>>>> one at 15-20 FPS as per your summary. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> - Aashish >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hello Aashish, >>>>>>>>> >>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>> I agree the performance is still quite good with the new backend, >>>>>>>>> and I also get something like 15/20 fps on windows on an HD screen. But >>>>>>>>> when compared to the old one, and in some condition (when zoomed >>>>>>>>> especially), it looks really slower to me >>>>>>>>> The two tested version are : >>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>> Quadro K420 >>>>>>>>> >>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>> - Load the above dataset on each >>>>>>>>> - Select volume rendering >>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>> - Set the view direction to +Y >>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>> >>>>>>>>> And start interacting ... >>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>> interactivity is better. >>>>>>>>> Shading enable or not does not change much >>>>>>>>> >>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with this >>>>>>>>> with the old backend to fine tune the interactivity, although what's really >>>>>>>>> inside was never clear to me >>>>>>>>> >>>>>>>>> I hope that there is enough information for you to reproduce this, >>>>>>>>> do not hesitate to ask for some more information. >>>>>>>>> >>>>>>>>> Thanks a lot for your help >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> >>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>> >>>>>>>>>> Dear Simon, >>>>>>>>>> >>>>>>>>>> Checking again. Wondering if you can provide some more detail on >>>>>>>>>> the binary you are using and whether or not without shading the rendering >>>>>>>>>> performance comparable to older version. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>> >>>>>>>>>>> Simon, >>>>>>>>>>> >>>>>>>>>>> I used your dataset on paraview master as of today on my Linux >>>>>>>>>>> box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 >>>>>>>>>>> FPS with shading on with 1920x1080 resolution. >>>>>>>>>>> >>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>> >>>>>>>>>>> NOTE: You might get multiple emails because of the attachment >>>>>>>>>>> size issue. Sorry about that. >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> >>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short element >>>>>>>>>>>>> (you can find the dataset here : >>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I >>>>>>>>>>>>> think it's all about GPU volume raycast mapper. >>>>>>>>>>>>> The new mapper does bring low resolution, but when compared to >>>>>>>>>>>>> the old one, it seems less "low resolution" during interaction than the old >>>>>>>>>>>>> one >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Right, so that's why its not a exact comparison. What happens >>>>>>>>>>>> is that depending on what is interactive, (you can set the desired update >>>>>>>>>>>> rate in VTK, not exposed in ParaView I believe), it will do interactive >>>>>>>>>>>> but with higher resolution (smaller sample distance). If they both have >>>>>>>>>>>> the same sample distance, then the new mapper should out perform the old >>>>>>>>>>>> one, however, there is another thing we need to consider here which is >>>>>>>>>>>> shading. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Can you disable the shading and see if now they both (opengl1 >>>>>>>>>>>> and 2) equally better? We already pushed a fix for it but not sure if that >>>>>>>>>>>> you have in your build. >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Don't know if you need a minimal example, but I believe the >>>>>>>>>>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks >>>>>>>>>>>>> Simon >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>> >>>>>>>>>>>>>> Also, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading that >>>>>>>>>>>>>> was causing the slow performance a while back. I don't remember if that was >>>>>>>>>>>>>> included in 4.4 or not ( I can check ). >>>>>>>>>>>>>> >>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the data >>>>>>>>>>>>>>> type you might be using >>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The performance we >>>>>>>>>>>>>>> measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new mapper >>>>>>>>>>>>>>> is bringing low resolution when you interact with the volume (and whether >>>>>>>>>>>>>>> or not it happens with old mapper). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 backend >>>>>>>>>>>>>>>> for our application, and although the switch was easy (thanks for not >>>>>>>>>>>>>>>> breaking the API ;) ), we can see a significant slowdown on the GPU volume >>>>>>>>>>>>>>>> rendering part, especially during interaction. Typically we dropped from >>>>>>>>>>>>>>>> 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), with >>>>>>>>>>>>>>>> the same code around. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare the >>>>>>>>>>>>>>>> latest 4.4 OpenGL2 build with the classic 4.4 build while volume rendering >>>>>>>>>>>>>>>> a big enough volume (512^3) >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with the >>>>>>>>>>>>>>>> new backend ! >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>> 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 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>>> * >>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>> * >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.ebert at virtopsy.com Wed Oct 28 12:22:36 2015 From: lars.ebert at virtopsy.com (laebert) Date: Wed, 28 Oct 2015 09:22:36 -0700 (MST) Subject: [vtkusers] Invalid pixel format, no OpenGL support Message-ID: <1446049356979-5734668.post@n5.nabble.com> Hello, I am kind of running out of ideas on how to handle this issue. Some time ago I upgraded our software to the latest QT and VTK versions (qt 5.5 and VTK 6.3.0 64bit, Visual Studio 2013). Since then, i get the message "Invalid pixel format, no OpenGL support" and the software just closes. Even a simple test application with just a QVTKWidget shows that behavior once I call GetRenderWindow()->Render(); on it. I tried to recompile QT with the -opengl desktop flag, i tried it to compile everything in 32 bit, always the same. I also tried to run the software on a different machine (with a Quadro FX 1800) - same error. The only thing that works is if I force my laptop to use the integrated graphics (Intel HD 4600) instead of the NVIDIA Quadro K5100M (with latest drivers), which is not a satisfactory solution. A similar issue was posted under http://public.kitware.com/pipermail/vtkusers/2015-March/090363.html , but unfortunately with no answers. Does anyone have an idea how to solve this? Thanks for any help Lars -- View this message in context: http://vtk.1045678.n5.nabble.com/Invalid-pixel-format-no-OpenGL-support-tp5734668.html Sent from the VTK - Users mailing list archive at Nabble.com. From werner at sembach.de Wed Oct 28 16:13:42 2015 From: werner at sembach.de (Werner Sembach) Date: Wed, 28 Oct 2015 21:13:42 +0100 Subject: [vtkusers] No vectors in input data after ShallowCopy In-Reply-To: References: <5630E3AA.9050700@sembach.de> Message-ID: <56312C76.9000102@sembach.de> The newImage->GetPointData()->SetActiveVectors("imageScalars"); was copyed out of an example, and the initilazation didn't work without it. Ok i tryed to replace it with newImage->GetPointData()->SetVectors(newImage->GetPointData()->GetArray(0)); but it has still the same behavior and complains about "No Vectors in input" after i copyed it over. Greetings Matombo Am 28.10.2015 um 16:29 schrieb Cory Quammen: > Hi Werner, > > Consider this line. > > newImage->GetPointData()->SetActiveVectors("imageScalars"); > > Where is an array named "imageScalars"? I don't see that anywhere in > the code, so whatever active vectors there might be in the image are > being unset by the call above. > > After you allocate the scalars, you can give them a name with > something like > > newImage->GetPointData()->GetArray(0)->SetName("imageScalars"); > > Or you can skip naming the array and set the active vectors with > > newImage->GetPointData()->SetVectors(newImage->GetPointData()->GetArray(0)); > > HTH, > Cory > > On Wed, Oct 28, 2015 at 11:03 AM, Werner Sembach > wrote: > > So i have a function that gehts a vtkImageData* > and should replace another, already displayed, vtkImageData* > > void MainWindow::updateImage(vtkSmartPointer newImage) { > image->ShallowCopy(newImage); > image->Modified(); > > qvtkWidget->GetRenderWindow()->Render(); > } > > however when i try to run this i get the error "vtkHedgeHog > (0xa3fc80): No vectors in input data" > > if i use a standart assignment (image = newImage) the display > doesn't change at all > > > > initial image is created here (image is a instance variable): > > void MainWindow::initializeImage() > { > unsigned int dim = 20; > > image->SetDimensions(dim, dim, 1); > image->SetSpacing(1.0, 1.0, 1.0); > image->SetOrigin(0.0, 0.0, 0.0); > > image->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(image->GetScalarPointer(x,y,0)); > pixel[0] = -1; > pixel[1] = 1; > pixel[2] = 0.0; > } > } > image->GetPointData()->SetActiveVectors("ImageScalars"); > image->Modified(); > } > > the new image is generated here: > > void MainWindow::on_actionTest_Update_triggered() > { > vtkSmartPointer newImage = > vtkSmartPointer::New(); > unsigned int dim = 30; > > newImage->SetDimensions(dim, dim, 1); > newImage->SetSpacing(1.0, 1.0, 1.0); > newImage->SetOrigin(0.0, 0.0, 0.0); > > newImage->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(newImage->GetScalarPointer(x,y,0)); > pixel[0] = 1; > pixel[1] = 0.0; > pixel[2] = 0.0; > } > } > newImage->GetPointData()->SetActiveVectors("imageScalars"); > newImage->Modified(); > updateImage(newImage); > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pedropaulobmjr at hotmail.com Wed Oct 28 17:05:03 2015 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Wed, 28 Oct 2015 21:05:03 +0000 Subject: [vtkusers] Python Wrapper Vtk Message-ID: Hello, I'm trying to make a GUI using Qt 4 with Vtk, as a test, I started doing a simple window and put the QVTKWidget using Qt Designer, I used the pyquic4 and did my python file, however when I try to compile it, there is the following error: Traceback (most recent call last): File "viv.py", line 40, in from QVTKWidget import QVTKWidgetImportError: No module named QVTKWidget I saw on the internet that the QVTKWidget is not a module, but a class of vtk module, but when I change the code and try again the following occurs: Traceback (most recent call last): File "viv.py", line 40, in from vtk import QVTKWidgetImportError: cannot import name QVTKWidget Does anyone know the solution to this?I thank the attention. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Oct 28 17:18:02 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 28 Oct 2015 15:18:02 -0600 Subject: [vtkusers] Python Wrapper Vtk In-Reply-To: References: Message-ID: Hi Pedro, Instead of using the QVTKWidget (which is written in C++), use the QVTKRenderWindowInteractor (which is written in Python) from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor - David On Wed, Oct 28, 2015 at 3:05 PM, Pedro Paulo wrote: > Hello, I'm trying to make a GUI using Qt 4 with Vtk, as a test, I started > doing a simple window and put the QVTKWidget using Qt Designer, I used the > pyquic4 and did my python file, however when I try to compile it, there is > the following error: > > Traceback (most recent call last): > File "viv.py", line 40, in > from QVTKWidget import QVTKWidget > ImportError: No module named QVTKWidget > > I saw on the internet that the QVTKWidget is not a module, but a class of > vtk module, but when I change the code and try again the following occurs: > > Traceback (most recent call last): > File "viv.py", line 40, in > from vtk import QVTKWidget > ImportError: cannot import name QVTKWidget > > Does anyone know the solution to this? > I thank the attention. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Oct 28 17:56:28 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 28 Oct 2015 17:56:28 -0400 Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> <1446046767501-5734659.post@n5.nabble.com> Message-ID: The CMAKE_BUILD_TYPE has definitely an effect on Windows but not so much on OS X and Linux. On Wed, Oct 28, 2015 at 11:45 AM, David Gobbi wrote: > On Wed, Oct 28, 2015 at 9:39 AM, zarko.milosevic wrote: > >> On thing i forgot to mention. Machine on which i`ve bult the vtk was with >> OS >> windows server 2008 R2. >> Can that affect ? >> > > This shouldn't have an effect. But it's easy to check: build VTK 5.8 on > the same > system for comparison. > > - David > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Oct 28 18:12:15 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 28 Oct 2015 18:12:15 -0400 Subject: [vtkusers] problems running a vtk java bindings example In-Reply-To: <1446046882.28640.65.camel@cohiba> References: <1445874538.28640.16.camel@cohiba> <1446046882.28640.65.camel@cohiba> Message-ID: Hi Henry, It is true that getting and understanding how to get your environment setup is frustrating and the most complex part, specially for Java developers. But once you figure it out, that's not a big deal anymore. I guess you do something like that on your linux box to run your app: $ export LD_LIBRARY_PATH=/usr/local/natives-Linux-x86_64 $ java -cp /path/to/vtk.jar:/your/jar/file.jar Cone It seems that you've done what is require for the app to work. But as a side note, it might be safer to use the dedicated enum to load the native libraries. // ----------------------------------------------------------------- // Load VTK library and print which library was not properly loaded static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) { System.out.println(lib.GetLibraryName() + " not loaded"); } } } vtkNativeLibrary.DisableOutputWindow(null); } You can also use that enum to make sure the Library that you try to load is the correct one too. Seb On Wed, Oct 28, 2015 at 11:41 AM, Henry Blanco wrote: > Hello Sebastien, thanks for your reply. Well, I have done what you > suggested, but still the program does not find the proper native > library, in this case: "libvtkCommonCoreJava.so". > > This library is placed at "/usr/local/natives-Linux-x86_64", and it is > also packed into the jar file "vtk-6.1-natives-Linux-x86_64.jar". The > environment variable $LD_LIBRARY_PATH is set to point to that directory > (as you suggested). Moreover, I have specify those dependencies in my > Eclipse IDE as well. You can check all these evidences attached to this > email as small screenshots. > > This is the piece of code that is generating the link error. The linker > stops when processing the statement: > > System.loadLibrary("libvtkCommonCoreJava"); > > -------------------- > import vtk.*; > public class Cone { > > // In the static constructor we load in the native code. > // The libraries must be in your path to work. > static { > > // System.loadLibrary("vtkCommonJava"); > // System.loadLibrary("vtkFilteringJava"); > // System.loadLibrary("vtkIOJava"); > // System.loadLibrary("vtkImagingJava"); > // System.loadLibrary("vtkGraphicsJava"); > // System.loadLibrary("vtkRenderingJava"); > > System.loadLibrary("libvtkCommonCoreJava"); > System.loadLibrary("libvtkFiltersCoreJava"); > System.loadLibrary("libvtkIOCoreJava"); > System.loadLibrary("libvtkImagingCoreJava"); > System.loadLibrary("libvtkRenderingCoreJava"); > } > ... > }// End of the class: Cone > > Failing to run such a simple example of this library it's a bit > frustrating for me. I'm looking forward to overcome this issue just to > start learning this attractive visualization library. > > Thanks in advance. > > Henry > -------------------- > On lun, 2015-10-26 at 11:09 -0600, Sebastien Jourdain wrote: > > Hi Henry, > > > > > > As you noticed, you will need to unzip > > the vtk-6.1-natives-Linux-x86_64.jar file into a directory and add > > that directory path to your LD_LIBRARY_PATH environment variable. Then > > the rest, should follow. > > > > > > Seb > > > > On Mon, Oct 26, 2015 at 9:48 AM, Henry Blanco > > wrote: > > Hello guys, I have set up and compiled VTK through cmake on a > > 64-bits > > Ubuntu 14.04, just to get VTK Java bindings, but I have failed > > to run a > > simple "Cone.java" example. Specifically, when I try to > > execute the > > statement: > > > > System.loadLibrary("vtkCommonJava"); > > > > The compiler throws the following error: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > > vtkCommonJava in java.library.path > > at > > java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) > > at java.lang.Runtime.loadLibrary0(Runtime.java:849) > > at java.lang.System.loadLibrary(System.java:1088) > > at Cone.(Cone.java:17) > > > > -------------------------------------- > > To specify what my problem is, please, read these comments: > > > > 1- The VTK compilation process produced the following .jar > > files (both > > placed at /usr/local/ directory): > > vtk-6.1.jar > > vtk-6.1-natives-Linux-x86_64.jar > > > > 2- The library files "vtkCommonJava.o" is not among those > > produced by > > the compilation process. > > 3- The most similar library file to "vtkCommonJava" that I > > have found is > > "libvtkCommonCoreJava.o", packed into the jar file > > "vtk-6.1-natives-Linux-x86_64.jar". I have included this file > > into the > > "Java Build Path" of my Eclipse IDE, as well as the jar file > > "vtk-6.1.jar", but still the program fails to run. > > > > I will appreciate any suggestions on what is missing here to > > run the > > java example. Thanks in advance. > > > > Henry > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 laysrodriguessilva at gmail.com Thu Oct 29 01:08:18 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 29 Oct 2015 03:08:18 -0200 Subject: [vtkusers] VtkWidget for Qt Message-ID: Hi guys, good night My name is Lays, and i'm starting develop with VTK to made a 3DView on a project that i'm working. After download the source of vtk6-3 and build(cmake, make, install), i'm trying do this step on my pc: sudo cp ~/build/VTK/lib/libQVTKWidgetPlugin.so /usr/lib/qt4/plugins/designer >From this article: http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup But, i didnt fint the file libQVTKWidget. Can anyone give me a tip? Thanks -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Thu Oct 29 05:17:37 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 29 Oct 2015 02:17:37 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> <1445612315711-5734538.post@n5.nabble.com> <1445877745725-5734567.post@n5.nabble.com> <1445913229439-5734600.post@n5.nabble.com> Message-ID: <1446110257022-5734676.post@n5.nabble.com> Hi Ken, Thanks for letting us know. Yup that's what I do for now, but it's not really a good long term solution ^^'. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734676.html Sent from the VTK - Users mailing list archive at Nabble.com. From rohithajare12 at gmail.com Thu Oct 29 05:52:12 2015 From: rohithajare12 at gmail.com (rohit hajare) Date: Thu, 29 Oct 2015 02:52:12 -0700 (MST) Subject: [vtkusers] VRML file to VTK file In-Reply-To: <49720063.3070902@doc.ic.ac.uk> References: <49720063.3070902@doc.ic.ac.uk> Message-ID: <1446112332634-5734677.post@n5.nabble.com> pvtkVrmlImporter->SetFileName(m_strVMRLFile); pvtkVrmlImporter->SetRenderWindow(pvtkMFCWindow->GetRenderWindow()); pvtkVrmlImporter->Update(); vtkRenderer *pvtkVrmlRenderer = pvtkVrmlImporter->GetRenderer(); vtkActorCollection *pvtkVrmlActorColl=vtkActorCollection::New(); pvtkVrmlActorColl = pvtkVrmlRenderer->GetActors(); vtkActor *pvtkVrmlActor = vtkActor::New(); pvtkVrmlActor = pvtkVrmlActorColl->GetLastActor(); vtkMapper *pvtkVrmlMapper = pvtkVrmlActor->GetMapper(); pvtkPolydata = dynamic_cast(pvtkVrmlMapper->GetInput()); -- View this message in context: http://vtk.1045678.n5.nabble.com/VRML-file-to-VTK-file-tp1242769p5734677.html Sent from the VTK - Users mailing list archive at Nabble.com. From werner at sembach.de Thu Oct 29 08:32:43 2015 From: werner at sembach.de (Werner Sembach) Date: Thu, 29 Oct 2015 13:32:43 +0100 Subject: [vtkusers] VtkWidget for Qt In-Reply-To: References: Message-ID: <563211EB.7020405@sembach.de> Have you compiled vtk with qt support? There is a compile flag for it that is off by default. You also need to pay attention on the qt version (also managed with a cmake flag) After that Are you using qt4 or qt5? because the plugin only works for the qt4 creator however you still can use vtk with qt5 but you have to add the qvtk widget manually in your c-code pseudo code: MainWindow { ui->setupUi(this); qvtkWidget = new QVTKWidget(this); ui->verticalLayout->addWidget(qvtkWidget); } Am 29.10.2015 um 06:08 schrieb Lays Rodrigues: > Hi guys, good night > My name is Lays, and i'm starting develop with VTK to made a 3DView on > a project that i'm working. > After download the source of vtk6-3 and build(cmake, make, install), > i'm trying do this step on my pc: > sudo cp ~/build/VTK/lib/libQVTKWidgetPlugin.so /usr/lib/qt4/plugins/designer > From this article: http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup > But, i didnt fint the file libQVTKWidget. > Can anyone give me a tip? > Thanks > > > > -- > __ > *Lays Rodrigues* > *Developer Front-End at Br-Print3D Project* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > > www.facebook.com/brprint3d > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 laysrodriguessilva at gmail.com Thu Oct 29 09:51:56 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 29 Oct 2015 11:51:56 -0200 Subject: [vtkusers] VtkWidget for Qt In-Reply-To: <563211EB.7020405@sembach.de> References: <563211EB.7020405@sembach.de> Message-ID: 2015-10-29 10:32 GMT-02:00 Werner Sembach : > Have you compiled vtk with qt support? > There is a compile flag for it that is off by default. > You also need to pay attention on the qt version (also managed with a > cmake flag) > No, i didnt see that i need do that. =S > After that > Are you using qt4 or qt5? because the plugin only works for the qt4 creator > however you still can use vtk with qt5 but you have to add the qvtk widget > manually in your c-code > I'm working with qt5. Thanks for this tip. No problem in include manually. ;) > pseudo code: > MainWindow { > ui->setupUi(this); > > qvtkWidget = new QVTKWidget(this); > ui->verticalLayout->addWidget(qvtkWidget); > > } > > Am 29.10.2015 um 06:08 schrieb Lays Rodrigues: > > Hi guys, good night > My name is Lays, and i'm starting develop with VTK to made a 3DView on a > project that i'm working. > After download the source of vtk6-3 and build(cmake, make, install), i'm > trying do this step on my pc: > > sudo cp ~/build/VTK/lib/libQVTKWidgetPlugin.so /usr/lib/qt4/plugins/designer > > From this article: http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup > But, i didnt fint the file libQVTKWidget. > Can anyone give me a tip? > Thanks > > > -- > __ > *Lays Rodrigues* > *Developer Front-End at Br-Print3D Project* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > www.facebook.com/brprint3d > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers > > > -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Thu Oct 29 10:55:56 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Thu, 29 Oct 2015 07:55:56 -0700 (MST) Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> <1446046767501-5734659.post@n5.nabble.com> Message-ID: <1446130556987-5734680.post@n5.nabble.com> CMAKE_BUILD_TYPE is not present anywhere on CmakeCache file. How do i set it ? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-5-10-significantly-slower-tp5734649p5734680.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.chen at gmail.com Thu Oct 29 11:42:53 2015 From: elvis.chen at gmail.com (Elvis Chen) Date: Thu, 29 Oct 2015 11:42:53 -0400 Subject: [vtkusers] Cannot update vtkChartXY Message-ID: hi all, I am trying to utilize vtkChartXY to plot a simple 2D curve but ran into some trouble, I seek your help. The 2D plot is a function of time and is been updated incrementally. I tried to follow the example at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot to create an initial plot. As the data come in, I extended the vtkTable, and calls the renderer again, but only the initial table/plot was shown. A code demonstrating is the follow. Basically what I did was: - create a vtkTable with 3 data point, and plot it, - modify the vtkTable to include 1 more data point (4 total), and plot it again, - but the resulting plot only shows the original curve. Any help is very much appreciated, thanks, // arrX and arrY are vtkFloatArray table->AddColumn( arrX ); table->AddColumn( arrY ); // create a table of 3 data points table->SetNumberOfRows( 3 ); table->SetValue( 0, 0, 0 ); table->SetValue( 0, 1, 0 ); table->SetValue( 1, 0, 1 ); table->SetValue( 1, 1, 1 ); table->SetValue( 2, 0, 2 ); table->SetValue( 2, 1, 3 ); // render the chart view->GetRenderer()->SetBackground( 1, 1, 1 ); view->GetScene()->AddItem( chart ); chart->SetShowLegend( true ); line = chart->AddPlot( vtkChart::LINE ); line->SetInput( table, 0, 1 ); line->SetColor( 1, 0, 0 ); line->SetWidth( 5.0 ); // shows a plot of 3 data point view->GetRenderer()->Render(); // add a new point to the vtkTable table->SetNumberOfRows( 4 ); table->SetValue( 0, 0, 0 ); table->SetValue( 0, 1, 0 ); table->SetValue( 1, 0, 1 ); table->SetValue( 1, 1, 1 ); table->SetValue( 2, 0, 2 ); table->SetValue( 2, 1, 3 ); table->SetValue( 3, 0, 5 ); table->SetValue( 3, 1, 5 ); table->Modified(); view->Modified(); line->Modified(); // render it again, but still, only 3 data points were plot view->GetRenderer()->Render(); view->GetInteractor()->Initialize(); view->GetInteractor()->Start(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Oct 29 11:48:56 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 29 Oct 2015 11:48:56 -0400 Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj In-Reply-To: References: <1445988115077-5734639.post@n5.nabble.com> Message-ID: <20151029154856.GA14767@megas.khq.kitware.com> On Tue, Oct 27, 2015 at 16:34:01 -0700, zarko.milosevic wrote: > That does not fits my needs. It is huge project and it has been > working with previous version but stoped working after. Looking at the CMakeLists.txt, a library named XNVCtrl is required. This requirement hasn't changed since 2012 however (and that was the modularization, so it's probably older). Using CMake is the only supported way of building VTK though. --Ben From andrew.slaughter at inl.gov Thu Oct 29 11:48:47 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 29 Oct 2015 09:48:47 -0600 Subject: [vtkusers] Cannot update vtkChartXY In-Reply-To: References: Message-ID: I attempted to do the same thing you did (with Python VTK6.3), but it wouldn't work for me either. The only way I was able to get it to work as needed was to remove and re-create the line. I came to this solution because of this: http://vtk.1045678.n5.nabble.com/How-to-update-a-2d-plot-vtkChartXY-with-new-data-online-using-C-td5725677.html However, it would be great is someone who was more familiar with VTK had a better solution. -Andrew On Thu, Oct 29, 2015 at 9:42 AM, Elvis Chen wrote: > hi all, > > I am trying to utilize vtkChartXY to plot a simple 2D curve but ran into > some trouble, I seek your help. > > The 2D plot is a function of time and is been updated incrementally. I > tried to follow the example at: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot > > to create an initial plot. As the data come in, I extended the vtkTable, > and calls the renderer again, but only the initial table/plot was shown. A > code demonstrating is the follow. Basically what I did was: > > - create a vtkTable with 3 data point, and plot it, > - modify the vtkTable to include 1 more data point (4 total), and plot it > again, > - but the resulting plot only shows the original curve. > > Any help is very much appreciated, > > thanks, > > > > // arrX and arrY are vtkFloatArray > > table->AddColumn( arrX ); > table->AddColumn( arrY ); > > // create a table of 3 data points > table->SetNumberOfRows( 3 ); > table->SetValue( 0, 0, 0 ); > table->SetValue( 0, 1, 0 ); > table->SetValue( 1, 0, 1 ); > table->SetValue( 1, 1, 1 ); > table->SetValue( 2, 0, 2 ); > table->SetValue( 2, 1, 3 ); > > // render the chart > view->GetRenderer()->SetBackground( 1, 1, 1 ); > view->GetScene()->AddItem( chart ); > chart->SetShowLegend( true ); > line = chart->AddPlot( vtkChart::LINE ); > line->SetInput( table, 0, 1 ); > line->SetColor( 1, 0, 0 ); > line->SetWidth( 5.0 ); > > // shows a plot of 3 data point > view->GetRenderer()->Render(); > > // add a new point to the vtkTable > table->SetNumberOfRows( 4 ); > table->SetValue( 0, 0, 0 ); > table->SetValue( 0, 1, 0 ); > table->SetValue( 1, 0, 1 ); > table->SetValue( 1, 1, 1 ); > table->SetValue( 2, 0, 2 ); > table->SetValue( 2, 1, 3 ); > table->SetValue( 3, 0, 5 ); > table->SetValue( 3, 1, 5 ); > table->Modified(); > view->Modified(); > line->Modified(); > > // render it again, but still, only 3 data points were plot > view->GetRenderer()->Render(); > view->GetInteractor()->Initialize(); > view->GetInteractor()->Start(); > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 lars.ebert at virtopsy.com Thu Oct 29 11:58:10 2015 From: lars.ebert at virtopsy.com (laebert) Date: Thu, 29 Oct 2015 08:58:10 -0700 (MST) Subject: [vtkusers] Invalid pixel format, no OpenGL support In-Reply-To: <1446049356979-5734668.post@n5.nabble.com> References: <1446049356979-5734668.post@n5.nabble.com> Message-ID: <1446134290586-5734684.post@n5.nabble.com> Problem solved by using QVTKWidget2 instead of QVTKWidget. -- View this message in context: http://vtk.1045678.n5.nabble.com/Invalid-pixel-format-no-OpenGL-support-tp5734668p5734684.html Sent from the VTK - Users mailing list archive at Nabble.com. From guanw at rhpcs.mcmaster.ca Thu Oct 29 11:59:36 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Thu, 29 Oct 2015 11:59:36 -0400 Subject: [vtkusers] Rendering multiple volumes Message-ID: <56324268.7080701@rhpcs.mcmaster.ca> There were a few posts in the past about this topic. The conclusion seemed to be that VTK didn't support multi-volume rendering in terms of proper visibility sorting/blending. I'm not sure it is still true. I've done a test where two partially overlapped volumes are used. I've found that only the texture mapping mapper can render them correctly. All the other mappers (GPU based or ray casting) always have one volume occlude the other one no matter what direction the camera is viewing. Is vtkImageOcclusionSpectrum designed for handling multiple volume rendering? Any comments will be appreciated. Thanks. Best, Weiguang From shawn.waldon at kitware.com Thu Oct 29 12:05:38 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 29 Oct 2015 12:05:38 -0400 Subject: [vtkusers] Invalid pixel format, no OpenGL support In-Reply-To: <1446134290586-5734684.post@n5.nabble.com> References: <1446049356979-5734668.post@n5.nabble.com> <1446134290586-5734684.post@n5.nabble.com> Message-ID: > > Problem solved by using QVTKWidget2 instead of QVTKWidget. > I'm glad you were able to solve your problem. The solution is probably a good thing as QVTKWidget is deprecated in favor of QVTKWidget2 in the master branch of VTK. Shawn -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Oct 29 12:14:21 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 29 Oct 2015 12:14:21 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <56324268.7080701@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, Yes, a true multi volume rendering is not supported in current GPU mappers. This is a interesting task and we talked about implementing it but didn't hit high in our priority list. I think there could be some interesting questions / answer related to this on blending and mixing. One thing you could do (if possible) is that you can combine two volumes into one with two components (assuming that each has one) if you need something soon. Also, I believe the texture mapping mapper works because it crates these polygonal slices but I would imaging that even it would not do the right thing completely (it may look right though) in all circumstances since its not going to sort slices between two volumes. - Aashish On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan wrote: > There were a few posts in the past about this topic. The conclusion seemed > to be that VTK didn't support multi-volume rendering in terms of proper > visibility sorting/blending. I'm not sure it is still true. > > I've done a test where two partially overlapped volumes are used. I've > found that only the texture mapping mapper can render them correctly. All > the other mappers (GPU based or ray casting) always have one volume occlude > the other one no matter what direction the camera is viewing. > > Is vtkImageOcclusionSpectrum designed for handling multiple volume > rendering? Any comments will be appreciated. Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.chen at gmail.com Thu Oct 29 12:42:52 2015 From: elvis.chen at gmail.com (Elvis Chen) Date: Thu, 29 Oct 2015 12:42:52 -0400 Subject: [vtkusers] Cannot update vtkChartXY In-Reply-To: References: Message-ID: Thanks. Your solution works for me as well. On Thu, Oct 29, 2015 at 11:48 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I attempted to do the same thing you did (with Python VTK6.3), but it > wouldn't work for me either. The only way I was able to get it to work as > needed was to remove and re-create the line. > > I came to this solution because of this: > http://vtk.1045678.n5.nabble.com/How-to-update-a-2d-plot-vtkChartXY-with-new-data-online-using-C-td5725677.html > > However, it would be great is someone who was more familiar with VTK had a > better solution. > > -Andrew > > On Thu, Oct 29, 2015 at 9:42 AM, Elvis Chen wrote: > >> hi all, >> >> I am trying to utilize vtkChartXY to plot a simple 2D curve but ran into >> some trouble, I seek your help. >> >> The 2D plot is a function of time and is been updated incrementally. I >> tried to follow the example at: >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot >> >> to create an initial plot. As the data come in, I extended the vtkTable, >> and calls the renderer again, but only the initial table/plot was shown. A >> code demonstrating is the follow. Basically what I did was: >> >> - create a vtkTable with 3 data point, and plot it, >> - modify the vtkTable to include 1 more data point (4 total), and plot it >> again, >> - but the resulting plot only shows the original curve. >> >> Any help is very much appreciated, >> >> thanks, >> >> >> >> // arrX and arrY are vtkFloatArray >> >> table->AddColumn( arrX ); >> table->AddColumn( arrY ); >> >> // create a table of 3 data points >> table->SetNumberOfRows( 3 ); >> table->SetValue( 0, 0, 0 ); >> table->SetValue( 0, 1, 0 ); >> table->SetValue( 1, 0, 1 ); >> table->SetValue( 1, 1, 1 ); >> table->SetValue( 2, 0, 2 ); >> table->SetValue( 2, 1, 3 ); >> >> // render the chart >> view->GetRenderer()->SetBackground( 1, 1, 1 ); >> view->GetScene()->AddItem( chart ); >> chart->SetShowLegend( true ); >> line = chart->AddPlot( vtkChart::LINE ); >> line->SetInput( table, 0, 1 ); >> line->SetColor( 1, 0, 0 ); >> line->SetWidth( 5.0 ); >> >> // shows a plot of 3 data point >> view->GetRenderer()->Render(); >> >> // add a new point to the vtkTable >> table->SetNumberOfRows( 4 ); >> table->SetValue( 0, 0, 0 ); >> table->SetValue( 0, 1, 0 ); >> table->SetValue( 1, 0, 1 ); >> table->SetValue( 1, 1, 1 ); >> table->SetValue( 2, 0, 2 ); >> table->SetValue( 2, 1, 3 ); >> table->SetValue( 3, 0, 5 ); >> table->SetValue( 3, 1, 5 ); >> table->Modified(); >> view->Modified(); >> line->Modified(); >> >> // render it again, but still, only 3 data points were plot >> view->GetRenderer()->Render(); >> view->GetInteractor()->Initialize(); >> view->GetInteractor()->Start(); >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 guanw at rhpcs.mcmaster.ca Thu Oct 29 13:07:40 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Thu, 29 Oct 2015 13:07:40 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> Message-ID: <5632525C.6000600@rhpcs.mcmaster.ca> Thanks, Aashish, for confirming it and providing a workaround. Hope my post + other related posts would bump it up a bit in the priority list. Best, Weiguang On 29/10/2015 12:14 PM, Aashish Chaudhary wrote: > Hi Weiguang, > > Yes, a true multi volume rendering is not supported in current GPU > mappers. This is a interesting task and we talked about implementing > it but didn't hit high in our priority list. I think there could be > some interesting questions / answer related to this on blending and > mixing. One thing you could do (if possible) is that you can combine > two volumes into one with two components (assuming that each has one) > if you need something soon. Also, I believe the texture mapping mapper > works because it crates these polygonal slices but I would imaging > that even it would not do the right thing completely (it may look > right though) in all circumstances since its not going to sort slices > between two volumes. > > - Aashish > > On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan > > wrote: > > There were a few posts in the past about this topic. The > conclusion seemed to be that VTK didn't support multi-volume > rendering in terms of proper visibility sorting/blending. I'm not > sure it is still true. > > I've done a test where two partially overlapped volumes are used. > I've found that only the texture mapping mapper can render them > correctly. All the other mappers (GPU based or ray casting) always > have one volume occlude the other one no matter what direction the > camera is viewing. > > Is vtkImageOcclusionSpectrum designed for handling multiple volume > rendering? Any comments will be appreciated. Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > /| Aashish Chaudhary > | Technical Leader > | Kitware Inc. > / > /| http://www.kitware.com/company/team/chaudhary.html/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Oct 29 13:12:13 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 29 Oct 2015 13:12:13 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <5632525C.6000600@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> Message-ID: On Thu, Oct 29, 2015 at 1:07 PM, Weiguang guan wrote: > Thanks, Aashish, for confirming it and providing a workaround. Hope my > post + other related posts would bump it up a bit in the priority list. > I am sure it will. Can you send me some sample dataset so that I can play around? Working with real use-cases is always more fun than using the wavelet or other sample data we have. Also, if you can share some screen captures, that would be great (if possible). You can send me an email privately for those if that's more comfortable. We always like to hear back from the community. Thanks, - Aashish > > Best, > Weiguang > > > On 29/10/2015 12:14 PM, Aashish Chaudhary wrote: > > Hi Weiguang, > > Yes, a true multi volume rendering is not supported in current GPU > mappers. This is a interesting task and we talked about implementing it but > didn't hit high in our priority list. I think there could be some > interesting questions / answer related to this on blending and mixing. One > thing you could do (if possible) is that you can combine two volumes into > one with two components (assuming that each has one) if you need something > soon. Also, I believe the texture mapping mapper works because it crates > these polygonal slices but I would imaging that even it would not do the > right thing completely (it may look right though) in all circumstances > since its not going to sort slices between two volumes. > > - Aashish > > On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan > wrote: > >> There were a few posts in the past about this topic. The conclusion >> seemed to be that VTK didn't support multi-volume rendering in terms of >> proper visibility sorting/blending. I'm not sure it is still true. >> >> I've done a test where two partially overlapped volumes are used. I've >> found that only the texture mapping mapper can render them correctly. All >> the other mappers (GPU based or ray casting) always have one volume occlude >> the other one no matter what direction the camera is viewing. >> >> Is vtkImageOcclusionSpectrum designed for handling multiple volume >> rendering? Any comments will be appreciated. Thanks. >> >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. > * > *| http://www.kitware.com/company/team/chaudhary.html > * > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Thu Oct 29 13:33:14 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Thu, 29 Oct 2015 13:33:14 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> Message-ID: <5632585A.4000005@rhpcs.mcmaster.ca> Sure, I will send you some datasets after this email. We have a very interesting project here at McMaster University to visualize x-ray diffraction data. The visualization package is written in C++ using VTK as rendering engine and Qt as GUI builder. You can find some screenshots together with description of the software at http://www.chemistry.mcmaster.ca/facilities/xray/221-max3d. Best, Weiguang On 29/10/2015 1:12 PM, Aashish Chaudhary wrote: > On Thu, Oct 29, 2015 at 1:07 PM, Weiguang guan > > wrote: > > Thanks, Aashish, for confirming it and providing a workaround. > Hope my post + other related posts would bump it up a bit in the > priority list. > > > I am sure it will. Can you send me some sample dataset so that I can > play around? Working with real use-cases is always more fun than using > the wavelet or other sample data we have. Also, if you can share some > screen captures, that would be great (if possible). You can send me an > email privately for those if that's more comfortable. We always like > to hear back from the community. > > Thanks, > - Aashish > > > Best, > Weiguang > > > On 29/10/2015 12:14 PM, Aashish Chaudhary wrote: >> Hi Weiguang, >> >> Yes, a true multi volume rendering is not supported in current >> GPU mappers. This is a interesting task and we talked about >> implementing it but didn't hit high in our priority list. I think >> there could be some interesting questions / answer related to >> this on blending and mixing. One thing you could do (if possible) >> is that you can combine two volumes into one with two components >> (assuming that each has one) if you need something soon. Also, I >> believe the texture mapping mapper works because it crates these >> polygonal slices but I would imaging that even it would not do >> the right thing completely (it may look right though) in all >> circumstances since its not going to sort slices between two >> volumes. >> >> - Aashish >> >> On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan >> > wrote: >> >> There were a few posts in the past about this topic. The >> conclusion seemed to be that VTK didn't support multi-volume >> rendering in terms of proper visibility sorting/blending. I'm >> not sure it is still true. >> >> I've done a test where two partially overlapped volumes are >> used. I've found that only the texture mapping mapper can >> render them correctly. All the other mappers (GPU based or >> ray casting) always have one volume occlude the other one no >> matter what direction the camera is viewing. >> >> Is vtkImageOcclusionSpectrum designed for handling multiple >> volume rendering? Any comments will be appreciated. Thanks. >> >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> -- >> /| Aashish Chaudhary >> | Technical Leader >> | Kitware Inc. >> / >> /| http://www.kitware.com/company/team/chaudhary.html/ > > > > > -- > /| Aashish Chaudhary > | Technical Leader > | Kitware Inc. > / > /| http://www.kitware.com/company/team/chaudhary.html/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Oct 29 13:38:22 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 29 Oct 2015 13:38:22 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <5632585A.4000005@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> Message-ID: This is really cool! thanks for sharing. I have cc'd Marcus and Utkarsh as well, I am sure they also would like to know more about your work. Yes, I will wait for your data and may be we can sync up again later over our emails directly. Thanks Aashish On Thu, Oct 29, 2015 at 1:33 PM, Weiguang guan wrote: > Sure, I will send you some datasets after this email. > > We have a very interesting project here at McMaster University to > visualize x-ray diffraction data. The visualization package is written in > C++ using VTK as rendering engine and Qt as GUI builder. You can find some > screenshots together with description of the software at > http://www.chemistry.mcmaster.ca/facilities/xray/221-max3d. > > Best, > Weiguang > > > > On 29/10/2015 1:12 PM, Aashish Chaudhary wrote: > > On Thu, Oct 29, 2015 at 1:07 PM, Weiguang guan > wrote: > >> Thanks, Aashish, for confirming it and providing a workaround. Hope my >> post + other related posts would bump it up a bit in the priority list. >> > > I am sure it will. Can you send me some sample dataset so that I can play > around? Working with real use-cases is always more fun than using the > wavelet or other sample data we have. Also, if you can share some screen > captures, that would be great (if possible). You can send me an email > privately for those if that's more comfortable. We always like to hear back > from the community. > > Thanks, > - Aashish > > >> >> Best, >> Weiguang >> >> >> On 29/10/2015 12:14 PM, Aashish Chaudhary wrote: >> >> Hi Weiguang, >> >> Yes, a true multi volume rendering is not supported in current GPU >> mappers. This is a interesting task and we talked about implementing it but >> didn't hit high in our priority list. I think there could be some >> interesting questions / answer related to this on blending and mixing. One >> thing you could do (if possible) is that you can combine two volumes into >> one with two components (assuming that each has one) if you need something >> soon. Also, I believe the texture mapping mapper works because it crates >> these polygonal slices but I would imaging that even it would not do the >> right thing completely (it may look right though) in all circumstances >> since its not going to sort slices between two volumes. >> >> - Aashish >> >> On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan >> wrote: >> >>> There were a few posts in the past about this topic. The conclusion >>> seemed to be that VTK didn't support multi-volume rendering in terms of >>> proper visibility sorting/blending. I'm not sure it is still true. >>> >>> I've done a test where two partially overlapped volumes are used. I've >>> found that only the texture mapping mapper can render them correctly. All >>> the other mappers (GPU based or ray casting) always have one volume occlude >>> the other one no matter what direction the camera is viewing. >>> >>> Is vtkImageOcclusionSpectrum designed for handling multiple volume >>> rendering? Any comments will be appreciated. Thanks. >>> >>> Best, >>> Weiguang >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. > * > *| http://www.kitware.com/company/team/chaudhary.html > * > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lisa.avila at kitware.com Thu Oct 29 15:25:39 2015 From: lisa.avila at kitware.com (Lisa Avila) Date: Thu, 29 Oct 2015 15:25:39 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <56324268.7080701@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> Message-ID: Do you mean that the volumes overlap in 3D space, or just overlap in image space? If the volumes overlap in image space (two disjoint volumes where sometimes one is in front of the other) VTK does render this correctly (you need to turn back to front rendering on in the culler in the renderer). It is true that VTK does not correctly handle volumes that overlap in 3D space, unless they are aligned and part of the same volume (multiple components in one vtkImageData). Lisa On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan wrote: > There were a few posts in the past about this topic. The conclusion seemed > to be that VTK didn't support multi-volume rendering in terms of proper > visibility sorting/blending. I'm not sure it is still true. > > I've done a test where two partially overlapped volumes are used. I've > found that only the texture mapping mapper can render them correctly. All > the other mappers (GPU based or ray casting) always have one volume occlude > the other one no matter what direction the camera is viewing. > > Is vtkImageOcclusionSpectrum designed for handling multiple volume > rendering? Any comments will be appreciated. Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 aashish.chaudhary at kitware.com Thu Oct 29 15:28:40 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 29 Oct 2015 15:28:40 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> Message-ID: On Thu, Oct 29, 2015 at 3:25 PM, Lisa Avila wrote: > Do you mean that the volumes overlap in 3D space, or just overlap in image > space? If the volumes overlap in image space (two disjoint volumes where > sometimes one is in front of the other) VTK does render this correctly (you > need to turn back to front rendering on in the culler in the renderer). It > is true that VTK does not correctly handle volumes that overlap in 3D > space, unless they are aligned and part of the same volume (multiple > components in one vtkImageData). > My understanding (based on some previous emails) is that they overlap in 3D space. - Aashish > > > Lisa > > > On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan > wrote: > >> There were a few posts in the past about this topic. The conclusion >> seemed to be that VTK didn't support multi-volume rendering in terms of >> proper visibility sorting/blending. I'm not sure it is still true. >> >> I've done a test where two partially overlapped volumes are used. I've >> found that only the texture mapping mapper can render them correctly. All >> the other mappers (GPU based or ray casting) always have one volume occlude >> the other one no matter what direction the camera is viewing. >> >> Is vtkImageOcclusionSpectrum designed for handling multiple volume >> rendering? Any comments will be appreciated. Thanks. >> >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Thu Oct 29 18:16:15 2015 From: zarko at kg.ac.rs (zarko.milosevic) Date: Thu, 29 Oct 2015 15:16:15 -0700 (MST) Subject: [vtkusers] Linker error vtkDirectXGPUInfoList.obj In-Reply-To: <20151029154856.GA14767@megas.khq.kitware.com> References: <1445988115077-5734639.post@n5.nabble.com> <20151029154856.GA14767@megas.khq.kitware.com> Message-ID: <1446156975889-5734701.post@n5.nabble.com> Found the solution. Beside VTK lib that should be include in the VS project lib wbemuuid.lib is also required so those two linking errors would not occur. Basically, workflow is following: Run CMAKE and build with default settings. Disable BUILD_TEST and BUILD_EXAMPLES if not needed in order to significantly improve building speed of the VTK project. BUILD_SHARED_LIBS i have disabled because i prefer to use static libraries more and in most cases that will fits the needs of most users. Run VTK.sln and build ALL_BUILD project After building finished build INSTALL project in order to get all libs and headers at one place. Libs and Headers(Include files) will be stored at location related to the CMAKE_INSTALL_PREFIX after building is done. Import Includes and libs in the VS project in standard way (see on net how) Add all the library names in additional dependencies. Copy all file names together with extensions ("lib") and add them in Configuration Properties -> Linker -> Input -> Additional Dependencies. Add at same place openg32.lib for support of OPEN GL in vtk. Build your project. If following error occurs Error 105 error LNK2001: unresolved external symbol _Direct3DCreate9 at 4 vtkRendering.lib(vtkDirectXGPUInfoList.obj) Add d3d9.lib to the Configuration Properties -> Linker -> Input -> Additional Dependencies. if folowing linker error occurs Error 103 error LNK2001: unresolved external symbol _CLSID_WbemLocator (vtkDirectXGPUInfoList.obj) Error 104 error LNK2001: unresolved external symbol _IID_IWbemLocator vtkRendering.lib(vtkDirectXGPUInfoList.obj) Add wbemuuid.lib to the Configuration Properties -> Linker -> Input -> Additional Dependencies. Hope someone will help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Linker-error-vtkDirectXGPUInfoList-obj-tp5734639p5734701.html Sent from the VTK - Users mailing list archive at Nabble.com. From rickfrank at me.com Thu Oct 29 18:16:10 2015 From: rickfrank at me.com (Richard Frank) Date: Thu, 29 Oct 2015 18:16:10 -0400 Subject: [vtkusers] Opengl2 and Qt5.5 Message-ID: <9327C7DA-8031-4377-94C5-943C78EC9F83@me.com> Does one need to turn on Module_vtkGUISupportQtOpenGL on or off with the OpenGL2 options on? Rick Frank From saeedbakhshmand at gmail.com Thu Oct 29 18:19:47 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Thu, 29 Oct 2015 18:19:47 -0400 Subject: [vtkusers] How to change opacity/visibility of polyline Message-ID: Hello, Is there any way to toggle visibility of each line of a vtkpolydata (or vtkpolyline) independently? Best, Saeed -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Thu Oct 29 18:35:34 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 29 Oct 2015 20:35:34 -0200 Subject: [vtkusers] Starting with Qt+VTK Message-ID: Hi guys, good night. I'm really newby on Qt and more with VTK. I need to do a enviroment 3D to load STL files, I already that VTK have a function ready to load STL files ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadSTL). But my doubt is: What is the better way to work with QVTKWidget? Make a class inherit from it, and do all controls there? Or make out, in main class? Read the STL file is the first thing that i need to do. After i will need do more stuff. But i'm focusing now only in read and render the STL file. Its the first time that i'm working with graphics, so any help or tips it will be welcome. Thanks everyone, good night! -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.hssi at gmail.com Thu Oct 29 21:55:29 2015 From: eduardo.hssi at gmail.com (eduardo) Date: Thu, 29 Oct 2015 18:55:29 -0700 (MST) Subject: [vtkusers] VTK-Export Scene VRML Message-ID: <1446170129124-5734706.post@n5.nabble.com> How do I export a scene from VTK. Example, I have a visualization where I use the vtkVolumeRayCastMapper to render a stack of images, always to export displays the following error "the actors found for writing VRML file." If I use the vtkActor the volume does not appear. VRML = vtk. vtkVRMLExporter (); VRML. SetRenderWindow (renWin); VRML. SetFileName ("D://test.vrml"); VRML. Write (); Is there any way to export the scene with volume? Any help would be greatly appreciated. Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Export-Scene-VRML-tp5734706.html Sent from the VTK - Users mailing list archive at Nabble.com. From laysrodriguessilva at gmail.com Thu Oct 29 21:56:00 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 29 Oct 2015 23:56:00 -0200 Subject: [vtkusers] Doubt Qt+Vtk Message-ID: Hi guys, good night. I started study VTK today, to make the 3DView to my Qt App. So i made the class vtkWidget inherit from QVTKWidget to control the view. How i need load STL files, i made a function to do that based on this example from VTK Wiki (https://cmake.org/Wiki/VTK/Examples/Cxx/IO/ReadSTL) Now my doubt is how to convert this code to render on the vtkWidget instead of ' 1. vtkSmartPointer renderWindow = 2. vtkSmartPointer::New(); ' At the pastebin is the code already in my function, but i didnt change almost nothing. http://pastebin.com/fe3kKV0K Thanks, Att -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Oct 30 08:35:50 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 30 Oct 2015 08:35:50 -0400 Subject: [vtkusers] Transparent NaN color with OpenGL2 In-Reply-To: <55FA7670.7060107@student.hpi.uni-potsdam.de> References: <55FA7670.7060107@student.hpi.uni-potsdam.de> Message-ID: This should be fixed in master now. I added methods to force an actor to treat itself as Opaque or Translucent regardless of other factors. So in your example even though you have some less than 1.0 alpha values in your LUT you could call yourActor->ForceOpaqueOn() to force it to be treated as Opaque. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Karsten Tausche Sent: Thursday, September 17, 2015 4:15 AM To: vtkusers at vtk.org Subject: [vtkusers] Transparent NaN color with OpenGL2 Hi, I'm using vtkLookupTable::SetNanColor to hide cells with NaN scalar values in my data sets (alpha value set to zero). This worked fine with the old OpenGL backend, but seems to break the depth test with OpenGL2. See the attached images: the red/blue quad is always rendered in the foreground, no matter how you rotate the camera. This happens when you set the alpha value for NaN-values to something different to 1 for both planes. I tested this with today's nightly branch, but it seems to be broken in the OpenGL2 backend since a while. (On Nvidia, Windows 8.1x64, MSVC2015) Is this a bug in the new backend, or is there some parameter that I have to configure for this setup? Thanks, Karsten From ken.martin at kitware.com Fri Oct 30 08:54:58 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 30 Oct 2015 08:54:58 -0400 Subject: [vtkusers] Building VTK without OpenGL In-Reply-To: <20151022182938.GA29507@megas.khq.kitware.com> References: <20151022182938.GA29507@megas.khq.kitware.com> Message-ID: I added some support for fixing the None backend work. It is still a bit twitchy as you can turn on some modules that require graphics even if the None backend was selected. But a fresh build with None seems to work including with Python and tests passed for me. Without Rendering there are still a couple hundred tests :-) If you get a chance to setup a None dashboard with python Ben that would be great. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ben Boeckel Sent: Thursday, October 22, 2015 2:30 PM To: Marcus D. Hanwell Cc: David Gobbi; vtkusers at vtk.org; Moreland, Kenneth Subject: Re: [vtkusers] Building VTK without OpenGL On Thu, Oct 22, 2015 at 11:05:31 -0400, Marcus D. Hanwell wrote: > This did work when I added it, but I guess the dashboard that tested > it was lost, and it was broken at some point. I agree with you that it > should be removed (or fixed, and tested). Is a dashboard which just builds with the None backend sufficient? Are there any tests that would still run that are meaningful in only None mode (looking for a way to save buildbot time here :) ). If anyone makes an MR where a None backend works, I'll add a builder for it. --Ben _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From guanw at rhpcs.mcmaster.ca Fri Oct 30 09:24:25 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Fri, 30 Oct 2015 09:24:25 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> Message-ID: <56336F89.7030901@rhpcs.mcmaster.ca> Actually both. However, rendering disjoint volumes is most needed in our application. I'll try the "back to front" rendering option. Thanks. Best, Weiguang On 29/10/2015 3:28 PM, Aashish Chaudhary wrote: > On Thu, Oct 29, 2015 at 3:25 PM, Lisa Avila > wrote: > > Do you mean that the volumes overlap in 3D space, or just overlap > in image space? If the volumes overlap in image space (two > disjoint volumes where sometimes one is in front of the other) VTK > does render this correctly (you need to turn back to front > rendering on in the culler in the renderer). It is true that VTK > does not correctly handle volumes that overlap in 3D space, unless > they are aligned and part of the same volume (multiple components > in one vtkImageData). > > > My understanding (based on some previous emails) is that they overlap > in 3D space. > > - Aashish > > > > Lisa > > > On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan > > wrote: > > There were a few posts in the past about this topic. The > conclusion seemed to be that VTK didn't support multi-volume > rendering in terms of proper visibility sorting/blending. I'm > not sure it is still true. > > I've done a test where two partially overlapped volumes are > used. I've found that only the texture mapping mapper can > render them correctly. All the other mappers (GPU based or ray > casting) always have one volume occlude the other one no > matter what direction the camera is viewing. > > Is vtkImageOcclusionSpectrum designed for handling multiple > volume rendering? Any comments will be appreciated. Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 > > > > > -- > /| Aashish Chaudhary > | Technical Leader > | Kitware Inc. > / > /| http://www.kitware.com/company/team/chaudhary.html/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Oct 30 09:38:06 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 30 Oct 2015 09:38:06 -0400 Subject: [vtkusers] [vtk-developers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget In-Reply-To: References: Message-ID: Thanks Simon, could you check and see if the attached patch fixes your issue? Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf Of *Simon ESNEAULT *Sent:* Tuesday, October 27, 2015 1:52 PM *To:* vtkusers at vtk.org; VTK Developers *Subject:* [vtk-developers] [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget Hello All, Following our migration to the brand new OpenGL2 backend, the ButtonWidget seem's broken, the button display's a gray texture instead of an image with the new backend. This is visible in all our tested platform (Windows or OSX box) The following VTK wiki example reproduce the problem : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget OpenGL1 backend result : http://picpaste.com/pics/OGL1_1.1445968197.png OpenGL2 backend result : http://picpaste.com/pics/OGL2_1.1445968221.png Is it a known issue ? Any clue ? In our application we try to load a png image, but it always show a gray/white rectangle instead Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: balloon.patch Type: application/octet-stream Size: 1707 bytes Desc: not available URL: From simon.esneault at gmail.com Fri Oct 30 09:47:40 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 30 Oct 2015 14:47:40 +0100 Subject: [vtkusers] [vtk-developers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget In-Reply-To: References: Message-ID: Hello Ken, Thanks a lot for working on this issue, I'll try the patch and get back to you soon -Simon 2015-10-30 14:38 GMT+01:00 Ken Martin : > Thanks Simon, could you check and see if the attached patch fixes your > issue? > > > > Thanks > > Ken > > > > Ken Martin PhD > > Chairman & CFO > > Kitware Inc. > > 28 Corporate Drive > > Clifton Park NY 12065 > > ken.martin at kitware.com > > 919 869-8871 (w) > > > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf > Of *Simon ESNEAULT > *Sent:* Tuesday, October 27, 2015 1:52 PM > *To:* vtkusers at vtk.org; VTK Developers > *Subject:* [vtk-developers] [vtkusers] OpenGL2 - Broken > vtkTexturedButtonRepresentation2D/vtkButtonWidget > > > > Hello All, > > Following our migration to the brand new OpenGL2 backend, the ButtonWidget > seem's broken, the button display's a gray texture instead of an image with > the new backend. This is visible in all our tested platform (Windows or OSX > box) > > The following VTK wiki example reproduce the problem : > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget > > > > OpenGL1 backend result : > http://picpaste.com/pics/OGL1_1.1445968197.png > > OpenGL2 backend result : > http://picpaste.com/pics/OGL2_1.1445968221.png > > > Is it a known issue ? Any clue ? In our application we try to load a png > image, but it always show a gray/white rectangle instead > > Thanks > Simon > > > > > > > > > > > > > > > > > > -- > > ------------------------------------------------------------------ > Simon Esneault > > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Oct 30 09:52:24 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 30 Oct 2015 08:52:24 -0500 Subject: [vtkusers] VTK-Export Scene VRML In-Reply-To: <1446170129124-5734706.post@n5.nabble.com> References: <1446170129124-5734706.post@n5.nabble.com> Message-ID: I am pretty sure that none of the exporters support volumes since none of the exported scene description languages support volume rendering. If VRML happens to have a way to describe a volume then we could presumably add it. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 29, 2015 at 8:55 PM, eduardo wrote: > How do I export a scene from VTK. Example, I have a visualization where I > use > the vtkVolumeRayCastMapper to render a stack of images, always to export > displays the following error "the actors found for writing VRML file." > > If I use the vtkActor the volume does not appear. > > VRML = vtk. vtkVRMLExporter (); > VRML. SetRenderWindow (renWin); > VRML. SetFileName ("D://test.vrml"); > VRML. Write (); > > Is there any way to export the scene with volume? > > Any help would be greatly appreciated. Thanks > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VTK-Export-Scene-VRML-tp5734706.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 shawn.waldon at kitware.com Fri Oct 30 09:54:32 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Fri, 30 Oct 2015 09:54:32 -0400 Subject: [vtkusers] Starting with Qt+VTK In-Reply-To: References: Message-ID: Hi Lays, There are some VTK examples that show how to set up simple Qt applications using QVTKWidget here [1]. Generally I subclass QMainWindow as shown in this example [2] rather than subclassing QVTKWidget. Also, if you are writing a new application, I would recommend using QVTKWidget2 rather than QVTKWidget since the latter is deprecated in VTK master. I think it should be fairly close to a drop-in replacement, but others on the list will know more about that than me. HTH, Shawn [1]: http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt [2]: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUISingleInheritance On Thu, Oct 29, 2015 at 6:35 PM, Lays Rodrigues < laysrodriguessilva at gmail.com> wrote: > Hi guys, good night. > I'm really newby on Qt and more with VTK. > I need to do a enviroment 3D to load STL files, I already that VTK have a > function ready to load STL files ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadSTL). > But my doubt is: > What is the better way to work with QVTKWidget? > Make a class inherit from it, and do all controls there? Or make out, in > main class? > Read the STL file is the first thing that i need to do. After i will need > do more stuff. But i'm focusing now only in read and render the STL file. > Its the first time that i'm working with graphics, so any help or tips it > will be welcome. > Thanks everyone, good night! > > > -- > __ > *Lays Rodrigues* > *Developer Front-End at Br-Print3D Project* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > www.facebook.com/brprint3d > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 lisa.avila at kitware.com Fri Oct 30 10:02:46 2015 From: lisa.avila at kitware.com (Lisa Avila) Date: Fri, 30 Oct 2015 10:02:46 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <56336F89.7030901@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> <56336F89.7030901@rhpcs.mcmaster.ca> Message-ID: Weiguang, That should work - if you run into issues let us know. Lisa On Fri, Oct 30, 2015 at 9:24 AM, Weiguang guan wrote: > Actually both. However, rendering disjoint volumes is most needed in our > application. I'll try the "back to front" rendering option. Thanks. > > Best, > Weiguang > > > > On 29/10/2015 3:28 PM, Aashish Chaudhary wrote: > > On Thu, Oct 29, 2015 at 3:25 PM, Lisa Avila > wrote: > >> Do you mean that the volumes overlap in 3D space, or just overlap in >> image space? If the volumes overlap in image space (two disjoint volumes >> where sometimes one is in front of the other) VTK does render this >> correctly (you need to turn back to front rendering on in the culler in the >> renderer). It is true that VTK does not correctly handle volumes that >> overlap in 3D space, unless they are aligned and part of the same volume >> (multiple components in one vtkImageData). >> > > My understanding (based on some previous emails) is that they overlap in > 3D space. > > - Aashish > >> >> >> Lisa >> >> >> On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan >> wrote: >> >>> There were a few posts in the past about this topic. The conclusion >>> seemed to be that VTK didn't support multi-volume rendering in terms of >>> proper visibility sorting/blending. I'm not sure it is still true. >>> >>> I've done a test where two partially overlapped volumes are used. I've >>> found that only the texture mapping mapper can render them correctly. All >>> the other mappers (GPU based or ray casting) always have one volume occlude >>> the other one no matter what direction the camera is viewing. >>> >>> Is vtkImageOcclusionSpectrum designed for handling multiple volume >>> rendering? Any comments will be appreciated. Thanks. >>> >>> Best, >>> Weiguang >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. > * > *| http://www.kitware.com/company/team/chaudhary.html > * > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Fri Oct 30 10:17:50 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 30 Oct 2015 15:17:50 +0100 Subject: [vtkusers] [vtk-developers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget In-Reply-To: <7400ebc5bb7ddfd554fea3bf09cb59be@mail.gmail.com> References: <7400ebc5bb7ddfd554fea3bf09cb59be@mail.gmail.com> Message-ID: Yes, the first patch was not working, but the second patch is ok, and the texture is correctly rendered ! Thanks a lot, will this patch be merged in the VTK 6.3.1 release ? Simon 2015-10-30 15:11 GMT+01:00 Ken Martin : > I think there is an issue with the previous patch, try this patch instead > if you can - Ken > > > > Ken Martin PhD > > Chairman & CFO > > Kitware Inc. > > 28 Corporate Drive > > Clifton Park NY 12065 > > ken.martin at kitware.com > > 919 869-8871 (w) > > > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > *From:* sesneault at gmail.com [mailto:sesneault at gmail.com] *On Behalf Of *Simon > ESNEAULT > *Sent:* Friday, October 30, 2015 9:48 AM > *To:* Ken Martin > *Cc:* vtkusers at vtk.org; VTK Developers > *Subject:* Re: [vtk-developers] [vtkusers] OpenGL2 - Broken > vtkTexturedButtonRepresentation2D/vtkButtonWidget > > > > Hello Ken, > > Thanks a lot for working on this issue, I'll try the patch and get back to > you soon > -Simon > > > > > 2015-10-30 14:38 GMT+01:00 Ken Martin : > > Thanks Simon, could you check and see if the attached patch fixes your > issue? > > > > Thanks > > Ken > > > > Ken Martin PhD > > Chairman & CFO > > Kitware Inc. > > 28 Corporate Drive > > Clifton Park NY 12065 > > ken.martin at kitware.com > > 919 869-8871 (w) > > > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf > Of *Simon ESNEAULT > *Sent:* Tuesday, October 27, 2015 1:52 PM > *To:* vtkusers at vtk.org; VTK Developers > *Subject:* [vtk-developers] [vtkusers] OpenGL2 - Broken > vtkTexturedButtonRepresentation2D/vtkButtonWidget > > > > Hello All, > > Following our migration to the brand new OpenGL2 backend, the ButtonWidget > seem's broken, the button display's a gray texture instead of an image with > the new backend. This is visible in all our tested platform (Windows or OSX > box) > > The following VTK wiki example reproduce the problem : > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget > > > > OpenGL1 backend result : > http://picpaste.com/pics/OGL1_1.1445968197.png > > OpenGL2 backend result : > http://picpaste.com/pics/OGL2_1.1445968221.png > > > Is it a known issue ? Any clue ? In our application we try to load a png > image, but it always show a gray/white rectangle instead > > Thanks > Simon > > > > > > > > > > > > > > > > > > -- > > ------------------------------------------------------------------ > Simon Esneault > > Rennes, France > ------------------------------------------------------------------ > > > > > > -- > > ------------------------------------------------------------------ > Simon Esneault > > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.buckler at elucidbio.com Fri Oct 30 10:12:18 2015 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Fri, 30 Oct 2015 14:12:18 +0000 Subject: [vtkusers] =?windows-1252?q?SystemTools=2Ecxx=3A326=3A51=3A_error?= =?windows-1252?q?=3A_=91realpath=92_was_not_declared_in_this_scope?= Message-ID: Hello, I am building VTK on Windows with Cygwin. I am trying to make the use of cmake and the build process as similar to Mac as possible; I already have it working there. The cmake configuration works fine, but the build fails: $ make Scanning dependencies of target VTKData [ 0%] Built target VTKData Scanning dependencies of target vtksys [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/ProcessUNIX.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Base64.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingC.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/MD5.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/System.c.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/DynamicLoader.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingCXX.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Glob.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/RegularExpression.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?void Realpath(const string&, std::string&, std::string*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope char *ret = realpath(path.c_str(), resolved_name); ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?int vtksys::kwsysUnPutEnv(const string&)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:518:16: error: ?putenv? was not declared in this scope if(putenv(buf) < 0 && errno != EINVAL) ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In member function ?bool vtksys::kwsysEnv::Put(const char*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:658:25: error: ?putenv? was not declared in this scope return putenv(newEnv) == 0; ^ Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/build.make:302: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o' failed make[2]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o] Error 1 CMakeFiles/Makefile2:193: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed make[1]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Any help? Best regards, Andy ------------------------------------- Andrew J. Buckler, President and CEO Elucid Bioimaging Inc. 225 Main Street, Suite 15 | Wenham, MA 01984 USA Office: +1-978-468-0508 Mobile: +1-978-473-1986 Fax: +1-978-468-0527 andrew.buckler at elucidbio.com | www.elucidbio.com This e-mail is from Elucid Bioimaging Inc., a product development and contract research company, and may contain information that is confidential or privileged. If you are not the intended recipient, do not read, copy or distribute the e-mail or any attachments. Instead, please notify the sender and delete the e-mail and any attachments. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner at sembach.de Fri Oct 30 10:46:06 2015 From: werner at sembach.de (Werner Sembach) Date: Fri, 30 Oct 2015 15:46:06 +0100 Subject: [vtkusers] No vectors in input data after ShallowCopy In-Reply-To: <5630E3AA.9050700@sembach.de> References: <5630E3AA.9050700@sembach.de> Message-ID: <563382AE.4060901@sembach.de> Ok it makes even less sense to me now: For testingpupose i have changed: void MainWindow::updateImage(vtkSmartPointer newImage) { image->ShallowCopy(newImage); image->Modified(); qvtkWidget->GetRenderWindow()->Render(); } too void MainWindow::updateImage(vtkSmartPointer newImage) { image->ShallowCopy(newImage); initializeImage2() qvtkWidget->GetRenderWindow()->Render(); } where inizializeImage2 prints a different picture than the first inizialization. And this works, but when i do this: void MainWindow::updateImage(vtkSmartPointer newImage) { image = newImage; initializeImage2() qvtkWidget->GetRenderWindow()->Render(); } nothing in the output changes at all. this doesn't make sense to me anymore. What am i missing guys? pls help void MainWindow::initializeImage2() { unsigned int dim = 20; image->SetDimensions(dim, dim, 1); image->SetSpacing(1.0, 1.0, 1.0); image->SetOrigin(0.0, 0.0, 0.0); image->AllocateScalars(VTK_DOUBLE,3); for(unsigned int x = 0; x < dim; x++) { for(unsigned int y = 0; y < dim; y++) { double* pixel = static_cast(image->GetScalarPointer(x,y,0)); pixel[0] = 1.0; pixel[1] = 1.0; pixel[2] = 0.0; } } image->GetPointData()->SetVectors(image->GetPointData()->GetArray(0)); //image->GetPointData()->SetActiveVectors("ImageScalars"); image->Modified(); } Am 28.10.2015 um 16:03 schrieb Werner Sembach: > So i have a function that gehts a vtkImageData* > and should replace another, already displayed, vtkImageData* > > void MainWindow::updateImage(vtkSmartPointer newImage) { > image->ShallowCopy(newImage); > image->Modified(); > > qvtkWidget->GetRenderWindow()->Render(); > } > > however when i try to run this i get the error "vtkHedgeHog > (0xa3fc80): No vectors in input data" > > if i use a standart assignment (image = newImage) the display doesn't > change at all > > > > initial image is created here (image is a instance variable): > > void MainWindow::initializeImage() > { > unsigned int dim = 20; > > image->SetDimensions(dim, dim, 1); > image->SetSpacing(1.0, 1.0, 1.0); > image->SetOrigin(0.0, 0.0, 0.0); > > image->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(image->GetScalarPointer(x,y,0)); > pixel[0] = -1; > pixel[1] = 1; > pixel[2] = 0.0; > } > } > image->GetPointData()->SetActiveVectors("ImageScalars"); > image->Modified(); > } > > the new image is generated here: > > void MainWindow::on_actionTest_Update_triggered() > { > vtkSmartPointer newImage = > vtkSmartPointer::New(); > unsigned int dim = 30; > > newImage->SetDimensions(dim, dim, 1); > newImage->SetSpacing(1.0, 1.0, 1.0); > newImage->SetOrigin(0.0, 0.0, 0.0); > > newImage->AllocateScalars(VTK_DOUBLE,3); > > for(unsigned int x = 0; x < dim; x++) > { > for(unsigned int y = 0; y < dim; y++) > { > double* pixel = > static_cast(newImage->GetScalarPointer(x,y,0)); > pixel[0] = 1; > pixel[1] = 0.0; > pixel[2] = 0.0; > } > } > newImage->GetPointData()->SetActiveVectors("imageScalars"); > newImage->Modified(); > updateImage(newImage); > } > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 lonni.besancon at gmail.com Fri Oct 30 11:52:56 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 30 Oct 2015 08:52:56 -0700 (MST) Subject: [vtkusers] NativeVTK has stopped Message-ID: <1446220376267-5734724.post@n5.nabble.com> I'm trying to build on the example provided in the directory android example NativeVTK. I took the sample code provided and decided to modify it to simply include the vtkInteractorMultiTouchCamera. The compilation is ok, I can make and install my application without any error or warning. However when launching the application on a Nexus 10 tablet, it stops working. The error log I get with adb logcat is a bit long but I will provide it here after the code itself. I made sure before asking that the sample code provided in the example initially works without problem. Posting the code and the really big errors I get would be useless and un-readable on here. I made a Stack-Overflow post for an easier read through the code and the error. You can check it out here . Thanks in advance for the help. -- View this message in context: http://vtk.1045678.n5.nabble.com/NativeVTK-has-stopped-tp5734724.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Fri Oct 30 11:59:38 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 30 Oct 2015 11:59:38 -0400 Subject: [vtkusers] NativeVTK has stopped In-Reply-To: <1446220376267-5734724.post@n5.nabble.com> References: <1446220376267-5734724.post@n5.nabble.com> Message-ID: <33138a4e1f7165bb403b8d3c8ea41667@mail.gmail.com> Yes. Some android OpenGL implementations have an issue with the extension being after any non-preprocessor command, and some don't. If you switch to ES 30 then the issue should go away but I do need to fix it in VTK. I'll try to get a topic merged in the next day or two. Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Friday, October 30, 2015 11:53 AM To: vtkusers at vtk.org Subject: [vtkusers] NativeVTK has stopped I'm trying to build on the example provided in the directory android example NativeVTK. I took the sample code provided and decided to modify it to simply include the vtkInteractorMultiTouchCamera. The compilation is ok, I can make and install my application without any error or warning. However when launching the application on a Nexus 10 tablet, it stops working. The error log I get with adb logcat is a bit long but I will provide it here after the code itself. I made sure before asking that the sample code provided in the example initially works without problem. Posting the code and the really big errors I get would be useless and un-readable on here. I made a Stack-Overflow post for an easier read through the code and the error. You can check it out here . Thanks in advance for the help. -- View this message in context: http://vtk.1045678.n5.nabble.com/NativeVTK-has-stopped-tp5734724.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From cory.quammen at kitware.com Fri Oct 30 12:10:26 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 30 Oct 2015 12:10:26 -0400 Subject: [vtkusers] =?utf-8?q?SystemTools=2Ecxx=3A326=3A51=3A_error=3A_?= =?utf-8?q?=E2=80=98realpath=E2=80=99_was_not_declared_in_this_scop?= =?utf-8?q?e?= In-Reply-To: References: Message-ID: Hi Andy, I don't know if cygwin is officially supported anymore. VTK isn't being tested against cygwin on a regular basis. Perhaps this page will help: http://hvrl.ics.keio.ac.jp/kimura/vtk/vtk-6.3.0.html. Cory On Fri, Oct 30, 2015 at 10:12 AM, Andrew J. Buckler (Elucid Bioimaging) < andrew.buckler at elucidbio.com> wrote: > Hello, > > I am building VTK on Windows with Cygwin. I am trying to make the use of > cmake and the build process as similar to Mac as possible; I already have > it working there. The cmake configuration works fine, but the build fails: > > $ make > > Scanning dependencies of target VTKData > > [ 0%] Built target VTKData > > Scanning dependencies of target vtksys > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/ProcessUNIX.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Base64.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingC.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/MD5.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/System.c.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/DynamicLoader.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingCXX.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Glob.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/RegularExpression.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > function ?void Realpath(const string&, std::string&, std::string*)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:326:51: > error: ?realpath? was not declared in this scope > > char *ret = realpath(path.c_str(), resolved_name); > > ^ > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > function ?int vtksys::kwsysUnPutEnv(const string&)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:518:16: > error: ?putenv? was not declared in this scope > > if(putenv(buf) < 0 && errno != EINVAL) > > ^ > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > member function ?bool vtksys::kwsysEnv::Put(const char*)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:658:25: > error: ?putenv? was not declared in this scope > > return putenv(newEnv) == 0; > > ^ > > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/build.make:302: recipe for > target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o' > failed > > make[2]: *** > [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o] Error 1 > > CMakeFiles/Makefile2:193: recipe for target > 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed > > make[1]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2 > > Makefile:127: recipe for target 'all' failed > > make: *** [all] Error 2 > > > > Any help? > > > > Best regards, > > *Andy* > > ------------------------------------- > > *Andrew J. Buckler*, President and CEO > > *Elucid Bioimaging Inc.* > > 225 Main Street, Suite 15 | Wenham, MA 01984 USA > > Office: +1-978-468-0508 > > Mobile: +1-978-473-1986 > > Fax: +1-978-468-0527 > > andrew.buckler at elucidbio.com | www.elucidbio.com > > > > This e-mail is from Elucid Bioimaging Inc., a product development and > contract research company, and may contain information that is confidential > or privileged. If you are not the intended recipient, do not read, copy or > distribute the e-mail or any attachments. Instead, please notify the sender > and delete the e-mail and any attachments. 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Fri Oct 30 12:10:38 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 30 Oct 2015 09:10:38 -0700 (MST) Subject: [vtkusers] NativeVTK has stopped In-Reply-To: <33138a4e1f7165bb403b8d3c8ea41667@mail.gmail.com> References: <1446220376267-5734724.post@n5.nabble.com> <33138a4e1f7165bb403b8d3c8ea41667@mail.gmail.com> Message-ID: <1446221438939-5734726.post@n5.nabble.com> Works like a charm. I've been banging my head on this for hours now. Can't believe you solved it that fast. Perhaps you'd like to answer the post on SO too to get extra rep reward :). -- View this message in context: http://vtk.1045678.n5.nabble.com/NativeVTK-has-stopped-tp5734724p5734726.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Fri Oct 30 12:11:25 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 30 Oct 2015 12:11:25 -0400 Subject: [vtkusers] [vtk-developers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget In-Reply-To: References: <7400ebc5bb7ddfd554fea3bf09cb59be@mail.gmail.com> Message-ID: <1894f63c6bdcbf91256b2e2f3ea4b6db@mail.gmail.com> I created a topic here and will try to get it merged soon - Ken https://gitlab.kitware.com/vtk/vtk/merge_requests/854 Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* sesneault at gmail.com [mailto:sesneault at gmail.com] *On Behalf Of *Simon ESNEAULT *Sent:* Friday, October 30, 2015 10:18 AM *To:* Ken Martin; vtkusers at vtk.org; VTK Developers *Subject:* Re: [vtk-developers] [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget Yes, the first patch was not working, but the second patch is ok, and the texture is correctly rendered ! Thanks a lot, will this patch be merged in the VTK 6.3.1 release ? Simon 2015-10-30 15:11 GMT+01:00 Ken Martin : I think there is an issue with the previous patch, try this patch instead if you can - Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* sesneault at gmail.com [mailto:sesneault at gmail.com] *On Behalf Of *Simon ESNEAULT *Sent:* Friday, October 30, 2015 9:48 AM *To:* Ken Martin *Cc:* vtkusers at vtk.org; VTK Developers *Subject:* Re: [vtk-developers] [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget Hello Ken, Thanks a lot for working on this issue, I'll try the patch and get back to you soon -Simon 2015-10-30 14:38 GMT+01:00 Ken Martin : Thanks Simon, could you check and see if the attached patch fixes your issue? Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf Of *Simon ESNEAULT *Sent:* Tuesday, October 27, 2015 1:52 PM *To:* vtkusers at vtk.org; VTK Developers *Subject:* [vtk-developers] [vtkusers] OpenGL2 - Broken vtkTexturedButtonRepresentation2D/vtkButtonWidget Hello All, Following our migration to the brand new OpenGL2 backend, the ButtonWidget seem's broken, the button display's a gray texture instead of an image with the new backend. This is visible in all our tested platform (Windows or OSX box) The following VTK wiki example reproduce the problem : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget OpenGL1 backend result : http://picpaste.com/pics/OGL1_1.1445968197.png OpenGL2 backend result : http://picpaste.com/pics/OGL2_1.1445968221.png Is it a known issue ? Any clue ? In our application we try to load a png image, but it always show a gray/white rectangle instead Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Fri Oct 30 13:38:22 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Fri, 30 Oct 2015 13:38:22 -0400 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> <56336F89.7030901@rhpcs.mcmaster.ca> Message-ID: <5633AB0E.4040700@rhpcs.mcmaster.ca> Have just tried it out --- It works great! Thanks, Lisa. Best, Weiguang On 30/10/2015 10:02 AM, Lisa Avila wrote: > Weiguang, > > That should work - if you run into issues let us know. > > Lisa > > > On Fri, Oct 30, 2015 at 9:24 AM, Weiguang guan > > wrote: > > Actually both. However, rendering disjoint volumes is most needed > in our application. I'll try the "back to front" rendering option. > Thanks. > > Best, > Weiguang > > > > On 29/10/2015 3:28 PM, Aashish Chaudhary wrote: >> On Thu, Oct 29, 2015 at 3:25 PM, Lisa Avila >> > wrote: >> >> Do you mean that the volumes overlap in 3D space, or just >> overlap in image space? If the volumes overlap in image space >> (two disjoint volumes where sometimes one is in front of the >> other) VTK does render this correctly (you need to turn back >> to front rendering on in the culler in the renderer). It is >> true that VTK does not correctly handle volumes that overlap >> in 3D space, unless they are aligned and part of the same >> volume (multiple components in one vtkImageData). >> >> >> My understanding (based on some previous emails) is that they >> overlap in 3D space. >> >> - Aashish >> >> >> >> Lisa >> >> >> On Thu, Oct 29, 2015 at 11:59 AM, Weiguang guan >> > wrote: >> >> There were a few posts in the past about this topic. The >> conclusion seemed to be that VTK didn't support >> multi-volume rendering in terms of proper visibility >> sorting/blending. I'm not sure it is still true. >> >> I've done a test where two partially overlapped volumes >> are used. I've found that only the texture mapping mapper >> can render them correctly. All the other mappers (GPU >> based or ray casting) always have one volume occlude the >> other one no matter what direction the camera is viewing. >> >> Is vtkImageOcclusionSpectrum designed for handling >> multiple volume rendering? Any comments will be >> appreciated. Thanks. >> >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 >> >> >> >> >> -- >> /| Aashish Chaudhary >> | Technical Leader >> | Kitware Inc. >> / >> /| http://www.kitware.com/company/team/chaudhary.html/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Fri Oct 30 15:57:01 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 30 Oct 2015 15:57:01 -0400 Subject: [vtkusers] The "View" coordinate Message-ID: The documentation here: From DLRdave at aol.com Fri Oct 30 16:14:13 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 30 Oct 2015 16:14:13 -0400 Subject: [vtkusers] The View coordinate system: meaning of the z value Message-ID: The documentation here: http://www.vtk.org/doc/nightly/html/classvtkCoordinate.html#details says: "VIEW - x-y-z (-1,1) values in camera coordinates. (z is depth)" I understand how to call WorldToView and ViewToWorld on a renderer to go back and forth between these coordinate systems, but I'm trying to understand what the math is for the z-value. What I think I'm seeing is the z value goes from 0 to 1 from the near clipping plane to the far clipping plane, but it does not appear to be exactly linear. It's nearly linear within the 0 to 1 range, but from -1 to 0, the view coordinates are much closer together in world space than they are from 0 to 1, and from 1 to 2, they are much farther apart in world space than the 0 to 1 range. What is the exact mathematical meaning of the z-value of the view coordinate system as it relates to distance in world coordinates? Are there any good articles or examples anybody can point to as a good tutorial on using View coordinates? My goal is to reflect and project some physically measured artifacts from the real world (in front of the screen), and have the reflection "look good". So I want to express the points involved in View coordinates, and then reflect /"adjust z" and then call ViewToWorld to get the right VTK world coords for these things... Thanks, David C. P.S. -- please forgive the previously prematurely sent nearly empty email... Definitely a PBKAC. From pedropaulobmjr at hotmail.com Fri Oct 30 16:16:09 2015 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Fri, 30 Oct 2015 20:16:09 +0000 Subject: [vtkusers] Show Dicom Image using PyQt4 Message-ID: Hello, recently I asked for help on using the VTK in Qt, but I'm having trouble because I do not know how to link the image that the VTK shown in PyQt, does anyone know how can I do this?Below are my programs: PyQt program obtained by pyuic4:from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) class Ui_Form(object): def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(292, 337) self.image_vtk = QVTKRenderWindowInteractor(Form) self.image_vtk.setGeometry(QtCore.QRect(0, 10, 291, 331)) self.image_vtk.setObjectName(_fromUtf8("image_vtk")) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): Form.setWindowTitle(_translate("Form", "Form", None)) from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor if __name__ == "__main__": import sys app = QtGui.QApplication(sys.argv) Form = QtGui.QWidget() ui = Ui_Form() ui.setupUi(Form) Form.show() sys.exit(app.exec_()) My test program to open the interface, but not knowing how to link the image:import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from xob import * class test(QWidget, Ui_Form): def __init__(self, parent=None): super(test, self).__init__(parent) self.setupUi(self) app = QApplication(sys.argv) dlg = test() dlg.show() app.exec_() Finally, the program using VTK opening DICOM image:import vtk def show_dicom_image(ndicom): reader = vtk.vtkDICOMImageReader() reader.SetFileName(ndicom) reader.Update() # Visualize imageViewer = vtk.vtkImageViewer() imageViewer.SetInputConnection(reader.GetOutputPort()) renderWindowInteractor = vtk.vtkRenderWindowInteractor() imageViewer.SetupInteractor(renderWindowInteractor) imageViewer.Render() imageViewer.GetRenderer().ResetCamera() imageViewer.Render() renderWindowInteractor.Start() show_dicom_image('image.dcm') -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Fri Oct 30 16:24:54 2015 From: dlrdave at aol.com (David Cole) Date: Fri, 30 Oct 2015 16:24:54 -0400 Subject: [vtkusers] The "View" coordinate In-Reply-To: References: Message-ID: <150ba6ca987-2d2a-d903@webprd-m34.mail.aol.com> Sorry about this prematurely sent email... The real question is here: http://public.kitware.com/pipermail/vtkusers/2015-October/092761.html Thanks, David C. -----Original Message----- From: David Cole via vtkusers To: vtkusers Sent: Fri, Oct 30, 2015 3:57 pm Subject: [vtkusers] The "View" coordinate The documentation here: _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 Fri Oct 30 16:32:44 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 30 Oct 2015 14:32:44 -0600 Subject: [vtkusers] The View coordinate system: meaning of the z value In-Reply-To: References: Message-ID: Hi David, The following link has some info, but probably not the full answer: https://www.opengl.org/wiki/Depth_Buffer_Precision#Why_is_there_more_precision_at_the_front_of_the_depth_buffer.3F - David On Fri, Oct 30, 2015 at 2:14 PM, David Cole via vtkusers wrote: > The documentation here: > > http://www.vtk.org/doc/nightly/html/classvtkCoordinate.html#details > > says: > > "VIEW - x-y-z (-1,1) values in camera coordinates. (z is depth)" > > I understand how to call WorldToView and ViewToWorld on a renderer to > go back and forth between these coordinate systems, but I'm trying to > understand what the math is for the z-value. > > What I think I'm seeing is the z value goes from 0 to 1 from the near > clipping plane to the far clipping plane, but it does not appear to be > exactly linear. It's nearly linear within the 0 to 1 range, but from > -1 to 0, the view coordinates are much closer together in world space > than they are from 0 to 1, and from 1 to 2, they are much farther > apart in world space than the 0 to 1 range. > > What is the exact mathematical meaning of the z-value of the view > coordinate system as it relates to distance in world coordinates? > > Are there any good articles or examples anybody can point to as a good > tutorial on using View coordinates? > > My goal is to reflect and project some physically measured artifacts > from the real world (in front of the screen), and have the reflection > "look good". So I want to express the points involved in View > coordinates, and then reflect /"adjust z" and then call ViewToWorld to > get the right VTK world coords for these things... > > > Thanks, > David C. > > > P.S. -- please forgive the previously prematurely sent nearly empty > email... Definitely a PBKAC. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Fri Oct 30 17:03:59 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Fri, 30 Oct 2015 19:03:59 -0200 Subject: [vtkusers] Cmake Error on VTK Message-ID: Hi guys! I trying to compile my qtproject with vtk and the make returns this error: [ 16%] Building CXX object CMakeFiles/BRPrint.dir/KI/Arduino_Serial.cpp.o cc1plus: warning: /usr/local/lib/cmake/vtk-6.3/UseVTK.cmake: not a directory [ 20%] Building CXX object CMakeFiles/BRPrint.dir/KI/File_Queue.cpp.o cc1plus: warning: /usr/local/lib/cmake/vtk-6.3/UseVTK.cmake: not a directory [ 25%] Building CXX object CMakeFiles/BRPrint.dir/KI/Repetier.cpp.o cc1plus: warning: /usr/local/lib/cmake/vtk-6.3/UseVTK.cmake: not a directory [ 29%] Building CXX object CMakeFiles/BRPrint.dir/KI/StringRepetierOps.cpp.o cc1plus: warning: /usr/local/lib/cmake/vtk-6.3/UseVTK.cmake: not a directory [ 33%] Building CXX object CMakeFiles/BRPrint.dir/Windows/aboutbrprint.cpp.o cc1plus: warning: /usr/local/lib/cmake/vtk-6.3/UseVTK.cmake: not a directory In file included from /home/lays/Dropbox/Br-Print/Pandora/./brprint3d.h:14:0, from /home/lays/Dropbox/Br-Print/Pandora/Windows/aboutbrprint.cpp:4: /home/lays/Dropbox/Br-Print/Pandora/./vtkWidget.h:1:25: fatal error: QVTKWidget2.h: No such file or directory #include ^ compilation terminated. Whats wrong? My CmakeLists is like this: cmake_minimum_required(VERSION 3.0.0) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ") endif() find_package(VTK REQUIRED) find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) find_package(Qt5 REQUIRED COMPONENTS Core Widgets Test LinguistTools OpenGL) include_directories(. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${VTK_USE_FILE} KI Windows ) set(KI_SRCS KI/Arduino_Serial.cpp KI/File_Queue.cpp KI/Repetier.cpp KI/StringRepetierOps.cpp ) set(Widgets_SRCS Windows/aboutbrprint.cpp Windows/documentation.cpp Windows/help.cpp Windows/legalwarning.cpp Windows/loading.cpp Windows/warning.cpp ) set(Br-Print_SRCS arduinolistener.cpp brprint3d.cpp main.cpp points.cpp threadRotine.cpp vtkWidget.cpp ) #qt5_add_translation(TRANSLATIONS EN_english.ts PT_portuguese.ts) if(LINUX) install_files(TRANSLATIONS DESTINATION share/br-print/translations) add_custom_target(translations ALL DEPENDS ${TRANSLATIONS}) endif() qt5_add_resources(Resources # translations.qrc fonts.qrc images.qrc ) add_custom_target(resources ALL DEPENDS ${Resources}) #add_dependencies(resources translations) add_executable(BRPrint ${KI_SRCS} ${Widgets_SRCS} ${Br-Print_SRCS} ${Resources}) target_link_libraries(BRPrint Qt5::Core Qt5::Widgets Qt5::OpenGL pthread ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${VTK_LIBRARIES}) enable_testing() Any tips? Thanks! -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.buckler at elucidbio.com Fri Oct 30 18:29:39 2015 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Fri, 30 Oct 2015 22:29:39 +0000 Subject: [vtkusers] =?utf-8?q?SystemTools=2Ecxx=3A326=3A51=3A_error=3A_?= =?utf-8?q?=E2=80=98realpath=E2=80=99_was_not_declared_in_this_scope?= In-Reply-To: References: Message-ID: That did it, thank you! From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: Friday, October 30, 2015 12:10 PM To: Andrew J. Buckler (Elucid Bioimaging) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope Hi Andy, I don't know if cygwin is officially supported anymore. VTK isn't being tested against cygwin on a regular basis. Perhaps this page will help: http://hvrl.ics.keio.ac.jp/kimura/vtk/vtk-6.3.0.html. Cory On Fri, Oct 30, 2015 at 10:12 AM, Andrew J. Buckler (Elucid Bioimaging) > wrote: Hello, I am building VTK on Windows with Cygwin. I am trying to make the use of cmake and the build process as similar to Mac as possible; I already have it working there. The cmake configuration works fine, but the build fails: $ make Scanning dependencies of target VTKData [ 0%] Built target VTKData Scanning dependencies of target vtksys [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/ProcessUNIX.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Base64.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingC.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/MD5.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/System.c.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/DynamicLoader.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingCXX.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Glob.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/RegularExpression.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?void Realpath(const string&, std::string&, std::string*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope char *ret = realpath(path.c_str(), resolved_name); ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?int vtksys::kwsysUnPutEnv(const string&)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:518:16: error: ?putenv? was not declared in this scope if(putenv(buf) < 0 && errno != EINVAL) ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In member function ?bool vtksys::kwsysEnv::Put(const char*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:658:25: error: ?putenv? was not declared in this scope return putenv(newEnv) == 0; ^ Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/build.make:302: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o' failed make[2]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o] Error 1 CMakeFiles/Makefile2:193: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed make[1]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Any help? Best regards, Andy ------------------------------------- Andrew J. Buckler, President and CEO Elucid Bioimaging Inc. 225 Main Street, Suite 15 | Wenham, MA 01984 USA Office: +1-978-468-0508 Mobile: +1-978-473-1986 Fax: +1-978-468-0527 andrew.buckler at elucidbio.com | www.elucidbio.com This e-mail is from Elucid Bioimaging Inc., a product development and contract research company, and may contain information that is confidential or privileged. If you are not the intended recipient, do not read, copy or distribute the e-mail or any attachments. Instead, please notify the sender and delete the e-mail and any attachments. 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rax20037 at gmail.com Sat Oct 31 03:02:33 2015 From: rax20037 at gmail.com (Raul Gerardo Huertas Paiva) Date: Sat, 31 Oct 2015 02:02:33 -0500 Subject: [vtkusers] Animating vtkGlyph3D Message-ID: <6367FEB7-8F3C-4C66-AC4C-C5E2CF692CEA@gmail.com> My dear fellows. I?m trying to use an animation with vtkGlyph3DMapper but I?ve read somewhere VTK doesn?t handle animations very well. Anyway, I?m trying something. At the beginning of my code I?m using: points = vtkPoints::New(); points->SetNumberOfPoints(nPuntos); for(?){points->SetPoint(?)} ? glypher->Update(); And the view appears as expected. However, after moving an slide i?m changing a parameter of my visualization and I?m trying to update wth: for(?){points->SetPoint(?)} glypher->Update(); However, what I get in my view is the same. I can still interact with it but the position of the elements doesn?t change. Whats the correct way to update it? Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sat Oct 31 09:55:03 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sat, 31 Oct 2015 09:55:03 -0400 Subject: [vtkusers] Animating vtkGlyph3D In-Reply-To: <6367FEB7-8F3C-4C66-AC4C-C5E2CF692CEA@gmail.com> References: <6367FEB7-8F3C-4C66-AC4C-C5E2CF692CEA@gmail.com> Message-ID: Raul, Try calling the Modified() member function on your input to the vtkGlyph3DMapper. - Cory On Sat, Oct 31, 2015 at 3:02 AM, Raul Gerardo Huertas Paiva < rax20037 at gmail.com> wrote: > My dear fellows. I?m trying to use an animation with vtkGlyph3DMapper but > I?ve read somewhere VTK doesn?t handle animations very well. Anyway, I?m > trying something. > At the beginning of my code I?m using: > > points = vtkPoints::New(); > > points->SetNumberOfPoints(nPuntos); > > for(?){points->SetPoint(?)} > ? > > glypher->Update(); > > > > And the view appears as expected. However, after moving an slide i?m > changing a parameter of my visualization and I?m trying to update wth: > > for(?){points->SetPoint(?)} > > glypher->Update(); > > > > However, what I get in my view is the same. I can still interact with it > but the position of the elements doesn?t change. Whats the correct way to > update it? > > Thanks in advance! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.buckler at elucidbio.com Sat Oct 31 11:24:20 2015 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Sat, 31 Oct 2015 15:24:20 +0000 Subject: [vtkusers] =?utf-8?q?SystemTools=2Ecxx=3A326=3A51=3A_error=3A_?= =?utf-8?q?=E2=80=98realpath=E2=80=99_was_not_declared_in_this_scope?= References: Message-ID: Hello, I was able to build VTK, which is great, but now have the same problem with ITK. I did look at the VTK patch, to see if it could be applied to ITK as well, but it is more complex than I am conformable with. I did also do a web search, but do not find anything obvious. Cory or others, is there another patch or approach for ITK? Thank you, Andy From: Andrew J. Buckler (Elucid Bioimaging) Sent: Friday, October 30, 2015 6:30 PM To: 'Cory Quammen' Cc: vtkusers at vtk.org Subject: RE: [vtkusers] SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope That did it, thank you! From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: Friday, October 30, 2015 12:10 PM To: Andrew J. Buckler (Elucid Bioimaging) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope Hi Andy, I don't know if cygwin is officially supported anymore. VTK isn't being tested against cygwin on a regular basis. Perhaps this page will help: http://hvrl.ics.keio.ac.jp/kimura/vtk/vtk-6.3.0.html. Cory On Fri, Oct 30, 2015 at 10:12 AM, Andrew J. Buckler (Elucid Bioimaging) > wrote: Hello, I am building VTK on Windows with Cygwin. I am trying to make the use of cmake and the build process as similar to Mac as possible; I already have it working there. The cmake configuration works fine, but the build fails: $ make Scanning dependencies of target VTKData [ 0%] Built target VTKData Scanning dependencies of target vtksys [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/ProcessUNIX.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Base64.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingC.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/MD5.c.o [ 0%] Building C object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/System.c.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/DynamicLoader.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingCXX.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Glob.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/RegularExpression.cxx.o [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?void Realpath(const string&, std::string&, std::string*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:326:51: error: ?realpath? was not declared in this scope char *ret = realpath(path.c_str(), resolved_name); ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In function ?int vtksys::kwsysUnPutEnv(const string&)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:518:16: error: ?putenv? was not declared in this scope if(putenv(buf) < 0 && errno != EINVAL) ^ /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In member function ?bool vtksys::kwsysEnv::Put(const char*)?: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:658:25: error: ?putenv? was not declared in this scope return putenv(newEnv) == 0; ^ Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/build.make:302: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o' failed make[2]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o] Error 1 CMakeFiles/Makefile2:193: recipe for target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed make[1]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Any help? Best regards, Andy ------------------------------------- Andrew J. Buckler, President and CEO Elucid Bioimaging Inc. 225 Main Street, Suite 15 | Wenham, MA 01984 USA Office: +1-978-468-0508 Mobile: +1-978-473-1986 Fax: +1-978-468-0527 andrew.buckler at elucidbio.com | www.elucidbio.com This e-mail is from Elucid Bioimaging Inc., a product development and contract research company, and may contain information that is confidential or privileged. If you are not the intended recipient, do not read, copy or distribute the e-mail or any attachments. Instead, please notify the sender and delete the e-mail and any attachments. 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 R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sat Oct 31 11:27:17 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sat, 31 Oct 2015 11:27:17 -0400 Subject: [vtkusers] =?utf-8?q?SystemTools=2Ecxx=3A326=3A51=3A_error=3A_?= =?utf-8?q?=E2=80=98realpath=E2=80=99_was_not_declared_in_this_scop?= =?utf-8?q?e?= In-Reply-To: References: Message-ID: Andy, Glad to hear you got it to work. You may want to ask the ITK mailing list [1] for help building ITK. - Cory [1] http://www.itk.org/ITK/help/mailing.html On Sat, Oct 31, 2015 at 11:24 AM, Andrew J. Buckler (Elucid Bioimaging) < andrew.buckler at elucidbio.com> wrote: > Hello, > > I was able to build VTK, which is great, but now have the same problem > with ITK. I did look at the VTK patch, to see if it could be applied to > ITK as well, but it is more complex than I am conformable with. I did also > do a web search, but do not find anything obvious. Cory or others, is > there another patch or approach for ITK? > > > > Thank you, > > Andy > > > > *From:* Andrew J. Buckler (Elucid Bioimaging) > *Sent:* Friday, October 30, 2015 6:30 PM > *To:* 'Cory Quammen' > *Cc:* vtkusers at vtk.org > *Subject:* RE: [vtkusers] SystemTools.cxx:326:51: error: ?realpath? was > not declared in this scope > > > > That did it, thank you! > > > > *From:* Cory Quammen [mailto:cory.quammen at kitware.com > ] > *Sent:* Friday, October 30, 2015 12:10 PM > *To:* Andrew J. Buckler (Elucid Bioimaging) > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] SystemTools.cxx:326:51: error: ?realpath? was > not declared in this scope > > > > Hi Andy, > > > > I don't know if cygwin is officially supported anymore. VTK isn't being > tested against cygwin on a regular basis. > > > > Perhaps this page will help: > > > > http://hvrl.ics.keio.ac.jp/kimura/vtk/vtk-6.3.0.html. > > > > Cory > > > > On Fri, Oct 30, 2015 at 10:12 AM, Andrew J. Buckler (Elucid Bioimaging) < > andrew.buckler at elucidbio.com> wrote: > > Hello, > > I am building VTK on Windows with Cygwin. I am trying to make the use of > cmake and the build process as similar to Mac as possible; I already have > it working there. The cmake configuration works fine, but the build fails: > > $ make > > Scanning dependencies of target VTKData > > [ 0%] Built target VTKData > > Scanning dependencies of target vtksys > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/ProcessUNIX.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Base64.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingC.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/MD5.c.o > > [ 0%] Building C object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/System.c.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/DynamicLoader.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/EncodingCXX.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Glob.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/RegularExpression.cxx.o > > [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > function ?void Realpath(const string&, std::string&, std::string*)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:326:51: > error: ?realpath? was not declared in this scope > > char *ret = realpath(path.c_str(), resolved_name); > > ^ > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > function ?int vtksys::kwsysUnPutEnv(const string&)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:518:16: > error: ?putenv? was not declared in this scope > > if(putenv(buf) < 0 && errno != EINVAL) > > ^ > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx: In > member function ?bool vtksys::kwsysEnv::Put(const char*)?: > > /cygdrive/c/Users/Andrew Buckler/My > Documents/projects/VTK-6.3.0/Utilities/KWSys/vtksys/SystemTools.cxx:658:25: > error: ?putenv? was not declared in this scope > > return putenv(newEnv) == 0; > > ^ > > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/build.make:302: recipe for > target 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o' > failed > > make[2]: *** > [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.o] Error 1 > > CMakeFiles/Makefile2:193: recipe for target > 'Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all' failed > > make[1]: *** [Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2 > > Makefile:127: recipe for target 'all' failed > > make: *** [all] Error 2 > > > > Any help? > > > > Best regards, > > *Andy* > > ------------------------------------- > > *Andrew J. Buckler*, President and CEO > > *Elucid Bioimaging Inc.* > > 225 Main Street, Suite 15 | Wenham, MA 01984 USA > > Office: +1-978-468-0508 > > Mobile: +1-978-473-1986 > > Fax: +1-978-468-0527 > > andrew.buckler at elucidbio.com | www.elucidbio.com > > > > This e-mail is from Elucid Bioimaging Inc., a product development and > contract research company, and may contain information that is confidential > or privileged. If you are not the intended recipient, do not read, copy or > distribute the e-mail or any attachments. Instead, please notify the sender > and delete the e-mail and any attachments. 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 > R&D Engineer > Kitware, Inc. > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rax20037 at gmail.com Sat Oct 31 11:56:36 2015 From: rax20037 at gmail.com (Raul Huertas) Date: Sat, 31 Oct 2015 10:56:36 -0500 Subject: [vtkusers] Animating vtkGlyph3D In-Reply-To: References: <6367FEB7-8F3C-4C66-AC4C-C5E2CF692CEA@gmail.com> Message-ID: That worked! Thank you so much! > El 31 oct. 2015, a las 8:55 a.m., Cory Quammen escribi?: > > Raul, > > Try calling the Modified() member function on your input to the vtkGlyph3DMapper. > > - Cory > >> On Sat, Oct 31, 2015 at 3:02 AM, Raul Gerardo Huertas Paiva wrote: >> My dear fellows. I?m trying to use an animation with vtkGlyph3DMapper but I?ve read somewhere VTK doesn?t handle animations very well. Anyway, I?m trying something. >> At the beginning of my code I?m using: >> points = vtkPoints::New(); >> points->SetNumberOfPoints(nPuntos); >> for(?){points->SetPoint(?)} >> ? >> glypher->Update(); >> >> >> And the view appears as expected. However, after moving an slide i?m changing a parameter of my visualization and I?m trying to update wth: >> >> for(?){points->SetPoint(?)} >> glypher->Update(); >> >> >> However, what I get in my view is the same. I can still interact with it but the position of the elements doesn?t change. Whats the correct way to update it? >> >> Thanks in advance! >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Sat Oct 31 16:12:26 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Sat, 31 Oct 2015 18:12:26 -0200 Subject: [vtkusers] Read STL File QVTKWidget vs QVTKWidget2 Message-ID: Hi guys, Yestarday i was able to get the code ReadSTL from VTK Wiki and convert to use in my QtApp using QVTKWidget. But, this class is depreciade. So i'm trying to use the QVTKWidget2. Was told to me that i only need to this to make the code fom VTK Wiki works on my code: vtkRenderWindow* renderWindow = this->GetRenderWindow(); Using the class QVTKWidget the return of GetRenderWindow is the type vtkRenderWindow, so its easy to solve. But in the QVTKWidget2, the return type of the function is a vtkGenericOpenGLRenderWindow, so with a little help for other guy i came to this: vtkSmartPointer renderer = vtkSmartPointer::New(); vtkRenderWindowInteractor *r = this->GetRenderWindow()->GetInteractor(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); r->SetRenderWindow(renderWindow); renderWindow->AddRenderer(renderer); renderer->AddActor(actor); renderer->SetBackground(.0, .5, 1); // Background color green renderer->ResetCamera(); renderWindow->Render(); BUT, the stl is load on a popup window, and dont permit zoom or move the load model . I guess that i'm missing something. But how i have only 2 days working with VTK, i dont know. I think that is something small and stupid, but i can be wrong too. Any tips? Thanks! ? -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From gilad.arnon at massivit.com Sat Oct 31 17:55:36 2015 From: gilad.arnon at massivit.com (Gilad Arnon) Date: Sat, 31 Oct 2015 23:55:36 +0200 Subject: [vtkusers] QVTKInteractor & VTK widgets Message-ID: Hi all, I'm trying to add some 2D widgets to my QVTKWidget. but I don't see them for example, vtkAffineWidget or vtkButtonWidget when I do this without QT, it works fine after I write: renderWindowInteractor->Start(); but in QT I can't write it (gives an error, that the interactor can't control the event loop in QT program). So, how can I get this widgets to work? (for some reason, 3D widgets, like vtkOrientationMarkerWidget and vtkBoxWidget forks fine) thanks, *Gilad* -------------- next part -------------- An HTML attachment was scrubbed... URL: From rax20037 at gmail.com Sat Oct 31 18:17:43 2015 From: rax20037 at gmail.com (Raul Gerardo Huertas Paiva) Date: Sat, 31 Oct 2015 17:17:43 -0500 Subject: [vtkusers] vtkGlyph3DMapper wit different vector for position, scale Message-ID: Hello! Where can i find sample code to use vtkGlyph3DMapper with different vectors for position, scale, color and orientation?. I?m trying the OpenGL2 renderer but I can?t find examples even for the old renderer. I already have it working with a set of vtkPoints for the positions, but I need help with the next step. Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: